MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / render

Function render

apps/cli/src/update-checker.ts:93–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91 let selected = 0
92
93 const render = () => {
94 // Move cursor up to rewrite choices (skip on first draw)
95 if (rendered) process.stderr.write(`\x1b[${choices.length}A`)
96 choices.forEach((c, i) => {
97 process.stderr.write(`\x1b[2K${i === selected ? '› ' : ' '}${i + 1}. ${c}\n`)
98 })
99 }
100
101 process.stderr.write(`${question}\n\n`)
102

Callers 2

promptUserFunction · 0.70
onDataFunction · 0.70

Calls 1

writeMethod · 0.65

Tested by

no test coverage detected