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

Function processMultiSelectCursorUp

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

Source from the content-addressed store, hash-verified

2641)
2642
2643const processMultiSelectCursorUp = (state: MultiSelectState, totalChoices: number) => {
2644 const newIndex = state.index === 0 ? totalChoices - 1 : state.index - 1
2645 return Effect.succeed(Action.NextFrame({ state: { ...state, index: newIndex } }))
2646}
2647
2648const processMultiSelectCursorDown = (state: MultiSelectState, totalChoices: number) => {
2649 const newIndex = (state.index + 1) % totalChoices

Callers 1

handleMultiSelectProcessFunction · 0.85

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected