Keep long G-code execution running past full planner queue

This commit is contained in:
2026-08-30 06:34:59 +08:00
parent d87366eb75
commit 2d6d8bd1c2
5 changed files with 32 additions and 15 deletions

View File

@@ -28,12 +28,15 @@ export class XyzacSession extends SimSession {
accept(input) {
const response = super.accept(input);
if (response?.payload && typeof response.payload === "object") {
response.payload.xyzac_session = this.authority();
response.payload.xyzac_ledger = this.ledger.audit();
response.payload.xyzac_scheduler = this.scheduler.export();
}
return response;
if (!response?.payload || typeof response.payload !== "object") return response;
// super.accept stores the response in the operation ledger. Enrich a
// shallow client copy so the next ledger audit cannot recursively embed
// every previous response inside the stored response object.
const payload = { ...response.payload };
payload.xyzac_session = this.authority();
payload.xyzac_ledger = this.ledger.audit({ includeResponses: input.kind !== "SIM_STEP" });
payload.xyzac_scheduler = this.scheduler.export();
return { ...response, payload };
}
}