@praxisui/list 8.0.0-beta.32 → 8.0.0-beta.34

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.
@@ -9567,7 +9567,7 @@ class ListAgenticAuthoringTurnFlow {
9567
9567
  const schemaFields = this.adapter.getSchemaFields?.()
9568
9568
  ?.map((field) => this.toAiJsonObject(field))
9569
9569
  .filter((field) => Object.keys(field).length > 0);
9570
- const contextHints = this.optionalJsonObject(this.adapter.getAuthoringContext?.());
9570
+ const contextHints = this.mergeJsonObjects(this.optionalJsonObject(this.adapter.getAuthoringContext?.()), this.optionalJsonObject(request.action?.contextHints));
9571
9571
  if (this.shouldRouteToGovernedDecision(prompt, contextHints)) {
9572
9572
  return this.toGovernedDecisionHandoff(prompt, request);
9573
9573
  }
@@ -9678,6 +9678,7 @@ class ListAgenticAuthoringTurnFlow {
9678
9678
  state: 'clarification',
9679
9679
  phase: 'clarify',
9680
9680
  sessionId: response.sessionId ?? request.sessionId,
9681
+ observationId: response.observationId ?? request.observationId ?? null,
9681
9682
  assistantMessage: response.message || 'Preciso de mais detalhes para continuar.',
9682
9683
  clarificationQuestions: this.toClarificationQuestions(response),
9683
9684
  quickReplies: this.toQuickReplies(response),
@@ -9690,6 +9691,7 @@ class ListAgenticAuthoringTurnFlow {
9690
9691
  state: 'success',
9691
9692
  phase: 'summarize',
9692
9693
  sessionId: response.sessionId ?? request.sessionId,
9694
+ observationId: response.observationId ?? request.observationId ?? null,
9693
9695
  assistantMessage: message,
9694
9696
  statusText: message,
9695
9697
  canApply: false,
@@ -9701,6 +9703,7 @@ class ListAgenticAuthoringTurnFlow {
9701
9703
  state: 'error',
9702
9704
  phase: 'capture',
9703
9705
  sessionId: response.sessionId ?? request.sessionId,
9706
+ observationId: response.observationId ?? request.observationId ?? null,
9704
9707
  assistantMessage: message,
9705
9708
  errorText: message,
9706
9709
  diagnostics: response.warnings?.length ? { warnings: response.warnings } : undefined,
@@ -9713,6 +9716,7 @@ class ListAgenticAuthoringTurnFlow {
9713
9716
  state: 'review',
9714
9717
  phase: 'review',
9715
9718
  sessionId: response.sessionId ?? request.sessionId,
9719
+ observationId: response.observationId ?? request.observationId ?? null,
9716
9720
  assistantMessage: `${response.explanation || 'Proposta de alteracao pronta para revisar.'}${suffix}`,
9717
9721
  statusText: 'Revise a proposta antes de aplicar.',
9718
9722
  canApply: true,
@@ -9728,6 +9732,7 @@ class ListAgenticAuthoringTurnFlow {
9728
9732
  state: 'success',
9729
9733
  phase: 'summarize',
9730
9734
  sessionId: response.sessionId ?? request.sessionId,
9735
+ observationId: response.observationId ?? request.observationId ?? null,
9731
9736
  assistantMessage: response.message || response.explanation || 'Nenhuma alteracao necessaria.',
9732
9737
  statusText: response.message || response.explanation || 'Nenhuma alteracao necessaria.',
9733
9738
  canApply: false,
@@ -9856,6 +9861,8 @@ class ListAgenticAuthoringTurnFlow {
9856
9861
  id: reply.id,
9857
9862
  label: reply.label,
9858
9863
  value: reply.prompt,
9864
+ description: reply.description ?? undefined,
9865
+ contextHints: reply.contextHints ? { ...reply.contextHints } : undefined,
9859
9866
  }));
9860
9867
  return labels.map((label, index) => ({
9861
9868
  id: `list-clarification-${index + 1}`,
@@ -9871,12 +9878,14 @@ class ListAgenticAuthoringTurnFlow {
9871
9878
  return payloads
9872
9879
  .map((option, index) => {
9873
9880
  const label = option.label?.trim() || option.value?.trim() || `Opcao ${index + 1}`;
9874
- const prompt = option.example?.trim() || option.value?.trim() || label;
9881
+ const prompt = option.value?.trim() || option.example?.trim() || label;
9875
9882
  return {
9876
9883
  id: `option-${index + 1}`,
9877
9884
  label,
9878
9885
  prompt,
9879
9886
  kind: 'clarification-option',
9887
+ description: option.example?.trim() || undefined,
9888
+ contextHints: this.optionalJsonObject(option.contextHints),
9880
9889
  };
9881
9890
  });
9882
9891
  }
@@ -9960,6 +9969,16 @@ class ListAgenticAuthoringTurnFlow {
9960
9969
  const object = this.toAiJsonObject(value);
9961
9970
  return Object.keys(object).length ? object : undefined;
9962
9971
  }
9972
+ mergeJsonObjects(base, overlay) {
9973
+ if (!base)
9974
+ return overlay;
9975
+ if (!overlay)
9976
+ return base;
9977
+ return {
9978
+ ...base,
9979
+ ...overlay,
9980
+ };
9981
+ }
9963
9982
  toAiJsonObject(value) {
9964
9983
  const record = this.toRecord(value);
9965
9984
  if (!record) {
@@ -12672,12 +12691,21 @@ class PraxisList {
12672
12691
  if (!controller)
12673
12692
  return;
12674
12693
  const state = controller.snapshot();
12694
+ const contextHints = reply.contextHints ? { ...reply.contextHints } : undefined;
12675
12695
  const next$ = state.state === 'clarification'
12676
- ? controller.answerClarification(reply.prompt)
12696
+ ? controller.answerClarification({
12697
+ id: reply.id,
12698
+ label: reply.label,
12699
+ value: reply.prompt,
12700
+ description: reply.description ?? undefined,
12701
+ contextHints,
12702
+ })
12677
12703
  : controller.submitPrompt(reply.prompt, {
12678
12704
  kind: reply.kind || 'quick-reply',
12679
12705
  id: reply.id,
12680
12706
  value: reply.prompt,
12707
+ displayPrompt: reply.label,
12708
+ contextHints,
12681
12709
  });
12682
12710
  next$.subscribe((nextState) => {
12683
12711
  this.aiAssistantPrompt = '';
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@praxisui/list",
3
- "version": "8.0.0-beta.32",
3
+ "version": "8.0.0-beta.34",
4
4
  "description": "List components and helpers for Praxis UI.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
7
7
  "@angular/core": "^21.0.0",
8
8
  "@angular/material": "^21.0.0",
9
- "@praxisui/dynamic-fields": "^8.0.0-beta.32",
9
+ "@praxisui/dynamic-fields": "^8.0.0-beta.34",
10
10
  "rxjs": ">=7 <9",
11
11
  "@angular/forms": "^21.0.0",
12
12
  "@angular/router": "^21.0.0",
13
- "@praxisui/ai": "^8.0.0-beta.32",
14
- "@praxisui/core": "^8.0.0-beta.32",
15
- "@praxisui/rich-content": "^8.0.0-beta.32",
16
- "@praxisui/settings-panel": "^8.0.0-beta.32"
13
+ "@praxisui/ai": "^8.0.0-beta.34",
14
+ "@praxisui/core": "^8.0.0-beta.34",
15
+ "@praxisui/rich-content": "^8.0.0-beta.34",
16
+ "@praxisui/settings-panel": "^8.0.0-beta.34"
17
17
  },
18
18
  "dependencies": {
19
19
  "tslib": "^2.3.0",