From 112b99035ce4ff810d60ab94e3fccbbf3594004f Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Wed, 10 Jun 2026 18:09:41 +0800 Subject: [PATCH] feat(web): base_branch selector with remote branch list in worktree creation --- web/src/api/workspaces.ts | 5 +++ .../workspaces/components/WorktreesTab.vue | 40 +++++++++++++++++-- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/web/src/api/workspaces.ts b/web/src/api/workspaces.ts index c643fed..b2a8869 100644 --- a/web/src/api/workspaces.ts +++ b/web/src/api/workspaces.ts @@ -52,6 +52,11 @@ export const workspacesApi = { release: (wtID: string) => request(`/api/v1/worktrees/${enc(wtID)}/release`, { method: 'POST' }), + listBranches(wsID: string): Promise { + return request<{ branches: string[] }>(`/api/v1/workspaces/${enc(wsID)}/branches`) + .then(r => r.branches) + }, + // ===== Git ops ===== statusOnMain: (wsID: string) => request(`/api/v1/workspaces/${enc(wsID)}/main/status`), diff --git a/web/src/views/workspaces/components/WorktreesTab.vue b/web/src/views/workspaces/components/WorktreesTab.vue index d432f85..e0093d9 100644 --- a/web/src/views/workspaces/components/WorktreesTab.vue +++ b/web/src/views/workspaces/components/WorktreesTab.vue @@ -6,7 +6,7 @@ > 新建 worktree @@ -31,7 +31,13 @@ - +