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

Function processAutoCompleteInput

packages/effect/src/cli/Prompt.ts:3580–3586  ·  view source on GitHub ↗
(input: string, state: AutoCompleteState, options: AutoCompleteOptionsReq<A>)

Source from the content-addressed store, hash-verified

3578 Effect.succeed(Action.NextFrame({ state: updateAutoCompleteState(state, options, "") }))
3579
3580const processAutoCompleteInput = <A>(input: string, state: AutoCompleteState, options: AutoCompleteOptionsReq<A>) => {
3581 if (input.length === 0) {
3582 return Effect.succeed(Action.Beep())
3583 }
3584 const query = state.query + input
3585 return Effect.succeed(Action.NextFrame({ state: updateAutoCompleteState(state, options, query) }))
3586}
3587
3588const handleSelectRender = <A>(options: SelectOptionsReq<A>) => {
3589 return (state: SelectState, action: Action<SelectState, A>) => {

Callers 1

Calls 2

updateAutoCompleteStateFunction · 0.85
succeedMethod · 0.45

Tested by

no test coverage detected