feat(command): add stats + end of session stats#48
Merged
CLEMENTINATOR merged 7 commits intomainfrom Apr 9, 2026
Merged
Conversation
SachaMorard
requested changes
Apr 8, 2026
Member
SachaMorard
left a comment
There was a problem hiding this comment.
I can't make it work. It seems to be an API problem, but get_session_stats always returns a 404
Member
@CLEMENTINATOR forget it, I get why now. |
SachaMorard
approved these changes
Apr 8, 2026
Member
Author
needs an api update on prod :D |
Co-Authored-By: Clement <noreply@users.noreply.github.com>
After a session ends, call the API to retrieve token usage, cost, and compression stats. Persist each session to ~/.config/edgee/session-stats/ as JSON, then render a formatted summary in the terminal. Falls back gracefully to the plain URL if the API call fails. Deduplicates the session-end display block that was repeated across claude.rs, codex.rs, and opencode.rs into a single shared print_session_stats() function in launch/mod.rs. Co-Authored-By: Clement <noreply@users.noreply.github.com>
The new `edgee stats` command reads all persisted session JSON files, prints an aggregate summary (requests, cost, savings, tokens, errors), renders the latest session in full detail, then lists all sessions in a compact table. Supports --limit to cap the table length. Co-Authored-By: Clement <noreply@users.noreply.github.com>
- Fix cost display: trim to 6 significant decimal places (was always 9) - Shorten timestamps to "YYYY-MM-DD HH:MM" in all stat views - Collapse Overview savings onto one line, removing fragile space alignment - Session list: single line per entry, drop the noisy session-ID second line - Add ASCII progress bars (█/░) for compression rate in session recap and list Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6d38a5c to
29caa66
Compare
8c79ee9 to
f066f79
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Description of Changes
Describe your changes here
Related Issues
List related issues here