From 1fcab8365e8bdcf5658bfa601916e074a39a71e7 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Fri, 27 Feb 2026 18:45:59 +0300 Subject: Enha: tool filter --- tui.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tui.go') diff --git a/tui.go b/tui.go index 05adf02..14ca1aa 100644 --- a/tui.go +++ b/tui.go @@ -99,6 +99,7 @@ var ( [yellow]Alt+8[white]: show char img or last picked img [yellow]Alt+9[white]: warm up (load) selected llama.cpp model [yellow]Alt+t[white]: toggle thinking blocks visibility (collapse/expand blocks) +[yellow]Ctrl+t[white]: toggle tool call/response visibility (collapse/expand tool calls and non-shell tool responses) [yellow]Alt+i[white]: show colorscheme selection popup === scrolling chat window (some keys similar to vim) === @@ -563,6 +564,20 @@ func init() { } return nil } + // Handle Ctrl+T to toggle tool call/response visibility + if event.Key() == tcell.KeyRune && event.Rune() == 't' && event.Modifiers()&tcell.ModCtrl != 0 { + toolCollapsed = !toolCollapsed + textView.SetText(chatToText(chatBody.Messages, cfg.ShowSys)) + colorText() + status := "expanded" + if toolCollapsed { + status = "collapsed" + } + if err := notifyUser("tools", "Tool calls/responses "+status); err != nil { + logger.Error("failed to send notification", "error", err) + } + return nil + } if event.Key() == tcell.KeyRune && event.Rune() == 'i' && event.Modifiers()&tcell.ModAlt != 0 { if isFullScreenPageActive() { return event -- cgit v1.2.3