feat(links): make .diff and .patch paths clickable

An agent that writes a diff for review prints a path such as
/tmp/.../scratchpad/resolution.diff, and that path rendered as plain text
because the link patterns had no diff or patch extension. The attachment
allowlist already serves both as inert text/plain, so only the two link
patterns in constants.js change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Michael GrundbergandClaude Opus 5.5 committed 2026-10-16 08:29:44 +02:00
1 parent b6218c1490
commit fe762f8dce
2 files changed
+5 -2

No files matched your search

+3
View File
@@ -153,6 +153,9 @@ describe('terminal link-provider regexes (shipped source)', () => {
'/home/a/.codeman-uploads/paste-2-cd.ogv',
// Longer extension of a family must win over its prefix (tsx over ts).
'/home/a/src/App.tsx',
// Diffs an agent writes for review; the attachment allowlist already serves them.
'/tmp/claude-1000/-home-a-repo/b3de6e9f/scratchpad/resolution.diff',
'/home/a/repo/fix.patch',
];
for (const path of cases) {
ext.lastIndex = 0;