Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/config/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,29 @@ pub struct OutputStyle {
pub name: String,
}

#[derive(Deserialize)]
pub struct RateLimitPeriod {
/// Usage as a percentage (0-100). Provided directly by Claude Code via stdin.
pub used_percentage: Option<f64>,
/// Unix timestamp (seconds) when this window resets.
pub resets_at: Option<i64>,
}

#[derive(Deserialize)]
pub struct RateLimits {
pub five_hour: Option<RateLimitPeriod>,
pub seven_day: Option<RateLimitPeriod>,
}

#[derive(Deserialize)]
pub struct InputData {
pub model: Model,
pub workspace: Workspace,
pub transcript_path: String,
pub cost: Option<Cost>,
pub output_style: Option<OutputStyle>,
/// Rate limit data passed directly by Claude Code — no API call needed.
pub rate_limits: Option<RateLimits>,
}

// OpenAI-style nested token details
Expand Down
Loading