feat: phase 2 usage (#12121)

This commit is contained in:
jif-oai
2026-02-18 11:33:55 +00:00
committed by GitHub
Unverified
parent f0ee2d9f67
commit 2293ab0e21
5 changed files with 56 additions and 0 deletions
+5
View File
@@ -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,