Add show_diff chat tool and diff card

The Pipelines MCP server gains show_diff: it runs Git in a repository
inside the operator's home (default: the chat's directory) and records
the per-file patches. Without base it shows uncommitted work against
HEAD; with base it shows everything since the merge base (a pull
request preview), optionally committed changes only. Bounded at 300
files, 256 KiB per patch and 1 MiB total, with partial diffs labelled;
diff bodies share the per-chat retention budget with HTML views.

The chat draws the item as a card listing each changed file with its
stat; a row opens the existing file diff viewer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-21 17:08:02 +00:00
parent 79e5183469
commit 059eb1bb0d
15 changed files with 1077 additions and 16 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ func TestHandshakeListAndCall(t *testing.T) {
t.Fatalf("tool without description or schema: %v", entry)
}
}
if strings.Join(names, ",") != "show_file,show_image,show_html,notify" {
if strings.Join(names, ",") != "show_file,show_image,show_html,show_diff,notify" {
t.Fatalf("tools = %v", names)
}
if list["id"] != "l" {