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

Function extractImage

source code/utils/notebook.ts:43–59  ·  view source on GitHub ↗
(
  data: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

41}
42
43function extractImage(
44 data: Record<string, unknown>,
45): NotebookOutputImage | undefined {
46 if (typeof data['image/png'] === 'string') {
47 return {
48 image_data: data['image/png'].replace(/\s/g, ''),
49 media_type: 'image/png',
50 }
51 }
52 if (typeof data['image/jpeg'] === 'string') {
53 return {
54 image_data: data['image/jpeg'].replace(/\s/g, ''),
55 media_type: 'image/jpeg',
56 }
57 }
58 return undefined
59}
60
61function processOutput(output: NotebookCellOutput) {
62 switch (output.output_type) {

Callers 1

processOutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected