feat(sdk): add before and after fields to WorktreeDiffItem schema

Extend WorktreeDiffItem with `before` and `after` string properties
across the OpenAPI spec, generated TypeScript types, and the Zod
schema in worktree-diff.ts. Both fields are marked as required in
the JSON schema definition.
This commit is contained in:
Imanol Maiztegui
2026-04-14 16:28:45 +02:00
parent cc2a03b2a0
commit fb48b5eae4
3 changed files with 22 additions and 1 deletions
@@ -9,6 +9,8 @@ import { Log } from "@/util/log"
export namespace WorktreeDiff {
export const Item = Snapshot.FileDiff.extend({
before: z.string(),
after: z.string(),
tracked: z.boolean(),
generatedLike: z.boolean(),
summarized: z.boolean(),
+2
View File
@@ -1910,6 +1910,8 @@ export type WorktreeDiffItem = {
additions: number
deletions: number
status?: "added" | "deleted" | "modified"
before: string
after: string
tracked: boolean
generatedLike: boolean
summarized: boolean
+18 -1
View File
@@ -15485,6 +15485,12 @@
"type": "string",
"enum": ["added", "deleted", "modified"]
},
"before": {
"type": "string"
},
"after": {
"type": "string"
},
"tracked": {
"type": "boolean"
},
@@ -15498,7 +15504,18 @@
"type": "string"
}
},
"required": ["file", "patch", "additions", "deletions", "tracked", "generatedLike", "summarized", "stamp"]
"required": [
"file",
"patch",
"additions",
"deletions",
"before",
"after",
"tracked",
"generatedLike",
"summarized",
"stamp"
]
},
"ProjectSummary": {
"type": "object",