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): open the right sidebar on Agents

RoversX900b04395332
diff --git a/wezterm-gui/src/termwindow/mod.rs b/wezterm-gui/src/termwindow/mod.rs
index 88d9c346..36784071 100644
--- a/wezterm-gui/src/termwindow/mod.rs
+++ b/wezterm-gui/src/termwindow/mod.rs
@@ -4832,7 +4832,7 @@ impl TermWindow {
workspace_notification_pulse_started_at: None,
right_sidebar_width: ui::right_sidebar_width_for_metrics(&render_metrics, dpi as usize),
right_sidebar_collapsed: true,
- right_sidebar_mode: RightSidebarMode::Snippets,
+ right_sidebar_mode: RightSidebarMode::initial(),
right_sidebar_agents_scroll: 0.0,
right_sidebar_agents_open_subtasks: HashSet::new(),
right_sidebar_agents_fitted: HashMap::new(),
diff --git a/wezterm-gui/src/termwindow/ui/right_sidebar.rs b/wezterm-gui/src/termwindow/ui/right_sidebar.rs
index 1d978194..76304a10 100644
--- a/wezterm-gui/src/termwindow/ui/right_sidebar.rs
+++ b/wezterm-gui/src/termwindow/ui/right_sidebar.rs
@@ -2036,6 +2036,17 @@ impl RightSidebarMode {
.collect()
}
+ /// The panel a new window's sidebar opens on: Agents while it is
+ /// offered, otherwise the first panel that is.
+ pub(crate) fn initial() -> Self {
+ let panels = Self::enabled_panels();
+ if panels.contains(&Self::Agents) {
+ Self::Agents
+ } else {
+ panels.first().copied().unwrap_or(Self::Snippets)
+ }
+ }
+
/// Whether the sidebar offers anything at all. Hot: `right_sidebar_width`
/// asks it, and that runs several times per frame and again on every
/// pointer move over the tab bar -- so one settings read, no Vec, and it