Add /side conversations (#18190)

The TUI supports long-running turns and agent threads, but quick side
questions have required interrupting the main flow or manually
forking/navigating threads. This PR adds a guarded `/side` flow so users
can ask brief side-conversation questions in an ephemeral fork while
keeping the primary thread focused. This also helps address the feature
request in #18125.

The implementation creates one side conversation at a time, lets `/side`
open either an empty side thread or immediately submit `/side
<question>`, and returns to the parent with Esc or Ctrl+C. Side
conversations get hidden developer guardrails that treat inherited
history as reference-only and steer the model away from workspace
mutations unless explicitly requested in the side conversation.

The TUI hides most slash commands while side mode is active, leaving
only `/copy`, `/diff`, `/mention`, and `/status` available there.
This commit is contained in:
Eric Traut authored and GitHub committed 2026-04-19 11:59:41 -07:00
1 parent ed1c5013ab
commit 95dafbc7b5
20 files changed
+1701 -80

No files matched your search

@@ -38,6 +38,7 @@ pub(crate) struct CommandPopupFlags {
pub(crate) realtime_conversation_enabled: bool,
pub(crate) audio_device_selection_enabled: bool,
pub(crate) windows_degraded_sandbox_active: bool,
pub(crate) side_conversation_active: bool,
}
impl From<CommandPopupFlags> for slash_commands::BuiltinCommandFlags {
@@ -51,6 +52,7 @@ impl From<CommandPopupFlags> for slash_commands::BuiltinCommandFlags {
realtime_conversation_enabled: value.realtime_conversation_enabled,
audio_device_selection_enabled: value.audio_device_selection_enabled,
allow_elevate_sandbox: value.windows_degraded_sandbox_active,
side_conversation_active: value.side_conversation_active,
}
}
}
@@ -359,6 +361,7 @@ mod tests {
realtime_conversation_enabled: false,
audio_device_selection_enabled: false,
windows_degraded_sandbox_active: false,
side_conversation_active: false,
});
popup.on_composer_text_change("/collab".to_string());
@@ -379,6 +382,7 @@ mod tests {
realtime_conversation_enabled: false,
audio_device_selection_enabled: false,
windows_degraded_sandbox_active: false,
side_conversation_active: false,
});
popup.on_composer_text_change("/plan".to_string());
@@ -399,6 +403,7 @@ mod tests {
realtime_conversation_enabled: false,
audio_device_selection_enabled: false,
windows_degraded_sandbox_active: false,
side_conversation_active: false,
});
popup.on_composer_text_change("/pers".to_string());
@@ -426,6 +431,7 @@ mod tests {
realtime_conversation_enabled: false,
audio_device_selection_enabled: false,
windows_degraded_sandbox_active: false,
side_conversation_active: false,
});
popup.on_composer_text_change("/personality".to_string());
@@ -446,6 +452,7 @@ mod tests {
realtime_conversation_enabled: true,
audio_device_selection_enabled: false,
windows_degraded_sandbox_active: false,
side_conversation_active: false,
});
popup.on_composer_text_change("/aud".to_string());