Wrapped links leak OSC 8 escape markup in Ghostty
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
Describe the bug
Long links in assistant Markdown sometimes render with the OSC 8 hyperlink control payload visible as text when the link wraps in Ghostty. The output is prefixed with text resembling:
]8;;id=md-<generated-id>;https://example.com/a/very/long/path/https://example.com/a/very/long/path/
The saved assistant response contains only a valid plain URL, with no malformed Markdown or escape sequences. This indicates the corruption occurs in Copilot CLI's terminal rendering rather than in model output.
This appears related to the 1.0.68 changelog fix, "Preserve wrapped OSC 8 hyperlink IDs in terminal output," but still reproduces on 1.0.78.
Affected version
GitHub Copilot CLI 1.0.78
Steps to reproduce the behavior
- Launch Copilot CLI in Ghostty.
- Have an assistant response end with a bare URL long enough to wrap at the current terminal width.
- Observe that the URL is preceded by visible OSC 8 payload text such as
]8;;id=md-...;and may appear duplicated.
An affected session is:
250a0930-cde5-4f39-bcdd-c40ef05656a0
The problem is visible in the final assistant response of that session.
Expected behavior
The response should display one clean, clickable URL. OSC 8 control sequences and generated hyperlink IDs must never be visible, including when the URL wraps across terminal lines.
Additional context
- Operating system: macOS (Darwin), Apple Silicon
- Terminal: Ghostty
1.3.2-main-+8252871b2 - Environment:
TERM_PROGRAM=ghostty,TERM=xterm-ghostty,COLORTERM=truecolor - Workaround: launching with
FORCE_HYPERLINK=0 copilotprevents OSC 8 hyperlinks from being emitted - The local session event log records the assistant content as normal prose followed by a plain URL, confirming the malformed text is introduced during rendering
- Screenshot exists locally but was not attached because
gh issue createdoes not support uploading issue-form attachments
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện vấn đề bằng cách chạy Copilot CLI 1.0.78 trong Ghostty với một URL thuần dài bị xuống dòng, sử dụng session 250a0930-cde5-4f39-bcdd-c40ef05656a0 làm ngữ cảnh. So sánh URL thuần trong nhật ký sự kiện của session với đầu ra của terminal và lần theo đường dẫn kết xuất OSC 8; được coi là hoàn tất khi các liên kết bị xuống dòng hiển thị dưới dạng một URL có thể nhấp duy nhất, rõ ràng, không có payload điều khiển hiển thị hoặc văn bản bị nhân đôi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100