/status followup (#4304)

- Render `send a message to load usage data` in the beginning of the
session
- Render `data not available yet` if received no rate limits 
- nit case
- Deleted stall snapshots that were moved to
`codex-rs/tui/src/status/snapshots`
This commit is contained in:
Ahmed Ibrahim
2025-09-26 11:16:54 -07:00
committed by GitHub
parent d3f6f6629b
commit 1fba99ed85
12 changed files with 82 additions and 70 deletions

View File

@@ -4,15 +4,15 @@ expression: sanitized
---
/status
╭──────────────────────────────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.0.0) │
│ │
│ Model: gpt-5-codex (reasoning none, summaries auto) │
│ Directory: [[workspace]] │
│ Approval: on-request │
│ Sandbox: read-only │
│ Agents.md: <none> │
│ │
│ Token Usage: 1.2K total (800 input + 400 output) │
│ Monthly limit: [██░░░░░░░░░░░░░░░░░░] 12% used · resets 7 May (07:08) │
╰──────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────────────
│ >_ OpenAI Codex (v0.0.0)
│ Model: gpt-5-codex (reasoning none, summaries auto)
│ Directory: [[workspace]]
│ Approval: on-request
│ Sandbox: read-only
│ Agents.md: <none>
│ Token usage: 1.2K total (800 input + 400 output)
│ Monthly limit: [██░░░░░░░░░░░░░░░░░░] 12% used (resets 07:08 on 7 May) │
╰──────────────────────────────────────────────────────────────────────────

View File

@@ -13,7 +13,7 @@ expression: sanitized
│ Sandbox: workspace-write │
│ Agents.md: <none> │
│ │
│ Token Usage: 1.9K total (1K input + 900 output) │
│ 5h limit: [███████████████░░░░░] 72% used · resets 03:14 │
│ Weekly limit: [█████████░░░░░░░░░░░] 45% used · resets 03:24 │
│ Token usage: 1.9K total (1K input + 900 output) │
│ 5h limit: [███████████████░░░░░] 72% used (resets 03:14)
│ Weekly limit: [█████████░░░░░░░░░░░] 45% used (resets 03:24)
╰───────────────────────────────────────────────────────────────────╯

View File

@@ -0,0 +1,18 @@
---
source: tui/src/status/tests.rs
expression: sanitized
---
/status
╭──────────────────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.0.0) │
│ │
│ Model: gpt-5-codex (reasoning none, summaries auto) │
│ Directory: [[workspace]] │
│ Approval: on-request │
│ Sandbox: read-only │
│ Agents.md: <none> │
│ │
│ Token usage: 750 total (500 input + 250 output) │
│ Limits: data not available yet │
╰──────────────────────────────────────────────────────────────╯

View File

@@ -13,6 +13,6 @@ expression: sanitized
│ Sandbox: read-only │
│ Agents.md: <none> │
│ │
│ Token Usage: 750 total (500 input + 250 output) │
│ Limits: data not available yet
│ Token usage: 750 total (500 input + 250 output) │
│ Limits: send a message to load usage data
╰──────────────────────────────────────────────────────────────╯

View File

@@ -13,7 +13,7 @@ expression: sanitized
│ Sandbox: read-only │
│ Agents.md: <none> │
│ │
│ Token Usage: 1.9K total (1K input + 90 │
│ Token usage: 1.9K total (1K input + 90 │
│ 5h limit: [███████████████░░░░░] 72% │
· resets 03:14 │
(resets 03:14)
╰────────────────────────────────────────────╯