[BUG]: Terminal streaming renderer corrupts output - characters doubled/truncated during streaming
- Vorherrschende Sprache
- Shell
- Sterne
- 11.2k
- Forks
- 1.9k
- Ø Merge
- 14 Std. 16 Min.
- Gemergte PRs (30 T.)
- 6
Beschreibung
## 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.
Beitragsleitfaden
Rechercherichtung
Beginne damit, die Beschädigung im Copilot CLI-Terminal-Renderer unter macOS zu reproduzieren, und vergleiche dabei das Streaming von Thinking/Reasoning und der finalen Antwort. Verfolge, wie der Renderer partielle Tokens und Zeilenaktualisierungen verarbeitet; abgeschlossen ist die Aufgabe, wenn die gestreamte Ausgabe dem zugrunde liegenden Inhalt entspricht, ohne doppelte Zeichen, Abschneidungen oder wiederholte Zeilen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- shell
- Bereich
- cli
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100