| author | |
| committer | |
| log | 3047974fdc759674eeac3969456656e3b8bf40d1 |
| tree | 32396cde7ddebcd8a35bbad327a7cbb329b4665e |
| parent | d64f78a9498ae017db7efde4cc5fbbfd07091a79 |
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({ |
| 17 | 17 | path: z.string().min(1), |
| 18 | 18 | }); |
| 19 | 19 | |
| 20 | export const gitCreateBranchInputSchema = z.object({ | |
| 21 | cwd: z.string().min(1), | |
| 22 | branch: z.string().min(1), | |
| 23 | }); | |
| 24 | ||
| 20 | 25 | export const gitInitInputSchema = z.object({ |
| 21 | 26 | cwd: z.string().min(1), |
| 22 | 27 | }); |
| ... | ... | @@ -44,6 +49,7 @@ export type GitWorktree = z.infer<typeof gitWorktreeSchema>; |
| 44 | 49 | export type GitRemoveWorktreeInput = z.infer< |
| 45 | 50 | typeof gitRemoveWorktreeInputSchema |
| 46 | 51 | >; |
| 52 | export type GitCreateBranchInput = z.infer<typeof gitCreateBranchInputSchema>; | |
| 47 | 53 | export type GitInitInput = z.infer<typeof gitInitInputSchema>; |
| 48 | 54 | |
| 49 | 55 | export interface GitListBranchesResult { |
packages/contracts/src/ipc.ts+2| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | 1 | import type { AgentConfig, AgentExit, OutputChunk } from "./agent"; |
| 2 | 2 | import type { |
| 3 | GitCreateBranchInput, | |
| 3 | 4 | GitCreateWorktreeInput, |
| 4 | 5 | GitCreateWorktreeResult, |
| 5 | 6 | GitInitInput, |
| ... | ... | @@ -74,6 +75,7 @@ export interface NativeApi { |
| 74 | 75 | listBranches: (input: GitListBranchesInput) => Promise<GitListBranchesResult>; |
| 75 | 76 | createWorktree: (input: GitCreateWorktreeInput) => Promise<GitCreateWorktreeResult>; |
| 76 | 77 | removeWorktree: (input: GitRemoveWorktreeInput) => Promise<void>; |
| 78 | createBranch: (input: GitCreateBranchInput) => Promise<void>; | |
| 77 | 79 | init: (input: GitInitInput) => Promise<void>; |
| 78 | 80 | }; |
| 79 | 81 | } |