mirror of
https://github.com/openai/codex.git
synced 2026-11-29 00:00:54 +00:00
Document TUI task activity
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user