feat: better diff. integration

This commit is contained in:
2026-02-16 12:03:22 +01:00
parent 9d71aa63fb
commit c5c3a55a5c
14 changed files with 336 additions and 33 deletions

View File

@@ -53,6 +53,16 @@ export function registerIpcHandlers(): void {
return engine.getDiff(projectPath, filePath);
});
safeHandle('git:diffContent', async (_, projectPath: string, filePath: string) => {
const engine = getGitEngine();
return engine.getDiffContent(projectPath, filePath);
});
safeHandle('git:history', async (_, projectPath: string, limit?: number) => {
const engine = getGitEngine();
return engine.getHistory(projectPath, limit);
});
safeHandle('git:init', async (event, projectPath: string, remoteUrl?: string) => {
const engine = getGitEngine();
return engine.initializeRepo(projectPath, remoteUrl, (progress) => {