From 697fad9548abd5bf9f842896469de6119e7b401d Mon Sep 17 00:00:00 2001 From: huaiyuWangh <34158348+huaiyuWangh@users.noreply.github.com> Date: Wed, 25 Mar 2026 22:09:23 +0800 Subject: [PATCH] fix: complete file picker dialog action (#2483) - Add DialogID field to file picker command in commands.go - Add FilePickerID case handler in openDialog function - Remove TODO comment and complete implementation --- internal/ui/dialog/commands.go | 2 +- internal/ui/model/ui.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/ui/dialog/commands.go b/internal/ui/dialog/commands.go index 18d6a7599f6d1cfe76830a675aaa6f5d771f9e51..4584804bd60e03746bc7379696442bcd74d41f2b 100644 --- a/internal/ui/dialog/commands.go +++ b/internal/ui/dialog/commands.go @@ -464,7 +464,7 @@ func (c *Commands) defaultCommands() []*CommandItem { model := cfgPrime.GetModelByType(agentCfg.Model) if model != nil && model.SupportsImages { commands = append(commands, NewCommandItem(c.com.Styles, "file_picker", "Open File Picker", "ctrl+f", ActionOpenDialog{ - // TODO: Pass in the file picker dialog id + DialogID: FilePickerID, })) } } diff --git a/internal/ui/model/ui.go b/internal/ui/model/ui.go index 89bf51254f860532bf9378be96751fe6706cde93..f8ec2d9e12abbe5a5fcc892e4d65a86124039113 100644 --- a/internal/ui/model/ui.go +++ b/internal/ui/model/ui.go @@ -2949,6 +2949,10 @@ func (m *UI) openDialog(id string) tea.Cmd { if cmd := m.openReasoningDialog(); cmd != nil { cmds = append(cmds, cmd) } + case dialog.FilePickerID: + if cmd := m.openFilesDialog(); cmd != nil { + cmds = append(cmds, cmd) + } case dialog.QuitID: if cmd := m.openQuitDialog(); cmd != nil { cmds = append(cmds, cmd)