MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / runMultiSelect

Function runMultiSelect

internal/cli/multiselect.go:230–242  ·  view source on GitHub ↗

runMultiSelect runs a bubbletea multi-select picker and returns the selected labels. Returns nil if the user aborted.

(title string, items []multiSelectItem)

Source from the content-addressed store, hash-verified

228// runMultiSelect runs a bubbletea multi-select picker and returns the
229// selected labels. Returns nil if the user aborted.
230func runMultiSelect(title string, items []multiSelectItem) ([]string, error) {
231 model := newMultiSelectModel(title, items)
232 p := tea.NewProgram(model)
233 final, err := p.Run()
234 if err != nil {
235 return nil, err
236 }
237 result := final.(multiSelectModel)
238 if result.aborted {
239 return nil, nil
240 }
241 return result.selectedLabels(), nil
242}

Callers 4

interactiveSelectItemsFunction · 0.85
promptSearchInstallFunction · 0.85
promptSelectAppFunction · 0.85
interactiveUninstallFunction · 0.85

Calls 3

newMultiSelectModelFunction · 0.85
selectedLabelsMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected