MCPcopy Index your code
hub / github.com/codeaashu/claude-code / processOutput

Function processOutput

src/utils/notebook.ts:59–81  ·  view source on GitHub ↗
(output: NotebookCellOutput)

Source from the content-addressed store, hash-verified

57}
58
59function processOutput(output: NotebookCellOutput) {
60 switch (output.output_type) {
61 case 'stream':
62 return {
63 output_type: output.output_type,
64 text: processOutputText(output.text),
65 }
66 case 'execute_result':
67 case 'display_data':
68 return {
69 output_type: output.output_type,
70 text: processOutputText(output.data?.['text/plain']),
71 image: output.data && extractImage(output.data),
72 }
73 case 'error':
74 return {
75 output_type: output.output_type,
76 text: processOutputText(
77 `${output.ename}: ${output.evalue}\n${output.traceback.join('\n')}`,
78 ),
79 }
80 }
81}
82
83function processCell(
84 cell: NotebookCell,

Callers

nothing calls this directly

Calls 2

processOutputTextFunction · 0.85
extractImageFunction · 0.85

Tested by

no test coverage detected