Skip to content

Commit 8d0f4be

Browse files
fix: use apiName as file and directory name
1 parent 6538237 commit 8d0f4be

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/commands/agent/generate/authoring-bundle.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ export default class AgentGenerateAuthoringBundle extends SfCommand<AgentGenerat
125125
try {
126126
// Get default output directory if not specified
127127
const defaultOutputDir = join(this.project!.getDefaultPackage().fullPath, 'main', 'default');
128-
const targetOutputDir = join(outputDir ?? defaultOutputDir, 'aiAuthoringBundles', name);
128+
const targetOutputDir = join(outputDir ?? defaultOutputDir, 'aiAuthoringBundles', bundleApiName);
129129

130130
// Generate file paths
131-
const agentPath = join(targetOutputDir, `${name}.agent`);
132-
const metaXmlPath = join(targetOutputDir, `${name}.aiAuthoringBundle-meta.xml`);
131+
const agentPath = join(targetOutputDir, `${bundleApiName}.agent`);
132+
const metaXmlPath = join(targetOutputDir, `${bundleApiName}.aiAuthoringBundle-meta.xml`);
133133

134134
// Write Agent file
135135
const conn = targetOrg.getConnection(flags['api-version']);
@@ -145,13 +145,13 @@ export default class AgentGenerateAuthoringBundle extends SfCommand<AgentGenerat
145145
<Label>${specContents.role}</Label>
146146
<BundleType>${specContents.agentType}</BundleType>
147147
<VersionTag>Spring2026</VersionTag>
148-
<VersionDescription>Initial release for ${name}</VersionDescription>
148+
<VersionDescription>Initial release for ${bundleApiName}</VersionDescription>
149149
<SourceBundleVersion></SourceBundleVersion>
150150
<Target></Target>
151151
</aiAuthoringBundle>`;
152152
writeFileSync(metaXmlPath, metaXml);
153153

154-
this.logSuccess(`Successfully generated ${name} Authoring Bundle`);
154+
this.logSuccess(`Successfully generated ${bundleApiName} Authoring Bundle`);
155155

156156
return {
157157
agentPath,

0 commit comments

Comments
 (0)