Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apps/desktop/src/main/lib/terminal-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,13 @@ export class TerminalManager extends EventEmitter {
let commandsSent = false;

ptyProcess.onData((data) => {
// Filter terminal query responses for storage only
// xterm needs raw data for proper terminal behavior (DA/DSR/OSC responses)
// Filter terminal query responses (CPR, DA, OSC color responses, etc.)
// These responses appear as garbage like "0;1R" when xterm doesn't fully consume them
const filteredData = session.escapeFilter.filter(data);
session.scrollback += filteredData;
session.historyWriter?.write(filteredData);
// Emit ORIGINAL data to xterm - it needs to process query responses
this.emit(`data:${tabId}`, data);
// Emit filtered data to prevent garbage output in the terminal
this.emit(`data:${tabId}`, filteredData);

// Send initial commands after shell outputs first data (prompt ready)
if (shouldRunCommands && !commandsSent) {
Expand Down
Loading