Skip to content

Conversation

@EstebanRomero84
Copy link
Contributor

What does this PR do?

Callout to the real compile API.

What issues does this PR fix or reference?

@W-19995335@

src/agent.ts Outdated
Comment on lines 329 to 330
const apiEnv = 'api.salesforce.com';
const url = `https://${apiEnv}/einstein/ai-agent/v1.1/authoring/compile`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could remove apiEnv and put it in the URL string now


describe('compileAgentScript', () => {
it('should compile a lululemon agent script successfully', async () => {
// Read the lululemon agent script from the project
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may want to obfuscate the lulu example some, and make it generic since this is OSS

src/agent.ts Outdated
Comment on lines 360 to 362
throw SfError.create({
name: 'CompileAgentScriptError',
message: 'Error when compiling AgentScript',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this was here, but we should just SfError.wrap(errror) - I think that'll preserve more information from the real error on the server

@WillieRuemmele WillieRuemmele merged commit c0a43ef into nga Oct 23, 2025
13 checks passed
@WillieRuemmele WillieRuemmele deleted the er/wireUpCompileAPI branch October 23, 2025 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants