borderless / ui /chat /panel.py
spagestic's picture
The UI folder restructured
f793029
Raw
History Blame Contribute Delete
614 Bytes
# 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()