swarm: /clear starts an agent's next turn on a fresh session
This commit is contained in:
parent
7b62f2c22a
commit
fb9d4b5040
1 changed files with 155 additions and 22 deletions
|
|
@ -448,6 +448,11 @@ pub enum AgentControl {
|
|||
/// Interrupt the turn in flight, as the agent's own cancel button does.
|
||||
/// Answered with an [`AgentControlReply`].
|
||||
Cancel,
|
||||
/// Start the next turn on a fresh claude session instead of resuming the
|
||||
/// current one; the swarm UI's `/clear`. Deferred to the turn boundary
|
||||
/// like the harness's own reset. Answered with an [`AgentControlReply`]
|
||||
/// whose `acted` is always `true`.
|
||||
NewSession,
|
||||
/// Apply a diff to the agent's `AGENTS.md`. Answered with an
|
||||
/// [`agents_md::ApplyReply`].
|
||||
ApplyAgentsMd(agents_md::Apply),
|
||||
|
|
@ -462,7 +467,7 @@ pub enum AgentControl {
|
|||
#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
|
||||
pub struct AgentControlReply {
|
||||
/// Whether the command changed anything: `false` for a cancel that
|
||||
/// found no turn in flight.
|
||||
/// found no turn in flight. A [`AgentControl::NewSession`] always acts.
|
||||
pub acted: bool,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue