feat(httpapi): bridge worktree mutations (#24371)

This commit is contained in:
Kit Langton
2026-04-25 15:35:15 -04:00
committed by GitHub
parent 474024f9e6
commit a369130226
6 changed files with 164 additions and 45 deletions
@@ -230,14 +230,14 @@ export const ExperimentalRoutes = lazy(() =>
description: "Worktree created",
content: {
"application/json": {
schema: resolver(Worktree.Info),
schema: resolver(Worktree.Info.zod),
},
},
},
...errors(400),
},
}),
validator("json", Worktree.CreateInput.optional()),
validator("json", Worktree.CreateInput.zod.optional()),
async (c) =>
jsonRequest("ExperimentalRoutes.worktree.create", c, function* () {
const body = c.req.valid("json")
@@ -286,7 +286,7 @@ export const ExperimentalRoutes = lazy(() =>
...errors(400),
},
}),
validator("json", Worktree.RemoveInput),
validator("json", Worktree.RemoveInput.zod),
async (c) =>
jsonRequest("ExperimentalRoutes.worktree.remove", c, function* () {
const body = c.req.valid("json")
@@ -315,7 +315,7 @@ export const ExperimentalRoutes = lazy(() =>
...errors(400),
},
}),
validator("json", Worktree.ResetInput),
validator("json", Worktree.ResetInput.zod),
async (c) =>
jsonRequest("ExperimentalRoutes.worktree.reset", c, function* () {
const body = c.req.valid("json")