MCPcopy Create free account
hub / github.com/Effect-TS/effect / processMultiSelectCursorUp

Function processMultiSelectCursorUp

packages/effect/src/cli/Prompt.ts:2866–2869  ·  view source on GitHub ↗
(state: MultiSelectState, totalChoices: number)

Source from the content-addressed store, hash-verified

2864)
2865
2866const processMultiSelectCursorUp = (state: MultiSelectState, totalChoices: number) => {
2867 const newIndex = state.index === 0 ? totalChoices - 1 : state.index - 1
2868 return Effect.succeed(Action.NextFrame({ state: { ...state, index: newIndex } }))
2869}
2870
2871const processMultiSelectCursorDown = (state: MultiSelectState, totalChoices: number) => {
2872 const newIndex = (state.index + 1) % totalChoices

Callers 1

handleMultiSelectProcessFunction · 0.85

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected