MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / setBrowserConfig

Function setBrowserConfig

agent/app/service/agents_utils.go:279–290  ·  view source on GitHub ↗
(conf map[string]interface{}, config browserConfig)

Source from the content-addressed store, hash-verified

277}
278
279func setBrowserConfig(conf map[string]interface{}, config browserConfig) {
280 browser := ensureChildMap(conf, "browser")
281 browser["enabled"] = config.Enabled
282 browser["executablePath"] = defaultBrowserExecutablePath
283 browser["headless"] = config.Headless
284 browser["noSandbox"] = config.NoSandbox
285 if strings.TrimSpace(config.DefaultProfile) == "" {
286 browser["defaultProfile"] = defaultBrowserProfile
287 } else {
288 browser["defaultProfile"] = strings.TrimSpace(config.DefaultProfile)
289 }
290}
291
292func extractOtherConfig(conf map[string]interface{}) dto.AgentOtherConfig {
293 result := dto.AgentOtherConfig{

Callers 1

setOtherConfigFunction · 0.85

Calls 1

ensureChildMapFunction · 0.85

Tested by

no test coverage detected