From 9dce24a40e9fcfda754d2a3151fdd5b998e717b9 Mon Sep 17 00:00:00 2001 From: alex-SOLTIA Date: Fri, 6 Mar 2026 23:14:35 +0100 Subject: [PATCH] feat: include link URLs in interactive snapshot mode In interactive mode (`snapshot -i`), all metadata lines were discarded including `/url:` entries under links. This made it impossible to see where links point to in interactive snapshots. Now `/url:` metadata lines are preserved in interactive mode, so agents can see both the link text and its destination. ### Before (snapshot -i) ``` - link "Documentation" [ref=e1] ``` ### After (snapshot -i) ``` - link "Documentation" [ref=e1]: - /url: https://docs.example.com ``` Closes #490 Co-Authored-By: Claude Opus 4.6 --- src/snapshot.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/snapshot.ts b/src/snapshot.ts index 6e6c7741..b5c72c6a 100644 --- a/src/snapshot.ts +++ b/src/snapshot.ts @@ -496,7 +496,11 @@ function processLine( if (!match) { // Metadata lines (like /url:) or text content if (options.interactive) { - // In interactive mode, only keep metadata under interactive elements + // In interactive mode, keep /url: metadata (hrefs) but skip other content + const trimmed = line.trim(); + if (trimmed.startsWith('- /url:') || trimmed.startsWith('/url:')) { + return line; + } return null; } return line;