Hold errors in GitSyncProvider

This commit is contained in:
Alex Gleason committed 2025-12-29 16:43:47 -06:00
1 parent f9febcce1e
commit ffa65212bc
5 files changed
+98 -19

No files matched your search

+4 -1
View File
@@ -6,13 +6,16 @@ export interface GitSyncState {
dir: string;
operation: GitOperation;
isActive: boolean;
error?: Error;
}
export interface GitSyncContextValue {
syncStates: Map<string, GitSyncState>;
startOperation: (dir: string, operation: GitOperation) => void;
endOperation: (dir: string) => void;
endOperation: (dir: string, error?: Error) => void;
setError: (dir: string, error: Error | null) => void;
getState: (dir: string) => GitSyncState | undefined;
getError: (dir: string) => Error | undefined;
}
export const GitSyncContext = createContext<GitSyncContextValue | null>(null);