MCPcopy Create free account
hub / github.com/cursor/cookbook / TranscriptLine

Function TranscriptLine

sdk/coding-agent-cli/src/tui/App.tsx:591–619  ·  view source on GitHub ↗
({ line }: { line: TranscriptLine })

Source from the content-addressed store, hash-verified

589}
590
591function TranscriptLine({ line }: { line: TranscriptLine }) {
592 const color = {
593 assistant: "white",
594 error: "red",
595 meta: "cyan",
596 status: "yellow",
597 tool: "magenta",
598 user: "green",
599 }[line.kind]
600
601 return (
602 <box>
603 <text fg={color} attributes={TextAttributes.BOLD}>
604 {line.label.padEnd(7)}
605 </text>
606 <text>
607 {line.parts.map((part, index) => (
608 <span
609 key={index}
610 attributes={partToAttributes(part)}
611 fg={part.color}
612 >
613 {part.text}
614 </span>
615 ))}
616 </text>
617 </box>
618 )
619}
620
621function partToAttributes(part: TranscriptPart) {
622 let attributes = TextAttributes.NONE

Callers

nothing calls this directly

Calls 1

partToAttributesFunction · 0.85

Tested by

no test coverage detected