mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-01 04:02:02 +08:00
refactor(usage): fold claude-desktop into claude in the dashboard
The Desktop gateway's proxy traffic is still recorded under its own app_type for route-takeover billing audit (the request detail panel shows the real value), but the dashboard now folds it into `claude` for display. A standalone "Claude Desktop" bucket only ever showed a partial number: Desktop chat usage never passes through the proxy and has no scannable local source, while its Code-tab sessions are just the embedded Claude Code runtime writing into the shared ~/.claude/projects tree — so a separate bucket misled users into reading it as Desktop's full usage. Backend: new `folded_app_type_sql` helper wraps the app_type column in every dashboard read path (10 filter sites + the by-app projection) so `= 'claude'` also matches claude-desktop and GROUP BY merges the two, without changing bound-param counts. Dedup matching and provider-limit checks keep exact comparison; get_request_logs folds only the WHERE filter and keeps the raw app_type in its row projection. Frontend: drop claude-desktop from the dashboard AppType/KNOWN_APP_TYPES filter list, the UsageHero theme, and the now-dead appFilter locale key in all four languages (the managed-app apps.claude-desktop label stays). Adds test_claude_desktop_folds_into_claude_for_display.
This commit is contained in:
@@ -1386,7 +1386,6 @@
|
||||
"appFilter": {
|
||||
"all": "All",
|
||||
"claude": "Claude Code",
|
||||
"claude-desktop": "Claude Desktop",
|
||||
"codex": "Codex",
|
||||
"gemini": "Gemini",
|
||||
"opencode": "OpenCode"
|
||||
|
||||
@@ -1386,7 +1386,6 @@
|
||||
"appFilter": {
|
||||
"all": "すべて",
|
||||
"claude": "Claude Code",
|
||||
"claude-desktop": "Claude Desktop",
|
||||
"codex": "Codex",
|
||||
"gemini": "Gemini",
|
||||
"opencode": "OpenCode"
|
||||
|
||||
@@ -1358,7 +1358,6 @@
|
||||
"appFilter": {
|
||||
"all": "全部",
|
||||
"claude": "Claude Code",
|
||||
"claude-desktop": "Claude Desktop",
|
||||
"codex": "Codex",
|
||||
"gemini": "Gemini",
|
||||
"opencode": "OpenCode"
|
||||
|
||||
@@ -1386,7 +1386,6 @@
|
||||
"appFilter": {
|
||||
"all": "全部",
|
||||
"claude": "Claude Code",
|
||||
"claude-desktop": "Claude Desktop",
|
||||
"codex": "Codex",
|
||||
"gemini": "Gemini",
|
||||
"opencode": "OpenCode"
|
||||
|
||||
Reference in New Issue
Block a user