mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 09:27:39 +00:00
fix: add extraArgs to sandbox browser config and apply oxfmt formatting
Add the missing extraArgs property to buildSandboxBrowserResolvedConfig to satisfy the ResolvedBrowserConfig type, and fix import ordering. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
Peter Steinberger
parent
039fc1e04c
commit
2977f7325d
@@ -1,5 +1,4 @@
|
|||||||
import crypto from "node:crypto";
|
import crypto from "node:crypto";
|
||||||
import type { SandboxBrowserContext, SandboxConfig } from "./types.js";
|
|
||||||
import { startBrowserBridgeServer, stopBrowserBridgeServer } from "../../browser/bridge-server.js";
|
import { startBrowserBridgeServer, stopBrowserBridgeServer } from "../../browser/bridge-server.js";
|
||||||
import { type ResolvedBrowserConfig, resolveProfile } from "../../browser/config.js";
|
import { type ResolvedBrowserConfig, resolveProfile } from "../../browser/config.js";
|
||||||
import {
|
import {
|
||||||
@@ -22,6 +21,7 @@ import {
|
|||||||
import { readBrowserRegistry, updateBrowserRegistry } from "./registry.js";
|
import { readBrowserRegistry, updateBrowserRegistry } from "./registry.js";
|
||||||
import { resolveSandboxAgentId, slugifySessionKey } from "./shared.js";
|
import { resolveSandboxAgentId, slugifySessionKey } from "./shared.js";
|
||||||
import { isToolAllowed } from "./tool-policy.js";
|
import { isToolAllowed } from "./tool-policy.js";
|
||||||
|
import type { SandboxBrowserContext, SandboxConfig } from "./types.js";
|
||||||
|
|
||||||
const HOT_BROWSER_WINDOW_MS = 5 * 60 * 1000;
|
const HOT_BROWSER_WINDOW_MS = 5 * 60 * 1000;
|
||||||
|
|
||||||
@@ -70,6 +70,7 @@ function buildSandboxBrowserResolvedConfig(params: {
|
|||||||
noSandbox: false,
|
noSandbox: false,
|
||||||
attachOnly: true,
|
attachOnly: true,
|
||||||
defaultProfile: DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME,
|
defaultProfile: DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME,
|
||||||
|
extraArgs: [],
|
||||||
profiles: {
|
profiles: {
|
||||||
[DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME]: {
|
[DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME]: {
|
||||||
cdpPort: params.cdpPort,
|
cdpPort: params.cdpPort,
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import fs from "node:fs";
|
|||||||
import os from "node:os";
|
import os from "node:os";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import WebSocket from "ws";
|
import WebSocket from "ws";
|
||||||
import type { ResolvedBrowserConfig, ResolvedBrowserProfile } from "./config.js";
|
|
||||||
import { ensurePortAvailable } from "../infra/ports.js";
|
import { ensurePortAvailable } from "../infra/ports.js";
|
||||||
import { createSubsystemLogger } from "../logging/subsystem.js";
|
import { createSubsystemLogger } from "../logging/subsystem.js";
|
||||||
import { CONFIG_DIR } from "../utils.js";
|
import { CONFIG_DIR } from "../utils.js";
|
||||||
@@ -18,6 +17,7 @@ import {
|
|||||||
ensureProfileCleanExit,
|
ensureProfileCleanExit,
|
||||||
isProfileDecorated,
|
isProfileDecorated,
|
||||||
} from "./chrome.profile-decoration.js";
|
} from "./chrome.profile-decoration.js";
|
||||||
|
import type { ResolvedBrowserConfig, ResolvedBrowserProfile } from "./config.js";
|
||||||
import {
|
import {
|
||||||
DEFAULT_OPENCLAW_BROWSER_COLOR,
|
DEFAULT_OPENCLAW_BROWSER_COLOR,
|
||||||
DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME,
|
DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME,
|
||||||
|
|||||||
Reference in New Issue
Block a user