From 2c82f972bf4fa0c9b6ab8b9895033e496af5ea7e Mon Sep 17 00:00:00 2001 From: Dita Aji Pratama Date: Thu, 18 Jun 2026 14:02:11 +0700 Subject: [PATCH] Fixing UI bug for a new session --- tui/app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tui/app.py b/tui/app.py index 24467b9..f44510b 100644 --- a/tui/app.py +++ b/tui/app.py @@ -51,8 +51,7 @@ class HendrikTUI: } def new_session(self): - name = f"Session {datetime.now().strftime('%Y-%m-%d %H:%M')}" - self.current_session = self.session_mgr.create(name, self._model_info()) + self.current_session = None self.messages = [{"role": "system", "content": self.build_system_prompt( tools_definition=self.tools_def, character=config.AGENT_CHARACTER or None, @@ -60,6 +59,9 @@ class HendrikTUI: )}] self.log.clear() self.scroll = 0 + self.input_buffer = [""] + self.input_line = 0 + self.input_col = 0 log(self, "welcome", WELCOME_ART) def switch_session(self, doc_id: int):