You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inline code chips hide part of relative paths that aren't files
#19040
Inline code like `size/provider/file.jpg` renders as a chip labelled file.jpg. In my case it was part of an image URL, not a file in the workspace. The chip drops the first two segments, so the reader can't see what the agent wrote, and clicking it opens a file that doesn't exist.
No text rule can catch this. size/provider/file.jpg has the same shape as src/main.ts, and the current tests treat vendor/jquery-3.6.0.min.js and share/man/ls.1 as files on purpose. Absolute paths have a cheap fix (require a known filesystem root or the workspace, #19012). Relative paths don't.
I can see two ways out:
Only make a chip when the file exists. The server can already answer this through projects.searchEntries and projects.listEntries. It costs a round trip per message, though, and the chip would appear late or flicker. Remote clients would feel that most.
Keep the chip but show the path as written, size/provider/file.jpg, and not just the file name. There's no new I/O. A wrong guess then costs one bad click target, and the text stays readable. The catch is longer chips for real files deep in the tree.
I lean towards 2, since what actually hurts is losing the text the agent wrote. Option 1 is more correct, but the cost looks too high for this. Is either direction acceptable?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Inline code like
`size/provider/file.jpg`renders as a chip labelledfile.jpg. In my case it was part of an image URL, not a file in the workspace. The chip drops the first two segments, so the reader can't see what the agent wrote, and clicking it opens a file that doesn't exist.No text rule can catch this.
size/provider/file.jpghas the same shape assrc/main.ts, and the current tests treatvendor/jquery-3.6.0.min.jsandshare/man/ls.1as files on purpose. Absolute paths have a cheap fix (require a known filesystem root or the workspace, #19012). Relative paths don't.I can see two ways out:
projects.searchEntriesandprojects.listEntries. It costs a round trip per message, though, and the chip would appear late or flicker. Remote clients would feel that most.size/provider/file.jpg, and not just the file name. There's no new I/O. A wrong guess then costs one bad click target, and the text stays readable. The catch is longer chips for real files deep in the tree.I lean towards 2, since what actually hurts is losing the text the agent wrote. Option 1 is more correct, but the cost looks too high for this. Is either direction acceptable?
All reactions