feat(worktrees): ship upstream-first worktree flow across web + vscode (#418)
* feat: add worktree validation and deleteLocalBranch option Add API to validate and create worktrees with new payload types Allow deleting local branches when removing worktrees via UI and API Introduce OpenCode style random names for worktrees when not provided * feat: enable SSH/HTTPS transport detection for PR picker Load remotes for the current project directory to inform PR picker options. Determine preferred push transport from remotes and apply it. Expose sshUrl in API for frontend to build SSH clone URLs * feat: extend head repo with sshUrl and improve push error messages Add sshUrl field to head repo mapping Enhance push failure handling to display stderr or stdout details Return push details on success * fix: worktree path * feat: worktree set upstream on creation Enable pushing to upstream by default when no remote is specified Remove per-remote dropdown for push actions and auto-use first/upstream remote Update server and VSCode git services to support push without explicit remote and set upstream * fix: worktree-name sanitization * feat: rename worktree path field and branch prefix * feat(worktrees): add git.worktree facade, validation endpoint, upstream/remote-aware creation, and non-blocking setup execution * refactor(git): use git.worktree namespace in branch picker * feat(worktrees): sync OpenCode sandbox metadata on create/remove * fix(worktrees): accept new path key in workspace guard and validate remote startRef * chore(docs): remove temporary worktree testing plan * feat: add git worktree management API (list/create/delete/validate) for vscode * feat: wire root tracking remote and defaults for new worktrees Add resolveRootTrackingRemote to detect upstream remote for root branch Apply upstream defaults when creating new worktrees to auto-set upstream Replace validation and creation flow to use new worktreeCreate APIs * feat(worktrees): enable root tracking remote handling
This commit is contained in:
@@ -18,6 +18,9 @@ export const createWebGitAPI = (): GitAPI => ({
|
||||
generateCommitMessage: gitApiHttp.generateCommitMessage,
|
||||
generatePullRequestDescription: gitApiHttp.generatePullRequestDescription,
|
||||
listGitWorktrees: gitApiHttp.listGitWorktrees,
|
||||
validateGitWorktree: gitApiHttp.validateGitWorktree,
|
||||
createGitWorktree: gitApiHttp.createGitWorktree,
|
||||
deleteGitWorktree: gitApiHttp.deleteGitWorktree,
|
||||
createGitCommit(directory: string, message: string, options?: CreateGitCommitOptions) {
|
||||
return gitApiHttp.createGitCommit(directory, message, options);
|
||||
},
|
||||
@@ -48,4 +51,10 @@ export const createWebGitAPI = (): GitAPI => ({
|
||||
stash: gitApiHttp.stash,
|
||||
stashPop: gitApiHttp.stashPop,
|
||||
getConflictDetails: gitApiHttp.getConflictDetails,
|
||||
worktree: {
|
||||
list: gitApiHttp.listGitWorktrees,
|
||||
validate: gitApiHttp.validateGitWorktree,
|
||||
create: gitApiHttp.createGitWorktree,
|
||||
remove: gitApiHttp.deleteGitWorktree,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user