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
@@ -34,6 +34,9 @@ final class FakeGit: GitServicing, @unchecked Sendable {
var runsByCommand: [String: FakeGitRun] = [:]
var branches = GitBranchList.empty
var author: String?
var recentCommits: [GitCommitSummary] = []
var recentCommitsReads = 0
var stagedDiff: StagedDiff? = StagedDiff(stat: " a.txt | 1 +\n", patch: "+a\n")
}
private let state: Locked<State>
@@ -54,6 +57,10 @@ final class FakeGit: GitServicing, @unchecked Sendable {
func setRun(_ run: FakeGitRun, forCommand command: String) { state.mutate { $0.runsByCommand[command] = run } }
func setBranches(_ value: GitBranchList) { state.mutate { $0.branches = value } }
func setAuthor(_ value: String?) { state.mutate { $0.author = value } }
func setRecentCommits(_ value: [GitCommitSummary]) { state.mutate { $0.recentCommits = value } }
var recentCommitsReads: Int { state.current.recentCommitsReads }
/// What `stagedDiff` returns; nil plays a failed git read.
func setStagedDiff(_ value: StagedDiff?) { state.mutate { $0.stagedDiff = value } }
/// Makes every `load` throw this error, or read normally again with nil.
func setLoadError(_ error: Error?) { state.mutate { $0.loadError = error } }
@@ -86,6 +93,13 @@ final class FakeGit: GitServicing, @unchecked Sendable {
func branches() async -> GitBranchList { state.current.branches }
func author() async -> String? { state.current.author }
func recentCommits() async -> [GitCommitSummary] {
state.mutate { state in
state.recentCommitsReads += 1
return state.recentCommits
}
}
func stagedDiff() async -> StagedDiff? { state.current.stagedDiff }
}
/// A snapshot with one change per row: (path, status, staged).