| author | |
| committer | |
| log | 59448593d8e6b067e1691150f1925107114f3cc7 |
| tree | 5526c60e0d063f1d335166a50419b477663b1c63 |
| parent | 3047974fdc759674eeac3969456656e3b8bf40d1 |
Wire up git:checkout IPC channel across the full stack so branch
selection actually checks out the branch. Clear error banners when
a subsequent checkout or branch creation succeeds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>2 files changed, 8 insertions(+), 0 deletions(-)
packages/contracts/src/git.ts+6| ... | @@ -22,6 +22,11 @@ export const gitCreateBranchInputSchema = z.object({ | ... | @@ -22,6 +22,11 @@ export const gitCreateBranchInputSchema = z.object({ |
| 22 | branch: z.string().min(1), | 22 | branch: z.string().min(1), |
| 23 | }); | 23 | }); |
| 24 | 24 | ||
| 25 | export const gitCheckoutInputSchema = z.object({ | ||
| 26 | cwd: z.string().min(1), | ||
| 27 | branch: z.string().min(1), | ||
| 28 | }); | ||
| 29 | |||
| 25 | export const gitInitInputSchema = z.object({ | 30 | export const gitInitInputSchema = z.object({ |
| 26 | cwd: z.string().min(1), | 31 | cwd: z.string().min(1), |
| 27 | }); | 32 | }); |
| ... | @@ -50,6 +55,7 @@ export type GitRemoveWorktreeInput = z.infer< | ... | @@ -50,6 +55,7 @@ export type GitRemoveWorktreeInput = z.infer< |
| 50 | typeof gitRemoveWorktreeInputSchema | 55 | typeof gitRemoveWorktreeInputSchema |
| 51 | >; | 56 | >; |
| 52 | export type GitCreateBranchInput = z.infer<typeof gitCreateBranchInputSchema>; | 57 | export type GitCreateBranchInput = z.infer<typeof gitCreateBranchInputSchema>; |
| 58 | export type GitCheckoutInput = z.infer<typeof gitCheckoutInputSchema>; | ||
| 53 | export type GitInitInput = z.infer<typeof gitInitInputSchema>; | 59 | export type GitInitInput = z.infer<typeof gitInitInputSchema>; |
| 54 | 60 | ||
| 55 | export interface GitListBranchesResult { | 61 | export interface GitListBranchesResult { |
packages/contracts/src/ipc.ts+2| ... | @@ -1,5 +1,6 @@ | ... | @@ -1,5 +1,6 @@ |
| 1 | import type { AgentConfig, AgentExit, OutputChunk } from "./agent"; | 1 | import type { AgentConfig, AgentExit, OutputChunk } from "./agent"; |
| 2 | import type { | 2 | import type { |
| 3 | GitCheckoutInput, | ||
| 3 | GitCreateBranchInput, | 4 | GitCreateBranchInput, |
| 4 | GitCreateWorktreeInput, | 5 | GitCreateWorktreeInput, |
| 5 | GitCreateWorktreeResult, | 6 | GitCreateWorktreeResult, |
| ... | @@ -76,6 +77,7 @@ export interface NativeApi { | ... | @@ -76,6 +77,7 @@ export interface NativeApi { |
| 76 | createWorktree: (input: GitCreateWorktreeInput) => Promise<GitCreateWorktreeResult>; | 77 | createWorktree: (input: GitCreateWorktreeInput) => Promise<GitCreateWorktreeResult>; |
| 77 | removeWorktree: (input: GitRemoveWorktreeInput) => Promise<void>; | 78 | removeWorktree: (input: GitRemoveWorktreeInput) => Promise<void>; |
| 78 | createBranch: (input: GitCreateBranchInput) => Promise<void>; | 79 | createBranch: (input: GitCreateBranchInput) => Promise<void>; |
| 80 | checkout: (input: GitCheckoutInput) => Promise<void>; | ||
| 79 | init: (input: GitInitInput) => Promise<void>; | 81 | init: (input: GitInitInput) => Promise<void>; |
| 80 | }; | 82 | }; |
| 81 | } | 83 | } |