Repository navigation
fix(chat): resolve complete file paths in transcripts - #1222
Merged
Merged
Conversation
Keep spaced and Windows absolute paths intact from chat text and tool rows through file resolution. Resolve absolute references only at their exact path inside allowed roots, and report access limits separately from missing files. Fixes vastsa#1169
Keep dotted directory paths and decorated filenames intact while avoiding ambiguous prose matches. Cover cross-platform paths and explicit references in the chat link tests.
The blob symlink assertion required Windows file-link privileges and was skipped on this machine. Exercise attachment-root containment with a junction on Windows while retaining the real blob symlink assertion on POSIX, so both platforms run a meaningful boundary test without a permission-dependent skip.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1169
Problem
Chat could fail to open a file the assistant had just written. For example,
C:\demo project\readme.mdcould be left as plain inline code or scanned as only its trailing segment, while clicking the Write tool path could report no match. Spaces in POSIX paths, Windows drive letters and backslashes, UNC paths, and multi-dot filenames exposed related parsing failures. A same-named file elsewhere could also make an incorrect fallback look plausible.Changes
Unmarked relative paths whose first segment contains spaces remain plain text because they cannot be reliably distinguished from ordinary prose. An explicit
@"my project/page.md"reference remains available. Home paths remain plain text.Validation
mainat110fc6675;pnpm check:pr-baseandgit diff --check upstream/main...HEADpassed.Remaining verification
pnpm test:e2e:transcriptdid not produce a UI verdict: Electron's renderer returned no probe result (exit=null). This is not counted as a passing E2E test. Actual macOS/Linux UI clicks have not been tested; the WSL result above is a resolver test.