| … | … | @@ -46,3 +47,21 @@ export function markdownFileCopyPaths( | |
| 59 | + | return buildWslOpenUrl({ | |
| 60 | + | editor: input.editor, | |
| 61 | + | distro: input.distro, | |
| 62 | + | absolutePath: input.cwd ? resolvePathLinkTarget(input.path, input.cwd) : input.path, | |
🟠 High src/markdownFileHostPath.ts:62
Dot-relative WSL file links return undefined from buildWslOpenUrl, so the ChatMarkdown caller throws instead of opening valid files. resolvePathLinkTarget preserves . and .. segments in absolutePath, which the contracts builder rejects; normalize the resolved path before passing it to buildWslOpenUrl.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/web/src/markdownFileHostPath.ts around line 62: |
| 2 | |
| 3 | Dot-relative WSL file links return `undefined` from `buildWslOpenUrl`, so the ChatMarkdown caller throws instead of opening valid files. `resolvePathLinkTarget` preserves `.` and `..` segments in `absolutePath`, which the contracts builder rejects; normalize the resolved path before passing it to `buildWslOpenUrl`. |