Files
zed/crates/agent_servers
Ben Brandt 6501df1576 acp_thread: Normalize line endings in v2 terminal output (#67368)
ACP v2 terminal chunks and snapshots were written to the emulator
without line-ending normalization. Commands run without a PTY emit bare
`\n`, which moves the cursor down without returning it to column zero,
so each line renders further right than the last. ACP v1 output already
avoids this by going through `Terminal::write_output`.

This sends v2 chunks and snapshots through `write_output` too, and
removes `write_raw_output`, which no longer has any production callers.
A `\r\n` split across two chunks gains an extra `\r`, which has no
visible effect.

One tradeoff: a program running under a real PTY that deliberately uses
a bare `\n` to move down while keeping its column will now return to
column zero.

There are fixes for both Claude and Codex adapters, but it seems to be a
common thing and we had this behavior in ACP v1 already.

Release Notes:

- Fixed misaligned lines in terminal output from ACP agents
2026-11-23 17:21:43 +00:00
..