@8wave/ai-elements 0.125.0-beta.29 → 0.125.0-beta.30

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.
Files changed (132) hide show
  1. package/README.md +5 -1
  2. package/dist/_chunks/{Agent-CCBs3D5I.js → Agent-BZiorSrE.js} +160 -119
  3. package/dist/_chunks/Agent-BZiorSrE.js.map +1 -0
  4. package/dist/_chunks/{PkFilePreview-DiLMoL-6.js → PkFilePreview-DCk2wnP9.js} +3 -3
  5. package/dist/_chunks/{PkFilePreview-DiLMoL-6.js.map → PkFilePreview-DCk2wnP9.js.map} +1 -1
  6. package/dist/_chunks/{PkFilePreviewDialog-CHBtxpoB.js → PkFilePreviewDialog-BFGUstHI.js} +2 -2
  7. package/dist/_chunks/{PkFilePreviewDialog-CHBtxpoB.js.map → PkFilePreviewDialog-BFGUstHI.js.map} +1 -1
  8. package/dist/_chunks/{PkSelectionActions-DFyvcEyl.js → PkSelectionActions-DMqJYWem.js} +2 -2
  9. package/dist/_chunks/{PkSelectionActions-DFyvcEyl.js.map → PkSelectionActions-DMqJYWem.js.map} +1 -1
  10. package/dist/_chunks/{PkStreamingMarkdown-0hE_Cx4W.js → PkStreamingMarkdown-BqDooeUU.js} +3 -3
  11. package/dist/_chunks/{PkStreamingMarkdown-0hE_Cx4W.js.map → PkStreamingMarkdown-BqDooeUU.js.map} +1 -1
  12. package/dist/_chunks/{PkToolChatFile-DtQ9xY4w.js → PkToolChatFile-DpStX3wS.js} +3 -3
  13. package/dist/_chunks/{PkToolChatFile-DtQ9xY4w.js.map → PkToolChatFile-DpStX3wS.js.map} +1 -1
  14. package/dist/_chunks/{PkToolRequestGeolocation-CUXB6Lkw.js → PkToolRequestGeolocation-BfwRKTYt.js} +2 -2
  15. package/dist/_chunks/{PkToolRequestGeolocation-CUXB6Lkw.js.map → PkToolRequestGeolocation-BfwRKTYt.js.map} +1 -1
  16. package/dist/_chunks/{PkToolRequestOAuthConnection-CoK7s1HA.js → PkToolRequestOAuthConnection-BeNjHyE9.js} +2 -2
  17. package/dist/_chunks/{PkToolRequestOAuthConnection-CoK7s1HA.js.map → PkToolRequestOAuthConnection-BeNjHyE9.js.map} +1 -1
  18. package/dist/_chunks/{PkToolShowArtifact-BdkKU6P1.js → PkToolShowArtifact-YPwJLLlW.js} +2 -2
  19. package/dist/_chunks/{PkToolShowArtifact-BdkKU6P1.js.map → PkToolShowArtifact-YPwJLLlW.js.map} +1 -1
  20. package/dist/_chunks/{PkToolShowContactForm-BmM2MbOK.js → PkToolShowContactForm-CTc1mbA8.js} +2 -2
  21. package/dist/_chunks/{PkToolShowContactForm-BmM2MbOK.js.map → PkToolShowContactForm-CTc1mbA8.js.map} +1 -1
  22. package/dist/_chunks/{PkToolShowForm-CoFlgA-I.js → PkToolShowForm-DT5EyYVY.js} +4 -4
  23. package/dist/_chunks/{PkToolShowForm-CoFlgA-I.js.map → PkToolShowForm-DT5EyYVY.js.map} +1 -1
  24. package/dist/_chunks/{PkToolShowImageGallery-DefXra8-.js → PkToolShowImageGallery-DKrCrrB5.js} +2 -2
  25. package/dist/_chunks/{PkToolShowImageGallery-DefXra8-.js.map → PkToolShowImageGallery-DKrCrrB5.js.map} +1 -1
  26. package/dist/_chunks/{PkToolShowProductList-D6Df6dtq.js → PkToolShowProductList-BQjFsiEo.js} +2 -2
  27. package/dist/_chunks/{PkToolShowProductList-D6Df6dtq.js.map → PkToolShowProductList-BQjFsiEo.js.map} +1 -1
  28. package/dist/_chunks/{PkToolShowSources-DDBlLBt6.js → PkToolShowSources-CzSknPo6.js} +3 -3
  29. package/dist/_chunks/{PkToolShowSources-DDBlLBt6.js.map → PkToolShowSources-CzSknPo6.js.map} +1 -1
  30. package/dist/_chunks/{PkToolShowSuggestedReply-B-s_ERZF.js → PkToolShowSuggestedReply-C9gtEyCy.js} +2 -2
  31. package/dist/_chunks/{PkToolShowSuggestedReply-B-s_ERZF.js.map → PkToolShowSuggestedReply-C9gtEyCy.js.map} +1 -1
  32. package/dist/_chunks/{PkToolShowVideo-CKpJ1O7O.js → PkToolShowVideo-CxYRfgA5.js} +2 -2
  33. package/dist/_chunks/{PkToolShowVideo-CKpJ1O7O.js.map → PkToolShowVideo-CxYRfgA5.js.map} +1 -1
  34. package/dist/_chunks/{PkToolShowWebPages-BicbYK0k.js → PkToolShowWebPages-CBkk8sYx.js} +2 -2
  35. package/dist/_chunks/{PkToolShowWebPages-BicbYK0k.js.map → PkToolShowWebPages-CBkk8sYx.js.map} +1 -1
  36. package/dist/_chunks/{chatImagePolicy-Df31QSRJ.js → chatImagePolicy-NToILNOC.js} +2 -2
  37. package/dist/_chunks/{chatImagePolicy-Df31QSRJ.js.map → chatImagePolicy-NToILNOC.js.map} +1 -1
  38. package/dist/_chunks/{markdown-B_D4YzWu.js → markdown-DqyUj6ze.js} +2 -2
  39. package/dist/_chunks/{markdown-B_D4YzWu.js.map → markdown-DqyUj6ze.js.map} +1 -1
  40. package/dist/_chunks/{utils-ChmRkK0t.js → utils-BcIYGNLF.js} +2 -2
  41. package/dist/_chunks/{utils-ChmRkK0t.js.map → utils-BcIYGNLF.js.map} +1 -1
  42. package/dist/ai-elements.es.js +30 -25
  43. package/dist/ai-elements.es.js.map +1 -1
  44. package/dist-vue/PkChatbot.js +1 -1
  45. package/dist-vue/PkChatbotEmptyState.js +1 -1
  46. package/dist-vue/PkChatbotInput.js +1 -1
  47. package/dist-vue/PkChatbotMessages.js +1 -1
  48. package/dist-vue/PkChatbotStepPayload.js +1 -1
  49. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  50. package/dist-vue/PkChatbotSteps.js +1 -1
  51. package/dist-vue/PkChatbotViewChat.js +1 -1
  52. package/dist-vue/PkChatbotViewConversations.js +1 -1
  53. package/dist-vue/PkChatbotViewFiles.js +1 -1
  54. package/dist-vue/PkChatbotViewProfile.js +1 -1
  55. package/dist-vue/_chunks/{Agent-Cm1LrkYm.js → Agent-B55xNURC.js} +168 -127
  56. package/dist-vue/_chunks/Agent-B55xNURC.js.map +1 -0
  57. package/dist-vue/_chunks/{Document-D1x1WBr-.js → Document-BzJVMupn.js} +10 -10
  58. package/dist-vue/_chunks/{Document-D1x1WBr-.js.map → Document-BzJVMupn.js.map} +1 -1
  59. package/dist-vue/_chunks/{PkChatbot-BjJzskl7.js → PkChatbot-DLgPqMWd.js} +8 -8
  60. package/dist-vue/_chunks/{PkChatbot-BjJzskl7.js.map → PkChatbot-DLgPqMWd.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkChatbotEmptyState-CZC2gP3I.js → PkChatbotEmptyState-DMPEj1Qa.js} +2 -2
  62. package/dist-vue/_chunks/{PkChatbotEmptyState-CZC2gP3I.js.map → PkChatbotEmptyState-DMPEj1Qa.js.map} +1 -1
  63. package/dist-vue/_chunks/{PkChatbotInput-BmTdIJZ9.js → PkChatbotInput-TamSYiA7.js} +3 -3
  64. package/dist-vue/_chunks/{PkChatbotInput-BmTdIJZ9.js.map → PkChatbotInput-TamSYiA7.js.map} +1 -1
  65. package/dist-vue/_chunks/{PkChatbotMessages-b2lupEv9.js → PkChatbotMessages-bPBOSAv7.js} +17 -17
  66. package/dist-vue/_chunks/{PkChatbotMessages-b2lupEv9.js.map → PkChatbotMessages-bPBOSAv7.js.map} +1 -1
  67. package/dist-vue/_chunks/{PkChatbotStepPayload-D4w1XlF2.js → PkChatbotStepPayload-DfLVMQrN.js} +2 -2
  68. package/dist-vue/_chunks/{PkChatbotStepPayload-D4w1XlF2.js.map → PkChatbotStepPayload-DfLVMQrN.js.map} +1 -1
  69. package/dist-vue/_chunks/{PkChatbotStepToolDetail-DFTcjzoX.js → PkChatbotStepToolDetail-mwByeqKJ.js} +3 -3
  70. package/dist-vue/_chunks/{PkChatbotStepToolDetail-DFTcjzoX.js.map → PkChatbotStepToolDetail-mwByeqKJ.js.map} +1 -1
  71. package/dist-vue/_chunks/{PkChatbotSteps-D3zLulMo.js → PkChatbotSteps-pibgqxus.js} +5 -5
  72. package/dist-vue/_chunks/{PkChatbotSteps-D3zLulMo.js.map → PkChatbotSteps-pibgqxus.js.map} +1 -1
  73. package/dist-vue/_chunks/{PkChatbotViewChat-DawyiUjq.js → PkChatbotViewChat-y60IA9aQ.js} +7 -7
  74. package/dist-vue/_chunks/{PkChatbotViewChat-DawyiUjq.js.map → PkChatbotViewChat-y60IA9aQ.js.map} +1 -1
  75. package/dist-vue/_chunks/{PkChatbotViewConversations-Bs246dtL.js → PkChatbotViewConversations-BPnPsRhJ.js} +3 -3
  76. package/dist-vue/_chunks/{PkChatbotViewConversations-Bs246dtL.js.map → PkChatbotViewConversations-BPnPsRhJ.js.map} +1 -1
  77. package/dist-vue/_chunks/{PkChatbotViewFiles-uzZ5H4Fd.js → PkChatbotViewFiles-gYkXw8dc.js} +3 -3
  78. package/dist-vue/_chunks/{PkChatbotViewFiles-uzZ5H4Fd.js.map → PkChatbotViewFiles-gYkXw8dc.js.map} +1 -1
  79. package/dist-vue/_chunks/{PkChatbotViewProfile-BhIvfT_n.js → PkChatbotViewProfile-PnHDQuuK.js} +2 -2
  80. package/dist-vue/_chunks/{PkChatbotViewProfile-BhIvfT_n.js.map → PkChatbotViewProfile-PnHDQuuK.js.map} +1 -1
  81. package/dist-vue/_chunks/{PkFilePreview-DfD48QQ_.js → PkFilePreview-CPSYaOV7.js} +3 -3
  82. package/dist-vue/_chunks/{PkFilePreview-DfD48QQ_.js.map → PkFilePreview-CPSYaOV7.js.map} +1 -1
  83. package/dist-vue/_chunks/{PkFilePreviewDialog-DFCBpQf3.js → PkFilePreviewDialog-D6zFO_H_.js} +2 -2
  84. package/dist-vue/_chunks/{PkFilePreviewDialog-DFCBpQf3.js.map → PkFilePreviewDialog-D6zFO_H_.js.map} +1 -1
  85. package/dist-vue/_chunks/{PkStreamingMarkdown-ChMbSviw.js → PkStreamingMarkdown-B3VWOaWb.js} +3 -3
  86. package/dist-vue/_chunks/{PkStreamingMarkdown-ChMbSviw.js.map → PkStreamingMarkdown-B3VWOaWb.js.map} +1 -1
  87. package/dist-vue/_chunks/{PkToolChatFile-DQtABEaI.js → PkToolChatFile-PXpiJLZ6.js} +3 -3
  88. package/dist-vue/_chunks/{PkToolChatFile-DQtABEaI.js.map → PkToolChatFile-PXpiJLZ6.js.map} +1 -1
  89. package/dist-vue/_chunks/{PkToolRequestGeolocation-p7Ip17F7.js → PkToolRequestGeolocation-Bx2Vtb-5.js} +2 -2
  90. package/dist-vue/_chunks/{PkToolRequestGeolocation-p7Ip17F7.js.map → PkToolRequestGeolocation-Bx2Vtb-5.js.map} +1 -1
  91. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CtXSzKzM.js → PkToolRequestOAuthConnection-Dp_dx8cQ.js} +2 -2
  92. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CtXSzKzM.js.map → PkToolRequestOAuthConnection-Dp_dx8cQ.js.map} +1 -1
  93. package/dist-vue/_chunks/{PkToolShowArtifact-w6SxjLPW.js → PkToolShowArtifact-DouCz_dZ.js} +2 -2
  94. package/dist-vue/_chunks/{PkToolShowArtifact-w6SxjLPW.js.map → PkToolShowArtifact-DouCz_dZ.js.map} +1 -1
  95. package/dist-vue/_chunks/{PkToolShowContactForm-BQ7bBTQU.js → PkToolShowContactForm-BmiNlFfx.js} +2 -2
  96. package/dist-vue/_chunks/{PkToolShowContactForm-BQ7bBTQU.js.map → PkToolShowContactForm-BmiNlFfx.js.map} +1 -1
  97. package/dist-vue/_chunks/{PkToolShowDiagram-D-yQgdOL.js → PkToolShowDiagram-D6mYTDU-.js} +2 -2
  98. package/dist-vue/_chunks/{PkToolShowDiagram-D-yQgdOL.js.map → PkToolShowDiagram-D6mYTDU-.js.map} +1 -1
  99. package/dist-vue/_chunks/{PkToolShowForm-CF00JLpa.js → PkToolShowForm-CksTiimD.js} +4 -4
  100. package/dist-vue/_chunks/{PkToolShowForm-CF00JLpa.js.map → PkToolShowForm-CksTiimD.js.map} +1 -1
  101. package/dist-vue/_chunks/{PkToolShowImageGallery-ZJMWOWHq.js → PkToolShowImageGallery-B-lVY0xH.js} +2 -2
  102. package/dist-vue/_chunks/{PkToolShowImageGallery-ZJMWOWHq.js.map → PkToolShowImageGallery-B-lVY0xH.js.map} +1 -1
  103. package/dist-vue/_chunks/{PkToolShowProductList-CeKI9H36.js → PkToolShowProductList-Dcq3Kdse.js} +2 -2
  104. package/dist-vue/_chunks/{PkToolShowProductList-CeKI9H36.js.map → PkToolShowProductList-Dcq3Kdse.js.map} +1 -1
  105. package/dist-vue/_chunks/{PkToolShowSources-CXZqanmw.js → PkToolShowSources-DApWmwvk.js} +3 -3
  106. package/dist-vue/_chunks/{PkToolShowSources-CXZqanmw.js.map → PkToolShowSources-DApWmwvk.js.map} +1 -1
  107. package/dist-vue/_chunks/{PkToolShowSuggestedReply-BRIzGNwx.js → PkToolShowSuggestedReply-CXGpPEl-.js} +2 -2
  108. package/dist-vue/_chunks/{PkToolShowSuggestedReply-BRIzGNwx.js.map → PkToolShowSuggestedReply-CXGpPEl-.js.map} +1 -1
  109. package/dist-vue/_chunks/{PkToolShowVideo-BCs-i6xQ.js → PkToolShowVideo-CjrYh9-q.js} +2 -2
  110. package/dist-vue/_chunks/{PkToolShowVideo-BCs-i6xQ.js.map → PkToolShowVideo-CjrYh9-q.js.map} +1 -1
  111. package/dist-vue/_chunks/{PkToolShowWebPages-Bixa0CjQ.js → PkToolShowWebPages-DSIAizw-.js} +2 -2
  112. package/dist-vue/_chunks/{PkToolShowWebPages-Bixa0CjQ.js.map → PkToolShowWebPages-DSIAizw-.js.map} +1 -1
  113. package/dist-vue/_chunks/{createChatbotApiClient-DO4_I5hT.js → createChatbotApiClient-c3U4TXu2.js} +15 -15
  114. package/dist-vue/_chunks/{createChatbotApiClient-DO4_I5hT.js.map → createChatbotApiClient-c3U4TXu2.js.map} +1 -1
  115. package/dist-vue/_chunks/{useChatbotStore-BIjCGX0B.js → useChatbotStore-Kk3ioX3v.js} +16 -16
  116. package/dist-vue/_chunks/{useChatbotStore-BIjCGX0B.js.map → useChatbotStore-Kk3ioX3v.js.map} +1 -1
  117. package/dist-vue/_chunks/{utils-CaYEz-0A.js → utils-DXOZ6zjh.js} +4 -4
  118. package/dist-vue/_chunks/{utils-CaYEz-0A.js.map → utils-DXOZ6zjh.js.map} +1 -1
  119. package/dist-vue/api.js +1 -1
  120. package/dist-vue/composables.js +10 -8
  121. package/dist-vue/composables.js.map +1 -1
  122. package/dist-vue/index.js +4001 -3879
  123. package/dist-vue/index.js.map +1 -1
  124. package/dist-vue/locales.js +8 -0
  125. package/dist-vue/packages/components/src/PkEditorRepeater.d.ts +2 -0
  126. package/dist-vue/packages/components/src/chat/PkAgentSelectionActionsSettings.d.ts +4 -1
  127. package/dist-vue/packages/components/src/chat/index.d.ts +1 -0
  128. package/dist-vue/packages/components/src/chat/selectionActionEdits.d.ts +40 -0
  129. package/dist-vue/packages/models/src/schema/SelectionAction.d.ts +30 -1
  130. package/package.json +1 -1
  131. package/dist/_chunks/Agent-CCBs3D5I.js.map +0 -1
  132. package/dist-vue/_chunks/Agent-Cm1LrkYm.js.map +0 -1
@@ -199,6 +199,8 @@ var e = {
199
199
  pageAccessPointer: "Point and ask",
200
200
  pageAccessNotice: "Notice to the user",
201
201
  pageAccessRisk: "What this level means",
202
+ selectionActionLabel: "Label",
203
+ selectionActionPrompt: "Instruction",
202
204
  mimeTypeImages: "Images",
203
205
  mimeTypePdf: "PDF",
204
206
  mimeTypeText: "Text",
@@ -464,6 +466,7 @@ var e = {
464
466
  pageAccessConfirmEveryAction: "The user confirms every click and every write, not only submits and page changes.",
465
467
  pageAccessPointer: "A button in the chat input to point at an element of the page, or select its text, and ask about it.",
466
468
  pageAccessNotice: "Empty, the widget uses the level's own text.",
469
+ selectionActionPrompt: "Sent with the selected text",
467
470
  selectionActionsMax: "At most {count} actions on the bar, built-in and the agent's together.",
468
471
  modelRetired: "No longer available on the platform: move the agents using it to another model.",
469
472
  modelNotCompatible: "Not compatible with the privacy flags of this agent.",
@@ -578,6 +581,7 @@ var e = {
578
581
  noHostToolsAllowed: "No tool allowed",
579
582
  select: "Select",
580
583
  noPageAccessExcludeSelectors: "No excluded area besides data-agent-ignore",
584
+ noSelectionActions: "No actions of the agent: the bar shows the chosen built-ins and “Ask…”",
581
585
  uploadFile: "Upload a file",
582
586
  askAnything: "Type your message…",
583
587
  noTrustedOrigins: "No trusted origins configured",
@@ -1179,6 +1183,8 @@ var e = {
1179
1183
  pageAccessPointer: "Indica e chiedi",
1180
1184
  pageAccessNotice: "Avviso all'utente",
1181
1185
  pageAccessRisk: "Cosa comporta questo livello",
1186
+ selectionActionLabel: "Etichetta",
1187
+ selectionActionPrompt: "Istruzione",
1182
1188
  mimeTypeImages: "Immagini",
1183
1189
  mimeTypePdf: "PDF",
1184
1190
  mimeTypeText: "Testo",
@@ -1444,6 +1450,7 @@ var e = {
1444
1450
  pageAccessConfirmEveryAction: "L'utente conferma ogni clic e ogni scrittura, non solo gli invii e i cambi di pagina.",
1445
1451
  pageAccessPointer: "Un pulsante nel campo della chat per indicare un elemento della pagina, o selezionarne il testo, e chiedere.",
1446
1452
  pageAccessNotice: "Vuoto, il widget usa il testo del livello.",
1453
+ selectionActionPrompt: "Parte con il testo selezionato",
1447
1454
  selectionActionsMax: "Al massimo {count} azioni nella barra, predefinite e dell'agente insieme.",
1448
1455
  modelRetired: "Non più disponibile sulla piattaforma: sposta su un altro modello gli agenti che lo usano.",
1449
1456
  modelNotCompatible: "Non compatibile con i flag di riservatezza di questo agente.",
@@ -1558,6 +1565,7 @@ var e = {
1558
1565
  noHostToolsAllowed: "Nessun tool ammesso",
1559
1566
  select: "Seleziona",
1560
1567
  noPageAccessExcludeSelectors: "Nessuna zona esclusa oltre a data-agent-ignore",
1568
+ noSelectionActions: "Nessuna azione dell'agente: la barra mostra le predefinite scelte e «Chiedi…»",
1561
1569
  uploadFile: "Carica un file",
1562
1570
  askAnything: "Scrivi la tua domanda…",
1563
1571
  noTrustedOrigins: "Nessuna origine attendibile configurata",
@@ -13,6 +13,8 @@ declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNull
13
13
  readonly?: boolean;
14
14
  allowEmpty?: boolean;
15
15
  force?: boolean;
16
+ /** The most items: "Add" turns off once the list holds them, and `addItem` adds no more. */
17
+ max?: number;
16
18
  } & {
17
19
  "onUpdate:modelValue"?: ((value: Partial<T>[]) => any) | undefined;
18
20
  }> & (typeof globalThis extends {
@@ -2,7 +2,8 @@ import { SelectionActionsSettings, SelectionSurface } from '../../../models/src'
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  /**
4
4
  * One group of the selection bar's settings (spec `selection-actions.md`,
5
- * "Cosa è comune"): the switch and the built-in actions to tick, within
5
+ * "Cosa è comune"): the switch, the built-in actions to tick and the
6
+ * agent's own actions, a label and an instruction per language, within
6
7
  * the cap the bar shows. The page group sits in "Site and app" after
7
8
  * "Point and ask", the Word and Excel groups in "Tools" beside their
8
9
  * tools. Its labels are `label.selectionActions<Surface><Key>`, the names
@@ -11,6 +12,8 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
11
12
  type Group = SelectionActionsSettings[SelectionSurface];
12
13
  type __VLS_Props = {
13
14
  surface: SelectionSurface;
15
+ /** The agent's languages, the interface's first: a tab each, as the agent's other texts. */
16
+ locales: string[];
14
17
  };
15
18
  type __VLS_ModelProps = {
16
19
  modelValue?: Partial<Group> | undefined;
@@ -59,6 +59,7 @@ import { default as PkWorkingBeam } from './PkWorkingBeam';
59
59
  export { MODEL_CATALOG_KEY, provideModelCatalog, useModelCatalogEntry, } from './modelCatalog';
60
60
  export { isMcpOAuthReport } from './mcpOAuthReport';
61
61
  export { provideChatImagePolicy } from './chatImagePolicy';
62
+ export { selectionActionsSummary } from './selectionActionEdits';
62
63
  export { provideChatFilePreviewDock } from './chatFilePreviewDock';
63
64
  export { localizeSummaryLabels, toolLabel } from './utils';
64
65
  export { useChatFilePreview } from './useChatFilePreview';
@@ -0,0 +1,40 @@
1
+ import { SelectionAction } from '../../../models/src';
2
+ /**
3
+ * The edits of the agent's own actions of a selection bar in the backoffice
4
+ * (spec `selection-actions.md`, F2), kept out of the component so they can be
5
+ * tested.
6
+ */
7
+ /** A new action: nothing written yet, and an id that outlives its label, for the telemetry. */
8
+ export declare const newSelectionAction: () => SelectionAction;
9
+ /**
10
+ * A text of one locale written into its record: kept as typed, and taken out
11
+ * when only blanks are left, because a locale present is a locale written
12
+ * (the schema refuses an empty one).
13
+ */
14
+ export declare function withLocaleText(record: Record<string, string> | undefined, locale: string, value: string): Record<string, string>;
15
+ /** The actions with something written: switching the group off drops the others. */
16
+ export declare const withoutUnwritten: (actions: SelectionAction[]) => {
17
+ id: string;
18
+ label: Record<string, string>;
19
+ prompt: Record<string, string>;
20
+ }[];
21
+ /**
22
+ * The languages the list is written in, a tab each: the agent's, then any
23
+ * other an action holds (written through the API), so that a gap there has
24
+ * a tab to show it in and does not keep the save refused out of sight.
25
+ */
26
+ export declare function actionLocales(locales: readonly string[], actions: readonly SelectionAction[]): string[];
27
+ /**
28
+ * Why a field of an action is incomplete in a locale, as an i18n key, or
29
+ * undefined: an action with nothing written asks for it in the first
30
+ * language only, a label without its instruction (or the other way round)
31
+ * in the language that has one of the two.
32
+ */
33
+ export declare function missingText(action: SelectionAction | undefined, key: 'label' | 'prompt', locale: string, firstLocale: string | undefined): string | undefined;
34
+ /**
35
+ * The agent's actions on one line, for the change list of a save: each one
36
+ * with its label and its instruction in every language written, the
37
+ * interface's first, so a changed instruction or translation shows (the
38
+ * list drops a change that reads the same before and after).
39
+ */
40
+ export declare function selectionActionsSummary(actions: readonly Partial<SelectionAction>[], locale: string): string;
@@ -12,13 +12,42 @@ export declare const SELECTION_SURFACE_BUILT_INS: {
12
12
  };
13
13
  /** The most actions a bar shows before "Ask…": the chosen built-ins, then the agent's. */
14
14
  export declare const SELECTION_MAX_ACTIONS = 4;
15
- /** An action the agent's author wrote: a label on the bar, the instruction it sends. */
15
+ /**
16
+ * What an action of the agent still lacks, by locale: a label on the bar
17
+ * with no instruction behind it sends nothing, and an instruction with no
18
+ * label shows an empty button. `empty` when no locale has either. A save
19
+ * refuses an action with any gap (`refineSelectionActions`), the backoffice
20
+ * marks the same fields, and a chat never sees one (`selectionActionsCapability`).
21
+ */
22
+ export declare function selectionActionGaps(action: {
23
+ label?: Record<string, string>;
24
+ prompt?: Record<string, string>;
25
+ }): {
26
+ empty: boolean;
27
+ label: string[];
28
+ prompt: string[];
29
+ };
30
+ /**
31
+ * An action the agent's author wrote: a label on the bar, the instruction it
32
+ * sends. Reading accepts one with gaps, as the first schema did: an agent
33
+ * stored with one must stay readable (every response goes through this
34
+ * schema). Writing refuses it, with `refineSelectionActions`.
35
+ */
16
36
  export declare const SelectionActionSchema: z.ZodObject<{
17
37
  id: z.ZodString;
18
38
  label: z.ZodRecord<z.ZodString, z.ZodString>;
19
39
  prompt: z.ZodRecord<z.ZodString, z.ZodString>;
20
40
  }, z.core.$strip>;
21
41
  export type SelectionAction = z.infer<typeof SelectionActionSchema>;
42
+ /**
43
+ * The check of a save on `settings`, for `AgentDtoSchema`: every action of a
44
+ * group that is on has its label and instruction in each locale written, the
45
+ * issue on the field that lacks it. A group switched off is not checked: its
46
+ * fields are not on screen, and the bar does not show it.
47
+ */
48
+ export declare function refineSelectionActions(settings: {
49
+ selectionActions?: Partial<SelectionActionsSettings>;
50
+ }, context: z.RefinementCtx): void;
22
51
  export declare const PageSelectionGroupSchema: z.ZodObject<{
23
52
  enabled: z.ZodDefault<z.ZodBoolean>;
24
53
  builtIns: z.ZodDefault<z.ZodArray<z.ZodEnum<{
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8wave/ai-elements",
3
3
  "private": false,
4
- "version": "0.125.0-beta.29",
4
+ "version": "0.125.0-beta.30",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite --port 8082 --open --host",