MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / appendChartBlocks

Function appendChartBlocks

apps/cli/src/ai/chat-command.ts:207–213  ·  view source on GitHub ↗
(charts: ChartPayload[])

Source from the content-addressed store, hash-verified

205 }
206
207 const appendChartBlocks = (charts: ChartPayload[]) => {
208 if (charts.length === 0) return
209 // 中文注释:图表 block 需要持久化给 CLI 生成的 AI 对话回放;
210 // 原始 SQL 行数据可能较大,保存时只保留渲染数据和字段元信息。
211 contentBlocks.push(...charts.map((chart) => ({ type: 'chart' as const, chart: toPersistedChartPayload(chart) })))
212 hasReplayContentBlocks = true
213 }
214
215 const appendPlanDraftBlock = (delta: string) => {
216 if (!delta) return

Callers 1

runChatTurnFunction · 0.85

Calls 1

toPersistedChartPayloadFunction · 0.70

Tested by

no test coverage detected