refactor(tools): return complete analysis results inline

This commit is contained in:
morluto
2026-09-29 14:53:50 +08:00
parent c34efca4cd
commit 2a6eb41147
156 changed files with 2529 additions and 1891 deletions
+2 -8
View File
@@ -118,17 +118,11 @@ const configureAttachedEnvironment = async (
export const openPlaywrightScenarioBrowser = async (
scenario: BrowserScenario,
environment: Readonly<Record<string, string | undefined>>,
maximumTimeoutMs: number,
): Promise<OpenedScenarioBrowser> => {
if (scenario.browser.mode === "connect") {
const browser = await chromium.connectOverCDP(
scenario.browser.cdp_endpoint,
{
timeout: Math.min(
scenario.limits.navigation_timeout_ms,
maximumTimeoutMs,
),
},
{ timeout: 0 },
);
try {
const target = await findConnectedPage(
@@ -165,7 +159,7 @@ export const openPlaywrightScenarioBrowser = async (
handleSIGHUP: false,
handleSIGINT: false,
handleSIGTERM: false,
timeout: maximumTimeoutMs,
timeout: 0,
});
const browser = context.browser();
if (browser === null) {