agent2: Fix remaining update_model_request_usage todos (#36570)

Release Notes:

- N/A
This commit is contained in:
Bennet Bo Fenner 2025-08-20 11:54:26 +02:00 committed by GitHub
parent 83d361ba69
commit 0a80209c5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1563,12 +1563,11 @@ impl Thread {
let text = match event { let text = match event {
LanguageModelCompletionEvent::Text(text) => text, LanguageModelCompletionEvent::Text(text) => text,
LanguageModelCompletionEvent::StatusUpdate( LanguageModelCompletionEvent::StatusUpdate(
CompletionRequestStatus::UsageUpdated { .. }, CompletionRequestStatus::UsageUpdated { amount, limit },
) => { ) => {
// this.update(cx, |thread, cx| { this.update(cx, |thread, cx| {
// thread.update_model_request_usage(amount as u32, limit, cx); thread.update_model_request_usage(amount, limit, cx);
// })?; })?;
// TODO: handle usage update
continue; continue;
} }
_ => continue, _ => continue,
@ -1629,12 +1628,11 @@ impl Thread {
let text = match event { let text = match event {
LanguageModelCompletionEvent::Text(text) => text, LanguageModelCompletionEvent::Text(text) => text,
LanguageModelCompletionEvent::StatusUpdate( LanguageModelCompletionEvent::StatusUpdate(
CompletionRequestStatus::UsageUpdated { .. }, CompletionRequestStatus::UsageUpdated { amount, limit },
) => { ) => {
// this.update(cx, |thread, cx| { this.update(cx, |thread, cx| {
// thread.update_model_request_usage(amount as u32, limit, cx); thread.update_model_request_usage(amount, limit, cx);
// })?; })?;
// TODO: handle usage update
continue; continue;
} }
_ => continue, _ => continue,