fix: force fresh web probe sessions

This commit is contained in:
lyon
2026-06-17 21:30:44 +08:00
parent b74fc22a5d
commit 3fd59899b1
+1 -4
View File
@@ -1,4 +1,5 @@
#!/usr/bin/env node
// SPEC: PJ2026-010401 Web工作台 - Workbench 可见性与性能探针
import { createHash } from "node:crypto";
import { spawn } from "node:child_process";
import fs from "node:fs";
@@ -608,10 +609,6 @@ async function createFreshSession(page, args, actions) {
}
const shellReady = await waitForSessionShellReady(page, args, actions);
const before = await collectSessionState(page);
if (before.messageCount === 0 && before.command?.inputDisabled === false) {
actions.push({ action: "fresh-session", selector, reusedExistingEmptySession: true, shellReady, before });
return true;
}
await locator.click();
const timeoutMs = Math.min(args.timeoutMs, 30000);
const settled = await page.waitForFunction((initial) => {