MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / processOutput

Function processOutput

source code/utils/notebook.ts:61–83  ·  view source on GitHub ↗
(output: NotebookCellOutput)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

processOutputTextFunction · 0.85
extractImageFunction · 0.85

Tested by

no test coverage detected