feat: add usage statistics page, CLI improvements, and UI enhancements

- Add Usage Stats page with token breakdown, model distribution, and 30-day trend
- Pass through cache/cost token fields in BFF (cache_read/write_tokens, reasoning_tokens, actual_cost_usd)
- Add CLI commands: -v/--version, -h/--help, update/upgrade with auto-restart
- Auto-open browser on startup, auto-kill port conflicts (cross-platform)
- Validate all api_server config fields on startup (enabled, host, port, key, cors_origins)
- Add streaming thinking video animation with tool calls panel
- Add context token usage display (used / total) in chat header
- Sidebar: white logo area with shadow, dance video beside logo (canvas seamless loop)
- Fix sidebar nav scroll (app-main overflow-y: auto)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ekko
2026-04-14 14:48:58 +08:00
co-authored by Claude Opus 4.6
parent f8fc64ff5c
commit 9dd5fca9f9
24 changed files with 1433 additions and 137 deletions
+23
View File
@@ -30,6 +30,7 @@ export default {
skills: 'Skills',
memory: 'Memory',
logs: 'Logs',
usage: 'Usage',
channels: 'Channels',
settings: 'Settings',
connected: 'Connected',
@@ -43,6 +44,7 @@ export default {
attachFiles: 'Attach files',
stop: 'Stop',
send: 'Send',
contextUsed: 'Context used:',
sessions: 'Sessions',
noSessions: 'No sessions',
newChat: 'New Chat',
@@ -337,4 +339,25 @@ export default {
zh: '中文',
en: 'English',
},
// Usage
usage: {
title: 'Usage Statistics',
refresh: 'Refresh',
totalTokens: 'Total Tokens',
inputTokens: 'Input',
outputTokens: 'Output',
totalSessions: 'Total Sessions',
avgPerDay: '~{n}/day avg',
estimatedCost: 'Est. Cost',
cacheHitRate: 'Cache Hit Rate',
modelBreakdown: 'Model Breakdown',
dailyTrend: 'Daily Usage (Last 30 Days)',
date: 'Date',
tokens: 'Tokens',
cache: 'Cache',
sessions: 'Sessions',
cost: 'Cost',
noData: 'No usage data',
},
}