MCPcopy
hub / github.com/cli/cli / startSearch

Method startSearch

internal/prompter/multi_select_with_search.go:107–116  ·  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

105// startSearch launches an async search and returns a tea.Cmd that will
106// deliver the result via msSearchResultMsg.
107func (m *multiSelectSearchField) startSearch(query string) tea.Cmd {
108 m.loading = true
109 searchFunc := m.searchFunc
110 return tea.Batch(
111 func() tea.Msg {
112 return msSearchResultMsg{query: query, result: searchFunc(query)}
113 },
114 m.spinner.Tick,
115 )
116}
117
118// applySearchResult processes a completed search and rebuilds the option list.
119func (m *multiSelectSearchField) applySearchResult(query string, result MultiSelectSearchResult) {

Callers 1

updateSearchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected