openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
22 lines (21 loc) • 816 B
JavaScript
//#region src/agents/codex-native-web-search.shared.ts
/** Resolve Codex native web-search config from OpenClaw tool settings. */
function resolveCodexNativeWebSearchConfig(e) {
const t = e?.tools?.web?.search?.openaiCodex;
return {
enabled: t?.enabled === true,
mode: t?.mode ?? "cached",
allowedDomains: t?.allowedDomains,
contextSize: t?.contextSize,
userLocation: t?.userLocation
};
}
/** Return concise prompt/status text for enabled Codex native search. */
function describeCodexNativeWebSearch(e) {
if (e?.tools?.web?.search?.enabled === false) return;
const t = resolveCodexNativeWebSearchConfig(e);
if (!t.enabled) return;
return `Codex native search: ${t.mode} for Codex-capable models`;
}
//#endregion
export { resolveCodexNativeWebSearchConfig as n, describeCodexNativeWebSearch as t };