diff options
Diffstat (limited to 'internal/tui')
| -rw-r--r-- | internal/tui/components/chat/editor.go | 5 | ||||
| -rw-r--r-- | internal/tui/tui.go | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/internal/tui/components/chat/editor.go b/internal/tui/components/chat/editor.go index dbaa05181..212ad5529 100644 --- a/internal/tui/components/chat/editor.go +++ b/internal/tui/components/chat/editor.go @@ -247,7 +247,8 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } // Handle history navigation with up/down arrow keys - if m.textarea.Focused() && key.Matches(msg, editorMaps.HistoryUp) { + // Only handle history navigation if the filepicker is not open + if m.textarea.Focused() && key.Matches(msg, editorMaps.HistoryUp) && !m.app.IsFilepickerOpen() { // Get the current line number currentLine := m.textarea.Line() @@ -267,7 +268,7 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } } - if m.textarea.Focused() && key.Matches(msg, editorMaps.HistoryDown) { + if m.textarea.Focused() && key.Matches(msg, editorMaps.HistoryDown) && !m.app.IsFilepickerOpen() { // Get the current line number and total lines currentLine := m.textarea.Line() value := m.textarea.Value() diff --git a/internal/tui/tui.go b/internal/tui/tui.go index 299c69793..56be04619 100644 --- a/internal/tui/tui.go +++ b/internal/tui/tui.go @@ -417,6 +417,7 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { if a.showFilepicker { a.showFilepicker = false a.filepicker.ToggleFilepicker(a.showFilepicker) + a.app.SetFilepickerOpen(a.showFilepicker) } if a.showModelDialog { a.showModelDialog = false @@ -539,6 +540,7 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { if a.showFilepicker { a.showFilepicker = false a.filepicker.ToggleFilepicker(a.showFilepicker) + a.app.SetFilepickerOpen(a.showFilepicker) return a, nil } if a.currentPage == page.LogsPage { @@ -571,6 +573,7 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { // Toggle filepicker a.showFilepicker = !a.showFilepicker a.filepicker.ToggleFilepicker(a.showFilepicker) + a.app.SetFilepickerOpen(a.showFilepicker) // Close other dialogs if opening filepicker if a.showFilepicker { |
