mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 20:30:23 +00:00
refactor: simplify plugin auto-enable structure
This commit is contained in:
@@ -23,7 +23,7 @@ import {
|
||||
DEFAULT_DANGEROUS_NODE_COMMANDS,
|
||||
resolveNodeCommandAllowlist,
|
||||
} from "../gateway/node-command-policy.js";
|
||||
import { hasBundledWebSearchCredential } from "../plugins/bundled-web-search-registry.js";
|
||||
import { hasConfiguredWebSearchCredential } from "../plugins/web-search-credential-presence.js";
|
||||
import { inferParamBFromIdOrName } from "../shared/model-param-b.js";
|
||||
import { pickSandboxToolPolicy } from "./audit-tool-policy.js";
|
||||
|
||||
@@ -326,7 +326,12 @@ function resolveToolPolicies(params: {
|
||||
}
|
||||
|
||||
function hasWebSearchKey(cfg: OpenClawConfig, env: NodeJS.ProcessEnv): boolean {
|
||||
return hasBundledWebSearchCredential({ config: cfg, env });
|
||||
return hasConfiguredWebSearchCredential({
|
||||
config: cfg,
|
||||
env,
|
||||
origin: "bundled",
|
||||
bundledAllowlistCompat: true,
|
||||
});
|
||||
}
|
||||
|
||||
function isWebSearchEnabled(cfg: OpenClawConfig, env: NodeJS.ProcessEnv): boolean {
|
||||
|
||||
Reference in New Issue
Block a user