Feature Request
Description
When using CustomElement (or other elements) with display="side", the side panel automatically opens every time an element is added to a message. This can be disruptive UX when users have intentionally closed the panel and send another message — the panel reopens on each response.
Current Behavior
sources_element = cl.CustomElement(
name="Sources",
props={"items": sources},
display="side",
)
Every time a message with this element is sent, the side panel opens automatically, even if the user previously closed it.
Desired Behavior
Add an option to control whether the side panel auto-opens, for example:
sources_element = cl.CustomElement(
name="Sources",
props={"items": sources},
display="side",
auto_expand=False, # New parameter - default True to preserve current behavior
)
Or a config option in config.toml:
[UI]
auto_expand_side_elements = false
Use Case
In our chat application, we attach sources to every assistant response. Users who prefer to focus on the conversation find it annoying that the sources panel keeps reopening after each message, requiring them to close it repeatedly.
Environment
- Chainlit version: 2.11.1
- Python version: 3.12
Thank you!
Feature Request
Description
When using
CustomElement(or other elements) withdisplay="side", the side panel automatically opens every time an element is added to a message. This can be disruptive UX when users have intentionally closed the panel and send another message — the panel reopens on each response.Current Behavior
Every time a message with this element is sent, the side panel opens automatically, even if the user previously closed it.
Desired Behavior
Add an option to control whether the side panel auto-opens, for example:
Or a config option in
config.toml:Use Case
In our chat application, we attach sources to every assistant response. Users who prefer to focus on the conversation find it annoying that the sources panel keeps reopening after each message, requiring them to close it repeatedly.
Environment
Thank you!