@8wave/ai-elements 0.126.0-beta.20 → 0.126.0-beta.21

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 (49) hide show
  1. package/dist/ai-elements.es.js +2313 -2150
  2. package/dist/ai-elements.es.js.map +1 -1
  3. package/dist-vue/PkChatbot.js +1 -1
  4. package/dist-vue/PkChatbotViewChat.js +1 -1
  5. package/dist-vue/PkChatbotViewConversations.js +1 -1
  6. package/dist-vue/PkChatbotViewFiles.js +1 -1
  7. package/dist-vue/PkChatbotViewProfile.js +1 -1
  8. package/dist-vue/_chunks/{PkChatbot-CxphD_YU.js → PkChatbot-Ck4H-uln.js} +6 -6
  9. package/dist-vue/_chunks/{PkChatbot-CxphD_YU.js.map → PkChatbot-Ck4H-uln.js.map} +1 -1
  10. package/dist-vue/_chunks/PkChatbotViewChat-SQLnQry2.js +1336 -0
  11. package/dist-vue/_chunks/PkChatbotViewChat-SQLnQry2.js.map +1 -0
  12. package/dist-vue/_chunks/{PkChatbotViewConversations-BbCnRdv4.js → PkChatbotViewConversations-D0vDYTyo.js} +2 -2
  13. package/dist-vue/_chunks/{PkChatbotViewConversations-BbCnRdv4.js.map → PkChatbotViewConversations-D0vDYTyo.js.map} +1 -1
  14. package/dist-vue/_chunks/{PkChatbotViewFiles-gwoZqmza.js → PkChatbotViewFiles-Bj5Nkzst.js} +2 -2
  15. package/dist-vue/_chunks/{PkChatbotViewFiles-gwoZqmza.js.map → PkChatbotViewFiles-Bj5Nkzst.js.map} +1 -1
  16. package/dist-vue/_chunks/{PkChatbotViewProfile-B7DroVld.js → PkChatbotViewProfile-GW0WuMOy.js} +2 -2
  17. package/dist-vue/_chunks/{PkChatbotViewProfile-B7DroVld.js.map → PkChatbotViewProfile-GW0WuMOy.js.map} +1 -1
  18. package/dist-vue/_chunks/{PkFilePreview-N0kWPuFh.js → PkFilePreview-CyA7aA5I.js} +2 -2
  19. package/dist-vue/_chunks/{PkFilePreview-N0kWPuFh.js.map → PkFilePreview-CyA7aA5I.js.map} +1 -1
  20. package/dist-vue/_chunks/{PkFilePreviewDialog-DqBESOIS.js → PkFilePreviewDialog-1Pp-5cpt.js} +2 -2
  21. package/dist-vue/_chunks/{PkFilePreviewDialog-DqBESOIS.js.map → PkFilePreviewDialog-1Pp-5cpt.js.map} +1 -1
  22. package/dist-vue/_chunks/{createChatbotApiClient-BACnmIzY.js → createChatbotApiClient-Pb7_cU2s.js} +105 -75
  23. package/dist-vue/_chunks/createChatbotApiClient-Pb7_cU2s.js.map +1 -0
  24. package/dist-vue/_chunks/{useChatbotStore-B-WenuyB.js → useChatbotStore-ChrZVIDt.js} +1172 -1141
  25. package/dist-vue/_chunks/useChatbotStore-ChrZVIDt.js.map +1 -0
  26. package/dist-vue/api.js +1 -1
  27. package/dist-vue/composables.js +76 -2
  28. package/dist-vue/composables.js.map +1 -1
  29. package/dist-vue/index.js +4290 -3576
  30. package/dist-vue/index.js.map +1 -1
  31. package/dist-vue/locales.js +78 -2
  32. package/dist-vue/packages/components/src/PkSchemaField.d.ts +2 -2
  33. package/dist-vue/packages/components/src/chat/PkChatProjectDialog.d.ts +50 -0
  34. package/dist-vue/packages/components/src/chat/PkChatProjectMoveDialog.d.ts +23 -0
  35. package/dist-vue/packages/components/src/chat/PkChatSidebar.d.ts +5 -2
  36. package/dist-vue/packages/components/src/chat/PkChatSidebarConversationItem.d.ts +12 -0
  37. package/dist-vue/packages/components/src/chat/PkChatbot.d.ts +9 -3
  38. package/dist-vue/packages/components/src/chat/PkChatbotFeedbackForm.d.ts +2 -2
  39. package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +20 -1
  40. package/dist-vue/packages/composable/src/chatbot/index.d.ts +1 -0
  41. package/dist-vue/packages/composable/src/chatbot/useChatProjectsStore.d.ts +4005 -0
  42. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +36 -6
  43. package/dist-vue/packages/models/src/schema/ChatProject.d.ts +10 -0
  44. package/dist-vue/style.css +1 -1
  45. package/package.json +1 -1
  46. package/dist-vue/_chunks/PkChatbotViewChat-2J6g9Etg.js +0 -1307
  47. package/dist-vue/_chunks/PkChatbotViewChat-2J6g9Etg.js.map +0 -1
  48. package/dist-vue/_chunks/createChatbotApiClient-BACnmIzY.js.map +0 -1
  49. package/dist-vue/_chunks/useChatbotStore-B-WenuyB.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./rolldown-runtime-CGnMp29N.js";
2
- import { t } from "./PkFilePreview-N0kWPuFh.js";
2
+ import { t } from "./PkFilePreview-CyA7aA5I.js";
3
3
  import { VvDialog as n } from "@volverjs/ui-vue/components";
4
4
  import { createBlock as r, createVNode as i, defineComponent as a, mergeModels as o, openBlock as s, useModel as c, withCtx as l } from "vue";
5
5
  // ../../packages/components/src/chat/PkFilePreviewDialog.vue?vue&type=script&setup=true&lang.ts
@@ -113,4 +113,4 @@ var u = /*@__PURE__*/ a({
113
113
  }), d = /* @__PURE__ */ e({ default: () => f }), f = u;
114
114
  export { d as n, f as t };
115
115
 
116
- //# sourceMappingURL=PkFilePreviewDialog-DqBESOIS.js.map
116
+ //# sourceMappingURL=PkFilePreviewDialog-1Pp-5cpt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PkFilePreviewDialog-DqBESOIS.js","names":["_useModel","_openBlock","_createBlock","_withCtx","_createVNode","PkFilePreview","__exportAll","PkFilePreviewDialog_vue_vue_type_script_setup_true_lang_default","\"mode\"","\"modeModifiers\"","\"sheet\"","\"sheetModifiers\"","\"zoom\"","\"zoomModifiers\"","\"fit\"","\"fitModifiers\"","__emit","emit","mode","useModel","__props","sheet","zoom","fit","_component_VvDialog","VvDialog","openBlock","createBlock","_cache","$event","withCtx","createVNode","PkFilePreview_default","text","pointer","action","PkFilePreviewDialog_exports","PkFilePreviewDialog_default"],"sources":["../../../../packages/components/src/chat/PkFilePreviewDialog.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import type {\n ChatFilePreview,\n FilePointer,\n SelectionGroupCapability,\n } from 'models'\n import PkFilePreview from './PkFilePreview.vue'\n import type { ChatFilePreviewChanges } from './previewChanges'\n import type { ChatFilePreviewTarget, WordPreviewMode } from './utils'\n\n /**\n * The viewer of a file stored in a chat in a dialog over the page: the\n * chat's when it has no room for the panel beside it or the reader\n * expands it, the chat log's always. Open while it is mounted: `close`\n * asks the host to drop it. The viewer draws its own head, with the file\n * and the close button, so the dialog has no title and takes its name.\n */\n defineProps<{\n target: ChatFilePreviewTarget\n /** The authenticated download URL of the same version. */\n downloadUrl: string\n preview?: ChatFilePreview\n /** What the version changed from the one shown before, for a moment. */\n changes?: ChatFilePreviewChanges\n loading?: boolean\n error?: boolean\n /** Covers the screen, for a phone. */\n fullscreen?: boolean\n /** The versions of the file in the conversation, from 1. */\n versions?: number[]\n /** The shown version can be written again as the newest one. */\n restorable?: boolean\n /** Offers to go back to the panel beside the chat. */\n resize?: 'shrink'\n /** The selection bar's actions for this format: absent in the chat logs. */\n selectionActions?: SelectionGroupCapability\n /** The agent answers in the chat the dialog covers. */\n working?: boolean\n }>()\n\n const emit = defineEmits<{\n close: []\n version: [version: number]\n restore: []\n resize: []\n showChat: []\n selectionSend: [\n text: string,\n pointer: FilePointer,\n action: { id: string; size: number },\n ]\n }>()\n\n // How the file is shown, kept by the host across panel and dialog\n const mode = defineModel<WordPreviewMode>('mode')\n const sheet = defineModel<number>('sheet')\n const zoom = defineModel<number>('zoom')\n // A boolean prop left out is false, not the viewer's default: the chat\n // logs keep no zoom, and their pages opened at 100% instead of fitted\n const fit = defineModel<boolean>('fit', { default: true })\n</script>\n\n<template>\n <VvDialog\n :model-value=\"true\"\n :aria-label=\"target.filename\"\n :modifiers=\"fullscreen ? 'fullscreen' : undefined\"\n class=\"pk-file-preview-dialog\"\n @update:model-value=\"!$event && emit('close')\">\n <PkFilePreview\n v-model:mode=\"mode\"\n v-model:sheet=\"sheet\"\n v-model:zoom=\"zoom\"\n v-model:fit=\"fit\"\n :kind=\"target.kind\"\n :filename=\"target.filename\"\n :version=\"target.version\"\n :versions\n :download-url\n :preview\n :changes\n :loading\n :error\n :restorable\n :resize\n :file-id=\"target.fileId\"\n :stored-file-name=\"target.storedFileName\"\n :selection-actions\n :working\n @version=\"emit('version', $event)\"\n @restore=\"emit('restore')\"\n @resize=\"emit('resize')\"\n @show-chat=\"emit('showChat')\"\n @selection-send=\"\n (text, pointer, action) =>\n emit('selectionSend', text, pointer, action)\n \"\n @close=\"emit('close')\" />\n </VvDialog>\n</template>\n\n<style lang=\"scss\">\n // Almost the whole window, room for a page of Word and a grid of Excel;\n // the viewer scrolls in its own box, so the content does not pad it.\n .pk-file-preview-dialog {\n &:not(.vv-dialog--fullscreen) > article {\n width: min(90rem, 94dvw);\n height: 92dvh;\n }\n\n // The library writes `max-height: auto`, which is no value: the\n // wrapper kept its 90dvh and the phone saw the chat around it\n &.vv-dialog--fullscreen > article {\n max-height: none;\n }\n\n .vv-dialog__content {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-height: 0;\n padding: 0;\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCI,IAAMiB,IAAOD,GAcPE,IAAOlB,EAA4BoB,GAAC,MAAM,GAC1CC,IAAQrB,EAAmBoB,GAAC,OAAO,GACnCE,IAAOtB,EAAmBoB,GAAC,MAAM,GAGjCG,IAAMvB,EAAoBoB,GAAC,KAAwB;;;GAIzD,OAAAnB,EAAA,GAAAC,EAmCWsB,GAAA;IAlCN,eAAa;IACb,cAAYJ,EAAA,OAAO;IACnB,WAAWA,EAAA,aAAU,eAAkB,KAAA;IACxC,OAAM;IACL,uBAAkB,AAAAQ,EAAA,SAAA,MAAA,CAAGC,KAAUZ,EAAI,OAAA;;IACpC,SAAAd,QA4B6B,CA5B7BC,EA4B6BC,GAAA;KA3BjB,MAAMa,EAAA;KAAA,iBAAA,AAAAU,EAAA,QAAA,MAAA,EAAI,QAAAC;KACV,OAAOR,EAAA;KAAA,kBAAA,AAAAO,EAAA,QAAA,MAAA,EAAK,QAAAC;KACZ,MAAMP,EAAA;KAAA,iBAAA,AAAAM,EAAA,QAAA,MAAA,EAAI,QAAAC;KACV,KAAKN,EAAA;KAAA,gBAAA,AAAAK,EAAA,QAAA,MAAA,EAAG,QAAAC;KACf,MAAMT,EAAA,OAAO;KACb,UAAUA,EAAA,OAAO;KACjB,SAASA,EAAA,OAAO;KAChB,UAAAA,EAAA;KACA,gBAAAA,EAAA;KACA,SAAAA,EAAA;KACA,SAAAA,EAAA;KACA,SAAAA,EAAA;KACA,OAAAA,EAAA;KACA,YAAAA,EAAA;KACA,QAAAA,EAAA;KACA,WAASA,EAAA,OAAO;KAChB,oBAAkBA,EAAA,OAAO;KACzB,qBAAAA,EAAA;KACA,SAAAA,EAAA;KACA,WAAO,AAAAQ,EAAA,QAAA,MAAEX,EAAI,WAAYY,CAAM;KAC/B,WAAO,AAAAD,EAAA,QAAA,MAAEX,EAAI,SAAA;KACb,UAAM,AAAAW,EAAA,QAAA,MAAEX,EAAI,QAAA;KACZ,YAAS,AAAAW,EAAA,QAAA,MAAEX,EAAI,UAAA;KACf,iBAAc,AAAAW,EAAA,QAAoB,GAAM,GAAS,MAA+BX,EAAI,iBAAkBgB,GAAMC,GAASC,CAAM;KAI3H,SAAK,AAAAP,EAAA,QAAA,MAAEX,EAAI,OAAA"}
1
+ {"version":3,"file":"PkFilePreviewDialog-1Pp-5cpt.js","names":["_useModel","_openBlock","_createBlock","_withCtx","_createVNode","PkFilePreview","__exportAll","PkFilePreviewDialog_vue_vue_type_script_setup_true_lang_default","\"mode\"","\"modeModifiers\"","\"sheet\"","\"sheetModifiers\"","\"zoom\"","\"zoomModifiers\"","\"fit\"","\"fitModifiers\"","__emit","emit","mode","useModel","__props","sheet","zoom","fit","_component_VvDialog","VvDialog","openBlock","createBlock","_cache","$event","withCtx","createVNode","PkFilePreview_default","text","pointer","action","PkFilePreviewDialog_exports","PkFilePreviewDialog_default"],"sources":["../../../../packages/components/src/chat/PkFilePreviewDialog.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import type {\n ChatFilePreview,\n FilePointer,\n SelectionGroupCapability,\n } from 'models'\n import PkFilePreview from './PkFilePreview.vue'\n import type { ChatFilePreviewChanges } from './previewChanges'\n import type { ChatFilePreviewTarget, WordPreviewMode } from './utils'\n\n /**\n * The viewer of a file stored in a chat in a dialog over the page: the\n * chat's when it has no room for the panel beside it or the reader\n * expands it, the chat log's always. Open while it is mounted: `close`\n * asks the host to drop it. The viewer draws its own head, with the file\n * and the close button, so the dialog has no title and takes its name.\n */\n defineProps<{\n target: ChatFilePreviewTarget\n /** The authenticated download URL of the same version. */\n downloadUrl: string\n preview?: ChatFilePreview\n /** What the version changed from the one shown before, for a moment. */\n changes?: ChatFilePreviewChanges\n loading?: boolean\n error?: boolean\n /** Covers the screen, for a phone. */\n fullscreen?: boolean\n /** The versions of the file in the conversation, from 1. */\n versions?: number[]\n /** The shown version can be written again as the newest one. */\n restorable?: boolean\n /** Offers to go back to the panel beside the chat. */\n resize?: 'shrink'\n /** The selection bar's actions for this format: absent in the chat logs. */\n selectionActions?: SelectionGroupCapability\n /** The agent answers in the chat the dialog covers. */\n working?: boolean\n }>()\n\n const emit = defineEmits<{\n close: []\n version: [version: number]\n restore: []\n resize: []\n showChat: []\n selectionSend: [\n text: string,\n pointer: FilePointer,\n action: { id: string; size: number },\n ]\n }>()\n\n // How the file is shown, kept by the host across panel and dialog\n const mode = defineModel<WordPreviewMode>('mode')\n const sheet = defineModel<number>('sheet')\n const zoom = defineModel<number>('zoom')\n // A boolean prop left out is false, not the viewer's default: the chat\n // logs keep no zoom, and their pages opened at 100% instead of fitted\n const fit = defineModel<boolean>('fit', { default: true })\n</script>\n\n<template>\n <VvDialog\n :model-value=\"true\"\n :aria-label=\"target.filename\"\n :modifiers=\"fullscreen ? 'fullscreen' : undefined\"\n class=\"pk-file-preview-dialog\"\n @update:model-value=\"!$event && emit('close')\">\n <PkFilePreview\n v-model:mode=\"mode\"\n v-model:sheet=\"sheet\"\n v-model:zoom=\"zoom\"\n v-model:fit=\"fit\"\n :kind=\"target.kind\"\n :filename=\"target.filename\"\n :version=\"target.version\"\n :versions\n :download-url\n :preview\n :changes\n :loading\n :error\n :restorable\n :resize\n :file-id=\"target.fileId\"\n :stored-file-name=\"target.storedFileName\"\n :selection-actions\n :working\n @version=\"emit('version', $event)\"\n @restore=\"emit('restore')\"\n @resize=\"emit('resize')\"\n @show-chat=\"emit('showChat')\"\n @selection-send=\"\n (text, pointer, action) =>\n emit('selectionSend', text, pointer, action)\n \"\n @close=\"emit('close')\" />\n </VvDialog>\n</template>\n\n<style lang=\"scss\">\n // Almost the whole window, room for a page of Word and a grid of Excel;\n // the viewer scrolls in its own box, so the content does not pad it.\n .pk-file-preview-dialog {\n &:not(.vv-dialog--fullscreen) > article {\n width: min(90rem, 94dvw);\n height: 92dvh;\n }\n\n // The library writes `max-height: auto`, which is no value: the\n // wrapper kept its 90dvh and the phone saw the chat around it\n &.vv-dialog--fullscreen > article {\n max-height: none;\n }\n\n .vv-dialog__content {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-height: 0;\n padding: 0;\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCI,IAAMiB,IAAOD,GAcPE,IAAOlB,EAA4BoB,GAAC,MAAM,GAC1CC,IAAQrB,EAAmBoB,GAAC,OAAO,GACnCE,IAAOtB,EAAmBoB,GAAC,MAAM,GAGjCG,IAAMvB,EAAoBoB,GAAC,KAAwB;;;GAIzD,OAAAnB,EAAA,GAAAC,EAmCWsB,GAAA;IAlCN,eAAa;IACb,cAAYJ,EAAA,OAAO;IACnB,WAAWA,EAAA,aAAU,eAAkB,KAAA;IACxC,OAAM;IACL,uBAAkB,AAAAQ,EAAA,SAAA,MAAA,CAAGC,KAAUZ,EAAI,OAAA;;IACpC,SAAAd,QA4B6B,CA5B7BC,EA4B6BC,GAAA;KA3BjB,MAAMa,EAAA;KAAA,iBAAA,AAAAU,EAAA,QAAA,MAAA,EAAI,QAAAC;KACV,OAAOR,EAAA;KAAA,kBAAA,AAAAO,EAAA,QAAA,MAAA,EAAK,QAAAC;KACZ,MAAMP,EAAA;KAAA,iBAAA,AAAAM,EAAA,QAAA,MAAA,EAAI,QAAAC;KACV,KAAKN,EAAA;KAAA,gBAAA,AAAAK,EAAA,QAAA,MAAA,EAAG,QAAAC;KACf,MAAMT,EAAA,OAAO;KACb,UAAUA,EAAA,OAAO;KACjB,SAASA,EAAA,OAAO;KAChB,UAAAA,EAAA;KACA,gBAAAA,EAAA;KACA,SAAAA,EAAA;KACA,SAAAA,EAAA;KACA,SAAAA,EAAA;KACA,OAAAA,EAAA;KACA,YAAAA,EAAA;KACA,QAAAA,EAAA;KACA,WAASA,EAAA,OAAO;KAChB,oBAAkBA,EAAA,OAAO;KACzB,qBAAAA,EAAA;KACA,SAAAA,EAAA;KACA,WAAO,AAAAQ,EAAA,QAAA,MAAEX,EAAI,WAAYY,CAAM;KAC/B,WAAO,AAAAD,EAAA,QAAA,MAAEX,EAAI,SAAA;KACb,UAAM,AAAAW,EAAA,QAAA,MAAEX,EAAI,QAAA;KACZ,YAAS,AAAAW,EAAA,QAAA,MAAEX,EAAI,UAAA;KACf,iBAAc,AAAAW,EAAA,QAAoB,GAAM,GAAS,MAA+BX,EAAI,iBAAkBgB,GAAMC,GAASC,CAAM;KAI3H,SAAK,AAAAP,EAAA,QAAA,MAAEX,EAAI,OAAA"}
@@ -1,16 +1,16 @@
1
1
  import { C as e, S as t, b as n, g as r, h as i, m as a, o, r as s, s as c, u as l, w as u, x as ee, y as d } from "./schemas-CwcNxjnD.js";
2
2
  import { l as f, t as te } from "./Media-0U2B_qCS.js";
3
- import { Dt as p, Et as m, c as ne, ct as re, j as ie, l as ae, m as oe, o as se, r as ce, u as le, v as ue } from "./Agent-CRwhrv5Z.js";
4
- import { t as de } from "./StreamError-FMgvyJMX.js";
3
+ import { Dt as p, Et as m, c as h, ct as ne, j as re, l as ie, m as ae, o as oe, r as se, u as ce, v as le } from "./Agent-CRwhrv5Z.js";
4
+ import { t as ue } from "./StreamError-FMgvyJMX.js";
5
5
  import "./src-nb8MU1sh.js";
6
- import { r as h, t as fe } from "./url-validation-CJV9pp4v.js";
7
- import { buildMongoQueryMatcher as pe, createAliasResolver as me } from "@casl/ability";
8
- import { createAccessControl as he } from "better-auth/plugins";
9
- import { adminAc as ge, defaultStatements as _e, memberAc as g, ownerAc as ve } from "better-auth/plugins/organization/access";
6
+ import { r as g, t as de } from "./url-validation-CJV9pp4v.js";
7
+ import { buildMongoQueryMatcher as fe, createAliasResolver as pe } from "@casl/ability";
8
+ import { createAccessControl as me } from "better-auth/plugins";
9
+ import { adminAc as he, defaultStatements as ge, memberAc as _, ownerAc as _e } from "better-auth/plugins/organization/access";
10
10
  // ../../packages/models/src/schema/ConversationAnalysis.ts
11
- var ye = /* @__PURE__ */ function(e) {
11
+ var ve = /* @__PURE__ */ function(e) {
12
12
  return e.Harassment = "harassment", e.HateSpeech = "hate_speech", e.SexualContent = "sexual_content", e.SelfHarm = "self_harm", e.Violence = "violence", e.PromptInjection = "prompt_injection", e.DataExtraction = "data_extraction", e.Spam = "spam", e.OffTopicPersistent = "off_topic_persistent", e.Impersonation = "impersonation", e;
13
- }({}), _ = /* @__PURE__ */ function(e) {
13
+ }({}), ye = /* @__PURE__ */ function(e) {
14
14
  return e.Low = "low", e.Medium = "medium", e.High = "high", e;
15
15
  }({}), v = /* @__PURE__ */ function(e) {
16
16
  return e.FalseSuccess = "false_success", e.Hallucination = "hallucination", e.OffBrand = "off_brand", e.DataLeak = "data_leak", e.InappropriateTone = "inappropriate_tone", e.RefusalLoop = "refusal_loop", e.Repetition = "repetition", e.FailedAction = "failed_action", e.EmptyReply = "empty_reply", e.StuckFlow = "stuck_flow", e;
@@ -33,8 +33,8 @@ var ye = /* @__PURE__ */ function(e) {
33
33
  language: n().max(10).describe("ISO 639-1 language code of the conversation (e.g. \"en\", \"it\")."),
34
34
  topics: o(n().max(100)).max(10).describe("Main topics discussed, as short lowercase labels."),
35
35
  userAbuseDetected: c().describe("Whether user abuse was detected. If false, userAbuseCategories MUST be empty."),
36
- userAbuseCategories: o(s(ye)).default([]).describe("Abuse categories detected. Non-empty only if userAbuseDetected is true."),
37
- userAbuseConfidence: s(_).optional().describe("Confidence level of the abuse detection. Set only if userAbuseDetected is true."),
36
+ userAbuseCategories: o(s(ve)).default([]).describe("Abuse categories detected. Non-empty only if userAbuseDetected is true."),
37
+ userAbuseConfidence: s(ye).optional().describe("Confidence level of the abuse detection. Set only if userAbuseDetected is true."),
38
38
  userAbuseSummary: n().max(w).optional().describe("Brief description of the abusive behavior detected. Always write in English. Set only if userAbuseDetected is true."),
39
39
  llmIssueDetected: c().describe("Whether an LLM quality issue was detected. If false, llmIssueCategories MUST be empty."),
40
40
  llmIssueCategories: o(s(v)).default([]).describe("LLM issue categories detected. Non-empty only if llmIssueDetected is true."),
@@ -67,21 +67,21 @@ r({
67
67
  maxOutputTokens: i().positive().optional(),
68
68
  presencePenalty: i().min(-2).max(2).optional(),
69
69
  frequencyPenalty: i().min(-2).max(2).optional(),
70
- searchMode: s(le).optional(),
70
+ searchMode: s(ce).optional(),
71
71
  limit: i().optional(),
72
- ranking: ne.optional(),
73
- reasoning: ae,
74
- webSearch: oe.optional(),
72
+ ranking: h.optional(),
73
+ reasoning: ie,
74
+ webSearch: ae.optional(),
75
75
  maxStepCount: i().int().min(1).max(40).optional(),
76
- disabledTools: o(s(ce)).optional(),
76
+ disabledTools: o(s(se)).optional(),
77
77
  fallbackModels: o(n()).optional(),
78
- gatewayOptions: se.partial().optional(),
79
- deviceContext: re.optional(),
78
+ gatewayOptions: oe.partial().optional(),
79
+ deviceContext: ne.optional(),
80
80
  externalContext: d(n(), t()).optional(),
81
81
  smoothStream: c().optional(),
82
82
  hostTools: o(t()).optional(),
83
83
  pageTools: t().optional(),
84
- confirmations: ue.optional(),
84
+ confirmations: le.optional(),
85
85
  projectId: u().optional()
86
86
  }), r({
87
87
  id: n().min(1),
@@ -109,7 +109,7 @@ function A(e) {
109
109
  continue;
110
110
  }
111
111
  let n = m(e, r.keys()), s = n && r.get(n);
112
- s && (t.state === "output-error" && de.test(t.errorText ?? "") ? o.add(s) : a.add(s));
112
+ s && (t.state === "output-error" && ue.test(t.errorText ?? "") ? o.add(s) : a.add(s));
113
113
  }
114
114
  let s = new Set(n.selected), c = new Set(n.seeded), l = t.groups.map((e) => ({
115
115
  id: e.id,
@@ -370,17 +370,17 @@ function ze(e, t, n) {
370
370
  var Z = /* @__PURE__ */ function(e) {
371
371
  return e.Backoffice = "backoffice", e.Frontoffice = "frontoffice", e.System = "system", e.Public = "public", e;
372
372
  }({});
373
- me({ modify: [
373
+ pe({ modify: [
374
374
  "read",
375
375
  "update",
376
376
  "delete"
377
- ] }), pe({ $or: V });
378
- var Q = he(_e);
379
- Q.newRole(ge.statements), Q.newRole(ve.statements), Q.newRole(g.statements), Q.newRole(g.statements);
377
+ ] }), fe({ $or: V });
378
+ var Q = me(ge);
379
+ Q.newRole(he.statements), Q.newRole(_e.statements), Q.newRole(_.statements), Q.newRole(_.statements);
380
380
  // ../../packages/composable/src/chatbot/api/resolveShortUrls.ts
381
381
  async function Be(e, t, n = {}) {
382
382
  try {
383
- let r = h(e), i = await fetch(`${r}/api/r/resolve`, {
383
+ let r = g(e), i = await fetch(`${r}/api/r/resolve`, {
384
384
  method: "POST",
385
385
  credentials: n.credentials ?? "include",
386
386
  headers: {
@@ -410,26 +410,30 @@ async function He(e) {
410
410
  }
411
411
  }
412
412
  function Ue(e) {
413
- let t = e.basePath ? fe(e.basePath) : `/api/v1/${Z.Public}`, n = `${h(e.baseUrl)}${t}`, r = `${h(e.baseUrl)}${t.replace(/\/[^/]+$/, `/${Z.Frontoffice}`)}`;
414
- async function i(t, r, i = "json") {
415
- let a = await fetch(`${n}${t}`, {
413
+ let t = e.basePath ? de(e.basePath) : `/api/v1/${Z.Public}`, n = g(e.baseUrl), r = `${n}${t}`, i = `${g(e.baseUrl)}${t.replace(/\/[^/]+$/, `/${Z.Frontoffice}`)}`, a = (e, n = "") => `${t.replace(/\/[^/]+$/, `/${Z.Public}`)}/agents/${encodeURIComponent(e)}/chat-projects${n}`, o = (e, t) => ({
414
+ method: e,
415
+ headers: { "Content-Type": "application/json" },
416
+ body: JSON.stringify(t)
417
+ });
418
+ async function s(t, n, i = "json", a = r) {
419
+ let o = await fetch(`${a}${t}`, {
416
420
  credentials: e.credentials ?? "include",
417
- ...r,
421
+ ...n,
418
422
  headers: {
419
423
  ...e.headers?.(),
420
- ...r?.headers
424
+ ...n?.headers
421
425
  }
422
426
  });
423
- if (!a.ok) throw Error(await He(a));
424
- if (i !== "void" && a.status !== 204) return a.json();
427
+ if (!o.ok) throw Error(await He(o));
428
+ if (i !== "void" && o.status !== 204) return o.json();
425
429
  }
426
430
  return {
427
431
  async getConversations(e, t, n) {
428
- let r = t ? `&filter[userId]=${encodeURIComponent(t)}` : "", a = n?.page ? `&page[number]=${n.page}` : "", o = n?.search ? `&search=${encodeURIComponent(n.search)}` : "";
429
- return (await i(`/agents/${encodeURIComponent(e)}/chats?sort=-lastMessageAt&page[size]=100${a}${r}${o}`)).map($);
432
+ let r = n?.projectId, i = t && (r === void 0 || r === "none") ? `&filter[userId]=${encodeURIComponent(t)}` : "", a = r ? `&filter[projectId]=${encodeURIComponent(r)}` : "", o = n?.page ? `&page[number]=${n.page}` : "", c = n?.search ? `&search=${encodeURIComponent(n.search)}` : "";
433
+ return (await s(`/agents/${encodeURIComponent(e)}/chats?sort=-lastMessageAt&page[size]=100${o}${i}${a}${c}`)).map($);
430
434
  },
431
435
  async getChatFiles(t) {
432
- let n = await fetch(`${r}/me/documents?filter[chatId]=${encodeURIComponent(t)}&page[size]=100`, {
436
+ let n = await fetch(`${i}/me/documents?filter[chatId]=${encodeURIComponent(t)}&page[size]=100`, {
433
437
  credentials: e.credentials ?? "include",
434
438
  headers: { ...e.headers?.() }
435
439
  });
@@ -438,13 +442,13 @@ function Ue(e) {
438
442
  },
439
443
  getChatFileDownloadUrl(e, t) {
440
444
  let n = t ? "?inline=true" : "";
441
- return this.appendAuthToken(`${r}/me/documents/${encodeURIComponent(e)}/download${n}`);
445
+ return this.appendAuthToken(`${i}/me/documents/${encodeURIComponent(e)}/download${n}`);
442
446
  },
443
447
  getChatFilePreviewUrl(e) {
444
- return this.appendAuthToken(`${r}/me/documents/${encodeURIComponent(e)}/download?preview=true`);
448
+ return this.appendAuthToken(`${i}/me/documents/${encodeURIComponent(e)}/download?preview=true`);
445
449
  },
446
450
  async deleteChatFile(t) {
447
- let n = await fetch(`${r}/me/documents/${encodeURIComponent(t)}`, {
451
+ let n = await fetch(`${i}/me/documents/${encodeURIComponent(t)}`, {
448
452
  method: "DELETE",
449
453
  credentials: e.credentials ?? "include",
450
454
  headers: { ...e.headers?.() }
@@ -452,23 +456,23 @@ function Ue(e) {
452
456
  if (!n.ok) throw Error(`API error: ${n.status} ${n.statusText}`);
453
457
  },
454
458
  async getChat(e, t) {
455
- let n = await i(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}`);
459
+ let n = await s(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}`);
456
460
  return n ? $(n) : null;
457
461
  },
458
462
  async getChatWakeup(e, t) {
459
- return i(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/wakeup`);
463
+ return s(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/wakeup`);
460
464
  },
461
465
  async stopChatWakeup(e, t) {
462
- return i(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/wakeup`, { method: "DELETE" });
466
+ return s(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/wakeup`, { method: "DELETE" });
463
467
  },
464
468
  async deleteChatTask(e, t, n) {
465
- return i(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`, { method: "DELETE" });
469
+ return s(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`, { method: "DELETE" });
466
470
  },
467
471
  async markChatWakeupPresence(e, t) {
468
- await i(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/wakeup/presence`, { method: "PUT" }, "void");
472
+ await s(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/wakeup/presence`, { method: "PUT" }, "void");
469
473
  },
470
474
  async stopChatTurn(e, t, n) {
471
- return (await i(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/stop`, n ? {
475
+ return (await s(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/stop`, n ? {
472
476
  method: "POST",
473
477
  headers: { "Content-Type": "application/json" },
474
478
  body: JSON.stringify({ streamId: n })
@@ -476,49 +480,75 @@ function Ue(e) {
476
480
  },
477
481
  async getRunningTurns(e, t) {
478
482
  if (t.length === 0) return [];
479
- let n = await i(`/agents/${encodeURIComponent(e)}/chats/turns?ids=${t.map(encodeURIComponent).join(",")}`);
483
+ let n = await s(`/agents/${encodeURIComponent(e)}/chats/turns?ids=${t.map(encodeURIComponent).join(",")}`);
480
484
  return Array.isArray(n?.running) ? n.running : [];
481
485
  },
482
486
  async updateChatTitle(e, t, n) {
483
- return $(await i(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}`, {
484
- method: "PATCH",
485
- headers: { "Content-Type": "application/json" },
486
- body: JSON.stringify({ title: n })
487
- }));
487
+ return $(await s(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}`, o("PATCH", { title: n })));
488
+ },
489
+ async moveChat(e, t, n) {
490
+ return $(await s(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}`, o("PATCH", { projectId: n })));
491
+ },
492
+ async getChatProjects(e) {
493
+ return s(a(e), void 0, "json", n);
494
+ },
495
+ async createChatProject(e, t) {
496
+ return s(a(e), o("POST", t), "json", n);
497
+ },
498
+ async updateChatProject(e, t, r) {
499
+ return s(a(e, `/${encodeURIComponent(t)}`), o("PATCH", r), "json", n);
500
+ },
501
+ async deleteChatProject(e, t) {
502
+ return s(a(e, `/${encodeURIComponent(t)}`), { method: "DELETE" }, "json", n);
503
+ },
504
+ async getChatProjectMembers(e, t) {
505
+ return s(a(e, `/${encodeURIComponent(t)}/members`), void 0, "json", n);
506
+ },
507
+ async getChatProjectCandidates(e, t) {
508
+ return s(a(e, `/${encodeURIComponent(t)}/candidates`), void 0, "json", n);
509
+ },
510
+ async addChatProjectMember(e, t, r) {
511
+ return s(a(e, `/${encodeURIComponent(t)}/members`), o("POST", { userId: r }), "json", n);
512
+ },
513
+ async transferChatProjectOwnership(e, t, r) {
514
+ return s(a(e, `/${encodeURIComponent(t)}/members/${encodeURIComponent(r)}`), o("PATCH", { role: "owner" }), "json", n);
515
+ },
516
+ async removeChatProjectMember(e, t, r) {
517
+ await s(a(e, `/${encodeURIComponent(t)}/members/${encodeURIComponent(r)}`), { method: "DELETE" }, "void", n);
488
518
  },
489
519
  async deleteChat(e, t) {
490
- await i(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}`, { method: "DELETE" }, "void");
520
+ await s(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}`, { method: "DELETE" }, "void");
491
521
  },
492
522
  async getMessageFeedbacks(e) {
493
- return i(`/message-feedbacks?filter[chatId]=${encodeURIComponent(e)}&page[size]=200`);
523
+ return s(`/message-feedbacks?filter[chatId]=${encodeURIComponent(e)}&page[size]=200`);
494
524
  },
495
525
  async submitMessageFeedback(e) {
496
- return i("/message-feedbacks", {
526
+ return s("/message-feedbacks", {
497
527
  method: "POST",
498
528
  headers: { "Content-Type": "application/json" },
499
529
  body: JSON.stringify(e)
500
530
  });
501
531
  },
502
532
  async submitLead(e) {
503
- await i("/leads", {
533
+ await s("/leads", {
504
534
  method: "POST",
505
535
  headers: { "Content-Type": "application/json" },
506
536
  body: JSON.stringify(e)
507
537
  }, "void");
508
538
  },
509
539
  async getAgent(e, t) {
510
- return i(`/organizations/${encodeURIComponent(e)}/agents/${encodeURIComponent(t)}`);
540
+ return s(`/organizations/${encodeURIComponent(e)}/agents/${encodeURIComponent(t)}`);
511
541
  },
512
542
  async getChatFilePreview(e, t, n) {
513
- return i(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/media/${encodeURIComponent(n)}/preview`);
543
+ return s(`/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/media/${encodeURIComponent(n)}/preview`);
514
544
  },
515
545
  async getAgentAccess(e, t) {
516
- return i(`/organizations/${encodeURIComponent(e)}/agents/${encodeURIComponent(t)}/access`);
546
+ return s(`/organizations/${encodeURIComponent(e)}/agents/${encodeURIComponent(t)}/access`);
517
547
  },
518
- async uploadMedia(t, r, i) {
548
+ async uploadMedia(t, n, i) {
519
549
  let a = new FormData();
520
550
  a.append("file", i);
521
- let o = await fetch(`${n}/agents/${encodeURIComponent(t)}/chats/${encodeURIComponent(r)}/media/upload`, {
551
+ let o = await fetch(`${r}/agents/${encodeURIComponent(t)}/chats/${encodeURIComponent(n)}/media/upload`, {
522
552
  method: "POST",
523
553
  credentials: e.credentials ?? "include",
524
554
  headers: e.headers?.(),
@@ -534,32 +564,32 @@ function Ue(e) {
534
564
  return o.json();
535
565
  },
536
566
  async discardMedia(e) {
537
- await i("/medias/discard", {
567
+ await s("/medias/discard", {
538
568
  method: "POST",
539
569
  headers: { "Content-Type": "application/json" },
540
570
  body: JSON.stringify(e)
541
571
  }, "void");
542
572
  },
543
573
  getChatEndpoint(e, t = "chat") {
544
- return `${n}/agents/${encodeURIComponent(e)}/${t === "reasoning" ? "reasoning-chat" : "chat"}`;
574
+ return `${r}/agents/${encodeURIComponent(e)}/${t === "reasoning" ? "reasoning-chat" : "chat"}`;
545
575
  },
546
576
  getChatStreamEndpoint(e, t) {
547
- return `${n}/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/stream`;
577
+ return `${r}/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/stream`;
548
578
  },
549
579
  appendAuthToken(t) {
550
580
  let n = e.headers?.()?.Authorization?.slice(7);
551
581
  return n ? `${t}${t.includes("?") ? "&" : "?"}token=${encodeURIComponent(n)}` : t;
552
582
  },
553
- getMediaUrl(e, t, r) {
554
- let i = `${n}/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/media/${encodeURIComponent(r)}/view`;
583
+ getMediaUrl(e, t, n) {
584
+ let i = `${r}/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/media/${encodeURIComponent(n)}/view`;
555
585
  return this.appendAuthToken(i);
556
586
  },
557
- getMediaDownloadUrl(e, t, r) {
558
- let i = `${n}/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/media/${encodeURIComponent(r)}/download`;
587
+ getMediaDownloadUrl(e, t, n) {
588
+ let i = `${r}/agents/${encodeURIComponent(e)}/chats/${encodeURIComponent(t)}/media/${encodeURIComponent(n)}/download`;
559
589
  return this.appendAuthToken(i);
560
590
  },
561
591
  async expandSourceContext(e, t, n, r = 2) {
562
- return i(`/agents/${encodeURIComponent(e)}/sources/expand-context`, {
592
+ return s(`/agents/${encodeURIComponent(e)}/sources/expand-context`, {
563
593
  method: "POST",
564
594
  headers: { "Content-Type": "application/json" },
565
595
  body: JSON.stringify({
@@ -570,7 +600,7 @@ function Ue(e) {
570
600
  });
571
601
  },
572
602
  async downloadSourceDocument(e, t) {
573
- return i(`/agents/${encodeURIComponent(e)}/sources/documents/${encodeURIComponent(t)}/download`);
603
+ return s(`/agents/${encodeURIComponent(e)}/sources/documents/${encodeURIComponent(t)}/download`);
574
604
  },
575
605
  async reverseGeocode(e, t, n) {
576
606
  let r = new URLSearchParams({
@@ -579,7 +609,7 @@ function Ue(e) {
579
609
  });
580
610
  n && r.set("lang", n);
581
611
  try {
582
- return (await i(`/geocoder/reverse?${r}`)).displayName;
612
+ return (await s(`/geocoder/reverse?${r}`)).displayName;
583
613
  } catch {
584
614
  return;
585
615
  }
@@ -588,21 +618,21 @@ function Ue(e) {
588
618
  let n = new URLSearchParams({ q: e });
589
619
  t && n.set("lang", t);
590
620
  try {
591
- return await i(`/geocoder/forward?${n}`);
621
+ return await s(`/geocoder/forward?${n}`);
592
622
  } catch {
593
623
  return;
594
624
  }
595
625
  },
596
626
  async getOAuthAuthorizeUrl(e, t) {
597
627
  let n = new URLSearchParams({ serverName: t });
598
- return i(`/agents/${encodeURIComponent(e)}/mcp-oauth/authorize?${n}`);
628
+ return s(`/agents/${encodeURIComponent(e)}/mcp-oauth/authorize?${n}`);
599
629
  },
600
630
  async getOAuthConnectionStatus(e, t) {
601
631
  let n = new URLSearchParams({ serverName: t });
602
- return i(`/agents/${encodeURIComponent(e)}/mcp-oauth/status?${n}`);
632
+ return s(`/agents/${encodeURIComponent(e)}/mcp-oauth/status?${n}`);
603
633
  },
604
634
  async createVoiceSession(e, t, n) {
605
- return ie.parse(await i(`/agents/${encodeURIComponent(e)}/voice/session`, {
635
+ return re.parse(await s(`/agents/${encodeURIComponent(e)}/voice/session`, {
606
636
  method: "POST",
607
637
  headers: { "Content-Type": "application/json" },
608
638
  body: JSON.stringify({
@@ -615,7 +645,7 @@ function Ue(e) {
615
645
  }));
616
646
  },
617
647
  async closeVoiceSession(e, t) {
618
- await i(`/agents/${encodeURIComponent(e)}/voice/session/${encodeURIComponent(t)}`, {
648
+ await s(`/agents/${encodeURIComponent(e)}/voice/session/${encodeURIComponent(t)}`, {
619
649
  method: "DELETE",
620
650
  keepalive: !0
621
651
  }, "void");
@@ -628,6 +658,6 @@ function Ue(e) {
628
658
  }
629
659
  };
630
660
  }
631
- export { A as a, j as i, Z as n, M as r, Ue as t };
661
+ export { j as a, M as i, Z as n, A as o, P as r, Ue as t };
632
662
 
633
- //# sourceMappingURL=createChatbotApiClient-BACnmIzY.js.map
663
+ //# sourceMappingURL=createChatbotApiClient-Pb7_cU2s.js.map