Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/resolve/pseudoTypes/agentResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,22 @@ const resolveAgentFromConnection = async (connection: Connection, botName: strin
if (genAiPluginNames.length) {
genAiPluginNames.map((r) => mdEntries.push(`GenAiPlugin:${r.DeveloperName}`));
} else {
getLogger().debug(`No GenAiPlugin metadata matches for plannerId: ${plannerId15}`);
getLogger().debug(
`No GenAiPlugin metadata matches for plannerId: ${plannerId15}. Reading the planner metadata for plugins...`
);
// read the planner metadata from the org
// @ts-expect-error jsForce types don't know about GenAiPlanner yet
const genAiPlannerMd = await connection.metadata.read<GenAiPlanner>('GenAiPlanner', botName);
const genAiPlannerMdArr = ensureArray(genAiPlannerMd) as unknown as GenAiPlanner[];
if (genAiPlannerMdArr?.length && genAiPlannerMdArr[0]?.genAiPlugins.length) {
genAiPlannerMdArr[0].genAiPlugins.map((plugin) => {
if (plugin.genAiPluginName?.length) {
mdEntries.push(`GenAiPlugin:${plugin.genAiPluginName}`);
}
});
} else {
getLogger().debug(`No GenAiPlugin metadata found in planner file for API name: ${botName}`);
}
}
} else {
getLogger().debug(`No GenAiPlanner metadata matches for Bot: ${botName}`);
Expand Down
Loading