agent2: Fix remaining update_model_request_usage todos (#36570)

Release Notes:

- N/A
This commit is contained in:
Bennet Bo Fenner
2025-08-20 09:54:26 +00:00
committed by GitHub
parent 83d361ba69
commit 0a80209c5e
+8 -10
View File
@@ -1563,12 +1563,11 @@ impl Thread {
let text = match event {
LanguageModelCompletionEvent::Text(text) => text,
LanguageModelCompletionEvent::StatusUpdate(
CompletionRequestStatus::UsageUpdated { .. },
CompletionRequestStatus::UsageUpdated { amount, limit },
) => {
// this.update(cx, |thread, cx| {
// thread.update_model_request_usage(amount as u32, limit, cx);
// })?;
// TODO: handle usage update
this.update(cx, |thread, cx| {
thread.update_model_request_usage(amount, limit, cx);
})?;
continue;
}
_ => continue,
@@ -1629,12 +1628,11 @@ impl Thread {
let text = match event {
LanguageModelCompletionEvent::Text(text) => text,
LanguageModelCompletionEvent::StatusUpdate(
CompletionRequestStatus::UsageUpdated { .. },
CompletionRequestStatus::UsageUpdated { amount, limit },
) => {
// this.update(cx, |thread, cx| {
// thread.update_model_request_usage(amount as u32, limit, cx);
// })?;
// TODO: handle usage update
this.update(cx, |thread, cx| {
thread.update_model_request_usage(amount, limit, cx);
})?;
continue;
}
_ => continue,