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

Function renderParts

packages/effect/src/unstable/cli/Prompt.ts:1582–1595  ·  view source on GitHub ↗
(state: DateState, submitted: boolean = false)

Source from the content-addressed store, hash-verified

1580}
1581
1582const renderParts = (state: DateState, submitted: boolean = false) => {
1583 return Arr.reduce(
1584 state.dateParts,
1585 "",
1586 (doc, part, currentIndex) => {
1587 const partDoc = part.toString()
1588 if (currentIndex === state.cursor && !submitted) {
1589 const annotation = Ansi.combine(Ansi.underlined, Ansi.cyanBright)
1590 return doc + Ansi.annotate(partDoc, annotation)
1591 }
1592 return doc + partDoc
1593 }
1594 )
1595}
1596
1597const renderDateOutput = (
1598 leadingSymbol: string,

Callers 1

Prompt.tsFile · 0.85

Calls 3

toStringMethod · 0.65
combineMethod · 0.65
annotateMethod · 0.65

Tested by

no test coverage detected