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

Function renderNextFrame

packages/cli/src/internal/prompt/toggle.ts:70–85  ·  view source on GitHub ↗
(state: State, options: ToggleOptions)

Source from the content-addressed store, hash-verified

68}
69
70function renderNextFrame(state: State, options: ToggleOptions) {
71 return Effect.gen(function*() {
72 const terminal = yield* Terminal.Terminal
73 const figures = yield* InternalAnsiUtils.figures
74 const columns = yield* terminal.columns
75 const leadingSymbol = Doc.annotate(Doc.text("?"), Ansi.cyanBright)
76 const trailingSymbol = Doc.annotate(figures.pointerSmall, Ansi.blackBright)
77 const toggle = renderToggle(state, options)
78 const promptMsg = renderOutput(toggle, leadingSymbol, trailingSymbol, options)
79 return Doc.cursorHide.pipe(
80 Doc.cat(promptMsg),
81 Optimize.optimize(Optimize.Deep),
82 Doc.render({ style: "pretty", options: { lineWidth: columns } })
83 )
84 })
85}
86
87function renderSubmission(value: boolean, options: ToggleOptions) {
88 return Effect.gen(function*() {

Callers 1

handleRenderFunction · 0.70

Calls 5

renderToggleFunction · 0.85
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…