Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/overview-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
},
);

const sessions = sessionsData?.sessions ?? [];

Check warning on line 137 in app/overview-client.tsx

View workflow job for this annotation

GitHub Actions / ci

The 'sessions' logical expression could make the dependencies of useMemo Hook (at line 155) change on every render. To fix this, wrap the initialization of 'sessions' in its own useMemo() Hook
const projects = projectsData?.projects ?? [];
const projectCount = projects.length;

Expand All @@ -143,7 +143,8 @@
const usage: Record<string, { inputTokens: number; outputTokens: number }> =
{};
for (const s of sessions) {
if (!s.model) continue;
// Skip empty, internal (<synthetic>), and non-claude models
if (!s.model || !s.model.startsWith("claude-")) continue;
const existing = usage[s.model] ?? { inputTokens: 0, outputTokens: 0 };
usage[s.model] = {
inputTokens: existing.inputTokens + (s.input_tokens ?? 0),
Expand Down
Loading