MCPcopy Create free account
hub / github.com/OverloadBlitz/cloudcent-cli / HandleKey

Method HandleKey

internal/tui/views/pricing.go:202–225  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

200)
201
202func (v *PricingView) HandleKey(key string) PricingEvent {
203 if key == "f2" {
204 v.CommandBuilder = NewCommandBuilderState()
205 v.BuilderFocus = BuilderFocusField
206 v.SuggestionsCache = nil
207 v.SuggestionIndex = -1
208 v.SuggestionScroll = 0
209 v.FilterItems()
210 if v.ActiveSection == PricingSectionCommand {
211 v.UpdateSuggestions()
212 }
213 return PricingEventNone
214 }
215
216 switch v.ActiveSection {
217 case PricingSectionHeader:
218 return v.handleKeyHeader(key)
219 case PricingSectionCommand:
220 return v.handleKeyCommand(key)
221 case PricingSectionResults:
222 return v.handleKeyResults(key)
223 }
224 return PricingEventNone
225}
226
227func (v *PricingView) handleKeyHeader(key string) PricingEvent {
228 switch key {

Callers

nothing calls this directly

Calls 6

FilterItemsMethod · 0.95
UpdateSuggestionsMethod · 0.95
handleKeyHeaderMethod · 0.95
handleKeyCommandMethod · 0.95
handleKeyResultsMethod · 0.95
NewCommandBuilderStateFunction · 0.85

Tested by

no test coverage detected