claw-code/rust/crates/rusty-claude-cli
YeonGyu-Kim 60ec2aed9b fix(cli): wire /tokens and /cache as aliases for /stats; implement /stats
Dogfood found that /tokens and /cache had spec entries (resume_supported:
true) but no parse arms in the command parser, resulting in:
  'Unknown slash command: /tokens — Did you mean /tokens'
(the suggestion engine found the spec entry but parsing always failed)

Fix three things:
1. Add 'tokens' | 'cache' as aliases for 'stats' in the parse match so
   the commands actually resolve to SlashCommand::Stats
2. Implement SlashCommand::Stats in the REPL dispatch — previously fell
   through to 'Command registered but not yet implemented'. Now shows
   cumulative token usage for the session.
3. Implement SlashCommand::Stats in run_resume_command — previously
   returned 'unsupported resumed slash command'. Now emits:
   text:  Cost / Input tokens / Output tokens / Cache create / Cache read
   json:  {kind:stats, input_tokens, output_tokens, cache_*, total_tokens}

159 CLI tests pass, fmt clean.
2026-04-09 21:34:36 +09:00
..
.claw/sessions feat(runtime): typed task packet format for structured claw dispatch 2026-04-04 00:40:20 +09:00
src fix(cli): wire /tokens and /cache as aliases for /stats; implement /stats 2026-04-09 21:34:36 +09:00
tests fix(cli): 6 cascading test regressions hidden behind client_integration gate 2026-04-08 14:54:10 +09:00
Cargo.toml Close the clawability backlog with deterministic CLI output and lane lineage 2026-04-05 18:41:02 +00:00
build.rs feat(cli): populate Git SHA, target triple, and build date at compile time via build.rs 2026-04-08 18:11:46 +09:00