fix(runtime): compact context inside worker

This commit is contained in:
ZacharyZhang-NY committed 2026-04-22 14:19:46 -04:00
1 parent 33c6ede381
commit 6dfa1a851d
13 files changed
+214 -92

No files matched your search

+4
View File
@@ -3,6 +3,7 @@ import type { workerMessageSchema } from "./types";
import { handleRunLog } from "../handlers/run-log-handler";
import { handleRunStatus } from "../handlers/run-status-handler";
import { handleRunFinished } from "../handlers/run-finished-handler";
import { handleContextCompaction } from "../handlers/context-compaction-handler";
import type { HandlerContext, HandlerDeps } from "../handlers/handler-context";
export async function handleWorkerMessage(
@@ -67,6 +68,9 @@ export async function handleWorkerMessage(
}
return;
}
case "context-compaction":
handleContextCompaction(event, deps, context);
return;
case "rpc-request": {
const bridge = deps.getRuntimeBridge?.();
const response = bridge