authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-08 23:19:01-08:00
committergravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-11 09:00:18-08:00
log59448593d8e6b067e1691150f1925107114f3cc7
tree5526c60e0d063f1d335166a50419b477663b1c63
parent3047974fdc759674eeac3969456656e3b8bf40d1

Add git checkout support and clear errors on success

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({
2222 branch: z.string().min(1),
2323});
2424
25export const gitCheckoutInputSchema = z.object({
26 cwd: z.string().min(1),
27 branch: z.string().min(1),
28});
29
2530export const gitInitInputSchema = z.object({
2631 cwd: z.string().min(1),
2732});
......@@ -50,6 +55,7 @@ export type GitRemoveWorktreeInput = z.infer<
5055 typeof gitRemoveWorktreeInputSchema
5156>;
5257export type GitCreateBranchInput = z.infer<typeof gitCreateBranchInputSchema>;
58export type GitCheckoutInput = z.infer<typeof gitCheckoutInputSchema>;
5359export type GitInitInput = z.infer<typeof gitInitInputSchema>;
5460
5561export interface GitListBranchesResult {
packages/contracts/src/ipc.ts+2
......@@ -1,5 +1,6 @@
11import type { AgentConfig, AgentExit, OutputChunk } from "./agent";
22import type {
3 GitCheckoutInput,
34 GitCreateBranchInput,
45 GitCreateWorktreeInput,
56 GitCreateWorktreeResult,
......@@ -76,6 +77,7 @@ export interface NativeApi {
7677 createWorktree: (input: GitCreateWorktreeInput) => Promise<GitCreateWorktreeResult>;
7778 removeWorktree: (input: GitRemoveWorktreeInput) => Promise<void>;
7879 createBranch: (input: GitCreateBranchInput) => Promise<void>;
80 checkout: (input: GitCheckoutInput) => Promise<void>;
7981 init: (input: GitInitInput) => Promise<void>;
8082 };
8183}