github / github/copilot-cli

[BUG]: Terminal streaming renderer corrupts output - characters doubled/truncated during streaming

Đang mở
#3,749 5 bình luận 8 reaction 0 người được giao Xem trên GitHub
area:terminal-rendering
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ả

## Description

The Copilot CLI terminal renderer corrupts streamed output, producing doubled characters, truncated tokens, and repeated lines. This affects both the thinking/reasoning phase output and the final assistant response output.

## Steps to Reproduce

1. Ask Copilot CLI any question that produces a moderately long response
2. Observe the output as it streams to the terminal

## Observed Behavior

Output is visibly corrupted during streaming. Examples seen:
- Partial tokens rendered before full token is available (e.g. `apil` instead of `apiVersion`)
- Characters doubled mid-word (e.g. `obserrvability`, `permpermissions`)
- Words repeated mid-sentence (e.g. `New ReliNew Relic`, `useruser`)
- Lines repeated (e.g. `metadata:` block appearing twice)
- Thinking/reasoning tokens streamed visibly with same corruption artifacts

Example corrupted output observed:
```
apil
apiVersion: rbac.authorization.k8s.io/v1
...
- apiGroups: [piGroups: [""]
```

## Expected Behavior

Output should render cleanly with no corruption, doubled characters, or repeated lines.

## Environment

- Copilot CLI version: 1.0.61
- OS: Darwin (macOS)

## Notes

The underlying content being generated is correct — the issue is purely in how the CLI streams and renders tokens to the terminal.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start by reproducing the corruption in the Copilot CLI terminal renderer on macOS, comparing thinking/reasoning and final-response streaming. Trace how the renderer handles partial tokens and line updates; done means streamed output matches the underlying content without doubled characters, truncation, or repeated lines.

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

Đánh giá

Công nghệ
shell
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
45/100

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.