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

Function extractImage

src/utils/notebook.ts:41–57  ·  view source on GitHub ↗
(
  data: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

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

Callers 1

processOutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected