agent: Show request usage in the panel (#29006)

This PR adds a banner showing request usage in the Agent panel:

<img width="640" alt="Screenshot 2025-04-17 at 5 51 46 PM"
src="https://github.com/user-attachments/assets/e0eb036c-57c1-441c-bbab-7dab1c6e56d9"
/>

Only visible to users on the new billing.

Note to Joseph: Doesn't need to be cherry-picked to Preview.

Release Notes:

- N/A

---------

Co-authored-by: Nate <nate@zed.dev>
This commit is contained in:
Marshall Bowers 2025-04-17 18:16:57 -04:00 committed by GitHub
parent 4095011af5
commit c2cd4fd7a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 248 additions and 223 deletions

View file

@ -421,7 +421,8 @@ impl Example {
ThreadEvent::MessageDeleted(_) |
ThreadEvent::SummaryChanged |
ThreadEvent::SummaryGenerated |
ThreadEvent::CheckpointChanged => {
ThreadEvent::CheckpointChanged |
ThreadEvent::UsageUpdated(_) => {
if std::env::var("ZED_EVAL_DEBUG").is_ok() {
println!("{}Event: {:#?}", log_prefix, event);
}