mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-24 02:02:42 +00:00
* fix(app): decode percent-encoded assistant file links markdown-it percent-encodes non-ASCII and space characters in link hrefs, so a link like [x](docs/reports/报告.md) arrives as docs/reports/%E6%8A%A5%E5%91%8A.md. The file:// and bare absolute-path branches already run safeDecodeURIComponent, but the workspace-relative, path:line, Windows, and home-relative branches did not, so clicking the link tried to open the still-encoded name and failed with ENOENT. Decode the path portion before the relative-path heuristics and in the inline absolute/Windows branches so all href forms behave the same. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(app): decode hrefs only, never raw inline-code paths Raw inline-code and linkified tokens reach the same parser as markdown hrefs. Decoding unconditionally would send a real file named my%20file.md to my file.md. Gate every decode on AssistantHrefParseOptions.decodeHref — set by the resolver only when the token came from source.href — and extract parseWindowsFileLink to keep the entry point under the complexity limit. Adds parse-level and resolver-level regression tests for literal %20 filenames. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(app): keep raw absolute paths out of URL parsing new URL() percent-encodes non-ASCII, so a raw inline-code path like /tmp/开户.md became /tmp/%E5%BC%80%E6%88%B7.md when decodeHref was false. Hrefs still go through URL parsing (normalizes dot segments before decode); raw paths split the # fragment manually instead. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(app): keep encoded and literal file links distinct Preserve inline-code provenance for Windows paths and key cached file lookups by their resolved query, path, and line range. Reproduce the reported non-ASCII Markdown link through the renderer and filesystem, with browser coverage for clicking it. Co-authored-by: Ouyang Xingyuan <galaxyroaming@qq.com> Co-authored-by: dengjiawen <dengjiawen@hortorgames.com> * test(app): assert file content after opening the markdown link Co-authored-by: sunshinehomeyu-blip <267551119+sunshinehomeyu-blip@users.noreply.github.com> * fix(app): preserve encoded line markers in filenames --------- Co-authored-by: Ouyang Xingyuan <galaxyroaming@qq.com> Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com> Co-authored-by: dengjiawen <dengjiawen@hortorgames.com> Co-authored-by: sunshinehomeyu-blip <267551119+sunshinehomeyu-blip@users.noreply.github.com>