Skip to content

Commit 4a6f460

Browse files
committed
fix(server): skip drained terminal events when clearing scrollback
1 parent 9b2c264 commit 4a6f460

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3378,7 +3378,7 @@ export const makeWithOptions = Effect.fn("TerminalManager.makeWithOptions")(func
33783378
// Scrollback clearing must preserve lifecycle events and the active drain owner.
33793379
session.pendingProcessEvents = session.pendingProcessEvents
33803380
.slice(session.pendingProcessEventIndex)
3381-
.filter((event) => event.type === "exit");
3381+
.filter((event) => event?.type === "exit");
33823382
session.pendingProcessEventIndex = 0;
33833383
const eventStamp = advanceEventSequence(session);
33843384
yield* persistHistory(input.threadId, terminalId, session.history);

0 commit comments

Comments
 (0)