Skip to content

Commit

Permalink
Merge pull request #17 from forcedotcom/wr/retrieveMore
Browse files Browse the repository at this point in the history
fix: retrieve GenAiPlugins too
  • Loading branch information
shetzel authored Dec 10, 2024
2 parents 1f57e30 + 1d461a2 commit e4069e4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ export class Agent implements SfAgent {

await Lifecycle.getInstance().emit(AgentCreateLifecycleStages.RetrievingMetadata, {});

const genAiPluginNames = (
await this.connection.tooling.query<{ DeveloperName: string }>(
`SELECT DeveloperName FROM GenAiPluginDefinition WHERE DeveloperName LIKE 'p_${plannerId}%'`
)
).records;
// more MD types were created in the org, than were in the project when we started
genAiPluginNames.map((r) => cs.add({ fullName: r.DeveloperName, type: 'GenAiPlugin' }));

const retrieve = await cs.retrieve({
usernameOrConnection: this.connection,
merge: true,
Expand Down

0 comments on commit e4069e4

Please sign in to comment.