Document TUI task activity

This commit is contained in:
Charlie Marsh
2026-06-29 09:39:15 -04:00
parent f490e1a5a6
commit 65462b1b22
2 changed files with 8 additions and 0 deletions
@@ -1,3 +1,7 @@
/// Tracks foreground work independently from MCP startup running in the background.
///
/// The aggregate busy state preserves the existing composer and spinner behavior, while the
/// individual states let command gating and status ownership distinguish the two lifecycles.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub(crate) struct TaskActivity {
foreground_task_running: bool,
+4
View File
@@ -248,6 +248,10 @@ impl SlashCommand {
self == SlashCommand::Review || self.available_during_task()
}
/// Whether this command is allowed during MCP startup but not during foreground work.
///
/// Callers use this distinction to preserve the draft until dispatch confirms that no
/// foreground task blocks the command.
pub fn available_during_background_task_only(self) -> bool {
self.available_during_mcp_startup() && !self.available_during_task()
}