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

Function renderParts

packages/cli/src/internal/prompt/date.ts:74–87  ·  view source on GitHub ↗
(state: State, submitted: boolean = false)

Source from the content-addressed store, hash-verified

72}
73
74function renderParts(state: State, submitted: boolean = false) {
75 return Arr.reduce(
76 state.dateParts,
77 Doc.empty as Doc.AnsiDoc,
78 (doc, part, currentIndex) => {
79 const partDoc = Doc.text(part.toString())
80 if (currentIndex === state.cursor && !submitted) {
81 const annotation = Ansi.combine(Ansi.underlined, Ansi.cyanBright)
82 return Doc.cat(doc, Doc.annotate(partDoc, annotation))
83 }
84 return Doc.cat(doc, partDoc)
85 }
86 )
87}
88
89function renderOutput(
90 leadingSymbol: Doc.AnsiDoc,

Callers 2

renderNextFrameFunction · 0.85
renderSubmissionFunction · 0.85

Calls 4

toStringMethod · 0.65
combineMethod · 0.65
annotateMethod · 0.65
textMethod · 0.45

Tested by

no test coverage detected