mirror of
https://github.com/openai/codex.git
synced 2026-11-01 16:17:58 +00:00
feat: phase 2 usage (#12121)
This commit is contained in:
@@ -1498,6 +1498,11 @@ impl Session {
|
||||
state.history.get_total_token_usage_breakdown()
|
||||
}
|
||||
|
||||
pub(crate) async fn total_token_usage(&self) -> Option<TokenUsage> {
|
||||
let state = self.state.lock().await;
|
||||
state.token_info().map(|info| info.total_token_usage)
|
||||
}
|
||||
|
||||
pub(crate) async fn get_estimated_token_count(
|
||||
&self,
|
||||
turn_context: &TurnContext,
|
||||
|
||||
Reference in New Issue
Block a user