Enrich /status command with tokens, cost, provider, profile (#463)#1156
Enrich /status command with tokens, cost, provider, profile (#463)#1156bergeouss wants to merge 2 commits intonesquena:masterfrom
Conversation
…arted time (nesquena#463) - Backend: session_status() now includes input_tokens, output_tokens, total_tokens, estimated_cost (previously only in /usage endpoint) - Frontend: cmdStatus() shows provider, profile, started timestamp, token usage with cost, alongside existing fields - i18n: added status_profile, status_started, status_tokens, status_no_tokens, status_unknown keys in en, zh-Hant, ko locales - Tests: extended test_status_returns_summary to verify new fields
…#1156) CI locale tests require all English keys present in every locale. Added status_profile, status_started, status_tokens, status_no_tokens, status_unknown with English placeholder values to ru, es, de, zh.
|
Good implementation of the enriched The approach of pulling The frontend additions in
The i18n approach — adding keys for The test extension verifying the 4 new fields exist and default to |
Merged as v0.50.227. 2634 tests passing, browser QA 21/21 (desktop + mobile). Full attribution below. Thanks to all 12 contributors: @jundev0001 (#1138), @franksong2702 (#1142, #1157, #1162), @dso2ng (#1143), @bergeouss (#1145, #1146, #1156, #1159), @jasonjcwu (#1149), @ccqqlo (#1161), @frap129 (#1165) Two fixes applied during integration and two more by the independent reviewer (@nesquena): - messages.js: per-turn cost delta capture order (#1159) - workspace.py: symlink target blocked-roots check + HOME sanity guard (#1149, #1165) - panels.js: cron unread counter bookkeeping (in-loop increment bug) - tests/test_symlink_cycle_detection.py: register workspace before session/new
|
Merged as v0.50.227 via batch PR #1168. Thank you @bergeouss! 🎉 |
Merged as v0.50.227. 2634 tests passing, browser QA 21/21 (desktop + mobile). Full attribution below. Thanks to all 12 contributors: @jundev0001 (nesquena#1138), @franksong2702 (nesquena#1142, nesquena#1157, nesquena#1162), @dso2ng (nesquena#1143), @bergeouss (nesquena#1145, nesquena#1146, nesquena#1156, nesquena#1159), @jasonjcwu (nesquena#1149), @ccqqlo (nesquena#1161), @frap129 (nesquena#1165) Two fixes applied during integration and two more by the independent reviewer (@nesquena): - messages.js: per-turn cost delta capture order (nesquena#1159) - workspace.py: symlink target blocked-roots check + HOME sanity guard (nesquena#1149, nesquena#1165) - panels.js: cron unread counter bookkeeping (in-loop increment bug) - tests/test_symlink_cycle_detection.py: register workspace before session/new
Thinking Path
Issue #463 requests that the
/statusslash command display more information matching the CLI agent's/statusoutput. Currently the WebUI's/statusonly shows basic session info (title, model, workspace, personality, message count, agent running). Missing: provider, profile, started time, token usage with cost.What Changed
Backend (
api/session_ops.py)session_status()now returnsinput_tokens,output_tokens,total_tokens,estimated_costalongside existing fields/api/session/usageendpointFrontend (
static/commands.js)cmdStatus()now displays:window._activeProvider)S.activeProfile, defaults to "default")i18n (
static/i18n.js)status_profile,status_started,status_tokens,status_no_tokens,status_unknownen,zh-Hant,kolocales (other locales fall back toen, matching the existing pattern for/statuskeys)Tests (
tests/test_session_ops.py)test_status_returns_summaryto verify the 4 new fields exist and default to 0 for fresh sessionsCloses #463