chore: generate
This commit is contained in:
@@ -82,8 +82,11 @@ describeVcs("Vcs", () => {
|
|||||||
const pending = nextBranchUpdate(tmp.path)
|
const pending = nextBranchUpdate(tmp.path)
|
||||||
|
|
||||||
const head = path.join(tmp.path, ".git", "HEAD")
|
const head = path.join(tmp.path, ".git", "HEAD")
|
||||||
await fs.writeFile(head, `ref: refs/heads/${branch}
|
await fs.writeFile(
|
||||||
`)
|
head,
|
||||||
|
`ref: refs/heads/${branch}
|
||||||
|
`,
|
||||||
|
)
|
||||||
|
|
||||||
const updated = await pending
|
const updated = await pending
|
||||||
expect(updated).toBe(branch)
|
expect(updated).toBe(branch)
|
||||||
@@ -99,8 +102,11 @@ describeVcs("Vcs", () => {
|
|||||||
const pending = nextBranchUpdate(tmp.path)
|
const pending = nextBranchUpdate(tmp.path)
|
||||||
|
|
||||||
const head = path.join(tmp.path, ".git", "HEAD")
|
const head = path.join(tmp.path, ".git", "HEAD")
|
||||||
await fs.writeFile(head, `ref: refs/heads/${branch}
|
await fs.writeFile(
|
||||||
`)
|
head,
|
||||||
|
`ref: refs/heads/${branch}
|
||||||
|
`,
|
||||||
|
)
|
||||||
|
|
||||||
await pending
|
await pending
|
||||||
const current = await Vcs.branch()
|
const current = await Vcs.branch()
|
||||||
|
|||||||
@@ -1994,7 +1994,7 @@ export type Path = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type VcsInfo = {
|
export type VcsInfo = {
|
||||||
branch: string
|
branch?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Command = {
|
export type Command = {
|
||||||
|
|||||||
@@ -6718,59 +6718,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/vcs/diff": {
|
|
||||||
"get": {
|
|
||||||
"operationId": "vcs.diff",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "directory",
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "workspace",
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "mode",
|
|
||||||
"schema": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": ["git", "branch"]
|
|
||||||
},
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": "Get VCS diff",
|
|
||||||
"description": "Retrieve the current git diff for the working tree or against the default branch.",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "VCS diff",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/FileDiff"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"x-codeSamples": [
|
|
||||||
{
|
|
||||||
"lang": "js",
|
|
||||||
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/command": {
|
"/command": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "command.list",
|
"operationId": "command.list",
|
||||||
@@ -12534,9 +12481,6 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"branch": {
|
"branch": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
|
||||||
"default_branch": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user