feat(httpapi): bridge worktree read endpoint (#24366)

This commit is contained in:
Kit Langton 2026-04-25 14:55:29 -04:00 committed by GitHub
commit b749866f0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 29 additions and 2 deletions

View file

@ -41,10 +41,11 @@ describe("experimental HttpApi", () => {
})
const headers = { "x-opencode-directory": tmp.path }
const [consoleState, consoleOrgs, toolIDs, resources] = await Promise.all([
const [consoleState, consoleOrgs, toolIDs, worktrees, resources] = await Promise.all([
app().request(ExperimentalPaths.console, { headers }),
app().request(ExperimentalPaths.consoleOrgs, { headers }),
app().request(ExperimentalPaths.toolIDs, { headers }),
app().request(ExperimentalPaths.worktree, { headers }),
app().request(ExperimentalPaths.resource, { headers }),
])
@ -60,6 +61,9 @@ describe("experimental HttpApi", () => {
expect(toolIDs.status).toBe(200)
expect(await toolIDs.json()).toContain("bash")
expect(worktrees.status).toBe(200)
expect(await worktrees.json()).toEqual([])
expect(resources.status).toBe(200)
expect(await resources.json()).toEqual({})
})