Skip to content

Commit b320926

Browse files
committed
chore: remove unused current_credits field from snapshot structs
1 parent 5d07d85 commit b320926

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

codex-rs/tui/src/statusline/code88_api.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,7 @@ pub(crate) struct TimelineDayEntry {
143143
pub(crate) struct Code88AggregatedData {
144144
/// Service tier (e.g., "LV5", "LV3", "LV1").
145145
pub service_tier: Option<String>,
146-
/// Current subscription remaining credits.
147-
pub current_credits: Option<f64>,
148-
/// Current subscription credit limit.
146+
/// Current subscription credit limit (used for loading state detection).
149147
pub credit_limit: Option<f64>,
150148
/// Today's total cost (consumed credits).
151149
pub daily_cost: Option<f64>,
@@ -539,7 +537,6 @@ pub(crate) async fn fetch_88code_aggregated(
539537

540538
Ok(Code88AggregatedData {
541539
service_tier,
542-
current_credits: usage_data.current_credits,
543540
credit_limit: usage_data.credit_limit,
544541
daily_cost,
545542
daily_available,

codex-rs/tui/src/statusline/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,7 @@ pub(crate) struct StatusLineDevspaceSnapshot {
203203
pub(crate) struct StatusLine88CodeSnapshot {
204204
/// Service tier (e.g., "LV5", "LV3", "LV1").
205205
pub service_tier: Option<String>,
206-
/// Current subscription remaining credits.
207-
pub current_credits: Option<f64>,
208-
/// Current subscription credit limit.
206+
/// Current subscription credit limit (used for loading state detection).
209207
pub credit_limit: Option<f64>,
210208
/// Today's total cost (consumed credits).
211209
pub daily_cost: Option<f64>,

codex-rs/tui/src/statusline/overlay.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ impl StatusLineOverlay {
176176
let snapshot = match fetch_88code_aggregated(&login_token, &api_key).await {
177177
Ok(data) => Some(StatusLine88CodeSnapshot {
178178
service_tier: data.service_tier,
179-
current_credits: data.current_credits,
180179
credit_limit: data.credit_limit,
181180
daily_cost: data.daily_cost,
182181
daily_available: data.daily_available,

0 commit comments

Comments
 (0)