Enha: tabcompletion is back in textarea

This commit is contained in:
Grail Finder
2026-03-02 12:09:27 +03:00
parent 3389b1d83b
commit 07b06bb0d3
2 changed files with 72 additions and 0 deletions

12
tui.go
View File

@@ -1071,6 +1071,18 @@ func init() {
chatRoundChan <- &models.ChatRoundReq{Role: persona, UserMsg: msgText}
return nil
}
if event.Key() == tcell.KeyTab {
currentF := app.GetFocus()
if currentF == textArea {
currentText := textArea.GetText()
atIndex := strings.LastIndex(currentText, "@")
if atIndex >= 0 {
filter := currentText[atIndex+1:]
showTextAreaFileCompletionPopup(filter)
}
}
return nil
}
if event.Key() == tcell.KeyPgUp || event.Key() == tcell.KeyPgDn {
currentF := app.GetFocus()
app.SetFocus(focusSwitcher[currentF])