refactor(browser): 使用全局数据目录并支持克隆

This commit is contained in:
WJZ_P
2026-03-17 00:43:40 +08:00
parent 33147c3610
commit 394a589a24
2 changed files with 92 additions and 54 deletions

View File

@@ -111,14 +111,14 @@ export function createOps(page) {
// 等待页面导航 / 内容刷新完成
try {
await page.waitForNavigation({ waitUntil: 'networkidle2', timeout });
await page.waitForNavigation({ waitUntil: 'domcontentloaded', timeout });
} catch {
// 部分场景下按钮不触发 navigation 而是 SPA 内部路由,静默跳过
console.log('[ops] temp chat: navigation wait timed out, continuing (may be SPA routing)');
}
// 再给一点时间让 UI 稳定
await sleep(1000);
await sleep(500);
console.log('[ops] entered temp chat mode');
return { ok: true };