MCPcopy Index your code
hub / github.com/codeaashu/claude-code / createAllTimeStatsPromise

Function createAllTimeStatsPromise

src/components/Stats.tsx:63–81  ·  view source on GitHub ↗

* Creates a stats loading promise that never rejects. * Always loads all-time stats for the heatmap.

()

Source from the content-addressed store, hash-verified

61 * Always loads all-time stats for the heatmap.
62 */
63function createAllTimeStatsPromise(): Promise<StatsResult> {
64 return aggregateClaudeCodeStatsForRange('all').then((data): StatsResult => {
65 if (!data || data.totalSessions === 0) {
66 return {
67 type: 'empty'
68 };
69 }
70 return {
71 type: 'success',
72 data
73 };
74 }).catch((err): StatsResult => {
75 const message = err instanceof Error ? err.message : 'Failed to load stats';
76 return {
77 type: 'error',
78 message
79 };
80 });
81}
82export function Stats(t0) {
83 const $ = _c(4);
84 const {

Callers 1

StatsFunction · 0.85

Calls 1

Tested by

no test coverage detected