Enha: tool role index for shellmode

This commit is contained in:
Grail Finder
2026-02-27 08:07:55 +03:00
parent a0ff384b81
commit 0d94734090
3 changed files with 6 additions and 97 deletions

View File

@@ -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