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

Method save

packages/node-runtime/src/services/analytics.ts:47–53  ·  view source on GitHub ↗
(data: AnalyticsData)

Source from the content-addressed store, hash-verified

45 }
46
47 private save(data: AnalyticsData): void {
48 try {
49 fs.writeFileSync(this.dataPath, JSON.stringify(data, null, 2), 'utf-8')
50 } catch (e) {
51 console.error('[Analytics] Failed to save:', e)
52 }
53 }
54
55 getEnabled(): boolean {
56 return this.load().enabled

Callers 4

setEnabledMethod · 0.95
trackDailyActiveMethod · 0.95
setOwnerAndApplyProfileFunction · 0.45
dismissOwnerPromptFunction · 0.45

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected