Skip to main content

announce_start

Function announce_start 

Source
pub(super) async fn announce_start(
    state: &AppState,
    leader: &Leader,
    user_instruction: &str,
    route_asked: bool,
    headline: String,
    body: String,
    quote: &str,
) -> Result<bool, SpawnError>
Expand description

Tell the person in the leader’s pane that it starts agents, and whether it may go ahead (docs/specs/SPEC_AGENT_SPAWN_NOTICE_IN_THE_PANE_2026_11_08.md). Nothing waits for a click:

  • the person’s own turn asked for it and the agent chose no route (the QuitSelf rule, self_quit::gate), the “Agents may start agents” setting is on, or the person said Always to this leader: a one-line notice, and it goes ahead;
  • otherwise a card with a countdown (Stop it, Start now, Always allow), and it goes ahead when the countdown ends. With no window connected there is no one to stop it, so it goes ahead.

Err when the person stopped it, or the leader is gone. Returns whether a card was shown.