MCPcopy Index your code
hub / github.com/coder/coder / getMaxIndex

Method getMaxIndex

cli/cliui/select.go:553–561  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

551}
552
553func (m multiSelectModel) getMaxIndex() int {
554 options := m.filteredOptions()
555 if m.enableCustomInput {
556 // Include the "+ Add custom value" entry
557 return len(options)
558 }
559 // Includes only the actual options
560 return len(options) - 1
561}
562
563// handleCustomInputMode manages keyboard interactions when in custom input mode
564func (m *multiSelectModel) handleCustomInputMode(msg tea.Msg) (tea.Model, tea.Cmd) {

Callers 1

UpdateMethod · 0.95

Calls 1

filteredOptionsMethod · 0.95

Tested by

no test coverage detected