Skip to content

Commit

Permalink
fix: update UX
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Nov 11, 2024
1 parent 633e484 commit 10fcd5e
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/commands/agent/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,19 @@ export default class AgentCreate extends SfCommand<AgentCreateResult> {

public async run(): Promise<AgentCreateResult> {
const { flags } = await this.parse(AgentCreate);
const mso = new MultiStageOutput<{ file?: string }>({
const jsonParsingStage = `Parsing ${flags['job-spec']}`;
const mso = new MultiStageOutput({
jsonEnabled: this.jsonEnabled(),
title: `Creating ${flags.name} Agent`,
stages: [
'Parsing agent spec JSON',
jsonParsingStage,
'Generating GenAiPlanner metadata',
'Creating agent in org',
'Retrieving agent metadata',
],
stageSpecificBlock: [
{
stage: 'Parsing agent spec JSON',
get: (data) => data?.file,
type: 'static-key-value',
label: 'file',
},
],
});

mso.goto('Parsing agent spec JSON', { file: flags['job-spec'] });
mso.goto(jsonParsingStage);
await sleep(Duration.milliseconds(200));

mso.goto('Generating GenAiPlanner metadata');
Expand Down

0 comments on commit 10fcd5e

Please sign in to comment.