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

Function renderPipeShellOutput

packages/cli/src/pi-transcript-tools.ts:610–624  ·  view source on GitHub ↗
(
  output: Extract<
    NonNullable<Extract<ToolResultContent, { kind: 'shell_run' }>['output']>,
    { mode: 'pipes' }
  >,
  width: number,
)

Source from the content-addressed store, hash-verified

608}
609
610function renderPipeShellOutput(
611 output: Extract<
612 NonNullable<Extract<ToolResultContent, { kind: 'shell_run' }>['output']>,
613 { mode: 'pipes' }
614 >,
615 width: number,
616): string[] {
617 const lines: string[] = [];
618 if (output.stdout) lines.push(...renderCappedResultText(output.stdout, width));
619 if (output.stderr) {
620 lines.push(...renderIndented(ansi.dim('[stderr]'), width, 2));
621 lines.push(...renderCappedResultText(output.stderr, width, ansi.dim));
622 }
623 return lines;
624}
625
626/**
627 * Render a `shell_run` (background-process) result. The status line — status,

Callers 1

renderShellRunResultFunction · 0.85

Calls 3

renderCappedResultTextFunction · 0.85
renderIndentedFunction · 0.85
pushMethod · 0.65

Tested by

no test coverage detected