()
| 79 | } |
| 80 | |
| 81 | function getEmptyCache(): PersistedStatsCache { |
| 82 | return { |
| 83 | version: STATS_CACHE_VERSION, |
| 84 | lastComputedDate: null, |
| 85 | dailyActivity: [], |
| 86 | dailyModelTokens: [], |
| 87 | modelUsage: {}, |
| 88 | totalSessions: 0, |
| 89 | totalMessages: 0, |
| 90 | longestSession: null, |
| 91 | firstSessionDate: null, |
| 92 | hourCounts: {}, |
| 93 | totalSpeculationTimeSavedMs: 0, |
| 94 | shotDistribution: {}, |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * Migrate an older cache to the current schema. |