mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-11 03:13:24 +00:00
feat(config): add browser Backend field + GOCLAW_BROWSER_BACKEND env
Introduces an explicit backend selector for the browser automation
tool ("chrome" or "lightpanda"). Empty means auto-detect, which will
be wired in a later commit. Chrome remains the default behavior.
This commit is contained in:
2 files changed
+2
No files matched your search
@@ -523,6 +523,7 @@ type WebFetchPolicyConfig struct {
|
||||
// BrowserToolConfig controls the browser automation tool.
|
||||
type BrowserToolConfig struct {
|
||||
Enabled bool `json:"enabled"` // enable the browser tool (default false)
|
||||
Backend string `json:"backend,omitempty"` // "chrome" (default) or "lightpanda"; auto-detected from /json/version if empty
|
||||
Headless bool `json:"headless,omitempty"` // run Chrome in headless mode (ignored when RemoteURL is set)
|
||||
RemoteURL string `json:"remote_url,omitempty"` // CDP endpoint for remote Chrome sidecar, e.g. "ws://chrome:9222"
|
||||
ActionTimeoutMs int `json:"action_timeout_ms,omitempty"` // per-action timeout in ms (default 30000)
|
||||
|
||||
@@ -390,6 +390,7 @@ func (c *Config) applyEnvOverrides() {
|
||||
|
||||
// Browser (for Docker-compose browser sidecar overlay)
|
||||
envStr("GOCLAW_BROWSER_REMOTE_URL", &c.Tools.Browser.RemoteURL)
|
||||
envStr("GOCLAW_BROWSER_BACKEND", &c.Tools.Browser.Backend)
|
||||
if c.Tools.Browser.RemoteURL != "" {
|
||||
c.Tools.Browser.Enabled = true
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user