@cqa-lib/cqa-ui 1.1.517 → 1.1.519

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13431,6 +13431,7 @@ class AIAgentStepComponent extends BaseStepComponent {
13431
13431
  const isStepFailed = statusLower === 'failed' || statusLower === 'failure';
13432
13432
  const hasExecutionStarted = actions.some((a) => (a.uiType || a.type) === 'STEP_EXECUTION_STARTED');
13433
13433
  const hasStepRunSuccessfully = actions.some((a) => (a.uiType || a.type) === 'STEP_RUN_SUCCESSFULLY');
13434
+ const hasPaused = actions.some((a) => (a.uiType || a.type) === 'STEP_RUN_PAUSED');
13434
13435
  const hasFailed = isStepFailed ||
13435
13436
  actions.some((a) => {
13436
13437
  const s = (a.status || '').toString().toLowerCase();
@@ -13438,7 +13439,7 @@ class AIAgentStepComponent extends BaseStepComponent {
13438
13439
  }) ||
13439
13440
  actions.some((a) => (a.stepStatus || '').toString().toUpperCase() === 'FAILURE') ||
13440
13441
  actions.some((a) => (a.uiType || a.type) === 'STEP_RUN_FAILED');
13441
- this.showThinkingLog = this.isLive && hasExecutionStarted && !hasStepRunSuccessfully && !hasFailed;
13442
+ this.showThinkingLog = this.isLive && hasExecutionStarted && !hasStepRunSuccessfully && !hasFailed && !hasPaused;
13442
13443
  }
13443
13444
  ngOnInit() {
13444
13445
  var _a, _b, _c, _d, _e;
@@ -43859,11 +43860,18 @@ class StepBuilderGroupComponent {
43859
43860
  if (this.initialStepGroupId) {
43860
43861
  const foundGroup = this.stepGroupOptions.find(opt => opt.id === this.initialStepGroupId);
43861
43862
  if (foundGroup) {
43862
- this.stepGroupForm.patchValue({ stepGroupId: this.initialStepGroupId });
43863
- this.selectedStepGroup = foundGroup;
43864
- // Capture snapshot for change detection (will be recaptured if runtime variables load later)
43865
- if (this.editMode) {
43866
- this.captureInitialSnapshot();
43863
+ // Only patch the form to the initial value if the user hasn't picked a
43864
+ // different option yet. Subsequent stepGroupOptions changes (e.g. the
43865
+ // refetch dynamic-select fires on every dropdown reopen) must NOT
43866
+ // clobber a user-modified selection.
43867
+ const currentFormValue = this.stepGroupForm.value.stepGroupId;
43868
+ if (currentFormValue == null || currentFormValue === this.initialStepGroupId) {
43869
+ this.stepGroupForm.patchValue({ stepGroupId: this.initialStepGroupId });
43870
+ this.selectedStepGroup = foundGroup;
43871
+ // Capture snapshot for change detection (will be recaptured if runtime variables load later)
43872
+ if (this.editMode) {
43873
+ this.captureInitialSnapshot();
43874
+ }
43867
43875
  }
43868
43876
  }
43869
43877
  }
@@ -43968,7 +43976,16 @@ class StepBuilderGroupComponent {
43968
43976
  if (!this.selectedStepGroup) {
43969
43977
  return;
43970
43978
  }
43971
- this.initialStepGroupIdSnapshot = this.stepGroupForm.value.stepGroupId || null;
43979
+ // Re-capture is only valid while the form still points at the original
43980
+ // initialStepGroupId — that covers the "runtime vars arrived after the
43981
+ // initial selection was patched" case. Once the user picks a different
43982
+ // group, keep the original baseline so `hasChanges()` stays true and the
43983
+ // Update button remains enabled.
43984
+ const currentStepGroupId = this.stepGroupForm.value.stepGroupId;
43985
+ if (this.snapshotReady && currentStepGroupId !== this.initialStepGroupId) {
43986
+ return;
43987
+ }
43988
+ this.initialStepGroupIdSnapshot = currentStepGroupId || null;
43972
43989
  this.initialRuntimeValuesSnapshot = JSON.stringify(this.runtimeVariableValues);
43973
43990
  this.snapshotReady = true;
43974
43991
  }