MCPcopy Create free account
hub / github.com/effect-app/libs / custom

Function custom

repos/effect/packages/effect/src/unstable/cli/Prompt.ts:785–802  ·  view source on GitHub ↗
(
  initialState: State | Effect.Effect<State, never, Environment>,
  ...args:
    | [handlers: Handlers<State, Output, Terminal.UserInput>]
    | [events: Queue.Dequeue<A, never>, handlers: Handlers<State, Output, ProcessInput<A>>]
)

Source from the content-addressed store, hash-verified

783 let result = map(entries[0][1], (value) => ({ [entries[0][0]]: value }))
784 if (entries.length === 1) {
785 return result as any
786 }
787 const rest = entries.slice(1)
788 for (const [key, prompt] of rest) {
789 result = result.pipe(
790 flatMap((record) =>
791 prompt.pipe(map((value) => ({
792 ...record,
793 [key]: value
794 })))
795 )
796 )
797 }
798 return result as any
799 }
800 }
801 return allTupled(arguments[0]) as any
802}
803
804const annotateLine = (line: string): string => Ansi.annotate(line, Ansi.bold)
805const annotateErrorLine = (line: string, color: string): string =>

Callers 10

confirmFunction · 0.70
dateFunction · 0.70
fileFunction · 0.70
floatFunction · 0.70
integerFunction · 0.70
selectFunction · 0.70
autoCompleteFunction · 0.70
multiSelectFunction · 0.70
toggleFunction · 0.70
basePromptFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…