mirror of
https://github.com/openai/codex.git
synced 2026-04-28 10:21:06 +03:00
[app-server] feat: add turn/diff/updated event (#7279)
This is the V2 version of `EventMsg::TurnDiff`. I decided to expose this as a `turn/*` notification as opposed to an Item to make it more explicit that the diff is accumulated throughout a turn (every `apply_patch` call updates the running diff). Also, I don't think it's worth persisting this diff as an Item because it can always be recomputed from the actual `FileChange` Items.
This commit is contained in:
@@ -1141,6 +1141,16 @@ pub struct TurnCompletedNotification {
|
||||
pub turn: Turn,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
/// Notification that the turn-level unified diff has changed.
|
||||
/// Contains the latest aggregated diff across all file changes in the turn.
|
||||
pub struct TurnDiffUpdatedNotification {
|
||||
pub turn_id: String,
|
||||
pub diff: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
|
||||
Reference in New Issue
Block a user