on main help sign in
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

commit697fad9548abd5bf9f842896469de6119e7b401d authorhuaiyuWangh <34158348+huaiyuWangh@users.noreply.github.com> dateWed 25 Mar 2026, 22:09 (7 months ago) parent0e3d472
2 files changed+5−1
internal/ui/dialog/commands.go+1−1 internal/ui/model/ui.go+4
internal/ui/dialog/commands.go+1−1
@@ -464,7 +464,7 @@ func (c *Commands) defaultCommands() []*CommandItem {
464464 model := cfgPrime.GetModelByType(agentCfg.Model)
465465 if model != nil && model.SupportsImages {
466466 commands = append(commands, NewCommandItem(c.com.Styles, "file_picker", "Open File Picker", "ctrl+f", ActionOpenDialog{
467− // TODO: Pass in the file picker dialog id
467+ DialogID: FilePickerID,
468468 }))
469469 }
470470 }
internal/ui/model/ui.go+4
@@ -2949,6 +2949,10 @@ func (m *UI) openDialog(id string) tea.Cmd {
29492949 if cmd := m.openReasoningDialog(); cmd != nil {
29502950 cmds = append(cmds, cmd)
29512951 }
2952+ case dialog.FilePickerID:
2953+ if cmd := m.openFilesDialog(); cmd != nil {
2954+ cmds = append(cmds, cmd)
2955+ }
29522956 case dialog.QuitID:
29532957 if cmd := m.openQuitDialog(); cmd != nil {
29542958 cmds = append(cmds, cmd)