From 10fcd5ed44ecc41316fdb17cc54cf44da6815e2b Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Mon, 11 Nov 2024 13:55:04 -0700 Subject: [PATCH] fix: update UX --- src/commands/agent/create.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/commands/agent/create.ts b/src/commands/agent/create.ts index 657ff95..01b7622 100644 --- a/src/commands/agent/create.ts +++ b/src/commands/agent/create.ts @@ -46,26 +46,19 @@ export default class AgentCreate extends SfCommand { public async run(): Promise { 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');