mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Add an account analytics dashboard to /usage (#45764)
## What changed - Add “Explore analytics” to the `/usage` menu for ChatGPT accounts, opening a full-screen dashboard. - Show usage and messages for consumer accounts, credits and token usage for Business and Enterprise accounts, and plugin and skill activity for both. - Support overview and maximized views, 7- and 30-day ranges, report grouping, daily details, model filtering for token usage, and refresh. - Keep report loading and errors independent, cancel pending loads on close, and retain navigation state across reopening while preserving the composer draft. ## Testing Add regression and snapshot coverage for account-specific reports, range and grouping changes, model filtering, loading and cancellation, small terminals, terminal colors, and draft preservation. GitOrigin-RevId: 46da94a14d6e227551e740b85f9d2d552aaf75b0
This commit is contained in:
1 parent
af3bc6f796
commit
ca53e19c75
68 files changed
+6357
-67
No files matched your search
@@ -58,6 +58,7 @@ use scrolling::render_offset_content;
|
||||
pub(crate) enum Overlay {
|
||||
Transcript(TranscriptOverlay),
|
||||
Static(StaticOverlay),
|
||||
Analytics(Box<crate::analytics::AnalyticsView>),
|
||||
}
|
||||
|
||||
impl Overlay {
|
||||
@@ -85,6 +86,7 @@ impl Overlay {
|
||||
match self {
|
||||
Overlay::Transcript(o) => o.handle_event(tui, event),
|
||||
Overlay::Static(o) => o.handle_event(tui, event),
|
||||
Overlay::Analytics(o) => o.handle_event(tui, event),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,6 +94,7 @@ impl Overlay {
|
||||
match self {
|
||||
Overlay::Transcript(o) => o.is_done(),
|
||||
Overlay::Static(o) => o.is_done(),
|
||||
Overlay::Analytics(o) => o.is_done,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user