feat(mcp): paths filter for get_task_diff, subset hint for preview_merge_set

get_task_diff gained an optional paths param (git pathspec, both stat and
full-diff modes) so a large multi-file task can be narrowed to the files
actually in question instead of shipping the whole diff.

preview_merge_set now also reports Subsets: pairs where one task's changed
files are a proper subset of another's in the same set, the strongest
available post-hoc signal that a task may be redundant with another.
This commit is contained in:
mika kuns
2026-08-10 13:39:55 +02:00
parent 6a2a19cc9e
commit c715c96af9
6 changed files with 174 additions and 30 deletions
@@ -162,9 +162,9 @@ public sealed partial class DiffViewerViewModel : ViewModelBase
try
{
raw = FromCommitRange && BaseRef is not null && HeadCommit is not null
? await _git.GetCommitRangeDiffAsync(WorktreePath, BaseRef, HeadCommit, ct)
? await _git.GetCommitRangeDiffAsync(WorktreePath, BaseRef, HeadCommit, ct: ct)
: BaseRef is not null
? await _git.GetBranchDiffAsync(WorktreePath, BaseRef, ct)
? await _git.GetBranchDiffAsync(WorktreePath, BaseRef, ct: ct)
: await _git.GetDiffAsync(WorktreePath, ct);
}
catch (Exception ex)