mirror of
https://github.com/openai/codex.git
synced 2026-11-02 19:43:24 +00:00
fix: introduce EventMsg::TurnAborted
This commit is contained in:
@@ -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::*;
|
||||
|
||||
Reference in New Issue
Block a user