File size: 432 Bytes
4c76b0d | 1 2 3 4 5 6 7 8 9 10 11 12 13 | 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;
}
|