File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,8 +82,11 @@ describeVcs("Vcs", () => {
8282 const pending = nextBranchUpdate ( tmp . path )
8383
8484 const head = path . join ( tmp . path , ".git" , "HEAD" )
85- await fs . writeFile ( head , `ref: refs/heads/${ branch }
86- ` )
85+ await fs . writeFile (
86+ head ,
87+ `ref: refs/heads/${ branch }
88+ ` ,
89+ )
8790
8891 const updated = await pending
8992 expect ( updated ) . toBe ( branch )
@@ -99,8 +102,11 @@ describeVcs("Vcs", () => {
99102 const pending = nextBranchUpdate ( tmp . path )
100103
101104 const head = path . join ( tmp . path , ".git" , "HEAD" )
102- await fs . writeFile ( head , `ref: refs/heads/${ branch }
103- ` )
105+ await fs . writeFile (
106+ head ,
107+ `ref: refs/heads/${ branch }
108+ ` ,
109+ )
104110
105111 await pending
106112 const current = await Vcs . branch ( )
Original file line number Diff line number Diff line change @@ -1994,7 +1994,7 @@ export type Path = {
19941994}
19951995
19961996export type VcsInfo = {
1997- branch : string
1997+ branch ? : string
19981998}
19991999
20002000export type Command = {
Original file line number Diff line number Diff line change 67186718 ]
67196719 }
67206720 },
6721- "/vcs/diff" : {
6722- "get" : {
6723- "operationId" : " vcs.diff" ,
6724- "parameters" : [
6725- {
6726- "in" : " query" ,
6727- "name" : " directory" ,
6728- "schema" : {
6729- "type" : " string"
6730- }
6731- },
6732- {
6733- "in" : " query" ,
6734- "name" : " workspace" ,
6735- "schema" : {
6736- "type" : " string"
6737- }
6738- },
6739- {
6740- "in" : " query" ,
6741- "name" : " mode" ,
6742- "schema" : {
6743- "type" : " string" ,
6744- "enum" : [" git" , " branch" ]
6745- },
6746- "required" : true
6747- }
6748- ],
6749- "summary" : " Get VCS diff" ,
6750- "description" : " Retrieve the current git diff for the working tree or against the default branch." ,
6751- "responses" : {
6752- "200" : {
6753- "description" : " VCS diff" ,
6754- "content" : {
6755- "application/json" : {
6756- "schema" : {
6757- "type" : " array" ,
6758- "items" : {
6759- "$ref" : " #/components/schemas/FileDiff"
6760- }
6761- }
6762- }
6763- }
6764- }
6765- },
6766- "x-codeSamples" : [
6767- {
6768- "lang" : " js" ,
6769- "source" : " import { createOpencodeClient } from \" @opencode-ai/sdk\n\n const client = createOpencodeClient()\n await client.vcs.diff({\n ...\n })"
6770- }
6771- ]
6772- }
6773- },
67746721 "/command" : {
67756722 "get" : {
67766723 "operationId" : " command.list" ,
1253412481 "properties" : {
1253512482 "branch" : {
1253612483 "type" : " string"
12537- },
12538- "default_branch" : {
12539- "type" : " string"
1254012484 }
1254112485 }
1254212486 },
You can’t perform that action at this time.
0 commit comments