mirror of
https://github.com/openai/codex.git
synced 2026-11-13 21:30:47 +00:00
## Why Consumer analytics lacked a per-chat view of allowance usage and balance credit debits. ## What changed - Add a Top chats panel for up to 100 local chats active in the past 30 days, including discovered descendants and excluding archived roots. - Show weekly and five-hour usage as percentages of current full limits, plus balance credits including adjustments. Preserve exact credit decimals and distinguish missing values from zero. - Support cycling sort metrics with `s`, a top-five dashboard summary, and expandable model, reasoning effort, and speed breakdowns. - Query task usage through `query_v2` with bounded, disjoint descendant groups. Retain partial and unavailable rows, hide titles when usage is unavailable, and report ranking coverage and freshness. ## Testing Add backend and TUI tests covering decimal precision, request and response validation, paginated archived descendants, unavailable responses, metric selection, title hiding, and top-five rendering. GitOrigin-RevId: b8f233166576389c8212bb97eceb7c6be7f5f51d
59 lines
2.2 KiB
Rust
59 lines
2.2 KiB
Rust
mod analytics_session;
|
|
mod client;
|
|
pub(crate) mod types;
|
|
|
|
pub use analytics_session::AnalyticsAccount;
|
|
pub use analytics_session::AnalyticsSession;
|
|
pub use client::AddCreditsNudgeCreditType;
|
|
pub use client::ChatgptThreadTurnCosts;
|
|
pub use client::ChatgptTurnCost;
|
|
pub use client::Client;
|
|
pub use client::RequestError;
|
|
pub use client::ThreadUsage;
|
|
pub use client::ThreadUsageBreakdownGroup;
|
|
pub use client::analytics::AnalyticsReport;
|
|
pub use client::analytics::AnalyticsResponse;
|
|
pub use client::turn_usage::ApiKeyResponseCost;
|
|
pub use client::turn_usage::ApiKeyTurnCost;
|
|
pub use client::turn_usage::ApiKeyTurnCostStatus;
|
|
pub use types::AccountEntry;
|
|
pub use types::AccountsCheckResponse;
|
|
pub use types::CodeTaskDetailsResponse;
|
|
pub use types::CodeTaskDetailsResponseExt;
|
|
pub use types::CodexUserSettingsResponse;
|
|
pub use types::CodexWorkspaceMessage;
|
|
pub use types::CodexWorkspaceMessageType;
|
|
pub use types::CodexWorkspaceMessagesResponse;
|
|
pub use types::ConfigBundleResponse;
|
|
pub use types::ConsumeRateLimitResetCreditCode;
|
|
pub use types::ConsumeRateLimitResetCreditResponse;
|
|
pub use types::DeliveredConfigToml;
|
|
pub use types::DeliveredManagedLayers;
|
|
pub use types::DeliveredRequirementsToml;
|
|
pub use types::DeliveredTomlFragment;
|
|
pub use types::PaginatedListTaskListItem;
|
|
pub use types::RateLimitResetCreditDetails;
|
|
pub use types::RateLimitResetCreditsDetails;
|
|
pub use types::RateLimitResetCreditsSummary;
|
|
pub use types::RateLimitsWithResetCredits;
|
|
pub use types::TaskListItem;
|
|
pub use types::TokenUsageProfile;
|
|
pub use types::TokenUsageProfileDailyBucket;
|
|
pub use types::TokenUsageProfileStats;
|
|
pub use types::TurnAttemptsSiblingTurnsResponse;
|
|
|
|
pub use client::plan_history::PlanLimitBreakdown;
|
|
pub use client::plan_history::PlanLimitDimension;
|
|
pub use client::plan_history::PlanLimitHistory;
|
|
pub use client::plan_history::PlanLimitPeriod;
|
|
pub use client::plan_history::PlanLimitValue;
|
|
|
|
pub use client::task_usage::TaskCredits;
|
|
pub use client::task_usage::TaskUsage;
|
|
pub use client::task_usage::TaskUsageAmounts;
|
|
pub use client::task_usage::TaskUsageGroup;
|
|
pub use client::task_usage::TaskUsageResponse;
|
|
pub use client::task_usage::TaskUsageStatus;
|
|
pub use client::task_usage::TaskUsageThread;
|
|
pub use codex_backend_openapi_models::models::analytics as analytics_models;
|