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

Function getTextCellLabel

packages/cli/src/utils/block-label.ts:142–148  ·  view source on GitHub ↗

* Get label for a text cell block (h1, h2, p, bullet, etc.)

(content: string, type: string)

Source from the content-addressed store, hash-verified

140 * Get label for a text cell block (h1, h2, p, bullet, etc.)
141 */
142function getTextCellLabel(content: string, type: string): string {
143 const trimmed = content.trim()
144 if (!trimmed) {
145 return `${type} (empty)`
146 }
147 return truncate(trimmed, MAX_LABEL_LENGTH)
148}
149
150/**
151 * Truncate a string to max length, adding ellipsis if needed.

Callers 1

getBlockLabelFunction · 0.85

Calls 1

truncateFunction · 0.85

Tested by

no test coverage detected