MCPcopy
hub / github.com/Effect-TS/effect / processTab

Function processTab

packages/cli/src/internal/prompt/text.ts:218–229  ·  view source on GitHub ↗
(state: State, options: Options)

Source from the content-addressed store, hash-verified

216}
217
218function processTab(state: State, options: Options) {
219 if (state.value === options.default) {
220 return Effect.succeed(Action.Beep())
221 }
222 const value = getValue(state, options)
223 const cursor = value.length
224 return Effect.succeed(
225 Action.NextFrame({
226 state: { ...state, value, cursor, error: Option.none() }
227 })
228 )
229}
230
231function defaultProcessor(input: string, state: State) {
232 const beforeCursor = state.value.slice(0, state.cursor)

Callers 1

handleProcessFunction · 0.85

Calls 1

getValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…