Skip to content

A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.

feat(gui): show a finished result as a tick in every status style

RoversXdbca70e7dfc5
diff --git a/wezterm-gui/src/termwindow/render/hover.rs b/wezterm-gui/src/termwindow/render/hover.rs
index ca3eecc9..e629cf63 100644
--- a/wezterm-gui/src/termwindow/render/hover.rs
+++ b/wezterm-gui/src/termwindow/render/hover.rs
@@ -398,7 +398,11 @@ impl TermWindow {
// The ring is these icons; the other styles draw the state as the
// sidebar does.
let status_style = crate::native_settings::agents_status();
- if status_style != crate::native_settings::NativeThreadStatus::Ring {
+ // A finished result keeps the card's own tick, at the card's icon
+ // size, whatever the style.
+ if status_style != crate::native_settings::NativeThreadStatus::Ring
+ && state != ShownState::Done
+ {
let Some((mark, color)) =
crate::termwindow::ui::agent_panel::agent_state_mark(state, palette, palette.muted_text)
else {
diff --git a/wezterm-gui/src/termwindow/ui/agent_panel.rs b/wezterm-gui/src/termwindow/ui/agent_panel.rs
index a3f55c7b..eaa3b355 100644
--- a/wezterm-gui/src/termwindow/ui/agent_panel.rs
+++ b/wezterm-gui/src/termwindow/ui/agent_panel.rs
@@ -534,7 +534,11 @@ impl TermWindow {
let has_state_icon = state_icon.is_some();
// The ring is these icons; the other styles draw the state as
// the sidebar does.
- let marks = (status_style != NativeThreadStatus::Ring)
+ // A finished result keeps the panel's own tick, at the panel's
+ // icon size, whatever the style.
+ let as_icon = status_style == NativeThreadStatus::Ring
+ || shown == agent_status::ShownState::Done;
+ let marks = (!as_icon)
.then(|| agent_state_mark(shown, chrome, muted_fg))
.flatten()
.map(|(mark, color)| (mark, own_color(color)))
@@ -555,8 +559,8 @@ impl TermWindow {
size,
color,
)?;
- } else if let Some((icon, color, spinning)) = state_icon
- .filter(|_| status_style == NativeThreadStatus::Ring && visible(state_y, state_size))
+ } else if let Some((icon, color, spinning)) =
+ state_icon.filter(|_| as_icon && visible(state_y, state_size))
{
if spinning {
self.paint_spinning_ui_icon_at(
diff --git a/wezterm-gui/src/termwindow/ui/sidebar.rs b/wezterm-gui/src/termwindow/ui/sidebar.rs
index 62a8e4ea..aa512116 100644
--- a/wezterm-gui/src/termwindow/ui/sidebar.rs
+++ b/wezterm-gui/src/termwindow/ui/sidebar.rs
@@ -996,6 +996,23 @@ impl crate::TermWindow {
size: f32,
color: LinearRgba,
) -> anyhow::Result<()> {
+ // A result waiting to be seen is a tick in every style: it is the
+ // one state that asks to be looked at rather than waited on.
+ // As large as the ring style draws it, the marks' own size being
+ // too small for an outline icon.
+ if mark == Mark::Finished {
+ let tick = (size * 1.5).round();
+ let inset = (tick - size) / 2.0;
+ return self.paint_ui_icon(
+ layers,
+ 2,
+ SvgIcon::CircleCheck,
+ (x - inset).max(0.0) as usize,
+ (y - inset).max(0.0) as usize,
+ tick as usize,
+ color,
+ );
+ }
if status == NativeThreadStatus::Ring {
let icon = match mark {
Mark::Working => {