[BUG]: Terminal streaming renderer corrupts output - characters doubled/truncated during streaming
- Lingua principale
- Shell
- Stelle
- 11.2k
- Fork
- 1.9k
- Merge medio
- 14h 16m
- PR unite (30g)
- 6
Descrizione
## 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo la corruzione nel renderer del terminale di Copilot CLI su macOS, confrontando lo streaming di thinking/reasoning e quello della risposta finale. Traccia il modo in cui il renderer gestisce i token parziali e gli aggiornamenti delle righe; il lavoro è completato quando l'output trasmesso corrisponde al contenuto sottostante, senza caratteri raddoppiati, troncamenti o righe ripetute.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- shell
- Ambito
- cli
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100