openclaw / src /plugins /runtime /runtime-agent-thinking.ts
SaylorTwift's picture
SaylorTwift HF Staff
Add files using upload-large-folder tool
4c76b0d verified
Raw
History Blame Contribute Delete
432 Bytes
import type { PluginRuntime } from "./types.js";
export function resolveRuntimeThinkingCatalog(
params: Parameters<PluginRuntime["agent"]["resolveThinkingPolicy"]>[0],
buildConfiguredCatalog: () => Exclude<typeof params.catalog, undefined>,
) {
if (params.catalog) {
return params.catalog;
}
const configuredCatalog = buildConfiguredCatalog();
return configuredCatalog.length > 0 ? configuredCatalog : undefined;
}