@8wave/ai-elements 0.115.0-beta.34 → 0.115.0-beta.47

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 (152) hide show
  1. package/dist/_chunks/{Agent-Cu04vBnd.js → Agent-D3cVY0pk.js} +121 -110
  2. package/dist/_chunks/Agent-D3cVY0pk.js.map +1 -0
  3. package/dist/_chunks/PkHeldImage-BtaPh0Jr.js +42 -0
  4. package/dist/_chunks/PkHeldImage-BtaPh0Jr.js.map +1 -0
  5. package/dist/_chunks/{PkStreamingMarkdown-Qk9Tk_N7.js → PkStreamingMarkdown-DyvZ5xKK.js} +782 -741
  6. package/dist/_chunks/PkStreamingMarkdown-DyvZ5xKK.js.map +1 -0
  7. package/dist/_chunks/{PkToolRequestGeolocation-BoKYkQ-Z.js → PkToolRequestGeolocation-DjRmmYMk.js} +2 -2
  8. package/dist/_chunks/{PkToolRequestGeolocation-BoKYkQ-Z.js.map → PkToolRequestGeolocation-DjRmmYMk.js.map} +1 -1
  9. package/dist/_chunks/{PkToolRequestOAuthConnection-CDzpfBg6.js → PkToolRequestOAuthConnection-CJ8dg2RY.js} +2 -2
  10. package/dist/_chunks/{PkToolRequestOAuthConnection-CDzpfBg6.js.map → PkToolRequestOAuthConnection-CJ8dg2RY.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowArtifact-DB8JjN-b.js → PkToolShowArtifact-Bk-xmGxl.js} +2 -2
  12. package/dist/_chunks/{PkToolShowArtifact-DB8JjN-b.js.map → PkToolShowArtifact-Bk-xmGxl.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowContactForm-DHviNxDk.js → PkToolShowContactForm-B0o6CY0Q.js} +2 -2
  14. package/dist/_chunks/{PkToolShowContactForm-DHviNxDk.js.map → PkToolShowContactForm-B0o6CY0Q.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowForm-B-R9fh3R.js → PkToolShowForm-C4-KAKPL.js} +3 -3
  16. package/dist/_chunks/{PkToolShowForm-B-R9fh3R.js.map → PkToolShowForm-C4-KAKPL.js.map} +1 -1
  17. package/dist/_chunks/PkToolShowImageGallery-Jdo7p2mZ.js +88 -0
  18. package/dist/_chunks/PkToolShowImageGallery-Jdo7p2mZ.js.map +1 -0
  19. package/dist/_chunks/PkToolShowProductList-Cfk865KB.js +72 -0
  20. package/dist/_chunks/PkToolShowProductList-Cfk865KB.js.map +1 -0
  21. package/dist/_chunks/{PkToolShowSources-CfZEfleZ.js → PkToolShowSources-qqUbdWzN.js} +3 -3
  22. package/dist/_chunks/{PkToolShowSources-CfZEfleZ.js.map → PkToolShowSources-qqUbdWzN.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowSuggestedReply-DsB35hRR.js → PkToolShowSuggestedReply-Dk6Nu9cG.js} +2 -2
  24. package/dist/_chunks/{PkToolShowSuggestedReply-DsB35hRR.js.map → PkToolShowSuggestedReply-Dk6Nu9cG.js.map} +1 -1
  25. package/dist/_chunks/PkToolShowVideo-D07i4hVd.js +142 -0
  26. package/dist/_chunks/PkToolShowVideo-D07i4hVd.js.map +1 -0
  27. package/dist/_chunks/{PkToolShowWebPages-BOxbTe2X.js → PkToolShowWebPages-ksXRNsDK.js} +31 -24
  28. package/dist/_chunks/PkToolShowWebPages-ksXRNsDK.js.map +1 -0
  29. package/dist/_chunks/chatImagePolicy-B1iRRLAB.js +46 -0
  30. package/dist/_chunks/chatImagePolicy-B1iRRLAB.js.map +1 -0
  31. package/dist/_chunks/{markdown-_p-gd9w8.js → markdown-DOitQ2jz.js} +13 -13
  32. package/dist/_chunks/{markdown-_p-gd9w8.js.map → markdown-DOitQ2jz.js.map} +1 -1
  33. package/dist/ai-elements.es.js +1720 -1713
  34. package/dist/ai-elements.es.js.map +1 -1
  35. package/dist-vue/PkChatbot.js +1 -1
  36. package/dist-vue/PkChatbotEmptyState.js +1 -1
  37. package/dist-vue/PkChatbotInput.js +1 -1
  38. package/dist-vue/PkChatbotMessages.js +1 -1
  39. package/dist-vue/PkChatbotStepPayload.js +1 -1
  40. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  41. package/dist-vue/PkChatbotSteps.js +1 -1
  42. package/dist-vue/PkChatbotViewChat.js +1 -1
  43. package/dist-vue/PkChatbotViewConversations.js +1 -1
  44. package/dist-vue/PkChatbotViewFiles.js +1 -1
  45. package/dist-vue/PkChatbotViewProfile.js +1 -1
  46. package/dist-vue/_chunks/{Agent-KbZm8GvA.js → Agent-C4p46YGt.js} +67 -56
  47. package/dist-vue/_chunks/Agent-C4p46YGt.js.map +1 -0
  48. package/dist-vue/_chunks/{Document-DCSWwcRE.js → Document-B9QaYHKT.js} +10 -10
  49. package/dist-vue/_chunks/{Document-DCSWwcRE.js.map → Document-B9QaYHKT.js.map} +1 -1
  50. package/dist-vue/_chunks/PkChatbot-BkMe7zxp.js +275 -0
  51. package/dist-vue/_chunks/PkChatbot-BkMe7zxp.js.map +1 -0
  52. package/dist-vue/_chunks/{PkChatbotEmptyState-CO7-vlsZ.js → PkChatbotEmptyState-HElKT2OO.js} +2 -2
  53. package/dist-vue/_chunks/{PkChatbotEmptyState-CO7-vlsZ.js.map → PkChatbotEmptyState-HElKT2OO.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkChatbotInput-D8ykcHKJ.js → PkChatbotInput-BykvFqbm.js} +2 -2
  55. package/dist-vue/_chunks/{PkChatbotInput-D8ykcHKJ.js.map → PkChatbotInput-BykvFqbm.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkChatbotMessages-UT72KC_z.js → PkChatbotMessages-wH9wxc6Y.js} +19 -19
  57. package/dist-vue/_chunks/{PkChatbotMessages-UT72KC_z.js.map → PkChatbotMessages-wH9wxc6Y.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkChatbotStepPayload-CSVHe7DP.js → PkChatbotStepPayload-DY0AzM6s.js} +2 -2
  59. package/dist-vue/_chunks/{PkChatbotStepPayload-CSVHe7DP.js.map → PkChatbotStepPayload-DY0AzM6s.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotStepToolDetail-ixte-rGB.js → PkChatbotStepToolDetail-AXtXQVQY.js} +3 -3
  61. package/dist-vue/_chunks/{PkChatbotStepToolDetail-ixte-rGB.js.map → PkChatbotStepToolDetail-AXtXQVQY.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkChatbotSteps-Y6kQ00ui.js → PkChatbotSteps-B-yrfTat.js} +5 -5
  63. package/dist-vue/_chunks/{PkChatbotSteps-Y6kQ00ui.js.map → PkChatbotSteps-B-yrfTat.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkChatbotViewChat-D3PwREDw.js → PkChatbotViewChat-CCcMnVkM.js} +7 -7
  65. package/dist-vue/_chunks/{PkChatbotViewChat-D3PwREDw.js.map → PkChatbotViewChat-CCcMnVkM.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkChatbotViewConversations-dpwDFyr_.js → PkChatbotViewConversations-C9h_bBIc.js} +2 -2
  67. package/dist-vue/_chunks/{PkChatbotViewConversations-dpwDFyr_.js.map → PkChatbotViewConversations-C9h_bBIc.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkChatbotViewFiles-BStYLY2B.js → PkChatbotViewFiles-BkoXgGE6.js} +3 -3
  69. package/dist-vue/_chunks/{PkChatbotViewFiles-BStYLY2B.js.map → PkChatbotViewFiles-BkoXgGE6.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkChatbotViewProfile-Brylm3We.js → PkChatbotViewProfile-CFR0B99Z.js} +2 -2
  71. package/dist-vue/_chunks/{PkChatbotViewProfile-Brylm3We.js.map → PkChatbotViewProfile-CFR0B99Z.js.map} +1 -1
  72. package/dist-vue/_chunks/PkHeldImage-BqnlurT_.js +41 -0
  73. package/dist-vue/_chunks/PkHeldImage-BqnlurT_.js.map +1 -0
  74. package/dist-vue/_chunks/{PkStreamingMarkdown-CJlfq7ub.js → PkStreamingMarkdown-XJBXdSG2.js} +792 -780
  75. package/dist-vue/_chunks/PkStreamingMarkdown-XJBXdSG2.js.map +1 -0
  76. package/dist-vue/_chunks/{PkToolRequestGeolocation-C8sLjD6g.js → PkToolRequestGeolocation-DpvsFEga.js} +2 -2
  77. package/dist-vue/_chunks/{PkToolRequestGeolocation-C8sLjD6g.js.map → PkToolRequestGeolocation-DpvsFEga.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-rbjNi_l0.js → PkToolRequestOAuthConnection-DRefs-S1.js} +2 -2
  79. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-rbjNi_l0.js.map → PkToolRequestOAuthConnection-DRefs-S1.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkToolShowArtifact-hBmAAfsd.js → PkToolShowArtifact-BopCMkyZ.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowArtifact-hBmAAfsd.js.map → PkToolShowArtifact-BopCMkyZ.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowContactForm-BHsm_W2R.js → PkToolShowContactForm-C6F_DdBu.js} +2 -2
  83. package/dist-vue/_chunks/{PkToolShowContactForm-BHsm_W2R.js.map → PkToolShowContactForm-C6F_DdBu.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkToolShowDiagram-De2XvRnq.js → PkToolShowDiagram-7-m7VrED.js} +2 -2
  85. package/dist-vue/_chunks/{PkToolShowDiagram-De2XvRnq.js.map → PkToolShowDiagram-7-m7VrED.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolShowEmail-D1mXZrT-.js → PkToolShowEmail-C591LR5N.js} +2 -2
  87. package/dist-vue/_chunks/{PkToolShowEmail-D1mXZrT-.js.map → PkToolShowEmail-C591LR5N.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolShowForm-Ce_GpcBt.js → PkToolShowForm-DEr8wDJi.js} +4 -4
  89. package/dist-vue/_chunks/{PkToolShowForm-Ce_GpcBt.js.map → PkToolShowForm-DEr8wDJi.js.map} +1 -1
  90. package/dist-vue/_chunks/PkToolShowImageGallery-D44wf_u3.js +88 -0
  91. package/dist-vue/_chunks/PkToolShowImageGallery-D44wf_u3.js.map +1 -0
  92. package/dist-vue/_chunks/{PkToolShowMessage-lNPZxw2v.js → PkToolShowMessage-CbXERPHI.js} +2 -2
  93. package/dist-vue/_chunks/{PkToolShowMessage-lNPZxw2v.js.map → PkToolShowMessage-CbXERPHI.js.map} +1 -1
  94. package/dist-vue/_chunks/PkToolShowProductList-C6CVRUlD.js +72 -0
  95. package/dist-vue/_chunks/PkToolShowProductList-C6CVRUlD.js.map +1 -0
  96. package/dist-vue/_chunks/{PkToolShowSources-B1Nhrk7O.js → PkToolShowSources-DzUNanmK.js} +4 -4
  97. package/dist-vue/_chunks/{PkToolShowSources-B1Nhrk7O.js.map → PkToolShowSources-DzUNanmK.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bmzygdww.js → PkToolShowSuggestedReply-DhNtI5gJ.js} +2 -2
  99. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bmzygdww.js.map → PkToolShowSuggestedReply-DhNtI5gJ.js.map} +1 -1
  100. package/dist-vue/_chunks/PkToolShowVideo-HbQzTMh5.js +141 -0
  101. package/dist-vue/_chunks/PkToolShowVideo-HbQzTMh5.js.map +1 -0
  102. package/dist-vue/_chunks/PkToolShowWebPages-Ct1HaCSq.js +86 -0
  103. package/dist-vue/_chunks/PkToolShowWebPages-Ct1HaCSq.js.map +1 -0
  104. package/dist-vue/_chunks/{PkUrl-E12f7rn_.js → PkUrl-CN1kkZiH.js} +2 -2
  105. package/dist-vue/_chunks/{PkUrl-E12f7rn_.js.map → PkUrl-CN1kkZiH.js.map} +1 -1
  106. package/dist-vue/_chunks/{createChatbotApiClient-B_mkyrEl.js → createChatbotApiClient-B2PvUG07.js} +16 -16
  107. package/dist-vue/_chunks/{createChatbotApiClient-B_mkyrEl.js.map → createChatbotApiClient-B2PvUG07.js.map} +1 -1
  108. package/dist-vue/_chunks/{useChatbotStore-DEELIJ89.js → useChatbotStore-Cj_UmNH3.js} +3 -3
  109. package/dist-vue/_chunks/{useChatbotStore-DEELIJ89.js.map → useChatbotStore-Cj_UmNH3.js.map} +1 -1
  110. package/dist-vue/_chunks/useShortUrlResolver-DI8ycJiO.js +71 -0
  111. package/dist-vue/_chunks/useShortUrlResolver-DI8ycJiO.js.map +1 -0
  112. package/dist-vue/_chunks/{utils-CtD8DCrq.js → utils-DXXzMVU3.js} +2 -2
  113. package/dist-vue/_chunks/{utils-CtD8DCrq.js.map → utils-DXXzMVU3.js.map} +1 -1
  114. package/dist-vue/api.js +1 -1
  115. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +2 -0
  116. package/dist-vue/composables.js +11 -7
  117. package/dist-vue/composables.js.map +1 -1
  118. package/dist-vue/index.js +3444 -3400
  119. package/dist-vue/index.js.map +1 -1
  120. package/dist-vue/locales.js +12 -0
  121. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -2
  122. package/dist-vue/packages/components/src/chat/PkHeldImage.d.ts +21 -0
  123. package/dist-vue/packages/components/src/chat/chatImagePolicy.d.ts +55 -0
  124. package/dist-vue/packages/components/src/chat/index.d.ts +1 -0
  125. package/dist-vue/packages/components/src/chat/markdownHtml.d.ts +17 -1
  126. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +6 -0
  127. package/dist-vue/packages/models/src/schema/Agent.d.ts +14 -0
  128. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +2 -0
  129. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +2 -0
  130. package/dist-vue/style.css +1 -1
  131. package/package.json +1 -1
  132. package/dist/_chunks/Agent-Cu04vBnd.js.map +0 -1
  133. package/dist/_chunks/PkStreamingMarkdown-Qk9Tk_N7.js.map +0 -1
  134. package/dist/_chunks/PkToolShowImageGallery-FubPWFCb.js +0 -75
  135. package/dist/_chunks/PkToolShowImageGallery-FubPWFCb.js.map +0 -1
  136. package/dist/_chunks/PkToolShowProductList-DFy2jxn4.js +0 -65
  137. package/dist/_chunks/PkToolShowProductList-DFy2jxn4.js.map +0 -1
  138. package/dist/_chunks/PkToolShowVideo-DClps9oP.js +0 -123
  139. package/dist/_chunks/PkToolShowVideo-DClps9oP.js.map +0 -1
  140. package/dist/_chunks/PkToolShowWebPages-BOxbTe2X.js.map +0 -1
  141. package/dist-vue/_chunks/Agent-KbZm8GvA.js.map +0 -1
  142. package/dist-vue/_chunks/PkChatbot-CRb-U8e3.js +0 -272
  143. package/dist-vue/_chunks/PkChatbot-CRb-U8e3.js.map +0 -1
  144. package/dist-vue/_chunks/PkStreamingMarkdown-CJlfq7ub.js.map +0 -1
  145. package/dist-vue/_chunks/PkToolShowImageGallery-DmhZLnBk.js +0 -75
  146. package/dist-vue/_chunks/PkToolShowImageGallery-DmhZLnBk.js.map +0 -1
  147. package/dist-vue/_chunks/PkToolShowProductList-BW5pRFe4.js +0 -65
  148. package/dist-vue/_chunks/PkToolShowProductList-BW5pRFe4.js.map +0 -1
  149. package/dist-vue/_chunks/PkToolShowVideo-BZOTu2Qe.js +0 -122
  150. package/dist-vue/_chunks/PkToolShowVideo-BZOTu2Qe.js.map +0 -1
  151. package/dist-vue/_chunks/PkToolShowWebPages-BiIBRV_n.js +0 -79
  152. package/dist-vue/_chunks/PkToolShowWebPages-BiIBRV_n.js.map +0 -1
@@ -254,6 +254,9 @@ var e = {
254
254
  monthRateLimit: "Month Rate Limit",
255
255
  trustedOrigins: "Trusted Origins",
256
256
  origin: "Origine",
257
+ imageHosts: "Image hosts",
258
+ imageHost: "Host",
259
+ imageHostsHint: "Answers and cards load images by themselves only from these hosts and from the platform. An image from any other host shows its host and loads on a click, so an answer cannot send the conversation to a site through an image url.",
257
260
  conversations: "Conversations",
258
261
  profile: "Profile",
259
262
  authentication: "Authentication",
@@ -302,6 +305,7 @@ var e = {
302
305
  thinking: "Thinking",
303
306
  enabled: "Enabled",
304
307
  disabled: "Disabled",
308
+ imageHeld: "Image from {host}: click to load",
305
309
  imageLoadError: "Image not available",
306
310
  toolApprovalBadge: "User confirm",
307
311
  calendarEvent: "Event",
@@ -353,6 +357,8 @@ var e = {
353
357
  askAnything: "Type your message...",
354
358
  noTrustedOrigins: "No trusted origins configured",
355
359
  insertOrigin: "https://example.com",
360
+ noImageHosts: "No image hosts: images from other hosts wait for a click",
361
+ insertImageHost: "images.example.com",
356
362
  search: "Search...",
357
363
  comment: "Write your comment...",
358
364
  enterYourQuestion: "Enter your question...",
@@ -847,6 +853,9 @@ var e = {
847
853
  monthRateLimit: "Limite al mese",
848
854
  trustedOrigins: "Origini attendibili",
849
855
  origin: "Origine",
856
+ imageHosts: "Host delle immagini",
857
+ imageHost: "Host",
858
+ imageHostsHint: "Risposte e card caricano da sole solo le immagini di questi host e della piattaforma. Un'immagine di un altro host mostra il suo host e si carica con un clic, così una risposta non può mandare la conversazione a un sito dentro l'url di un'immagine.",
850
859
  conversations: "Conversazioni",
851
860
  profile: "Profilo",
852
861
  authentication: "Autenticazione",
@@ -895,6 +904,7 @@ var e = {
895
904
  thinking: "Pensiero",
896
905
  enabled: "Abilitato",
897
906
  disabled: "Disabilitato",
907
+ imageHeld: "Immagine da {host}: clicca per caricarla",
898
908
  imageLoadError: "Immagine non disponibile",
899
909
  toolApprovalBadge: "Conferma utente",
900
910
  calendarEvent: "Evento",
@@ -946,6 +956,8 @@ var e = {
946
956
  askAnything: "Scrivi la tua domanda...",
947
957
  noTrustedOrigins: "Nessuna origine attendibile configurata",
948
958
  insertOrigin: "https://example.com",
959
+ noImageHosts: "Nessun host: le immagini degli altri host aspettano un clic",
960
+ insertImageHost: "images.example.com",
949
961
  search: "Cerca...",
950
962
  comment: "Scrivi il tuo commento...",
951
963
  enterYourQuestion: "Inserisci la tua domanda...",
@@ -60,6 +60,8 @@ type __VLS_ModelProps = {
60
60
  'trustedOrigins'?: {
61
61
  origins?: string[];
62
62
  };
63
+ /** Hosts the answers may load images from by themselves (hole 20). */
64
+ 'imageHosts'?: string[] | undefined;
63
65
  'disabledTools'?: AgentBuiltInTool[];
64
66
  /**
65
67
  * Tools that ask the user to confirm before running
@@ -119,9 +121,9 @@ type __VLS_ModelProps = {
119
121
  } | undefined;
120
122
  };
121
123
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
122
- declare var __VLS_766: {};
124
+ declare var __VLS_777: {};
123
125
  type __VLS_Slots = {} & {
124
- default?: (props: typeof __VLS_766) => any;
126
+ default?: (props: typeof __VLS_777) => any;
125
127
  };
126
128
  declare const __VLS_base: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
127
129
  "update:reasoning": (value: {
@@ -311,6 +313,7 @@ declare const __VLS_base: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Com
311
313
  "update:trustedOrigins": (value: {
312
314
  origins?: string[];
313
315
  }) => any;
316
+ "update:imageHosts": (value: string[] | undefined) => any;
314
317
  "update:disabledTools": (value: AgentBuiltInTool[]) => any;
315
318
  "update:approvalTools": (value: string[]) => any;
316
319
  "update:useAllUserKb": (value: boolean) => any;
@@ -550,6 +553,7 @@ declare const __VLS_base: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Com
550
553
  "onUpdate:trustedOrigins"?: ((value: {
551
554
  origins?: string[];
552
555
  }) => any) | undefined;
556
+ "onUpdate:imageHosts"?: ((value: string[] | undefined) => any) | undefined;
553
557
  "onUpdate:disabledTools"?: ((value: AgentBuiltInTool[]) => any) | undefined;
554
558
  "onUpdate:approvalTools"?: ((value: string[]) => any) | undefined;
555
559
  "onUpdate:useAllUserKb"?: ((value: boolean) => any) | undefined;
@@ -0,0 +1,21 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ /**
3
+ * The place of an image a tool card may not load by itself
4
+ * (chatImagePolicy.ts): it names the host and asks for a click. A span and
5
+ * not a button, because the cards wrap their images in a link, and a
6
+ * click here must neither open it nor reach it.
7
+ */
8
+ type __VLS_Props = {
9
+ host?: string;
10
+ /** Fills the slot of a large image, with the words under the icon. */
11
+ fill?: boolean;
12
+ /** A video card holds its player the same way. */
13
+ kind?: 'image' | 'video';
14
+ };
15
+ declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
16
+ release: () => any;
17
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ onRelease?: (() => any) | undefined;
19
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
@@ -0,0 +1,55 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ /**
3
+ * Which images a chat loads by itself: hole 20 of
4
+ * docs/specs/organization-isolation.md.
5
+ *
6
+ * The model writes the url of every image in an answer and in the image tool
7
+ * cards (gallery, products, web pages), and a prompt injected through a
8
+ * document, a page or a tool result can make it put the conversation in that
9
+ * url. The browser fetches it as soon as it renders, and the text is gone.
10
+ * So an image loads by itself only from the media of the platform and from
11
+ * the hosts the agent lists (`interface.imageHosts`); any other shows its host
12
+ * and loads on a click, a choice made by whoever reads it.
13
+ *
14
+ * Provided by `PkChatbot` (the app and the widget) and by the pages that show
15
+ * an agent's answers; where nothing is provided, images load as before.
16
+ */
17
+ export interface ChatImagePolicy {
18
+ /** Host names the agent lists, normalized (`normalizeImageHost`). */
19
+ hosts: string[];
20
+ /** Origins of the platform, which serve the media of a chat. */
21
+ platformOrigins: string[];
22
+ }
23
+ export declare const ChatImagePolicyKey: InjectionKey<ComputedRef<ChatImagePolicy>>;
24
+ /**
25
+ * Applies the policy of an agent to the answers rendered below: its listed
26
+ * hosts, and the backend the page talks to, which serves the chat's media.
27
+ * The hosts are normalized again because a preview passes them as typed,
28
+ * before the schema does.
29
+ */
30
+ export declare function provideChatImagePolicy(hosts: () => string[] | undefined, backendUrl: () => string | undefined): void;
31
+ /**
32
+ * The host an image url points to, for the placeholder, or `undefined` when
33
+ * it does not parse.
34
+ */
35
+ export declare function imageHostOf(src: string, pageUrl: string): string | undefined;
36
+ /**
37
+ * Whether an image may load without a click. `data:` and `blob:` images never
38
+ * reach the network; everything else needs the media of the platform or a
39
+ * listed host, over https. The page's own origin gets no exception: a site,
40
+ * the platform's included, often redirects wherever its query says.
41
+ */
42
+ export declare function isImageAllowed(src: string, policy: ChatImagePolicy, pageUrl: string): boolean;
43
+ /**
44
+ * The policy of the surrounding chat, with the images released by a click.
45
+ * A release is per url and lasts as long as the component that asked. A
46
+ * short link of the platform is judged, and named, by the url it stands for:
47
+ * it waits until the resolver brings that url back.
48
+ */
49
+ export declare function useChatImageGate(): {
50
+ /** Whether a policy applies here at all. */
51
+ isGated: ComputedRef<boolean>;
52
+ canLoad: (src: string | undefined) => boolean;
53
+ release: (src: string) => void;
54
+ hostOf: (src: string) => string | undefined;
55
+ };
@@ -54,4 +54,5 @@ import { default as PkVoiceOrb } from './PkVoiceOrb';
54
54
  import { default as PkChatButton } from './PkChatButton';
55
55
  export { MODEL_CATALOG_KEY, provideModelCatalog, useModelCatalogEntry, } from './modelCatalog';
56
56
  export { isMcpOAuthReport } from './mcpOAuthReport';
57
+ export { provideChatImagePolicy } from './chatImagePolicy';
57
58
  export { PkAgentSelectorInline, PkAgentSettingsPanel, PkAuroraCanvas, PkAvatar, PkChatSidebar, PkChatSidebarConversationItem, PkChatbot, PkChatbotEmptyState, PkChatbotError, PkChatbotFeedbackForm, PkChatbotFilePreview, PkChatbotInput, PkChatbotMessages, PkChatbotSteps, PkChatbotStepToolDetail, PkChatbotStepPayload, PkChatbotViewChat, PkChunkPreview, PkChatbotViewConversations, PkChatbotViewProfile, PkCode, PkCopyBlock, PkDocumentHeader, PkLanguageModel, PkLanguageModelCombobox, PkModelOption, PkMessageParts, PkMessageDetail, PkStreamingMarkdown, PkStreamingMarkdownAutoscroll, PkToolShowForm, PkToolShowArtifact, PkToolApprovalBadge, PkToolShowEmail, PkToolShowMessage, PkToolShowWebPages, PkToolShowProductList, PkToolShowContactForm, PkToolShowCalendarEvent, PkToolShowComparison, PkToolShowLocation, PkToolShowQrCode, PkToolShowImageGallery, PkToolShowSuggestedReply, PkToolShowSources, PkRetryCountdown, PkReasoningChat, PkReasoningSettings, PkWebSearchSettings, PkWelcomePopup, PkChatbotAuth, PkVoiceSession, PkVoiceOrb, PkChatButton, };
@@ -9,6 +9,18 @@ export declare function escapeHtml(text: string): string;
9
9
  * no quote either, so the formula cannot close the attribute.
10
10
  */
11
11
  export declare function renderKatexPlaceholder(text: string, displayMode: boolean): string;
12
+ /**
13
+ * What the sanitizer does with an image the chat may not load by itself
14
+ * (see `chatImagePolicy.ts`).
15
+ */
16
+ export interface HeldImages {
17
+ canLoad: (src: string) => boolean;
18
+ hostOf: (src: string) => string | undefined;
19
+ /** The words on the placeholder, for the host the image points to. */
20
+ label: (host: string) => string;
21
+ }
22
+ /** The attribute a held image keeps its url in, read back on a click. */
23
+ export declare const HELD_IMAGE_ATTRIBUTE = "data-held-src";
12
24
  /**
13
25
  * Cleans the HTML rendered from a markdown before it reaches `v-html`. The
14
26
  * markdown is written by a model, and through the knowledge base, the tools and
@@ -16,5 +28,9 @@ export declare function renderKatexPlaceholder(text: string, displayMode: boolea
16
28
  * through untouched, so a handler written in a document ran in the browser of
17
29
  * whoever read the answer. Scripts, handlers, `javascript:` urls, styles and
18
30
  * forms go, the formatting stays.
31
+ *
32
+ * With `held`, an image the chat may not load by itself becomes a button that
33
+ * names its host: the url waits in an attribute, which fetches nothing, until
34
+ * the reader asks for it.
19
35
  */
20
- export declare function sanitizeMarkdownHtml(html: string): string;
36
+ export declare function sanitizeMarkdownHtml(html: string, held?: HeldImages): string;
@@ -57,6 +57,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
57
57
  loaderStrategy: AgentLoaderStrategy;
58
58
  smoothStream: boolean;
59
59
  showExtendedSteps: boolean;
60
+ imageHosts: string[];
60
61
  media?: {
61
62
  name: string;
62
63
  src: {
@@ -150,6 +151,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
150
151
  loaderStrategy: AgentLoaderStrategy;
151
152
  smoothStream: boolean;
152
153
  showExtendedSteps: boolean;
154
+ imageHosts: string[];
153
155
  media?: {
154
156
  name: string;
155
157
  src: {
@@ -1801,6 +1803,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
1801
1803
  loaderStrategy: AgentLoaderStrategy;
1802
1804
  smoothStream: boolean;
1803
1805
  showExtendedSteps: boolean;
1806
+ imageHosts: string[];
1804
1807
  media?: {
1805
1808
  name: string;
1806
1809
  src: {
@@ -1894,6 +1897,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
1894
1897
  loaderStrategy: AgentLoaderStrategy;
1895
1898
  smoothStream: boolean;
1896
1899
  showExtendedSteps: boolean;
1900
+ imageHosts: string[];
1897
1901
  media?: {
1898
1902
  name: string;
1899
1903
  src: {
@@ -3545,6 +3549,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
3545
3549
  loaderStrategy: AgentLoaderStrategy;
3546
3550
  smoothStream: boolean;
3547
3551
  showExtendedSteps: boolean;
3552
+ imageHosts: string[];
3548
3553
  media?: {
3549
3554
  name: string;
3550
3555
  src: {
@@ -3638,6 +3643,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
3638
3643
  loaderStrategy: AgentLoaderStrategy;
3639
3644
  smoothStream: boolean;
3640
3645
  showExtendedSteps: boolean;
3646
+ imageHosts: string[];
3641
3647
  media?: {
3642
3648
  name: string;
3643
3649
  src: {
@@ -955,6 +955,12 @@ export declare enum AgentChannel {
955
955
  Widget = "widget"
956
956
  }
957
957
  export declare const ALL_AGENT_CHANNELS: AgentChannel[];
958
+ /**
959
+ * An image host as an agent lists it: lower case, without scheme, port or
960
+ * path, so `https://Images.Example.com/a.png` and `images.example.com` are the
961
+ * same entry and compare equal to `URL.hostname`.
962
+ */
963
+ export declare function normalizeImageHost(value: string): string;
958
964
  export declare const AgentInterfaceSchema: z.ZodObject<{
959
965
  media: z.ZodOptional<z.ZodObject<{
960
966
  name: z.ZodString;
@@ -1080,6 +1086,7 @@ export declare const AgentInterfaceSchema: z.ZodObject<{
1080
1086
  customCss: z.ZodOptional<z.ZodString>;
1081
1087
  smoothStream: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1082
1088
  showExtendedSteps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1089
+ imageHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
1083
1090
  }, z.core.$strip>;
1084
1091
  export type AgentInterface = z.infer<typeof AgentInterfaceSchema>;
1085
1092
  export declare const CHAT_FILE_UPLOAD_DEFAULT_MIME_TYPES: readonly ["image/jpeg", "image/png", "image/gif", "image/webp", "application/pdf", "text/plain", "text/markdown", "text/csv"];
@@ -1517,6 +1524,7 @@ export declare const AgentSettingsSchema: z.ZodObject<{
1517
1524
  customCss: z.ZodOptional<z.ZodString>;
1518
1525
  smoothStream: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1519
1526
  showExtendedSteps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1527
+ imageHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
1520
1528
  }, z.core.$strip>;
1521
1529
  tools: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1522
1530
  disabled: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof AgentBuiltInTool>>>;
@@ -1912,6 +1920,7 @@ export declare const AgentDtoSchema: z.ZodObject<{
1912
1920
  customCss: z.ZodOptional<z.ZodString>;
1913
1921
  smoothStream: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1914
1922
  showExtendedSteps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1923
+ imageHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
1915
1924
  }, z.core.$strip>;
1916
1925
  tools: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1917
1926
  disabled: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof AgentBuiltInTool>>>;
@@ -2308,6 +2317,7 @@ export declare const AgentSchema: z.ZodLazy<z.ZodObject<{
2308
2317
  customCss: z.ZodOptional<z.ZodString>;
2309
2318
  smoothStream: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2310
2319
  showExtendedSteps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2320
+ imageHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
2311
2321
  }, z.core.$strip>;
2312
2322
  tools: z.ZodDefault<z.ZodOptional<z.ZodObject<{
2313
2323
  disabled: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof AgentBuiltInTool>>>;
@@ -2573,6 +2583,7 @@ export declare const AgentPublicSchema: z.ZodObject<{
2573
2583
  customCss: z.ZodOptional<z.ZodString>;
2574
2584
  smoothStream: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2575
2585
  showExtendedSteps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2586
+ imageHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
2576
2587
  }, z.core.$strip>;
2577
2588
  createdAt: z.ZodCoercedDate<unknown>;
2578
2589
  updatedAt: z.ZodCoercedDate<unknown>;
@@ -2793,6 +2804,7 @@ export declare const AgentAccessGrantedSchema: z.ZodObject<{
2793
2804
  customCss: z.ZodOptional<z.ZodString>;
2794
2805
  smoothStream: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2795
2806
  showExtendedSteps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2807
+ imageHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
2796
2808
  }, z.core.$strip>;
2797
2809
  createdAt: z.ZodCoercedDate<unknown>;
2798
2810
  updatedAt: z.ZodCoercedDate<unknown>;
@@ -2973,6 +2985,7 @@ export declare const AgentAccessDecisionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
2973
2985
  customCss: z.ZodOptional<z.ZodString>;
2974
2986
  smoothStream: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2975
2987
  showExtendedSteps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2988
+ imageHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
2976
2989
  }, z.core.$strip>;
2977
2990
  createdAt: z.ZodCoercedDate<unknown>;
2978
2991
  updatedAt: z.ZodCoercedDate<unknown>;
@@ -3158,6 +3171,7 @@ export declare const AgentAccessSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3158
3171
  customCss: z.ZodOptional<z.ZodString>;
3159
3172
  smoothStream: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3160
3173
  showExtendedSteps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3174
+ imageHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
3161
3175
  }, z.core.$strip>;
3162
3176
  createdAt: z.ZodCoercedDate<unknown>;
3163
3177
  updatedAt: z.ZodCoercedDate<unknown>;
@@ -290,6 +290,7 @@ export declare const ReasoningChatSchema: z.ZodObject<{
290
290
  customCss: z.ZodOptional<z.ZodString>;
291
291
  smoothStream: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
292
292
  showExtendedSteps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
293
+ imageHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
293
294
  }, z.core.$strip>;
294
295
  tools: z.ZodDefault<z.ZodOptional<z.ZodObject<{
295
296
  disabled: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof AgentBuiltInTool>>>;
@@ -737,6 +738,7 @@ export declare const ReasoningChatSchema: z.ZodObject<{
737
738
  customCss: z.ZodOptional<z.ZodString>;
738
739
  smoothStream: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
739
740
  showExtendedSteps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
741
+ imageHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
740
742
  }, z.core.$strip>;
741
743
  tools: z.ZodDefault<z.ZodOptional<z.ZodObject<{
742
744
  disabled: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof AgentBuiltInTool>>>;
@@ -290,6 +290,7 @@ export declare const SubAgentSchema: z.ZodObject<{
290
290
  customCss: z.ZodOptional<z.ZodString>;
291
291
  smoothStream: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
292
292
  showExtendedSteps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
293
+ imageHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
293
294
  }, z.core.$strip>;
294
295
  tools: z.ZodDefault<z.ZodOptional<z.ZodObject<{
295
296
  disabled: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof AgentBuiltInTool>>>;
@@ -695,6 +696,7 @@ export declare const SubAgentSchema: z.ZodObject<{
695
696
  customCss: z.ZodOptional<z.ZodString>;
696
697
  smoothStream: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
697
698
  showExtendedSteps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
699
+ imageHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
698
700
  }, z.core.$strip>;
699
701
  tools: z.ZodDefault<z.ZodOptional<z.ZodObject<{
700
702
  disabled: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof AgentBuiltInTool>>>;