Show the context fill grade as a pie chart
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -159,18 +159,27 @@ impl App {
|
||||
container(
|
||||
column![
|
||||
composer,
|
||||
progress_bar(0.0..=1.0, context_fraction).height(3),
|
||||
row![
|
||||
icon(ICON_PAPERCLIP, 19),
|
||||
text(format!(
|
||||
"{} / {} tokens ({:.0}%) • {}",
|
||||
self.context_used,
|
||||
self.context_limit,
|
||||
context_fraction * 100.0,
|
||||
self.tokens_per_second.map_or_else(
|
||||
|| "— tok/s".to_owned(),
|
||||
|speed| format!("{speed:.1} tok/s")
|
||||
tooltip(
|
||||
context_pie(context_fraction, 19),
|
||||
container(
|
||||
text(format!(
|
||||
"{} / {} tokens ({:.0}%)",
|
||||
self.context_used,
|
||||
self.context_limit,
|
||||
context_fraction * 100.0
|
||||
))
|
||||
.size(12)
|
||||
)
|
||||
.padding(10)
|
||||
.style(preference_group_style),
|
||||
tooltip::Position::Top,
|
||||
)
|
||||
.gap(6),
|
||||
text(self.tokens_per_second.map_or_else(
|
||||
|| "— tok/s".to_owned(),
|
||||
|speed| format!("{speed:.1} tok/s")
|
||||
))
|
||||
.size(11)
|
||||
.color(muted_text()),
|
||||
@@ -184,6 +193,7 @@ impl App {
|
||||
.size(12),
|
||||
action,
|
||||
]
|
||||
.spacing(6)
|
||||
.align_y(Alignment::Center),
|
||||
]
|
||||
.spacing(8),
|
||||
|
||||
Reference in New Issue
Block a user