feat: git initialisation

This commit is contained in:
2026-02-16 10:47:55 +01:00
parent 1ecaae3dbd
commit 3b9ff2fc22
9 changed files with 523 additions and 34 deletions

View File

@@ -48,12 +48,11 @@ export function registerIpcHandlers(): void {
return engine.getStatus(projectPath);
});
safeHandle('git:init', async (_, projectPath: string, remoteUrl?: string) => {
safeHandle('git:init', async (event, projectPath: string, remoteUrl?: string) => {
const engine = getGitEngine();
if (remoteUrl) {
return engine.initializeRepo(projectPath, remoteUrl);
}
return engine.initializeRepo(projectPath);
return engine.initializeRepo(projectPath, remoteUrl, (progress) => {
event.sender.send('git:initProgress', progress);
});
});
// ============ Project Handlers ============