MCPcopy Create free account
hub / github.com/cli/cli / startSearch

Method startSearch

internal/prompter/multi_select_with_search.go:115–124  ·  view source on GitHub ↗

startSearch launches an async search and returns a tea.Cmd that will deliver the result via msSearchResultMsg.

(query string)

Source from the content-addressed store, hash-verified

113// startSearch launches an async search and returns a tea.Cmd that will
114// deliver the result via msSearchResultMsg.
115func (m *multiSelectSearchField) startSearch(query string) tea.Cmd {
116 m.loading = true
117 searchFunc := m.searchFunc
118 return tea.Batch(
119 func() tea.Msg {
120 return msSearchResultMsg{query: query, result: searchFunc(query)}
121 },
122 m.spinner.Tick,
123 )
124}
125
126// applySearchResult processes a completed search and rebuilds the option list.
127func (m *multiSelectSearchField) applySearchResult(query string, result MultiSelectSearchResult) {

Callers 1

updateSearchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected