-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(ux): complete UX overhaul — design system, onboarding, web polish #1277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3845037
d6e6de7
eea1cb4
7bcb0d0
61d3ba0
46d099a
77d4656
1a92147
7e63692
e355259
8b81ce7
f75127d
a2248d8
d9c5ede
8796c7c
9764929
2d6faa9
8103ee4
d5d8389
5de6e60
a895123
f88f96f
37d1e1f
abb3511
1c30e94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -556,6 +556,33 @@ impl Agent { | |
| .await; | ||
| } | ||
|
|
||
| // Emit per-turn cost summary | ||
| { | ||
| let usage = self.cost_guard().model_usage().await; | ||
| let (total_in, total_out, total_cost) = | ||
| usage | ||
| .values() | ||
| .fold((0u64, 0u64, rust_decimal::Decimal::ZERO), |acc, m| { | ||
| ( | ||
| acc.0 + m.input_tokens, | ||
| acc.1 + m.output_tokens, | ||
| acc.2 + m.cost, | ||
| ) | ||
| }); | ||
| let _ = self | ||
| .channels | ||
| .send_status( | ||
| &message.channel, | ||
| StatusUpdate::TurnCost { | ||
| input_tokens: total_in, | ||
| output_tokens: total_out, | ||
| cost_usd: format!("${:.4}", total_cost), | ||
| }, | ||
| &message.metadata, | ||
| ) | ||
| .await; | ||
| } | ||
|
Comment on lines
+559
to
+584
|
||
|
|
||
| Ok(SubmissionResult::response(response)) | ||
| } | ||
| Ok(AgenticLoopResult::NeedApproval { pending }) => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The u32→u64 overflow concern is fixed in this PR. The cumulative-vs-per-turn design issue is a pre-existing limitation of the CostGuard API — tracking per-turn deltas requires snapshotting before/after, which is a separate change. Filed for follow-up.