mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-14 16:42:38 +00:00
chore: generate
This commit is contained in:
@@ -45,7 +45,10 @@ describe("session diff with missing patch (#26574)", () => {
|
||||
directory: tmp.path,
|
||||
fn: async () => {
|
||||
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
|
||||
@@ -61,10 +64,9 @@ describe("session diff with missing patch (#26574)", () => {
|
||||
)
|
||||
|
||||
const headers = { "x-opencode-directory": tmp.path }
|
||||
const response = await Server.Default().app.request(
|
||||
pathFor(SessionPaths.diff, { sessionID: session.id }),
|
||||
{ headers },
|
||||
)
|
||||
const response = await Server.Default().app.request(pathFor(SessionPaths.diff, { sessionID: session.id }), {
|
||||
headers,
|
||||
})
|
||||
expect(response.status).toBe(200)
|
||||
const body = (await response.json()) as Array<{ file: string; patch?: string; additions: number }>
|
||||
expect(body).toHaveLength(1)
|
||||
|
||||
@@ -1520,7 +1520,7 @@ export type VcsFileStatus = {
|
||||
|
||||
export type VcsFileDiff = {
|
||||
file: string
|
||||
patch: string
|
||||
patch?: string
|
||||
additions: number
|
||||
deletions: number
|
||||
status?: "added" | "deleted" | "modified"
|
||||
|
||||
@@ -13039,7 +13039,7 @@
|
||||
"enum": ["added", "deleted", "modified"]
|
||||
}
|
||||
},
|
||||
"required": ["file", "patch", "additions", "deletions"],
|
||||
"required": ["file", "additions", "deletions"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"VcsApplyError": {
|
||||
|
||||
Reference in New Issue
Block a user