MCPcopy Index your code
hub / github.com/Effect-TS/effect / processCursorUp

Function processCursorUp

packages/cli/src/internal/prompt/multi-select.ts:197–200  ·  view source on GitHub ↗
(state: State, totalChoices: number)

Source from the content-addressed store, hash-verified

195}
196
197function processCursorUp(state: State, totalChoices: number) {
198 const newIndex = state.index === 0 ? totalChoices - 1 : state.index - 1
199 return Effect.succeed(Action.NextFrame({ state: { ...state, index: newIndex } }))
200}
201
202function processCursorDown(state: State, totalChoices: number) {
203 const newIndex = (state.index + 1) % totalChoices

Callers 1

handleProcessFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected