Repository navigation
Replies: 1 comment
|
这条已经修了,在 它改在 markdown 层:CommonMark 把 版本:这个提交在 master(0.2.2-alpha.2, 在那之前:把反斜杠换成正斜杠,或者加 只读了提交和源码。 |
0 replies
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.
[Bug] Inline file links with Windows paths open a wrong path: Markdown
\_escaping breaks_-prefixed segments, sidebar reports "文件不存在"Environment
dshBuildCommit: be72761ee1a6736ebcdf4f3739363b083ae53c98), Windows 11 zh-CNSymptom
Clicking an inline file link rendered from a reply opens the wrong path in the sidebar and shows the empty-state text "文件不存在,可能已被移动或删除" (file does not exist), while the tool-result card for the same file ("在侧边栏预览") opens it correctly.
Reproduction
Agent writes
G:\AI\_dsh_tools\_issue-body.md.Agent replies with a Markdown link:
[\_issue-body.md](G:\AI\_dsh_tools\_issue-body.md)Click the inline link → the sidebar tries
G:/AI/_dsh_tools_issue-body.md→ "文件不存在".Click the tool-result card → opens
G:\AI\_dsh_tools\_issue-body.mdcorrectly.Checks on the machine:
Root cause (two channels, one is lossy)
Tool-result card: uses structured
meta.path(absolute, from the tool call) → reliable.Inline link: uses the Markdown-authored text path. CommonMark backslash escapes apply inside link destinations —
\_becomes_(while\Astays literal) — soG:\AI\_dsh_tools\_issue-body.md→G:\AI_dsh_tools_issue-body.mdThe client then normalizes
\→/infileAddressFor()and opens the result without any existence check or fallback; the only failure surface is the sidebar'serror.notFoundstring.Bundle references (0.2.1-rc.3):
dsh-client-ui-reference/lib/client.js→fileAddressFor(sessionId, cwd, path)(~line 194): onlypath.replace(/\\/g, "/")+ relative-join; no validation, no fallback.dsh-client-ui-sidebar-documentpreview/lib/client.jsline 1467 →"error.notFound": "文件不存在,可能已被移动或删除", no retry/fallback.dsh-client-ui-deliverables/lib/client.jsline 1115 →if (typeof meta.path === "string" && isAbsoluteWorkspacePath(meta.path)) return meta.path;— this is why cards work.Impact
Deterministic (not intermittent) for any Windows path whose segment starts with
_after a backslash — e.g._dsh_tools,_dsh_probe,_dsh_export,_issue-body.md. This is a very common naming pattern on Windows dev machines, so the failure is systematic rather than rare.Suggested fix (any of these)
basenamewithin the session workspace, or match against the turn's tool-callmeta.pathlist, and open the unique match.meta.pathwhere available instead of trusting authored Markdown text.All reactions