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

Function processAutoCompleteInput

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

Source from the content-addressed store, hash-verified

3340 Effect.succeed(Action.NextFrame({ state: updateAutoCompleteState(state, options, "") }))
3341
3342const processAutoCompleteInput = <A>(input: string, state: AutoCompleteState, options: AutoCompleteOptionsReq<A>) => {
3343 if (input.length === 0) {
3344 return Effect.succeed(Action.Beep())
3345 }
3346 const query = state.query + input
3347 return Effect.succeed(Action.NextFrame({ state: updateAutoCompleteState(state, options, query) }))
3348}
3349
3350const handleSelectRender = <A>(options: SelectOptionsReq<A>) => {
3351 return (state: SelectState, action: Action<SelectState, A>) => {

Callers 1

Calls 2

updateAutoCompleteStateFunction · 0.85
succeedMethod · 0.45

Tested by

no test coverage detected