MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / chartSignature

Function chartSignature

src/stores/aiChatChartBlocks.ts:158–167  ·  view source on GitHub ↗
(chart: ChartPayload)

Source from the content-addressed store, hash-verified

156}
157
158function chartSignature(chart: ChartPayload): string {
159 const persisted = toPersistedChartPayload(chart)
160 return stableStringify({
161 spec: persisted.spec,
162 columns: persisted.dataset.columns,
163 data: persisted.data,
164 rowCount: persisted.rowCount,
165 truncated: persisted.truncated,
166 })
167}
168
169function hasDuplicateChart(blocks: readonly unknown[], chart: ChartPayload): boolean {
170 const signature = chartSignature(chart)

Callers 1

hasDuplicateChartFunction · 0.85

Calls 2

stableStringifyFunction · 0.85
toPersistedChartPayloadFunction · 0.70

Tested by

no test coverage detected