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

Function processFileCursorUp

packages/effect/src/cli/Prompt.ts:2558–2566  ·  view source on GitHub ↗
(state: FileState)

Source from the content-addressed store, hash-verified

2556}
2557
2558const processFileCursorUp = (state: FileState) => {
2559 if (state.files.length === 0) {
2560 return Effect.succeed(Action.Beep())
2561 }
2562 const cursor = state.cursor - 1
2563 return Effect.succeed(Action.NextFrame({
2564 state: { ...state, cursor: cursor < 0 ? state.files.length - 1 : cursor }
2565 }))
2566}
2567
2568const processFileCursorDown = (state: FileState) => {
2569 if (state.files.length === 0) {

Callers 1

handleFileProcessFunction · 0.85

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected