mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
46ab9974dc
Addresses #17498 Problem: The TUI derived /status instruction source paths from the local client environment, which could show stale <none> output or incorrect paths when connected to a remote app server. Solution: Add an app-server v2 instructionSources snapshot to thread start/resume/fork responses, default it to an empty list when older servers omit it, and render TUI /status from that server-provided session data. Additional context: The app-server field is intentionally named instructionSources rather than AGENTS.md-specific terminology because the loaded instruction sources can include global instructions, project AGENTS.md files, AGENTS.override.md, user-defined instruction files, and future dynamic sources.
34 lines
1.2 KiB
Rust
34 lines
1.2 KiB
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;
|
|
|
|
pub(crate) use account::StatusAccountDisplay;
|
|
pub(crate) use card::StatusHistoryHandle;
|
|
#[cfg(test)]
|
|
pub(crate) use card::new_status_output;
|
|
#[cfg(test)]
|
|
pub(crate) use card::new_status_output_with_rate_limits;
|
|
pub(crate) use card::new_status_output_with_rate_limits_handle;
|
|
pub(crate) use helpers::compose_agents_summary;
|
|
pub(crate) use helpers::format_directory_display;
|
|
pub(crate) use helpers::format_tokens_compact;
|
|
pub(crate) use helpers::plan_type_display_name;
|
|
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;
|