tweak: keep completion options open when trigger is still present (#789)

This commit is contained in:
Aiden Cline
2025-07-09 04:42:31 -05:00
committed by GitHub
parent 58b1c58bc5
commit 67765fa47c
2 changed files with 15 additions and 8 deletions

View File

@@ -202,7 +202,7 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
cmds = append(cmds, cmd)
// Set command provider for command completion
a.completions = dialog.NewCompletionDialogComponent(a.commandProvider)
a.completions = dialog.NewCompletionDialogComponent(a.commandProvider, "/")
updated, cmd = a.completions.Update(msg)
a.completions = updated.(dialog.CompletionDialog)
cmds = append(cmds, cmd)
@@ -221,7 +221,7 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
cmds = append(cmds, cmd)
// Set file provider for file completion
a.completions = dialog.NewCompletionDialogComponent(a.fileProvider)
a.completions = dialog.NewCompletionDialogComponent(a.fileProvider, "@")
updated, cmd = a.completions.Update(msg)
a.completions = updated.(dialog.CompletionDialog)
cmds = append(cmds, cmd)
@@ -1034,7 +1034,7 @@ func NewModel(app *app.App) tea.Model {
messages := chat.NewMessagesComponent(app)
editor := chat.NewEditorComponent(app)
completions := dialog.NewCompletionDialogComponent(commandProvider)
completions := dialog.NewCompletionDialogComponent(commandProvider, "/")
var leaderBinding *key.Binding
if app.Config.Keybinds.Leader != "" {