chore: generate
This commit is contained in:
@@ -45,7 +45,10 @@ describe("session diff with missing patch (#26574)", () => {
|
|||||||
directory: tmp.path,
|
directory: tmp.path,
|
||||||
fn: async () => {
|
fn: async () => {
|
||||||
const session = await Effect.runPromise(
|
const session = await Effect.runPromise(
|
||||||
Effect.provide(Session.Service.use((s) => s.create({ title: "missing-patch" })), Session.defaultLayer),
|
Effect.provide(
|
||||||
|
Session.Service.use((s) => s.create({ title: "missing-patch" })),
|
||||||
|
Session.defaultLayer,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
// Mimic legacy/imported on-disk shape: a diff entry with no
|
// Mimic legacy/imported on-disk shape: a diff entry with no
|
||||||
@@ -61,10 +64,9 @@ describe("session diff with missing patch (#26574)", () => {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const headers = { "x-opencode-directory": tmp.path }
|
const headers = { "x-opencode-directory": tmp.path }
|
||||||
const response = await Server.Default().app.request(
|
const response = await Server.Default().app.request(pathFor(SessionPaths.diff, { sessionID: session.id }), {
|
||||||
pathFor(SessionPaths.diff, { sessionID: session.id }),
|
headers,
|
||||||
{ headers },
|
})
|
||||||
)
|
|
||||||
expect(response.status).toBe(200)
|
expect(response.status).toBe(200)
|
||||||
const body = (await response.json()) as Array<{ file: string; patch?: string; additions: number }>
|
const body = (await response.json()) as Array<{ file: string; patch?: string; additions: number }>
|
||||||
expect(body).toHaveLength(1)
|
expect(body).toHaveLength(1)
|
||||||
|
|||||||
@@ -1520,7 +1520,7 @@ export type VcsFileStatus = {
|
|||||||
|
|
||||||
export type VcsFileDiff = {
|
export type VcsFileDiff = {
|
||||||
file: string
|
file: string
|
||||||
patch: string
|
patch?: string
|
||||||
additions: number
|
additions: number
|
||||||
deletions: number
|
deletions: number
|
||||||
status?: "added" | "deleted" | "modified"
|
status?: "added" | "deleted" | "modified"
|
||||||
|
|||||||
@@ -13039,7 +13039,7 @@
|
|||||||
"enum": ["added", "deleted", "modified"]
|
"enum": ["added", "deleted", "modified"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["file", "patch", "additions", "deletions"],
|
"required": ["file", "additions", "deletions"],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
"VcsApplyError": {
|
"VcsApplyError": {
|
||||||
|
|||||||
Reference in New Issue
Block a user