You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: session token tracking with /tokens command and exit summary
Track cumulative input/output/cache tokens, request count, and turn
count across the session. Display via:
- /tokens command — show session totals at any time
- Exit summary — printed at all exit points (interactive, --prompt, SIGINT)
- Per-turn inline display unchanged (📊 line)
New state fields: totalInputTokens, totalOutputTokens,
totalCacheReadTokens, totalRequests, totalTurns
Accumulation happens in the assistant.usage event handler.
Turn count incremented on each onUserPromptSubmitted.
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
* feat: teach LLM to build reusable modules proactively
Add guidance to system message encouraging the LLM to use
register_module when it identifies missing capabilities rather
than just describing gaps. Modules persist across sessions.
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
* fix: update sourceHash on register_module to prevent hash mismatch warnings
When register_module saves a user module, it now writes the sourceHash
to the .json metadata. Previously only loadModuleAsync set this field,
so re-registering a module with updated code would leave a stale hash
that the validator flagged as a mismatch warning.
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
* fix: address PR #58 review feedback
1. event-handler.ts: guard against undefined token values before accumulating
2. llm-output.ts: format large token numbers with toLocaleString, fix alignment
3. index.ts: use guard function for exit summary (no tokens = no summary)
4. state.ts: add doc comment clarifying totalRequests tracks premium requests
5. module-store.ts: use computeTruncatedHash instead of manual slice
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
---------
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
0 commit comments