diff options
| author | Grail Finder <wohilas@gmail.com> | 2026-02-27 08:07:55 +0300 |
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2026-02-27 08:07:55 +0300 |
| commit | 0d947340904db30b3dce36f5ebd5230057da9f18 (patch) | |
| tree | ba75552a324fb393ab46556d51770e9bad6897fc /helpfuncs.go | |
| parent | a0ff384b815f525bf15e6928e9a00b7019156e41 (diff) | |
Enha: tool role index for shellmode
Diffstat (limited to 'helpfuncs.go')
| -rw-r--r-- | helpfuncs.go | 10 |
1 files changed, 6 insertions, 4 deletions
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 |
