MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / createRenderState

Function createRenderState

cli/src/utils/markdown-renderer.tsx:124–137  ·  view source on GitHub ↗
(
  palette: MarkdownPalette,
  codeBlockWidth: number,
)

Source from the content-addressed store, hash-verified

122}
123
124const createRenderState = (
125 palette: MarkdownPalette,
126 codeBlockWidth: number,
127): RenderState => {
128 let counter = 0
129 return {
130 palette,
131 codeBlockWidth,
132 nextKey: () => {
133 counter += 1
134 return `markdown-${counter}`
135 },
136 }
137}
138
139// Unified trim helper with predicate
140const trimTrailingNodes = (

Callers 1

renderMarkdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected