Skip to content

Commit 0981e6b

Browse files
authored
perf(server): keep passive terminal output flowing (pingdotgg#17178)
1 parent b822420 commit 0981e6b

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎apps/server/src/terminal/OutputProtocol.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ import { withTerminalOutputWindow } from "./OutputProtocol.ts";
1313
describe("terminal output window", () => {
1414
it.effect.each([
1515
{ tag: WS_METHODS.terminalAttach, size: 1, limit: 8 },
16+
{ tag: WS_METHODS.terminalObserve, size: 1, limit: 8 },
1617
{ tag: WS_METHODS.subscribeTerminalEvents, size: 1, limit: 8 },
1718
{ tag: WS_METHODS.terminalAttach, size: 64 * 1024, limit: 1 },
19+
{ tag: WS_METHODS.terminalObserve, size: 64 * 1024, limit: 1 },
1820
{ tag: WS_METHODS.subscribeTerminalMetadata, size: 1, limit: 1 },
1921
])("limits $tag with $size-byte values to $limit pending chunks", ({ tag, size, limit }) =>
2022
Effect.gen(function* () {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export function withTerminalOutputWindow(
2222
if (
2323
message._tag === "Request" &&
2424
(message.tag === WS_METHODS.terminalAttach ||
25+
message.tag === WS_METHODS.terminalObserve ||
2526
message.tag === WS_METHODS.subscribeTerminalEvents)
2627
) {
2728
const key = `${clientId}:${message.id}`;

0 commit comments

Comments
 (0)