@cqa-lib/cqa-ui 1.1.480 → 1.1.481

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.
@@ -13227,7 +13227,7 @@ class AIAgentStepComponent extends BaseStepComponent {
13227
13227
  status: this.status,
13228
13228
  duration: this.duration,
13229
13229
  displayType: 'ai-agent',
13230
- prompt: promptValue.replace('AI Agent', '').trim(),
13230
+ prompt: promptValue.replace('AI Agent', '').trim().replace(/\n/g, '<br>'),
13231
13231
  optimizedRun: this.optimizedRun,
13232
13232
  actionCount: this.actionCount,
13233
13233
  actions: this.actions || [],
@@ -13251,18 +13251,18 @@ class AIAgentStepComponent extends BaseStepComponent {
13251
13251
  if (changes['prompt']) {
13252
13252
  // Remove 'AI Agent' prefix if present and trim
13253
13253
  const promptValue = this.prompt || '';
13254
- this.config.prompt = promptValue.replace('AI Agent', '').trim();
13254
+ this.config.prompt = promptValue.replace('AI Agent', '').trim().replace(/\n/g, '<br>');
13255
13255
  }
13256
13256
  // Sync prompt when the step reference updates (live execution); use `prompt`, then `action`
13257
13257
  if (changes['step'] && !String(this.config.prompt || '').trim()) {
13258
13258
  const fromStep = this.step?.prompt || this.step?.action || '';
13259
13259
  if (fromStep) {
13260
- this.config.prompt = String(fromStep).replace('AI Agent', '').trim();
13260
+ this.config.prompt = String(fromStep).replace('AI Agent', '').trim().replace(/\n/g, '<br>');
13261
13261
  }
13262
13262
  }
13263
13263
  // If prompt is not set but title is, use title as prompt
13264
13264
  if (!this.prompt && !String(this.config.prompt || '').trim() && this.title) {
13265
- this.config.prompt = this.title.replace('AI Agent', '').trim();
13265
+ this.config.prompt = this.title.replace('AI Agent', '').trim().replace(/\n/g, '<br>');
13266
13266
  }
13267
13267
  // If title is not set but prompt is, use prompt as title
13268
13268
  if (!this.title && this.prompt && this.config.title !== this.prompt) {
@@ -13281,7 +13281,7 @@ class AIAgentStepComponent extends BaseStepComponent {
13281
13281
  if (!String(this.config.prompt || '').trim()) {
13282
13282
  const fallback = this.action || this.step?.prompt || this.step?.action || '';
13283
13283
  if (fallback) {
13284
- this.config.prompt = String(fallback).replace('AI Agent', '').trim();
13284
+ this.config.prompt = String(fallback).replace('AI Agent', '').trim().replace(/\n/g, '<br>');
13285
13285
  }
13286
13286
  }
13287
13287
  }