feat: start of git integration

This commit is contained in:
2026-02-16 09:45:34 +01:00
parent f34195bd76
commit d7286ef92f
16 changed files with 876 additions and 4 deletions

View File

@@ -4,6 +4,19 @@ import type { ElectronAPI } from './shared/electronApi';
// Expose protected methods that allow the renderer process to use
// ipcRenderer without exposing the entire object
export const electronAPI: ElectronAPI = {
// Git
git: {
checkAvailability: () => ipcRenderer.invoke('git:checkAvailability'),
getRepoState: (projectPath: string) => ipcRenderer.invoke('git:getRepoState', projectPath),
getStatus: (projectPath: string) => ipcRenderer.invoke('git:status', projectPath),
init: (projectPath: string, remoteUrl?: string) => {
if (remoteUrl) {
return ipcRenderer.invoke('git:init', projectPath, remoteUrl);
}
return ipcRenderer.invoke('git:init', projectPath);
},
},
// Projects
projects: {
create: (data: { name: string; description?: string; slug?: string; dataPath?: string }) => ipcRenderer.invoke('projects:create', data),