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

Function processSelectCursorUp

packages/effect/src/unstable/cli/Prompt.ts:3293–3298  ·  view source on GitHub ↗
(state: SelectState, choices: SelectOptionsReq<A>["choices"])

Source from the content-addressed store, hash-verified

3291})
3292
3293const processSelectCursorUp = <A>(state: SelectState, choices: SelectOptionsReq<A>["choices"]) => {
3294 if (state === 0) {
3295 return Effect.succeed(Action.NextFrame({ state: choices.length - 1 }))
3296 }
3297 return Effect.succeed(Action.NextFrame({ state: state - 1 }))
3298}
3299
3300const processSelectCursorDown = <A>(state: SelectState, choices: SelectOptionsReq<A>["choices"]) => {
3301 if (state === choices.length - 1) {

Callers 1

handleSelectProcessFunction · 0.85

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected