lil branch refactor

This commit is contained in:
Dax Raad
2025-11-26 12:34:48 -05:00
parent e8e474597c
commit 98031173b6
5 changed files with 14 additions and 28 deletions

View File

@@ -376,22 +376,7 @@ export namespace Server {
description: "VCS info",
content: {
"application/json": {
schema: resolver(
z
.object({
worktree: z.string(),
directory: z.string(),
projectID: z.string(),
vcs: z
.object({
branch: z.string(),
})
.optional(),
})
.meta({
ref: "VcsInfo",
}),
),
schema: resolver(Vcs.Info),
},
},
},
@@ -400,10 +385,7 @@ export namespace Server {
async (c) => {
const branch = await Vcs.branch()
return c.json({
worktree: Instance.worktree,
directory: Instance.directory,
projectID: Instance.project.id,
vcs: Instance.project.vcs ? { branch } : undefined,
branch,
})
},
)