diff options
| author | Grail Finder <wohilas@gmail.com> | 2026-02-27 18:45:59 +0300 |
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2026-02-27 18:45:59 +0300 |
| commit | 1fcab8365e8bdcf5658bfa601916e074a39a71e7 (patch) | |
| tree | 0aba354dacc0abd1d20350cff7180f39aea96d32 /tui.go | |
| parent | c855c30ae2f0b5fb272ba08826dc3d79f9487c80 (diff) | |
Enha: tool filter
Diffstat (limited to 'tui.go')
| -rw-r--r-- | tui.go | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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 <think> 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 |
