MCPcopy Index your code
hub / github.com/Effect-TS/effect / renderNextFrame

Function renderNextFrame

packages/cli/src/internal/prompt/date.ts:112–129  ·  view source on GitHub ↗
(state: State, options: DateOptions)

Source from the content-addressed store, hash-verified

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

Callers 1

handleRenderFunction · 0.70

Calls 6

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

Tested by

no test coverage detected