on main help sign in
fix: complete file picker dialog action (#2483)
697fad9huaiyuWangh
internal/ui/dialog/commands.go+1−1
@@ -464,7 +464,7 @@ func (c *Commands) defaultCommands() []*CommandItem {
464 model := cfgPrime.GetModelByType(agentCfg.Model)
464 model := cfgPrime.GetModelByType(agentCfg.Model)
465 if model != nil && model.SupportsImages {
465 if model != nil && model.SupportsImages {
466 commands = append(commands, NewCommandItem(c.com.Styles, "file_picker", "Open File Picker", "ctrl+f", ActionOpenDialog{
466 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,
468 }))
468 }))
469 }
469 }
470 }
470 }
internal/ui/model/ui.go+4
@@ -2949,6 +2949,10 @@ func (m *UI) openDialog(id string) tea.Cmd {
2949 if cmd := m.openReasoningDialog(); cmd != nil {
2949 if cmd := m.openReasoningDialog(); cmd != nil {
2950 cmds = append(cmds, cmd)
2950 cmds = append(cmds, cmd)
2951 }
2951 }
2952+ case dialog.FilePickerID:
2953+ if cmd := m.openFilesDialog(); cmd != nil {
2954+ cmds = append(cmds, cmd)
2955+ }
2952 case dialog.QuitID:
2956 case dialog.QuitID:
2953 if cmd := m.openQuitDialog(); cmd != nil {
2957 if cmd := m.openQuitDialog(); cmd != nil {
2954 cmds = append(cmds, cmd)
2958 cmds = append(cmds, cmd)