Skip to content

Commit 902b6f6

Browse files
fix(server): terminal history drops the ESC Z identity query
The legacy DECID query (ESC Z) went through the generic two-byte escape branch of sanitizeTerminalHistoryChunk and was kept, so replaying saved history answered it again with a primary device attributes reply. Drop it like the CSI DA query it is equivalent to. Fixes #36013 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 2eea399 commit 902b6f6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/server/src/terminal/Manager.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,10 @@ function sanitizeTerminalHistoryChunk(
13131313
if (escapeSequenceEndIndex === null) {
13141314
return { visibleText, pendingControlSequence: input.slice(index) };
13151315
}
1316-
append(input.slice(index, escapeSequenceEndIndex));
1316+
// ESC Z (DECID) is the legacy primary device attributes query.
1317+
if (nextCodePoint !== 0x5a) {
1318+
append(input.slice(index, escapeSequenceEndIndex));
1319+
}
13171320
index = escapeSequenceEndIndex;
13181321
continue;
13191322
}

0 commit comments

Comments
 (0)