MCPcopy Create free account
hub / github.com/codehamr/codehamr / setPopover

Method setPopover

internal/tui/popover.go:79–89  ·  view source on GitHub ↗

setPopover swaps in a new suggestion set. Selection priority: the current row (e.g. active profile), else the first.

(ms []argOption, argLevel bool, cmdName string)

Source from the content-addressed store, hash-verified

77// setPopover swaps in a new suggestion set. Selection priority: the current row
78// (e.g. active profile), else the first.
79func (m *Model) setPopover(ms []argOption, argLevel bool, cmdName string) {
80 if len(ms) == 0 {
81 m.closePopover()
82 return
83 }
84 m.suggest = ms
85 m.suggestArgLevel = argLevel
86 m.activeCmd = cmdName
87 m.suggestOpen = true
88 m.suggestIdx = selectInitialIdx(ms)
89}
90
91// selectInitialIdx picks the starting row: the current row (e.g. active
92// profile), else the first.

Callers 1

refreshSuggestMethod · 0.95

Calls 2

closePopoverMethod · 0.95
selectInitialIdxFunction · 0.85

Tested by

no test coverage detected