保存视觉审核与文档流迁移进度

This commit is contained in:
rain
2026-07-20 17:23:09 +08:00
parent 5a31a75da0
commit 01d246c47b
59 changed files with 3615 additions and 378 deletions
+5 -2
View File
@@ -520,12 +520,15 @@ const capture = async () => {
await waitForLoadedImages(send)
await sleep(action?.endsWith('-submitting') ? 80 : renderSettleMilliseconds)
const screenshot = await send('Page.captureScreenshot', { format: 'png', fromSurface: true, captureBeyondViewport: false })
await send('Page.bringToFront')
const screenshot = await send('Page.captureScreenshot', { format: 'png', fromSurface: action !== 'from-view', captureBeyondViewport: false })
fs.mkdirSync(path.dirname(output), { recursive: true })
fs.writeFileSync(output, Buffer.from(screenshot.data, 'base64'))
process.stdout.write(`CAPTURED ${output}\n`)
} finally {
try { await send('Emulation.clearDeviceMetricsOverride') } catch (_) {}
if (action !== 'keep-view') {
try { await send('Emulation.clearDeviceMetricsOverride') } catch (_) {}
}
socket.close()
}
}