Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng
#14,541 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu trong packages/client-runtime/src/markdownLinks.ts tại parseMarkdownFileLink và kiểm tra cách EXTERNAL_SCHEME_PATTERN được áp dụng trước các bước kiểm tra đường dẫn. Tái hiện các ví dụ host:path và bare-path từ issue, sau đó xác minh hành vi đã chọn: các tham chiếu host:path либо phải trở thành file chips khi được hỗ trợ, либо vẫn được ghi rõ là nằm ngoài phạm vi, mà không gây hồi quy đối với bare paths.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
24.8k
Fork
6.4k
Merge trung bình
2 giờ 58 phút
Pull request đã merge (30 ngày)
480

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pingdotgg/t3code

Tất cả issue của pingdotgg/t3code

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.