mirror of
https://github.com/openai/codex.git
synced 2026-05-02 20:32:04 +03:00
Added multi-limit support end-to-end by carrying limit_name in rate-limit snapshots and handling multiple buckets instead of only codex. Extended /usage client parsing to consume additional_rate_limits Updated TUI /status and in-memory state to store/render per-limit snapshots Extended app-server rate-limit read response: kept rate_limits and added rate_limits_by_name. Adjusted usage-limit error messaging for non-default codex limit buckets
28 lines
1014 B
Rust
28 lines
1014 B
Rust
//! Status output formatting and display adapters for the TUI.
|
|
//!
|
|
//! This module turns protocol-level snapshots into stable display structures used by `/status`
|
|
//! output and footer/status-line helpers, while keeping rendering concerns out of transport-facing
|
|
//! code.
|
|
//!
|
|
//! `rate_limits` is the main integration point for status-line usage-limit items: it converts raw
|
|
//! window snapshots into local-time labels and classifies data as available, stale, or missing.
|
|
mod account;
|
|
mod card;
|
|
mod format;
|
|
mod helpers;
|
|
mod rate_limits;
|
|
|
|
#[cfg(test)]
|
|
pub(crate) use card::new_status_output;
|
|
pub(crate) use card::new_status_output_with_rate_limits;
|
|
pub(crate) use helpers::format_directory_display;
|
|
pub(crate) use helpers::format_tokens_compact;
|
|
pub(crate) use rate_limits::RateLimitSnapshotDisplay;
|
|
pub(crate) use rate_limits::RateLimitWindowDisplay;
|
|
#[cfg(test)]
|
|
pub(crate) use rate_limits::rate_limit_snapshot_display;
|
|
pub(crate) use rate_limits::rate_limit_snapshot_display_for_limit;
|
|
|
|
#[cfg(test)]
|
|
mod tests;
|