perf(server): keep passive terminal output flowing (#17178)

This commit is contained in:
Wout Stiens authored and GitHub committed 2026-10-09 23:57:34 -03:00
1 parent b822420e50
commit 0981e6b9d4
2 files changed
+3

No files matched your search

@@ -13,8 +13,10 @@ import { withTerminalOutputWindow } from "./OutputProtocol.ts";
describe("terminal output window", () => {
it.effect.each([
{ tag: WS_METHODS.terminalAttach, size: 1, limit: 8 },
{ tag: WS_METHODS.terminalObserve, size: 1, limit: 8 },
{ tag: WS_METHODS.subscribeTerminalEvents, size: 1, limit: 8 },
{ tag: WS_METHODS.terminalAttach, size: 64 * 1024, limit: 1 },
{ tag: WS_METHODS.terminalObserve, size: 64 * 1024, limit: 1 },
{ tag: WS_METHODS.subscribeTerminalMetadata, size: 1, limit: 1 },
])("limits $tag with $size-byte values to $limit pending chunks", ({ tag, size, limit }) =>
Effect.gen(function* () {
@@ -22,6 +22,7 @@ export function withTerminalOutputWindow(
if (
message._tag === "Request" &&
(message.tag === WS_METHODS.terminalAttach ||
message.tag === WS_METHODS.terminalObserve ||
message.tag === WS_METHODS.subscribeTerminalEvents)
) {
const key = `${clientId}:${message.id}`;