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

Function renderNextFrame

packages/cli/src/internal/prompt/number.ts:114–129  ·  view source on GitHub ↗
(state: State, options: IntegerOptions)

Source from the content-addressed store, hash-verified

112}
113
114function renderNextFrame(state: State, options: IntegerOptions) {
115 return Effect.gen(function*() {
116 const terminal = yield* Terminal.Terminal
117 const columns = yield* terminal.columns
118 const figures = yield* InternalAnsiUtils.figures
119 const leadingSymbol = Doc.annotate(Doc.text("?"), Ansi.cyanBright)
120 const trailingSymbol = Doc.annotate(figures.pointerSmall, Ansi.blackBright)
121 const errorMsg = renderError(state, figures.pointerSmall)
122 const promptMsg = renderOutput(state, leadingSymbol, trailingSymbol, options)
123 return promptMsg.pipe(
124 Doc.cat(errorMsg),
125 Optimize.optimize(Optimize.Deep),
126 Doc.render({ style: "pretty", options: { lineWidth: columns } })
127 )
128 })
129}
130
131function renderSubmission(nextState: State, options: IntegerOptions) {
132 return Effect.gen(function*() {

Callers 2

handleRenderIntegerFunction · 0.70
handleRenderFloatFunction · 0.70

Calls 5

renderErrorFunction · 0.70
renderOutputFunction · 0.70
annotateMethod · 0.65
pipeMethod · 0.65
textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…