MCPcopy Create free account
hub / github.com/apache/maka / renderAssistantBlock

Function renderAssistantBlock

packages/cli/src/pi-transcript.ts:1675–1680  ·  view source on GitHub ↗

An assistant turn: bare markdown prose, no speaker label or indent.

(text: string, width: number)

Source from the content-addressed store, hash-verified

1673
1674/** An assistant turn: bare markdown prose, no speaker label or indent. */
1675function renderAssistantBlock(text: string, width: number): string[] {
1676 if (!text.trim()) return [];
1677 return new Markdown(text, 0, 0, markdownTheme, undefined, { preserveOrderedListMarkers: true })
1678 .render(width)
1679 .map((line) => fitLine(line, width));
1680}
1681
1682function renderNotice(entry: MakaPiNoticeEntry, width: number): string[] {
1683 const label = entry.level === 'error' ? ansi.red('Error') : ansi.dim('Note');

Callers 1

Calls 3

fitLineFunction · 0.85
trimMethod · 0.45
renderMethod · 0.45

Tested by

no test coverage detected