From 0d947340904db30b3dce36f5ebd5230057da9f18 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Fri, 27 Feb 2026 08:07:55 +0300 Subject: Enha: tool role index for shellmode --- helpfuncs.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'helpfuncs.go') diff --git a/helpfuncs.go b/helpfuncs.go index 7b1cec9..55b3353 100644 --- a/helpfuncs.go +++ b/helpfuncs.go @@ -452,11 +452,12 @@ func updateFlexLayout() { } // Keep focus on currently focused widget focused := app.GetFocus() - if focused == textView { + switch { + case focused == textView: app.SetFocus(textView) - } else if shellMode { + case shellMode: app.SetFocus(shellInput) - } else { + default: app.SetFocus(textArea) } } @@ -483,7 +484,8 @@ func executeCommandAndDisplay(cmdText string) { // Execute the command and get output output, err := cmd.CombinedOutput() // Add the command being executed to the chat - fmt.Fprintf(textView, "\n[yellow]$ %s[-:-:-]\n", cmdText) + fmt.Fprintf(textView, "\n[-:-:b](%d) <%s>: [-:-:-]\n$ %s\n", + len(chatBody.Messages), cfg.ToolRole, cmdText) var outputContent string if err != nil { // Include both output and error -- cgit v1.2.3