MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / captureLines

Function captureLines

packages/server-e2e/scripts/run-scenarios.ts:97–109  ·  view source on GitHub ↗
(
  stream: NodeJS.ReadableStream,
  caseName: string,
  label: 'stdout' | 'stderr',
  reportDir: string,
)

Source from the content-addressed store, hash-verified

95}
96
97function captureLines(
98 stream: NodeJS.ReadableStream,
99 caseName: string,
100 label: 'stdout' | 'stderr',
101 reportDir: string,
102): void {
103 const lines = createInterface({ input: stream });
104 lines.on('line', (line) => {
105 const output = label === 'stderr' ? process.stderr : process.stdout;
106 output.write(`${line}\n`);
107 recordReportEvent({ kind: 'log', caseName, label, value: line }, { reportDir });
108 });
109}
110
111try {
112 await main();

Callers 1

runScenarioFunction · 0.85

Calls 3

recordReportEventFunction · 0.85
onMethod · 0.65
writeMethod · 0.65

Tested by

no test coverage detected