INNER CODE UNIT · JavaScript

stopPageTranslation

figranium/figranium · src/agent/figranite/index.js:209

    let stopPageTranslation = () => {};

    const syncBrowserState = async () => {
        if (statelessExecution || isTestMode || !context) return;
        // Agent contexts import the shared cookies after launch, but their persistent
        // profile does not contain headful-only local storage for unrelated origins.
        // Keep those origins intact while publishing the agent's updated cookies.
        await saveSharedBrowserState(context, { preserveOrigins: true });
    };

    const forceStop = async () => {
        isForceStopped = true;
        userStopped = true;
        stopRequested = true;
        logs.push('Execution force-stopped by user after 3s timeout.');
        try {
            await syncBrowserState();
            if (page) await page.close().catch(() => {});

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…