mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-23 19:08:14 +00:00
17 lines
575 B
TypeScript
17 lines
575 B
TypeScript
/**
|
|
* Browser plugin enablement resolver for bundled-plugin defaults.
|
|
*/
|
|
import type { OpenClawConfig } from "./sdk-config.js";
|
|
import { normalizePluginsConfig, resolveEffectiveEnableState } from "./sdk-config.js";
|
|
|
|
/** Returns whether the bundled Browser plugin is effectively enabled by config. */
|
|
export function isDefaultBrowserPluginEnabled(cfg: OpenClawConfig): boolean {
|
|
return resolveEffectiveEnableState({
|
|
id: "browser",
|
|
origin: "bundled",
|
|
config: normalizePluginsConfig(cfg.plugins),
|
|
rootConfig: cfg,
|
|
enabledByDefault: true,
|
|
}).enabled;
|
|
}
|