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

Function processFileCursorUp

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

Source from the content-addressed store, hash-verified

2355}
2356
2357const processFileCursorUp = (state: FileState) => {
2358 if (state.files.length === 0) {
2359 return Effect.succeed(Action.Beep())
2360 }
2361 const cursor = state.cursor - 1
2362 return Effect.succeed(Action.NextFrame({
2363 state: { ...state, cursor: cursor < 0 ? state.files.length - 1 : cursor }
2364 }))
2365}
2366
2367const processFileCursorDown = (state: FileState) => {
2368 if (state.files.length === 0) {

Callers 1

handleFileProcessFunction · 0.85

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected