feat(cli): add /usage command to display session token usage

Introduced a new command "/usage" in the CLI to show cumulative token usage for the current session. This includes details on prompt tokens, completion tokens, total tokens, API calls, and context state. Updated command documentation to reflect this addition. Enhanced the AIAgent class to track token usage throughout the session.
This commit is contained in:
teknium1 2026-03-01 00:23:19 -08:00
parent 30efc263ff
commit 177be32b7f
3 changed files with 50 additions and 0 deletions

View file

@ -27,6 +27,7 @@ COMMANDS = {
"/platforms": "Show gateway/messaging platform status",
"/verbose": "Cycle tool progress display: off → new → all → verbose",
"/compress": "Manually compress conversation context (flush memories + summarize)",
"/usage": "Show token usage for the current session",
"/quit": "Exit the CLI (also: /exit, /q)",
}