MCPcopy Index your code
hub / github.com/deepnote/deepnote / getBlockContent

Function getBlockContent

packages/cli/src/commands/cat.ts:252–264  ·  view source on GitHub ↗

* Get the content of a block.

(block: DeepnoteBlock)

Source from the content-addressed store, hash-verified

250 * Get the content of a block.
251 */
252function getBlockContent(block: DeepnoteBlock): string | undefined {
253 // Blocks with direct content
254 if ('content' in block && typeof block.content === 'string') {
255 return block.content
256 }
257
258 // Separator blocks show a horizontal line
259 if (block.type === 'separator') {
260 return '---'
261 }
262
263 return undefined
264}
265
266/**
267 * Get color function for block type.

Callers 2

outputCatJsonFunction · 0.70
printBlockFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected