Add git event types to ClientMessage and SSEEvent

This commit is contained in:
Jared Miller 2026-01-28 14:55:47 -05:00
parent 0489864652
commit 3b5e636730
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C
2 changed files with 20 additions and 0 deletions

View file

@ -47,6 +47,8 @@ function createDefaultSessionState(): SessionState {
mode: "normal",
model: null,
idle_since: null,
git_branch: null,
git_files_json: null,
dirty: false,
};
}

View file

@ -136,6 +136,16 @@ export type ClientMessage =
tool_timestamps: number[];
session_start: number;
idle_since: number | null;
}
| {
type: "git";
branch: string;
files: Array<{
path: string;
status: string;
additions: number;
deletions: number;
}>;
};
export type ServerMessage =
@ -191,6 +201,12 @@ export type SSEEvent =
mode: "normal" | "auto_accept" | "plan";
model: string | null;
idle_since: number | null;
}
| {
type: "git";
session_id: number;
branch: string;
files_json: string;
};
// Session state tracking (in-memory)
@ -212,5 +228,7 @@ export interface SessionState {
mode: "normal" | "auto_accept" | "plan";
model: string | null;
idle_since: number | null;
git_branch: string | null;
git_files_json: string | null;
dirty: boolean;
}