Centralize git/GitHub runtime state into WorkspaceGitService

Consolidate workspace git watch lifecycle, background fetch scheduling,
and GitHub PR polling from session.ts and BackgroundGitFetchManager into
a single daemon-scoped WorkspaceGitService. Sessions now subscribe to
the service for push-driven updates instead of coordinating watchers and
fetch intervals themselves. Workspace payloads gain optional gitRuntime
and githubRuntime fields for richer client-side display.
This commit is contained in:
Mohamed Boudra
2026-04-12 10:38:50 +07:00
parent f35b0b8b7d
commit 40e27f5a00
12 changed files with 1871 additions and 1001 deletions
@@ -95,7 +95,7 @@ type RegisterPendingWorktreeWorkspaceDependencies = {
type CreatePaseoWorktreeInBackgroundDependencies = {
paseoHome?: string;
emitWorkspaceUpdateForCwd: (cwd: string, options?: { dedupeGitState?: boolean }) => Promise<void>;
emitWorkspaceUpdateForCwd: (cwd: string) => Promise<void>;
sessionLogger: Logger;
terminalManager: TerminalManager | null;
};