fix: introduce EventMsg::TurnAborted

This commit is contained in:
Michael Bolin
2025-08-15 17:26:24 -07:00
parent 1ad8ae2579
commit 465175a163
8 changed files with 84 additions and 30 deletions
+9 -1
View File
@@ -39,7 +39,7 @@ pub struct Submission {
#[non_exhaustive]
pub enum Op {
/// Abort current task.
/// This server sends no corresponding Event
/// This server sends [`EventMsg::TurnAborted`] in response.
Interrupt,
/// Input from the user
@@ -422,6 +422,8 @@ pub enum EventMsg {
PlanUpdate(UpdatePlanArgs),
TurnAborted(TurnAbortReason),
/// Notification that the agent is shutting down.
ShutdownComplete,
}
@@ -745,6 +747,12 @@ pub struct Chunk {
pub inserted_lines: Vec<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub enum TurnAbortReason {
Interrupted,
Replaced,
}
#[cfg(test)]
mod tests {
use super::*;