[Feature]: Open chat file links outside the project root in the file panel #7965
andybergon
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
When an agent reply links a file that lives outside the active project root, clicking it leaves T3 Code. The link is handed to the preferred external editor (or the OS default app for that extension), while the same link for a file inside the root opens in the built-in file panel.
This comes up whenever a session is rooted in one folder but the work touches a sibling repo, for example a notes workspace driving changes in a dotfiles checkout. Relative links to the other repo fail with
Failed to read workspace file '…', which is fair since they resolve against the workspace, but absolute links still cannot stay in the app.Reproduction
Actual behavior
The file opens in VS Code (macOS default for
.md) instead of the T3 file panel. There is no in-app option for the link.Expected behavior
Out-of-root file links open in the file panel, read-only if that is safer, and modifier-click keeps the current "open in editor" behavior. A user-defined open target (#7109) would also cover this.
Evidence
MarkdownFileLinkinapps/web/src/components/ChatMarkdown.tsxonly callsonOpenInPanelwhenworkspaceRelativePathis set, and falls back tohandleOpenInEditorotherwise.workspaceRelativePathis null for any target outside the project root, so the editor branch is the only path for these links.Related, but different scope: #7027 asks for integrated browser previews of HTML/PDF/image assets outside the root; #6859 asks for native actions on local file links.
Environment
All reactions