Fix for chat sidebars toggle buttons disappearing (#7106)

This commit is contained in:
Philipp Claßen 2025-07-07 01:51:42 +02:00 committed by GitHub
parent 8df1127ce2
commit 959d4ddb91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View file

@ -27,9 +27,7 @@ document.querySelector(".header_bar").addEventListener("click", function(event)
this.style.marginBottom = chatVisible ? "0px" : "19px"; this.style.marginBottom = chatVisible ? "0px" : "19px";
if (chatVisible && !showControlsChecked) { if (chatVisible && !showControlsChecked) {
document.querySelectorAll( document.querySelectorAll("#extensions").forEach(element => {
"#chat-tab > div > :nth-child(1), #chat-tab > div > :nth-child(3), #chat-tab > div > :nth-child(4), #extensions"
).forEach(element => {
element.style.display = "none"; element.style.display = "none";
}); });
} }

View file

@ -21,7 +21,7 @@ def create_ui():
shared.gradio['history'] = gr.State({'internal': [], 'visible': [], 'metadata': {}}) shared.gradio['history'] = gr.State({'internal': [], 'visible': [], 'metadata': {}})
shared.gradio['display'] = gr.JSON(value={}, visible=False) # Hidden buffer shared.gradio['display'] = gr.JSON(value={}, visible=False) # Hidden buffer
with gr.Tab('Chat', id='Chat', elem_id='chat-tab'): with gr.Tab('Chat', elem_id='chat-tab'):
with gr.Row(elem_id='past-chats-row', elem_classes=['pretty_scrollbar']): with gr.Row(elem_id='past-chats-row', elem_classes=['pretty_scrollbar']):
with gr.Column(): with gr.Column():
with gr.Row(elem_id='past-chats-buttons'): with gr.Row(elem_id='past-chats-buttons'):