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

Function processAutoCompleteCursorUp

packages/effect/src/cli/Prompt.ts:3549–3556  ·  view source on GitHub ↗
(state: AutoCompleteState)

Source from the content-addressed store, hash-verified

3547}
3548
3549const processAutoCompleteCursorUp = (state: AutoCompleteState) => {
3550 if (state.filtered.length === 0) {
3551 return Effect.succeed(Action.Beep())
3552 }
3553 const cursor = autoCompleteCursor(state)
3554 const nextCursor = cursor === 0 ? state.filtered.length - 1 : cursor - 1
3555 return Effect.succeed(Action.NextFrame({ state: { ...state, index: state.filtered[nextCursor] } }))
3556}
3557
3558const processAutoCompleteCursorDown = (state: AutoCompleteState) => {
3559 if (state.filtered.length === 0) {

Callers 1

Calls 2

autoCompleteCursorFunction · 0.85
succeedMethod · 0.45

Tested by

no test coverage detected