adds claude-generated commit messages and a recent commits panel to the git view - adds log tailing in the explorer, branch merging and a clean up button

This commit is contained in:
2026-11-04 10:07:52 +01:00
parent 600d4874d2
commit cc6651c08a
49 changed files with 1944 additions and 180 deletions
@@ -14,11 +14,14 @@ extension WorkspaceModel {
}
}
/// A target without entries, such as the current branch, opens no menu.
func showContextMenu(_ target: ContextTarget, anchor: CGPoint) {
let entries = ContextActions.entries(for: target)
guard !entries.isEmpty else { return }
overlay.present(.contextMenu(ContextMenuRequest(
target: target,
header: ContextActions.header(for: target, projectName: name),
entries: ContextActions.entries(for: target),
entries: entries,
anchor: anchor
)))
}
@@ -78,8 +81,12 @@ extension WorkspaceModel {
case let .openFile(path):
closeGitView()
open(path)
case let .commit(andPush):
track { await sourceControl?.commit(andPush: andPush) }
case let .mergeBranch(name):
guard let sourceControl else { return }
track {
await sourceControl.mergeBranch(name)
self.scheduleRefresh([.tree, .openFiles])
}
case let .passOnFileName(name):
overlay.present(.passOn(PassOnRequest(reference: name, anchor: anchor)))
case let .bouwen(name):
@@ -92,6 +99,8 @@ extension WorkspaceModel {
readAloud.read(text)
case let .readAloudFile(path):
readAloudFile(path)
case let .tailLog(path):
terminal.startTail(path)
case let .readAloudTerminalSelection(kind):
let text = terminal.selection(kind)?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
let prose = MarkdownSpeech.plainText(MarkdownParser.parse(text))
@@ -113,6 +122,12 @@ extension WorkspaceModel {
if let text = terminal.selection(kind) { app.system.copy(text) }
case let .pasteIntoTerminal(kind):
if let text = app.system.pasteboardText() { terminal.paste(text, into: kind) }
case .gitCleanUp:
guard let sourceControl else { return }
track {
await sourceControl.cleanUp()
self.scheduleRefresh([.tree, .openFiles])
}
case let .gitDiscard(paths):
track {
await sourceControl?.discard(paths)