Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: SSH-style `host:path` references in chat never become file chips

已关闭
#14,541 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
frontend

调研方向

从 packages/client-runtime/src/markdownLinks.ts 中的 parseMarkdownFileLink 开始,检查在进行路径检查之前如何应用 EXTERNAL_SCHEME_PATTERN。复现 issue 中的 host:path 和 bare-path 示例,然后验证所选择的行为:支持时,host:path 引用应转换为 file chips;否则应继续明确记录为超出范围,同时不能使 bare paths 发生回归。

由索引模型根据 Issue 内容生成。

描述

enhancement via-triage
Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/web

Steps to reproduce
  1. In any thread, have the agent (or yourself) write an SSH-style host:path reference in inline code, e.g. `devbox:~/notes/handoff.md` or `devbox:/home/me/notes/handoff.md`.
  2. In the same message, include a plain path such as `~/notes/handoff.md` for comparison.
Expected behavior

Either the host:path reference renders as a file chip (ideally resolved against the matching SSH environment when the host matches one), or this is documented as intentionally out of scope.

This may well be intended behavior; filing so maintainers can decide. The reverse direction already exists: #11229 makes "Copy full path" on a remote file chip produce host:path, so a chip copied from one thread and pasted into another currently doesn't round-trip back into a chip.

Actual behavior

The host:path reference stays as plain inline code. The bare ~/… path in the same message becomes a chip.

Cause (from reading main): parseMarkdownFileLink in packages/client-runtime/src/markdownLinks.ts rejects anything matching EXTERNAL_SCHEME_PATTERN (/^([A-Za-z][A-Za-z0-9+.-]*):(.*)$/). A hostname like devbox or devbox-doggo is a valid URL scheme under that pattern, so devbox:~/… is treated as an external URL (like mailto:) and dropped before any path checks run.

Image
Impact

Minor bug or occasional failure

Version or commit

main @ c57a04b722

Environment

Linux server (remote environment), web/desktop client; agent output from Claude Code. Applies to any provider since detection is client-side.

Workaround

Write the path without the host prefix (~/… or an absolute path); it then resolves against the thread's environment.

Related: #11229 (copies host:path), #8251 (chips for files outside the project root fail to open).

🤖 Generated with Claude Code

主要语言
TypeScript
星标
24.8k
派生
6.4k
平均合并
5 小时 30 分钟
30 天内合并 PR
215

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pingdotgg/t3code 的其他 Issue

查看 pingdotgg/t3code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。