| # ui/chat/panel.py | |
| import gradio as gr | |
| class SidebarChatInterface(gr.ChatInterface): | |
| def __init__( | |
| self, | |
| fn, | |
| *, | |
| history_container: gr.Column | None = None, | |
| **kwargs, | |
| ): | |
| self._history_container = history_container | |
| kwargs.setdefault("save_history", True) | |
| super().__init__(fn, **kwargs) | |
| def _render_history_area(self): | |
| if self._history_container is not None: | |
| with self._history_container: | |
| super()._render_history_area() | |
| return | |
| super()._render_history_area() | |