From c43af62dc41099d2b31e56deb20e3c81c4f97855 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Fri, 26 Dec 2025 22:05:19 +0300 Subject: Feat: alt+3 to start new chat with the summary of old one --- tui.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tui.go') diff --git a/tui.go b/tui.go index 581ae4f..e6be85b 100644 --- a/tui.go +++ b/tui.go @@ -91,6 +91,7 @@ var ( [yellow]Alt+1[white]: toggle shell mode (execute commands locally) [yellow]Alt+4[white]: edit msg role [yellow]Alt+5[white]: toggle system and tool messages display +[yellow]Alt+3[white]: summarize chat history and start new chat with summary as tool response [yellow]Alt+6[white]: toggle status line visibility [yellow]Alt+9[white]: warm up (load) selected llama.cpp model @@ -779,6 +780,10 @@ func init() { textView.SetText(chatToText(cfg.ShowSys)) colorText() } + if event.Key() == tcell.KeyRune && event.Rune() == '3' && event.Modifiers()&tcell.ModAlt != 0 { + go summarizeAndStartNewChat() + return nil + } if event.Key() == tcell.KeyRune && event.Rune() == '6' && event.Modifiers()&tcell.ModAlt != 0 { // toggle status line visibility if name, _ := pages.GetFrontPage(); name != "main" { @@ -826,7 +831,7 @@ func init() { // there is no case where user msg is regenerated // lastRole := chatBody.Messages[len(chatBody.Messages)-1].Role textView.SetText(chatToText(cfg.ShowSys)) - go chatRound("", cfg.UserRole, textView, true, false) + go chatRound("", cfg.UserRole, textView, true, false, false) return nil } if event.Key() == tcell.KeyF3 && !botRespMode { @@ -1129,7 +1134,7 @@ func init() { // INFO: continue bot/text message // without new role lastRole := chatBody.Messages[len(chatBody.Messages)-1].Role - go chatRound("", lastRole, textView, false, true) + go chatRound("", lastRole, textView, false, true, false) return nil } if event.Key() == tcell.KeyCtrlQ { @@ -1289,7 +1294,7 @@ func init() { textView.ScrollToEnd() colorText() } - go chatRound(msgText, persona, textView, false, false) + go chatRound(msgText, persona, textView, false, false, false) // Also clear any image attachment after sending the message go func() { // Wait a short moment for the message to be processed, then clear the image attachment -- cgit v1.2.3 From af2684664725f3e5da79d1d53e714b48e430e6fb Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sat, 27 Dec 2025 11:10:03 +0300 Subject: Enha: summary agent --- tui.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tui.go') diff --git a/tui.go b/tui.go index e6be85b..31e0f25 100644 --- a/tui.go +++ b/tui.go @@ -831,7 +831,7 @@ func init() { // there is no case where user msg is regenerated // lastRole := chatBody.Messages[len(chatBody.Messages)-1].Role textView.SetText(chatToText(cfg.ShowSys)) - go chatRound("", cfg.UserRole, textView, true, false, false) + go chatRound("", cfg.UserRole, textView, true, false) return nil } if event.Key() == tcell.KeyF3 && !botRespMode { @@ -1134,7 +1134,7 @@ func init() { // INFO: continue bot/text message // without new role lastRole := chatBody.Messages[len(chatBody.Messages)-1].Role - go chatRound("", lastRole, textView, false, true, false) + go chatRound("", lastRole, textView, false, true) return nil } if event.Key() == tcell.KeyCtrlQ { @@ -1294,7 +1294,7 @@ func init() { textView.ScrollToEnd() colorText() } - go chatRound(msgText, persona, textView, false, false, false) + go chatRound(msgText, persona, textView, false, false) // Also clear any image attachment after sending the message go func() { // Wait a short moment for the message to be processed, then clear the image attachment -- cgit v1.2.3 From 99151672d48a419df175655cee167d8df46ee821 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sat, 27 Dec 2025 19:57:03 +0300 Subject: Chore: alt order --- tui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tui.go') diff --git a/tui.go b/tui.go index 31e0f25..9b94062 100644 --- a/tui.go +++ b/tui.go @@ -89,9 +89,9 @@ var ( [yellow]Ctrl+q[white]: cycle through mentioned chars in chat, to pick persona to send next msg as [yellow]Ctrl+x[white]: cycle through mentioned chars in chat, to pick persona to send next msg as (for llm) [yellow]Alt+1[white]: toggle shell mode (execute commands locally) +[yellow]Alt+3[white]: summarize chat history and start new chat with summary as tool response [yellow]Alt+4[white]: edit msg role [yellow]Alt+5[white]: toggle system and tool messages display -[yellow]Alt+3[white]: summarize chat history and start new chat with summary as tool response [yellow]Alt+6[white]: toggle status line visibility [yellow]Alt+9[white]: warm up (load) selected llama.cpp model -- cgit v1.2.3