authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-08 22:57:15-08:00
committergravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-11 09:00:18-08:00
log3047974fdc759674eeac3969456656e3b8bf40d1
tree32396cde7ddebcd8a35bbad327a7cbb329b4665e
parentd64f78a9498ae017db7efde4cc5fbbfd07091a79

Add branch/env picker toolbar and create branch flow

Move branch picking from sidebar context menu into ChatView input toolbar. Add env mode toggle (local/worktree) that locks after first message, branch dropdown with create-new-branch inline form, and wire up git:create-branch IPC channel. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

2 files changed, 8 insertions(+), 0 deletions(-)

packages/contracts/src/git.ts+6
......@@ -17,6 +17,11 @@ export const gitRemoveWorktreeInputSchema = z.object({
1717 path: z.string().min(1),
1818});
1919
20export const gitCreateBranchInputSchema = z.object({
21 cwd: z.string().min(1),
22 branch: z.string().min(1),
23});
24
2025export const gitInitInputSchema = z.object({
2126 cwd: z.string().min(1),
2227});
......@@ -44,6 +49,7 @@ export type GitWorktree = z.infer<typeof gitWorktreeSchema>;
4449export type GitRemoveWorktreeInput = z.infer<
4550 typeof gitRemoveWorktreeInputSchema
4651>;
52export type GitCreateBranchInput = z.infer<typeof gitCreateBranchInputSchema>;
4753export type GitInitInput = z.infer<typeof gitInitInputSchema>;
4854
4955export interface GitListBranchesResult {
packages/contracts/src/ipc.ts+2
......@@ -1,5 +1,6 @@
11import type { AgentConfig, AgentExit, OutputChunk } from "./agent";
22import type {
3 GitCreateBranchInput,
34 GitCreateWorktreeInput,
45 GitCreateWorktreeResult,
56 GitInitInput,
......@@ -74,6 +75,7 @@ export interface NativeApi {
7475 listBranches: (input: GitListBranchesInput) => Promise<GitListBranchesResult>;
7576 createWorktree: (input: GitCreateWorktreeInput) => Promise<GitCreateWorktreeResult>;
7677 removeWorktree: (input: GitRemoveWorktreeInput) => Promise<void>;
78 createBranch: (input: GitCreateBranchInput) => Promise<void>;
7779 init: (input: GitInitInput) => Promise<void>;
7880 };
7981}