feat(git): add diff, branch, checkout, push, pull to Git sidebar panel

Extends GitOperations.js with diff/branches/checkoutBranch/push/pull,
wires the 5 new IPC handlers in main.js (reusing the existing dir
resolution), whitelists the new channels in preload.js, and fixes the
Git sidebar panel's previously dead _gitDiff callback by wiring up a
diff view, branch list/create/checkout UI, and push/pull buttons.
Resolves Task 5, which deferred this work to this task.

Amit Haridas
This commit is contained in:
2026-08-23 19:31:33 +05:30
parent 6ba3174480
commit abcfb03e52
7 changed files with 404 additions and 4 deletions
+8
View File
@@ -1751,6 +1751,14 @@ document.addEventListener('DOMContentLoaded', async () => {
message,
}),
gitLog: () => ipcRenderer.invoke('git-log'),
gitBranches: () => ipcRenderer.invoke('git-branches'),
gitCheckout: (name, isNew) =>
ipcRenderer.invoke('git-checkout', {
name,
isNew,
}),
gitPush: () => ipcRenderer.invoke('git-push'),
gitPull: () => ipcRenderer.invoke('git-pull'),
}),
});
sidebarManager.registerPanel('snippets', {