Fix: shellmode tab completion

This commit is contained in:
Grail Finder
2026-03-05 11:36:35 +03:00
parent 04f1fd464b
commit c65c11bcfb

4
tui.go
View File

@@ -273,7 +273,7 @@ func init() {
shellHistoryPos = -1 shellHistoryPos = -1
} }
// Handle Tab key for @ file completion // Handle Tab key for @ file completion
if event.Key() == tcell.KeyTab { if event.Key() == tcell.KeyTab && shellMode {
currentText := shellInput.GetText() currentText := shellInput.GetText()
atIndex := strings.LastIndex(currentText, "@") atIndex := strings.LastIndex(currentText, "@")
if atIndex >= 0 { if atIndex >= 0 {
@@ -1151,7 +1151,7 @@ func init() {
chatRoundChan <- &models.ChatRoundReq{Role: persona, UserMsg: msgText} chatRoundChan <- &models.ChatRoundReq{Role: persona, UserMsg: msgText}
return nil return nil
} }
if event.Key() == tcell.KeyTab { if event.Key() == tcell.KeyTab && !shellMode {
currentF := app.GetFocus() currentF := app.GetFocus()
if currentF == textArea { if currentF == textArea {
currentText := textArea.GetText() currentText := textArea.GetText()