@8wave/ai-elements 0.126.0 → 0.127.0-beta.2
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.
- package/dist/_chunks/{Agent-DytagI8S.js → Agent-nB9V45mr.js} +354 -276
- package/dist/_chunks/Agent-nB9V45mr.js.map +1 -0
- package/dist/_chunks/{Document-BdWEd1tb.js → Document-Dm5GM40t.js} +7 -7
- package/dist/_chunks/{Document-BdWEd1tb.js.map → Document-Dm5GM40t.js.map} +1 -1
- package/dist/_chunks/{PkFilePreview-C3BxAdui.js → PkFilePreview-qTCDbut0.js} +3 -3
- package/dist/_chunks/{PkFilePreview-C3BxAdui.js.map → PkFilePreview-qTCDbut0.js.map} +1 -1
- package/dist/_chunks/{PkFilePreviewDialog-WAm7QSvT.js → PkFilePreviewDialog-m5d4zZDi.js} +2 -2
- package/dist/_chunks/{PkFilePreviewDialog-WAm7QSvT.js.map → PkFilePreviewDialog-m5d4zZDi.js.map} +1 -1
- package/dist/_chunks/{PkImageEditorDialog-DM-d0hCD.js → PkImageEditorDialog-aekpEqWD.js} +2 -2
- package/dist/_chunks/{PkImageEditorDialog-DM-d0hCD.js.map → PkImageEditorDialog-aekpEqWD.js.map} +1 -1
- package/dist/_chunks/{PkSelectionActions-Bl1KbGOj.js → PkSelectionActions-DDhRX6cs.js} +2 -2
- package/dist/_chunks/{PkSelectionActions-Bl1KbGOj.js.map → PkSelectionActions-DDhRX6cs.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-CU1ZUUCf.js → PkStreamingMarkdown-5WfFCjFv.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-CU1ZUUCf.js.map → PkStreamingMarkdown-5WfFCjFv.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-B-Y47Q_K.js → PkToolChatFile-C3B9q2OL.js} +3 -3
- package/dist/_chunks/{PkToolChatFile-B-Y47Q_K.js.map → PkToolChatFile-C3B9q2OL.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-B41xrF8k.js → PkToolRequestGeolocation-D4pYnCW5.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-B41xrF8k.js.map → PkToolRequestGeolocation-D4pYnCW5.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-BuCGuHwd.js → PkToolRequestOAuthConnection-DnnRY2rt.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-BuCGuHwd.js.map → PkToolRequestOAuthConnection-DnnRY2rt.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-Bjm6uhOK.js → PkToolShowArtifact-DQln7TsF.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-Bjm6uhOK.js.map → PkToolShowArtifact-DQln7TsF.js.map} +1 -1
- package/dist/_chunks/{PkToolShowChart-B6TKQ3aT.js → PkToolShowChart-DfDB9BeZ.js} +2 -2
- package/dist/_chunks/{PkToolShowChart-B6TKQ3aT.js.map → PkToolShowChart-DfDB9BeZ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-5tg4xbrh.js → PkToolShowContactForm-Dkb8AiqL.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-5tg4xbrh.js.map → PkToolShowContactForm-Dkb8AiqL.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-CiNtS-vX.js → PkToolShowDiagram-B2dBogUW.js} +2 -2
- package/dist/_chunks/{PkToolShowDiagram-CiNtS-vX.js.map → PkToolShowDiagram-B2dBogUW.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-eh8mXr6u.js → PkToolShowForm-CtDcwJs4.js} +4 -4
- package/dist/_chunks/{PkToolShowForm-eh8mXr6u.js.map → PkToolShowForm-CtDcwJs4.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-DedpXD-b.js → PkToolShowImageGallery-dLMI3SM7.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-DedpXD-b.js.map → PkToolShowImageGallery-dLMI3SM7.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-D24EIc4v.js → PkToolShowProductList-DE6BEdr_.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-D24EIc4v.js.map → PkToolShowProductList-DE6BEdr_.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-Dnw1x7dT.js → PkToolShowSources-vSr080EU.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-Dnw1x7dT.js.map → PkToolShowSources-vSr080EU.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-CxNx1Uf6.js → PkToolShowSuggestedReply-HuKn3loC.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-CxNx1Uf6.js.map → PkToolShowSuggestedReply-HuKn3loC.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-CDcJiprr.js → PkToolShowVideo-BL-9CiYe.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-CDcJiprr.js.map → PkToolShowVideo-BL-9CiYe.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-UXqb0XEJ.js → PkToolShowWebPages-DQfODZdD.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-UXqb0XEJ.js.map → PkToolShowWebPages-DQfODZdD.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-DJAB0Bgw.js → chatImagePolicy-Cj5lkTVq.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-DJAB0Bgw.js.map → chatImagePolicy-Cj5lkTVq.js.map} +1 -1
- package/dist/_chunks/text-CCurUhdH.js +13 -0
- package/dist/_chunks/text-CCurUhdH.js.map +1 -0
- package/dist/_chunks/{utils-78zQeKDO.js → utils-CRy3kzE3.js} +458 -160
- package/dist/_chunks/utils-CRy3kzE3.js.map +1 -0
- package/dist/ai-elements.es.js +5971 -5636
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAuth.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotLocalFolders.d.ts +2 -0
- package/dist-vue/PkChatbotLocalFolders.js +1 -0
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-Da4XChe8.js → Agent-DKefaJeG.js} +445 -377
- package/dist-vue/_chunks/Agent-DKefaJeG.js.map +1 -0
- package/dist-vue/_chunks/{Document-CsQsUQYa.js → Document-B49E_gxT.js} +18 -18
- package/dist-vue/_chunks/{Document-CsQsUQYa.js.map → Document-B49E_gxT.js.map} +1 -1
- package/dist-vue/_chunks/{Media-CMiWEpdQ.js → Media-DtudATme.js} +12 -2
- package/dist-vue/_chunks/Media-DtudATme.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-CITKd3qD.js → PkChatbot-8Fqlhwq5.js} +10 -9
- package/dist-vue/_chunks/PkChatbot-8Fqlhwq5.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotAuth-SfTyFbq1.js → PkChatbotAuth-CIK2CFy-.js} +8 -8
- package/dist-vue/_chunks/{PkChatbotAuth-SfTyFbq1.js.map → PkChatbotAuth-CIK2CFy-.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-DI_8T5a4.js → PkChatbotEmptyState-C_htXOSW.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-DI_8T5a4.js.map → PkChatbotEmptyState-C_htXOSW.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotInput-CJ5lPtpH.js +658 -0
- package/dist-vue/_chunks/PkChatbotInput-CJ5lPtpH.js.map +1 -0
- package/dist-vue/_chunks/PkChatbotLocalFolders-CSvqh_Cx.js +126 -0
- package/dist-vue/_chunks/PkChatbotLocalFolders-CSvqh_Cx.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotMessages-BWdINCAX.js → PkChatbotMessages-DY8r4UKe.js} +49 -49
- package/dist-vue/_chunks/{PkChatbotMessages-BWdINCAX.js.map → PkChatbotMessages-DY8r4UKe.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-CTwsRpkv.js → PkChatbotStepPayload-BLjH1pkP.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-CTwsRpkv.js.map → PkChatbotStepPayload-BLjH1pkP.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-C9xeMg-k.js → PkChatbotStepToolDetail-wIZmkvr-.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-C9xeMg-k.js.map → PkChatbotStepToolDetail-wIZmkvr-.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-DsubpIKa.js → PkChatbotSteps-DG09GyCb.js} +7 -7
- package/dist-vue/_chunks/{PkChatbotSteps-DsubpIKa.js.map → PkChatbotSteps-DG09GyCb.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-DW1a9ZNl.js → PkChatbotViewChat-DTKfW1kr.js} +684 -666
- package/dist-vue/_chunks/PkChatbotViewChat-DTKfW1kr.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-DdniYy1b.js → PkChatbotViewConversations-NA_PCvZR.js} +4 -4
- package/dist-vue/_chunks/{PkChatbotViewConversations-DdniYy1b.js.map → PkChatbotViewConversations-NA_PCvZR.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-CMoromsf.js → PkChatbotViewFiles-D8_Khdu2.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-CMoromsf.js.map → PkChatbotViewFiles-D8_Khdu2.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-BT7I3GhB.js → PkChatbotViewProfile-iTBiQVsZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-BT7I3GhB.js.map → PkChatbotViewProfile-iTBiQVsZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-Dxp-U8QU.js → PkFilePreview-sSb1Mmr2.js} +4 -4
- package/dist-vue/_chunks/{PkFilePreview-Dxp-U8QU.js.map → PkFilePreview-sSb1Mmr2.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreviewDialog-BE-NpN18.js → PkFilePreviewDialog-DquXMRJD.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-BE-NpN18.js.map → PkFilePreviewDialog-DquXMRJD.js.map} +1 -1
- package/dist-vue/_chunks/{PkImageEditorDialog-BiuOD6Hr.js → PkImageEditorDialog-CrjpCier.js} +2 -2
- package/dist-vue/_chunks/{PkImageEditorDialog-BiuOD6Hr.js.map → PkImageEditorDialog-CrjpCier.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-DMmt35Mq.js → PkStreamingMarkdown-CgKFdzCI.js} +23 -23
- package/dist-vue/_chunks/{PkStreamingMarkdown-DMmt35Mq.js.map → PkStreamingMarkdown-CgKFdzCI.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-BdNron14.js → PkToolChatFile-IEQxfzjM.js} +3 -3
- package/dist-vue/_chunks/{PkToolChatFile-BdNron14.js.map → PkToolChatFile-IEQxfzjM.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-DeI7kLlR.js → PkToolRequestGeolocation-BmrbMPke.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-DeI7kLlR.js.map → PkToolRequestGeolocation-BmrbMPke.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C0lE3Qbk.js → PkToolRequestOAuthConnection-yKgXyOUN.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C0lE3Qbk.js.map → PkToolRequestOAuthConnection-yKgXyOUN.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-C0Gb-LW2.js → PkToolShowArtifact-CF90yFCe.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-C0Gb-LW2.js.map → PkToolShowArtifact-CF90yFCe.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowChart-oJmzU10F.js → PkToolShowChart-CDR8ag4q.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowChart-oJmzU10F.js.map → PkToolShowChart-CDR8ag4q.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-D4IAna-K.js → PkToolShowContactForm-DAdKUU4X.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-D4IAna-K.js.map → PkToolShowContactForm-DAdKUU4X.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-ClGpv5Cr.js → PkToolShowDiagram-Do20AvFb.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-ClGpv5Cr.js.map → PkToolShowDiagram-Do20AvFb.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-ByfNodNh.js → PkToolShowForm-DfFmPOt6.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-ByfNodNh.js.map → PkToolShowForm-DfFmPOt6.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-DJ9JNDWK.js → PkToolShowImageGallery-DA6KW2g_.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-DJ9JNDWK.js.map → PkToolShowImageGallery-DA6KW2g_.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-CcFseg28.js → PkToolShowProductList-FcDDabPI.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-CcFseg28.js.map → PkToolShowProductList-FcDDabPI.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-DznWqWK3.js → PkToolShowSources-afCYBONq.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-DznWqWK3.js.map → PkToolShowSources-afCYBONq.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BZqnfpwO.js → PkToolShowSuggestedReply-C863wgtU.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BZqnfpwO.js.map → PkToolShowSuggestedReply-C863wgtU.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-niwkzqTN.js → PkToolShowVideo-kUiwxRlz.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-niwkzqTN.js.map → PkToolShowVideo-kUiwxRlz.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-BsMVJ6c7.js → PkToolShowWebPages-Dw9D1__u.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-BsMVJ6c7.js.map → PkToolShowWebPages-Dw9D1__u.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-Cd_2UI_O.js → createChatbotApiClient-DzrHp52e.js} +66 -65
- package/dist-vue/_chunks/createChatbotApiClient-DzrHp52e.js.map +1 -0
- package/dist-vue/_chunks/localFolders-ChZp8dLu.js +353 -0
- package/dist-vue/_chunks/localFolders-ChZp8dLu.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-Dir9Rc7K.js → useChatbotStore-DZlc7dzK.js} +1289 -1152
- package/dist-vue/_chunks/useChatbotStore-DZlc7dzK.js.map +1 -0
- package/dist-vue/_chunks/useSettledSelection-1bfM1fzx.js +55 -0
- package/dist-vue/_chunks/useSettledSelection-1bfM1fzx.js.map +1 -0
- package/dist-vue/_chunks/{utils-CibsowVe.js → utils-CY0jFRnG.js} +126 -107
- package/dist-vue/_chunks/utils-CY0jFRnG.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +6 -0
- package/dist-vue/composables.js +62 -10
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +4100 -4086
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +32 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -2
- package/dist-vue/packages/components/src/chat/PkChatbot.d.ts +7 -1
- package/dist-vue/packages/components/src/chat/PkChatbotLocalFolders.d.ts +31 -0
- package/dist-vue/packages/components/src/chat/utils.d.ts +3 -2
- package/dist-vue/packages/composable/src/chatbot/hostTools.d.ts +1 -1
- package/dist-vue/packages/composable/src/chatbot/index.d.ts +1 -0
- package/dist-vue/packages/composable/src/chatbot/localFolders.d.ts +137 -0
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +46 -3
- package/dist-vue/packages/models/src/schema/Agent.d.ts +24 -0
- package/dist-vue/packages/models/src/schema/Chat.d.ts +1 -0
- package/dist-vue/packages/models/src/schema/HostTool.d.ts +5 -2
- package/dist-vue/packages/models/src/schema/LocalFolder.d.ts +78 -0
- package/dist-vue/packages/models/src/schema/Organization.d.ts +10 -0
- package/dist-vue/packages/models/src/schema/PageAccess.d.ts +4 -1
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +8 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +8 -0
- package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-DytagI8S.js.map +0 -1
- package/dist/_chunks/text-5F7L8EHi.js +0 -5
- package/dist/_chunks/text-5F7L8EHi.js.map +0 -1
- package/dist/_chunks/utils-78zQeKDO.js.map +0 -1
- package/dist-vue/_chunks/Agent-Da4XChe8.js.map +0 -1
- package/dist-vue/_chunks/Media-CMiWEpdQ.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-CITKd3qD.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-UqcSEi8l.js +0 -708
- package/dist-vue/_chunks/PkChatbotInput-UqcSEi8l.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-DW1a9ZNl.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-Cd_2UI_O.js.map +0 -1
- package/dist-vue/_chunks/message-DuibQyHy.js +0 -61
- package/dist-vue/_chunks/message-DuibQyHy.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-Dir9Rc7K.js.map +0 -1
- package/dist-vue/_chunks/utils-CibsowVe.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Media-CMiWEpdQ.js","names":["core._coercedDate","schemas.ZodDate","z.object","z.enum","z.string","z.number","z.literal","z.url","z.discriminatedUnion","z.record","z.array","z.custom","object","record","discriminatedUnion","number","literal","_enum","_coercedDate","ZodDate","custom","url","string","date","params","MIME_TYPE_REGEX","SUPPORTED_AUDIO_TYPES","AUDIO_EXTENSIONS","extension","OTHER_AUDIO_EXTENSIONS","bareMimeType","mimeType","isAudioFile","getExtensionFromFilename","name","CODE_FILE_FORMATS","SUPPORTED_CODE_TYPES","format","codeExtensionsOf","mimeTypes","chatUploadMimeType","bare","declaredMimeType","allowedMimeTypes","candidate","saysNothing","chatDropAccepts","code","loose","types","type","allowed","StoragePolicy","\"DEFAULT\"","\"COLD\"","\"HOT\"","\"ARCHIVE\"","AzureBlobStorageHandleSchema","S3StorageHandleSchema","StorageHandleSchema","MediaSourceSchema","ext","MediaSchema","array","MediaType","\"picture\"","\"video\"","\"audio\"","\"office\"","\"archive\"","\"binary\"","\"executable\"","PictureRawOptionsSchema","VideoRawOptionsSchema","AudioRawOptionsSchema","OfficeRawOptionsSchema","ArchiveRawOptionsSchema","BinaryRawOptionsSchema","ExecutableRawOptionsSchema","lastDot","filename"],"sources":["../../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/coerce.js","../../../../packages/models/src/schema/Media.ts"],"sourcesContent":["import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport function string(params) {\n return core._coercedString(schemas.ZodString, params);\n}\nexport function number(params) {\n return core._coercedNumber(schemas.ZodNumber, params);\n}\nexport function boolean(params) {\n return core._coercedBoolean(schemas.ZodBoolean, params);\n}\nexport function bigint(params) {\n return core._coercedBigint(schemas.ZodBigInt, params);\n}\nexport function date(params) {\n return core._coercedDate(schemas.ZodDate, params);\n}\n","import { z } from 'zod'\n\n// ===== Constants =====\n\nexport const MAX_FILE_SIZE = 100 * 1024 * 1024 // 100MB\n\n/**\n * The largest audio that is transcribed (spec `audio-file-transcription.md`,\n * D2): about seven hours of m4a at 32 kbps, ten minutes of CD quality wav.\n * The SDK sends it as base64 inside a JSON body, so a job holds about four\n * times this in memory. The upload alert\n * (`problemReasons.file-upload-validation.audio-too-large`) states it in MB.\n */\nexport const MAX_AUDIO_FILE_SIZE = MAX_FILE_SIZE\n\n/**\n * The largest audio a chat accepts, whatever the agent's own cap (spec\n * `audio-file-transcription.md`, D4, decided 2026-10-14): the turn transcribes\n * it before the answer starts, and 25 MB (about an hour and forty minutes of\n * m4a at 32 kbps) keeps that wait within a minute or two, short of what a\n * proxy tolerates before the first byte.\n */\nexport const MAX_CHAT_AUDIO_FILE_SIZE = 25 * 1024 * 1024\n\nexport const MIME_TYPE_REGEX = /^[a-z]+\\/[a-z0-9\\-+.]+$/i\n\nexport const SUPPORTED_IMAGE_TYPES = [\n 'image/jpeg',\n 'image/png',\n 'image/gif',\n 'image/webp',\n 'image/svg+xml',\n] as const\n\nexport const SUPPORTED_VIDEO_TYPES = [\n 'video/mp4',\n 'video/webm',\n 'video/ogg',\n] as const\n\n/**\n * The audio a transcription model reads (spec `audio-file-transcription.md`,\n * D2), by every type a browser or a drive declares for it: an m4a arrives as\n * `audio/mp4` or `audio/x-m4a` depending on the system, a wav as any of three.\n * `audio/webm`, what a browser records, waits for a test.\n */\nexport const SUPPORTED_AUDIO_TYPES = [\n 'audio/mpeg',\n 'audio/mp4',\n 'audio/x-m4a',\n 'audio/aac',\n 'audio/wav',\n 'audio/x-wav',\n 'audio/wave',\n 'audio/ogg',\n 'audio/flac',\n 'audio/x-flac',\n] as const\n\n/**\n * Each extension of the audio in {@link SUPPORTED_AUDIO_TYPES} with a type it\n * is declared as: the one table both directions read (spec\n * `voice-notes-platform-channels.md`, D3). From a type to the extension its\n * stored file takes, the first pair with that type; from an extension to the\n * type of a file that came without one (Teams), the first pair with that\n * extension. `.oga` and `.opus` are ogg files no type names apart.\n */\nconst AUDIO_EXTENSION_TYPES: ReadonlyArray<\n readonly [\n extension: string,\n mimeType: (typeof SUPPORTED_AUDIO_TYPES)[number],\n ]\n> = [\n ['.mp3', 'audio/mpeg'],\n ['.m4a', 'audio/mp4'],\n ['.m4a', 'audio/x-m4a'],\n ['.aac', 'audio/aac'],\n ['.wav', 'audio/wav'],\n ['.wav', 'audio/x-wav'],\n ['.wav', 'audio/wave'],\n ['.ogg', 'audio/ogg'],\n ['.oga', 'audio/ogg'],\n ['.opus', 'audio/ogg'],\n ['.flac', 'audio/flac'],\n ['.flac', 'audio/x-flac'],\n]\n\n/** The extensions of {@link SUPPORTED_AUDIO_TYPES}, for a file whose type says nothing. */\nconst AUDIO_EXTENSIONS = new Set(\n AUDIO_EXTENSION_TYPES.map(([extension]) => extension),\n)\n\n/**\n * The extension a stored audio of this bare type takes (`.m4a` for\n * `audio/x-m4a`), or undefined for a type the transcription does not read.\n */\nexport const audioExtensionFor = (mimeType: string): string | undefined =>\n AUDIO_EXTENSION_TYPES.find(([, type]) => type === mimeType)?.[0]\n\n/**\n * The type of an audio named with this extension (`audio/ogg` for `.opus`),\n * or undefined for an extension the transcription does not read.\n */\nexport const audioMimeTypeFor = (extension: string): string | undefined =>\n AUDIO_EXTENSION_TYPES.find(([ext]) => ext === extension.toLowerCase())?.[1]\n\n/** Audio no transcription reads, still to keep away from a model. */\nconst OTHER_AUDIO_EXTENSIONS = new Set([\n '.amr',\n '.3ga',\n '.aif',\n '.aiff',\n '.caf',\n '.m4b',\n '.mka',\n '.weba',\n '.wma',\n])\n\n/** A MIME type without its parameters: `audio/ogg; codecs=opus` is `audio/ogg`. */\nconst bareMimeType = (mimeType?: string): string =>\n mimeType?.split(';')[0]?.trim().toLowerCase() ?? ''\n\nconst hasAudioExtension = (name = ''): boolean =>\n AUDIO_EXTENSIONS.has(getExtensionFromFilename(name))\n\n/**\n * Whether a file is audio of any kind, read or not: what a channel that does\n * not transcribe has to keep away from the model, since most models refuse an\n * audio part and the whole turn with it.\n */\nexport const isAudioFile = (name?: string, mimeType?: string): boolean => {\n const extension = getExtensionFromFilename(name ?? '')\n return (\n bareMimeType(mimeType).startsWith('audio/') ||\n AUDIO_EXTENSIONS.has(extension) ||\n OTHER_AUDIO_EXTENSIONS.has(extension)\n )\n}\n\n/**\n * Whether a file is audio the transcription reads: by its type, else by its\n * extension when the type says nothing (none, `application/octet-stream`) or\n * is another system's name for an audio of ours (`audio/mp3`,\n * `audio/vnd.wave`, `audio/opus`): the model reads the bytes, not the type.\n */\nexport const isTranscribableAudio = (\n name?: string,\n mimeType?: string,\n): boolean => {\n const bare = bareMimeType(mimeType)\n if ((SUPPORTED_AUDIO_TYPES as readonly string[]).includes(bare)) {\n return true\n }\n return (\n (bare === '' ||\n bare === 'application/octet-stream' ||\n bare.startsWith('audio/')) &&\n hasAudioExtension(name)\n )\n}\n\n/**\n * The type a file the transcription reads is handled as (spec\n * `voice-notes-platform-channels.md`, D1): its own without parameters\n * (`audio/ogg; codecs=opus` is `audio/ogg`), or the one its extension names\n * when {@link isTranscribableAudio} took it by the extension. Undefined for a\n * file the transcription does not read.\n */\nexport const transcribableAudioType = (\n name?: string,\n mimeType?: string,\n): string | undefined => {\n if (!isTranscribableAudio(name, mimeType)) {\n return undefined\n }\n const bare = bareMimeType(mimeType)\n return (SUPPORTED_AUDIO_TYPES as readonly string[]).includes(bare)\n ? bare\n : audioMimeTypeFor(getExtensionFromFilename(name ?? ''))\n}\n\n/**\n * Source code and structured text a chat takes as an attachment (the \"Code\"\n * category of an agent's file types, off until the admin turns it on), one\n * row per format: the extensions it goes by, the type it is allowed and\n * stored as, and the other names a browser or a system declares it with\n * (most systems call a `.ts` `video/mp2t`, and many send a `.py` with no type\n * at all). The model reads the content as text, never the file: a provider\n * takes a file part for images and PDFs, plain text at most.\n *\n * A format added here is not allowed on an agent that turned the category on\n * before: the settings show the category off there, until the admin turns it\n * on again.\n */\nconst CODE_FILE_FORMATS: ReadonlyArray<{\n extensions: readonly string[]\n mimeType: string\n aliases: readonly string[]\n}> = [\n { extensions: ['.html', '.htm'], mimeType: 'text/html', aliases: [] },\n { extensions: ['.css'], mimeType: 'text/css', aliases: [] },\n { extensions: ['.scss'], mimeType: 'text/x-scss', aliases: ['text/scss'] },\n {\n extensions: ['.js', '.mjs', '.cjs', '.jsx'],\n mimeType: 'text/javascript',\n aliases: [\n 'application/javascript',\n 'application/x-javascript',\n 'text/jsx',\n ],\n },\n {\n extensions: ['.ts', '.mts', '.cts', '.tsx'],\n mimeType: 'text/x-typescript',\n aliases: [\n 'application/typescript',\n 'application/x-typescript',\n 'text/typescript',\n 'text/tsx',\n 'video/mp2t',\n ],\n },\n { extensions: ['.vue'], mimeType: 'text/x-vue', aliases: [] },\n {\n extensions: ['.json'],\n mimeType: 'application/json',\n aliases: ['text/json', 'text/x-json'],\n },\n {\n extensions: ['.xml'],\n mimeType: 'application/xml',\n aliases: ['text/xml'],\n },\n {\n extensions: ['.yaml', '.yml'],\n mimeType: 'application/yaml',\n aliases: ['application/x-yaml', 'text/yaml', 'text/x-yaml'],\n },\n {\n extensions: ['.toml'],\n mimeType: 'application/toml',\n aliases: ['text/x-toml'],\n },\n {\n extensions: ['.py'],\n mimeType: 'text/x-python',\n aliases: ['text/x-python-script', 'application/x-python'],\n },\n {\n extensions: ['.java'],\n mimeType: 'text/x-java',\n aliases: ['text/x-java-source'],\n },\n { extensions: ['.kt'], mimeType: 'text/x-kotlin', aliases: [] },\n {\n extensions: ['.c', '.h'],\n mimeType: 'text/x-c',\n aliases: ['text/x-csrc', 'text/x-chdr'],\n },\n {\n extensions: ['.cpp', '.cc', '.cxx', '.hpp'],\n mimeType: 'text/x-c++',\n aliases: ['text/x-c++src', 'text/x-c++hdr'],\n },\n { extensions: ['.cs'], mimeType: 'text/x-csharp', aliases: [] },\n { extensions: ['.go'], mimeType: 'text/x-go', aliases: [] },\n {\n extensions: ['.rs'],\n mimeType: 'text/x-rust',\n aliases: ['application/rls-services+xml'],\n },\n {\n extensions: ['.rb'],\n mimeType: 'text/x-ruby',\n aliases: ['application/x-ruby'],\n },\n {\n extensions: ['.php'],\n mimeType: 'text/x-php',\n aliases: ['application/x-php', 'application/x-httpd-php'],\n },\n { extensions: ['.swift'], mimeType: 'text/x-swift', aliases: [] },\n {\n extensions: ['.sql'],\n mimeType: 'application/sql',\n aliases: ['application/x-sql', 'text/x-sql'],\n },\n {\n extensions: ['.sh', '.bash', '.zsh'],\n mimeType: 'text/x-sh',\n aliases: [\n 'application/x-sh',\n 'application/x-shellscript',\n 'text/x-shellscript',\n ],\n },\n]\n\n/** The types of {@link CODE_FILE_FORMATS}, what the \"Code\" category allows. */\nexport const SUPPORTED_CODE_TYPES: readonly string[] = CODE_FILE_FORMATS.map(\n (format) => format.mimeType,\n)\n\n/** The text a chat reads besides code: the \"Text\" category. */\nconst PLAIN_TEXT_TYPES = ['text/plain', 'text/markdown', 'text/csv']\n\n/**\n * Whether the model reads a chat attachment of this type as text: the\n * content goes into the message, the file never reaches the provider.\n */\nexport const isTextAttachmentType = (mimeType?: string): boolean => {\n const bare = bareMimeType(mimeType)\n return (\n PLAIN_TEXT_TYPES.includes(bare) || SUPPORTED_CODE_TYPES.includes(bare)\n )\n}\n\n/**\n * The extension a stored code file of this type takes (`.js` for\n * `text/javascript`), or undefined for a type that is not code.\n */\nexport const codeExtensionFor = (mimeType: string): string | undefined =>\n CODE_FILE_FORMATS.find((format) => format.mimeType === mimeType)\n ?.extensions[0]\n\n/**\n * The extensions of the code types among `mimeTypes`, for a file picker: a\n * browser filters by type, and knows few of these.\n */\nexport const codeExtensionsOf = (mimeTypes: readonly string[]): string[] =>\n CODE_FILE_FORMATS.filter((format) =>\n mimeTypes.includes(format.mimeType),\n ).flatMap((format) => format.extensions)\n\n/**\n * The type a chat upload is checked and stored as: the declared one when the\n * agent allows it. Otherwise, for a file whose extension names a code format\n * the agent allows, that format's type, when the declared one says nothing\n * (none, `application/octet-stream`, `text/plain`) or is another system's name\n * for it. Anything else keeps its declared type, which the allow-list then\n * refuses.\n */\nexport const chatUploadMimeType = (\n name: string | undefined,\n declaredMimeType: string | undefined,\n allowedMimeTypes: readonly string[],\n): string => {\n const bare = bareMimeType(declaredMimeType)\n if (allowedMimeTypes.includes(bare)) {\n return bare\n }\n const extension = getExtensionFromFilename(name ?? '')\n const format = CODE_FILE_FORMATS.find((candidate) =>\n candidate.extensions.includes(extension),\n )\n const saysNothing =\n bare === '' ||\n bare === 'application/octet-stream' ||\n bare === 'text/plain'\n return format &&\n allowedMimeTypes.includes(format.mimeType) &&\n (saysNothing || format.aliases.includes(bare))\n ? format.mimeType\n : (declaredMimeType ?? '')\n}\n\n/**\n * Whether a chat drop zone takes files of these types, read while they are\n * dragged and their names are still unknown: each one allowed, or, when the\n * agent allows code, a type a code file comes with (none,\n * `application/octet-stream`, another system's name for it). The upload\n * decides by the name ({@link chatUploadMimeType}).\n */\nexport const chatDropAccepts = (\n types: readonly string[],\n allowedMimeTypes: readonly string[],\n): boolean => {\n if (allowedMimeTypes.length === 0) {\n return true\n }\n const code = CODE_FILE_FORMATS.filter((format) =>\n allowedMimeTypes.includes(format.mimeType),\n )\n const loose = new Set(\n code.length > 0\n ? [\n '',\n 'application/octet-stream',\n 'text/plain',\n ...code.flatMap((format) => format.aliases),\n ]\n : [],\n )\n return (\n types.length > 0 &&\n types.every(\n (type) =>\n loose.has(bareMimeType(type)) ||\n allowedMimeTypes.some((allowed) => type.includes(allowed)),\n )\n )\n}\n\n/**\n * What a chat turn made of an audio the user attached (spec\n * `audio-file-transcription.md`, D4), kept on its file part\n * (`providerMetadata['8bot'].transcript`) and on its `chat_attachments` row:\n * the transcript in paragraphs opened by their time, or why there is none.\n * `off` is an organization that does not use the platform gateway, where\n * nothing is transcribed and nothing is charged.\n */\nexport const ChatAudioTranscriptSchema = z.object({\n status: z.enum(['ready', 'no-speech', 'failed', 'off']),\n text: z.string().optional(),\n /** ISO 639-1, when the model detected it. */\n language: z.string().optional(),\n durationSeconds: z.number().optional(),\n model: z.string().optional(),\n})\nexport type ChatAudioTranscript = z.infer<typeof ChatAudioTranscriptSchema>\n\n// ===== Enums =====\n\nexport enum StoragePolicy {\n DEFAULT = 'default',\n COLD = 'cold',\n HOT = 'hot',\n ARCHIVE = 'archive',\n}\n\nexport enum PreviewStatus {\n Pending = 'pending',\n Done = 'done',\n Failed = 'failed',\n}\n\n// ===== Storage Handle Schemas =====\n\nconst AzureBlobStorageHandleSchema = z.object({\n type: z.literal('azure-blob'),\n blobUri: z.url(),\n containerName: z.string().min(1),\n pathRelativeToContainer: z.string().min(1),\n})\n\nconst S3StorageHandleSchema = z.object({\n type: z.literal('s3'),\n bucket: z.string().min(1),\n key: z.string().min(1),\n region: z.string().min(1),\n})\n\nconst StorageHandleSchema = z.discriminatedUnion('type', [\n AzureBlobStorageHandleSchema,\n S3StorageHandleSchema,\n])\n\n// ===== Media Upload Schema =====\n\n/**\n * Media upload information for preparing a file upload\n */\nexport const MediaUploadSchema = z.object({\n /** Media type category (picture, video, audio, etc.) */\n type: z.string().min(1),\n /** Original filename */\n name: z.string().min(1),\n /** MIME type (e.g., 'image/jpeg') */\n mimeType: z.string().regex(MIME_TYPE_REGEX),\n /** File size in bytes (must be positive) */\n bytesCount: z.number().positive(),\n /** File extension with dot (e.g., '.jpg') */\n extension: z\n .string()\n .regex(/^\\.[a-zA-Z0-9]+$/)\n .overwrite((ext) => ext.toLowerCase()),\n /** Optional custom stored filename */\n storedFileName: z.string().optional(),\n /** Additional metadata key-value pairs */\n metadata: z.record(z.string(), z.string()).default({}),\n /** Storage tags for categorization */\n tags: z.record(z.string(), z.string()).default({}),\n})\nexport type MediaUpload = z.infer<typeof MediaUploadSchema>\n\n// ===== Media Source Schema =====\n\n/**\n * Complete media source information including storage details\n */\nexport const MediaSourceSchema = MediaUploadSchema.extend({\n /** Storage backend configuration */\n storageHandle: StorageHandleSchema,\n /** Storage tier/policy */\n storagePolicy: z.enum(StoragePolicy),\n /** Optional signature data for verification */\n signData: z.string().optional(),\n /** Actual stored filename (required) */\n storedFileName: z.string().min(1),\n})\nexport type MediaSource = z.infer<typeof MediaSourceSchema>\n\n// ===== Media Schema =====\n\n/**\n * Complete media object with source and optional variants\n */\nexport const MediaSchema = z.object({\n /** Display name for the media */\n name: z.string().min(1),\n /** Primary media source */\n src: MediaSourceSchema,\n /** Optional additional sources (e.g., different resolutions) */\n srcSet: z.array(MediaSourceSchema).default([]),\n /** Type-specific metadata (dimensions, duration, etc.) */\n rawOptions: z.custom<RawOptions>().optional(),\n})\nexport type Media = z.infer<typeof MediaSchema>\n\n// ===== Upload Handle Schema =====\n\n/**\n * Upload handle containing SAS URI and metadata for client-side upload\n */\nexport const MediaUploadHandleSchema = z.object({\n /** Media source information */\n src: MediaSourceSchema,\n /** Upload credentials and metadata */\n uploadHandle: z.object({\n /** Shared Access Signature URI for upload */\n uploadSasuri: z.url(),\n /** Metadata to attach to the blob */\n metadata: z.record(z.string(), z.string()).default({}),\n /** Tags to attach to the blob */\n tags: z.record(z.string(), z.string()).default({}),\n }),\n})\nexport type MediaUploadHandle = z.infer<typeof MediaUploadHandleSchema>\n\n// ===== Download Handle Schema =====\n\n/**\n * Download handle containing SAS URIs for different access patterns\n */\nexport const MediaDownloadHandleSchema = z.object({\n /** Media source information */\n src: MediaSourceSchema,\n /** Download credentials and URIs */\n downloadHandle: z.object({\n /** SAS URI for file download */\n downloadSasuri: z.url(),\n /** SAS URI for inline viewing */\n viewSasuri: z.url(),\n /** Optional SAS URI for preview thumbnail */\n previewSasuri: z.url().optional(),\n /** Expiration timestamp for the SAS URIs */\n expiresOn: z.string().datetime(),\n /** Storage backend type */\n type: z.string(),\n }),\n})\nexport type MediaDownloadHandle = z.infer<typeof MediaDownloadHandleSchema>\n\n// ===== Media Types =====\n\nexport enum MediaType {\n picture = 'picture',\n video = 'video',\n audio = 'audio',\n office = 'office',\n archive = 'archive',\n binary = 'binary',\n executable = 'executable',\n}\n\n// ===== Raw Options Schemas =====\n\nconst PictureRawOptionsSchema = z.object({\n type: z.literal(MediaType.picture),\n width: z.number().positive(),\n height: z.number().positive(),\n blurhash: z.string().optional(),\n})\n\nconst VideoRawOptionsSchema = z.object({\n type: z.literal(MediaType.video),\n width: z.number().positive(),\n height: z.number().positive(),\n duration: z.number().nonnegative(),\n})\n\nconst AudioRawOptionsSchema = z.object({\n type: z.literal(MediaType.audio),\n duration: z.number().nonnegative(),\n})\n\nconst OfficeRawOptionsSchema = z.object({\n type: z.literal(MediaType.office),\n})\n\nconst ArchiveRawOptionsSchema = z.object({\n type: z.literal(MediaType.archive),\n})\n\nconst BinaryRawOptionsSchema = z.object({\n type: z.literal(MediaType.binary),\n})\n\nconst ExecutableRawOptionsSchema = z.object({\n type: z.literal(MediaType.executable),\n})\n\nexport const RawOptionsSchema = z.discriminatedUnion('type', [\n PictureRawOptionsSchema,\n VideoRawOptionsSchema,\n AudioRawOptionsSchema,\n OfficeRawOptionsSchema,\n ArchiveRawOptionsSchema,\n BinaryRawOptionsSchema,\n ExecutableRawOptionsSchema,\n])\n\n// ===== Raw Options Types =====\n\n// ===== Raw Options Types =====\n\nexport type PictureRawOptions = z.infer<typeof PictureRawOptionsSchema>\nexport type VideoRawOptions = z.infer<typeof VideoRawOptionsSchema>\nexport type AudioRawOptions = z.infer<typeof AudioRawOptionsSchema>\nexport type OfficeRawOptions = z.infer<typeof OfficeRawOptionsSchema>\nexport type ArchiveRawOptions = z.infer<typeof ArchiveRawOptionsSchema>\nexport type BinaryRawOptions = z.infer<typeof BinaryRawOptionsSchema>\nexport type ExecutableRawOptions = z.infer<typeof ExecutableRawOptionsSchema>\n\nexport type RawOptions = z.infer<typeof RawOptionsSchema>\n\n// ===== Uploaded File Type =====\n\nexport type UploadedFile<Source = undefined> = Source extends undefined\n ? {\n name: string\n size: number\n type: string\n url: string\n lastModified?: number\n }\n : {\n name: string\n size: number\n type: string\n url: string\n lastModified?: number\n source: Source\n }\n\n// ===== Helper Functions =====\n\n/**\n * Check if a MIME type is a supported image format\n */\nexport const isSupportedImageType = (mimeType: string): boolean => {\n return mimeType.startsWith('image/')\n}\n\n/**\n * Check if a MIME type supports preview generation\n */\nexport const isSupportedPreviewType = (mimeType: string): boolean => {\n return mimeType.startsWith('image/') || mimeType === 'application/pdf'\n}\n\n/**\n * Determine MediaType from MIME type\n */\nexport const getMediaTypeFromMime = (mimeType: string): MediaType => {\n if (mimeType.startsWith('image/')) {\n return MediaType.picture\n }\n if (mimeType.startsWith('video/')) {\n return MediaType.video\n }\n if (mimeType.startsWith('audio/')) {\n return MediaType.audio\n }\n if (\n mimeType.startsWith('application/pdf') ||\n mimeType.startsWith('application/msword') ||\n mimeType.startsWith('application/vnd.openxmlformats') ||\n mimeType.startsWith('application/vnd.ms-')\n ) {\n return MediaType.office\n }\n if (\n mimeType === 'application/zip' ||\n mimeType === 'application/x-rar-compressed' ||\n mimeType === 'application/x-7z-compressed'\n ) {\n return MediaType.archive\n }\n if (\n mimeType.startsWith('application/x-') &&\n mimeType.includes('executable')\n ) {\n return MediaType.executable\n }\n return MediaType.binary\n}\n\n/**\n * Extract file extension from filename\n */\nexport const getExtensionFromFilename = (filename: string): string => {\n const lastDot = filename.lastIndexOf('.')\n return lastDot === -1 ? '' : filename.slice(lastDot).toLowerCase()\n}\n\n/**\n * Format bytes to human-readable string\n */\nexport const formatBytes = (bytes: number, decimals = 2): string => {\n if (bytes === 0) {\n return '0 Bytes'\n }\n const k = 1024\n const dm = decimals < 0 ? 0 : decimals\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']\n const i = Math.floor(Math.log(bytes) / Math.log(k))\n return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`\n}\n\n// ===== Type Guards =====\n\nexport const isPictureOptions = (\n options: RawOptions,\n): options is PictureRawOptions => {\n return options.type === MediaType.picture\n}\n\nexport const isVideoOptions = (\n options: RawOptions,\n): options is VideoRawOptions => {\n return options.type === MediaType.video\n}\n\nexport const isAudioOptions = (\n options: RawOptions,\n): options is AudioRawOptions => {\n return options.type === MediaType.audio\n}\n\nexport const isOfficeOptions = (\n options: RawOptions,\n): options is OfficeRawOptions => {\n return options.type === MediaType.office\n}\n\nexport const isArchiveOptions = (\n options: RawOptions,\n): options is ArchiveRawOptions => {\n return options.type === MediaType.archive\n}\n\nexport const isBinaryOptions = (\n options: RawOptions,\n): options is BinaryRawOptions => {\n return options.type === MediaType.binary\n}\n\nexport const isExecutableOptions = (\n options: RawOptions,\n): options is ExecutableRawOptions => {\n return options.type === MediaType.executable\n}\n"],"ignoreList":[0],"mappings":";;AAcA,SAAgBuB,EAAK,GAAQ;CACzB,OAAOvB,EAAkBC,GAAiBuB,CAAM;AACpD;;ACQA,IAAaC,IAAkB,4BAsBlBC,IAAwB;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ,GA+BMC,IAAmB,IAAI,IACzB;CAhBA,CAAC,QAAQ,YAAY;CACrB,CAAC,QAAQ,WAAW;CACpB,CAAC,QAAQ,aAAa;CACtB,CAAC,QAAQ,WAAW;CACpB,CAAC,QAAQ,WAAW;CACpB,CAAC,QAAQ,aAAa;CACtB,CAAC,QAAQ,YAAY;CACrB,CAAC,QAAQ,WAAW;CACpB,CAAC,QAAQ,WAAW;CACpB,CAAC,SAAS,WAAW;CACrB,CAAC,SAAS,YAAY;CACtB,CAAC,SAAS,cAAc;AAKxB,CAAA,CAAsB,KAAK,CAACC,OAAeA,CAAS,CACxD,GAiBMC,oBAAyB,IAAI,IAAI;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ,CAAC,GAGKC,KAAgB,MAClBC,GAAU,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,YAAY,KAAK,IAUxCC,KA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AY,KAAK,KAAKC,EAAS,MAAMD,CAAO,CAAC,CAAC,YAAY;AACrE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PkChatbot-CITKd3qD.js","names":["_useModel","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createElementVNode","_unref","_Fragment","_createVNode","_mergeProps","_createBlock","PkAvatar","_toDisplayString","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps","_createTextVNode","PkChatbotViewChat","_renderList","PkChatbotViewConversations","PkChatbotViewFiles","PkChatbotViewProfile","PkStreamingMarkdown","VvButtonLocalized","useChatbotStore","useDialogConfirm","useLocalizedString","provideShortUrlResolver","PkAvatar_default","PkChatbotViewChat_default","PkChatbotViewConversations_default","PkChatbotViewFiles_default","ChatbotProfileContextKey","PkChatbotViewProfile_default","provideChatImagePolicy","PkStreamingMarkdown_default","agentThemeStyle","resolveContrastColor","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","PkChatbot_default","defineComponent","\"chatId\"","\"chatIdModifiers\"","__expose","__emit","slots","useSlots","$t","useI18n","props","__props","emit","chatId","useModel","store","hashes","storeToRefs","storeAgentId","toRef","profile","inject","canManageProfile","computed","canSignIn","canEraseConversations","showEraseConversations","activeView","conversations","isErasingConversations","ref","handleEraseAll","eraseConversations","openDialogConfirm","startNewChat","watch","canManage","navigate","watchEffect","id","localChatId","chatError","error","parsedError","isFullscreen","isPanel","chatbotEl","useTemplateRef","chatbotWidth","useElementSize","isPhoneWidth","isTightWidth","isWideWidth","isReasoningAgent","showReasoningNotice","messages","message","useColorsForAgentHeader","showHeaderMenu","pageAccessAvailable","confirmationsAvailable","themeClass","isDark","mainColor","contrastColor","themeStyle","footerMessage","title","activeMessage","newAgentId","newChatId","newView","_component_VvButton","_component_VvIcon","VvIcon","_component_VvDropdownAction","VvDropdownAction","_component_VvDropdown","VvDropdown","_component_VvButtonGroup","VvButtonGroup","_component_VvAlert","VvAlert","openBlock","createElementBlock","normalizeClass","normalizeStyle","createCommentVNode","createElementVNode","unref","createBlock","Fragment","createVNode","mergeProps","_cache","toDisplayString","withCtx","renderSlot","_ctx","normalizeProps","guardReactiveProps","stopGeneration","createTextVNode","setPageAccessOff","pageAccessOff","setConfirmationMode","confirmationMode","$event","createSlots","renderList","slotName","slotData"],"sources":["../../../../packages/components/src/chat/PkChatbot.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import {\n computed,\n inject,\n ref,\n toRef,\n useTemplateRef,\n watch,\n watchEffect,\n useSlots,\n } from 'vue'\n import { useElementSize } from '@vueuse/core'\n import { storeToRefs } from 'pinia'\n import { useI18n } from 'vue-i18n'\n import type {\n AgentConfirmationsCapability,\n AgentInterface,\n AgentModel,\n AgentFileUpload,\n AgentGatewayOptions,\n AgentVoiceCapability,\n ChatMessageActions,\n RevisedAnswer,\n UIChatMessage,\n AgentTools,\n HostToolsCapability,\n PageAccessCapability,\n SelectionActionsCapability,\n } from 'models'\n import {\n type RegisteredHostTool,\n useChatbotStore,\n useDialogConfirm,\n useLocalizedString,\n provideShortUrlResolver,\n } from 'composables'\n import PkAvatar from './PkAvatar.vue'\n import PkChatbotViewChat from './PkChatbotViewChat.vue'\n import PkChatbotViewConversations from './PkChatbotViewConversations.vue'\n import PkChatbotViewFiles from './PkChatbotViewFiles.vue'\n import PkChatbotViewProfile from './PkChatbotViewProfile.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n import { ChatbotProfileContextKey } from './chatbotProfileContext'\n import { provideChatImagePolicy } from './chatImagePolicy'\n import { agentThemeStyle, resolveContrastColor } from './utils'\n\n // Captured in script setup to avoid TS7022 circular inference in template\n const slots = useSlots()\n\n const { t: $t } = useI18n({\n useScope: 'global',\n })\n\n const props = defineProps<{\n baseUrl: string\n basePath?: string\n agentId: string\n agentType?: 'reasoning' | 'chat'\n userId?: string\n name?: string\n model?: string\n agentModel?: AgentModel\n agentTools?: AgentTools\n agentInterface?: AgentInterface\n actions?: ChatMessageActions[]\n revisedAnswers?: RevisedAnswer[]\n headers?: Record<string, string>\n systemTheme?: 'light' | 'dark'\n agentFileUpload?: AgentFileUpload\n /** Voice configuration from the agent settings: enables the talk button. */\n voice?: AgentVoiceCapability\n fallbackModels?: string[]\n gatewayOptions?: Partial<AgentGatewayOptions>\n externalContext?: Record<string, unknown>\n /** Host tools as the agent allows them (`capabilities.hostTools` of the public agent). */\n hostTools?: HostToolsCapability\n /** Tools the embedding app registered, with the function that runs each (spec `host-tools.md`). */\n hostToolRegistry?: RegisteredHostTool[]\n /** Page access as the agent allows it (`capabilities.pageAccess`, spec `page-tools.md`). */\n pageAccess?: PageAccessCapability\n /** Whether the user may choose automatic confirmations (`capabilities.confirmations`, spec `auto-confirmations.md`). */\n confirmations?: AgentConfirmationsCapability\n /** The selection bar's groups (`capabilities.selectionActions`, spec `selection-actions.md`). */\n selectionActions?: SelectionActionsCapability\n /** The widget's page tools: only the web component provides them. */\n pageToolRegistry?: RegisteredHostTool[]\n /** The tools of the forms annotated on the page now, read on every request. */\n pageForms?: () => RegisteredHostTool[]\n /** Layout modifier: `widget` (default) keeps the contained layout with header, `fullscreen` removes header/background for full-page usage (the page provides the chrome), `panel` keeps the header but slims it down for a docked side panel (the host provides background and border) */\n modifier?: 'widget' | 'fullscreen' | 'panel'\n /** Display name of the current user, used for the `{name}` placeholder in the fullscreen greeting */\n userName?: string\n /** Show the \"Files in this chat\" menu for hosts that don't provide the\n * profile context but whose user is authenticated (e.g. the backoffice\n * playground). The widget host relies on `canManageProfile` instead. */\n userFilesEnabled?: boolean\n /** The host can close the chat: the header menu offers \"Close\", which emits `close`. */\n closable?: boolean\n }>()\n const emit = defineEmits<{\n 'message-update': [message: UIChatMessage]\n 'show-info': [message: UIChatMessage]\n revise: [message: UIChatMessage]\n error: [error: { type: string; title: string; status: number }]\n /** That conversation is loaded: a message sent now lands in it. */\n loaded: [chatId: string]\n /** The user chose \"Close\" in the header menu. */\n close: []\n /** An action of a selection bar was sent: the telemetry's properties (spec `selection-actions.md`). */\n 'selection-action': [properties: Record<string, string>]\n }>()\n\n const chatId = defineModel<string | undefined>('chatId', {\n type: String,\n default: undefined,\n })\n\n const store = useChatbotStore(props.agentId)\n\n // Resolve backend short-urls (`/api/r/<hash>`) back to their real target\n // for display in tool components. Batched + cached across the chat tree.\n provideShortUrlResolver((hashes) =>\n store.apiClient.resolveShortUrls(hashes),\n )\n\n const {\n messages,\n conversations,\n localChatId,\n activeView,\n chatError,\n isDark,\n pageAccessAvailable,\n pageAccessOff,\n confirmationsAvailable,\n confirmationMode,\n } = storeToRefs(store)\n\n // Ref to store.agentId for watchers (avoids duplicate-key with agentId prop)\n const storeAgentId = toRef(store, 'agentId')\n\n const {\n startNewChat,\n stopGeneration,\n regenerate,\n navigate,\n sendMessage,\n setPageAccessOff,\n setConfirmationMode,\n } = store\n\n // When the agent holds external images, the answers and the tool cards\n // load them by themselves only from the backend this chat talks to and\n // from the hosts the agent lists.\n provideChatImagePolicy(\n () => props.agentInterface,\n () => props.baseUrl,\n )\n\n // Optional profile-management context provided by the host widget.\n // Present only for authenticated, non-anonymous sessions.\n const profile = inject(ChatbotProfileContextKey, undefined)\n const canManageProfile = computed(\n () => profile?.canManageProfile.value ?? false,\n )\n // Anonymous users get a \"Sign in\" entry instead of the profile one,\n // provided the host filled the `view-auth` slot and the agent has at\n // least one auth method enabled.\n const canSignIn = computed(\n () =>\n !canManageProfile.value &&\n (profile?.canSignIn?.value ?? false) &&\n slots['view-auth'] !== undefined,\n )\n\n // GDPR B.3: bulk \"delete my conversations\", available to anonymous\n // sessions too (the host wires the endpoint through the profile context).\n // Hidden when the host application owns the session (external token or\n // host-session mode): the endpoint erases ALL conversations of the\n // session's user platform-wide, an account-scoped action that belongs to\n // the host, not to an embedded widget. Same gating as sign-out and\n // manage-profile in PkChatbotViewProfile. It is the last, danger entry of\n // the header menu while the conversations are on screen, so the list\n // holds only the conversations (DESIGN.md: an irreversible action in a\n // menu is a danger VvDropdownAction).\n const { openDialogConfirm } = useDialogConfirm()\n const canEraseConversations = computed(\n () =>\n !!profile?.eraseConversations &&\n !(profile.isExternalAuth?.value ?? false),\n )\n const showEraseConversations = computed(\n () =>\n canEraseConversations.value &&\n activeView.value === 'conversations' &&\n conversations.value.length > 0,\n )\n const isErasingConversations = ref(false)\n const handleEraseAll = async () => {\n const eraseConversations = profile?.eraseConversations\n if (!eraseConversations || !canEraseConversations.value) {\n return\n }\n const proceed = await openDialogConfirm({\n title: $t('confirmTitle.deleteMyConversations'),\n questionLabel: $t('message.deleteMyConversationsConfirm'),\n descriptionLabel: $t('message.deleteMyConversationsConsequence'),\n confirmLabel: $t('action.deleteMyConversationsConfirm'),\n danger: true,\n })\n if (!proceed) {\n return\n }\n isErasingConversations.value = true\n try {\n await eraseConversations()\n conversations.value = []\n startNewChat()\n } catch {\n // Same policy as single delete: fail silently and reconcile\n // with the server state\n store.loadConversations(props.agentId)\n } finally {\n isErasingConversations.value = false\n }\n }\n\n // Once the sign-in completes (the session becomes non-anonymous) leave\n // the auth view and return to the conversation.\n watch(canManageProfile, (canManage) => {\n if (canManage && activeView.value === 'auth') {\n navigate('chat')\n }\n })\n\n // Sync props → store reactively\n watchEffect(() => {\n store.baseUrl = props.baseUrl\n store.basePath = props.basePath\n store.name = props.name\n store.agentType = props.agentType\n store.userId = props.userId\n store.agentInterface = props.agentInterface\n store.agentModel = props.agentModel\n store.agentTools = props.agentTools\n store.headers = props.headers\n store.revisedAnswers = props.revisedAnswers\n store.model = props.model\n store.actionsInput = props.actions\n store.agentFileUpload = props.agentFileUpload\n store.agentVoice = props.voice\n store.fallbackModels = props.fallbackModels\n store.gatewayOptions = props.gatewayOptions\n store.externalContext = props.externalContext\n store.agentHostTools = props.hostTools\n store.hostToolRegistry = props.hostToolRegistry\n store.agentPageAccess = props.pageAccess\n store.agentConfirmations = props.confirmations\n store.agentSelectionActions = props.selectionActions\n store.pageToolRegistry = props.pageToolRegistry\n store.pageFormsProvider = props.pageForms\n store.systemTheme = props.systemTheme\n store.hideWelcomeMessage = props.modifier === 'fullscreen'\n })\n\n // Sync chatId v-model ↔ store (bidirectional)\n // Parent → store: if the parent provides an external chatId, push it into\n // the store so the Chat instance picks it up.\n watch(\n () => chatId.value,\n (id) => {\n if (id && id !== store.localChatId) {\n store.localChatId = id\n }\n },\n { immediate: true },\n )\n // Store → parent: keep the v-model in sync whenever the store changes\n // the chatId internally (e.g. startNewChat).\n watch(localChatId, (id) => {\n chatId.value = id\n })\n\n // Emit structured errors from chat to the parent component\n watch(chatError, (error) => {\n if (!error) {\n return\n }\n try {\n const parsedError = JSON.parse(error.message) as {\n type: string\n title: string\n status: number\n }\n emit('error', parsedError)\n } catch {\n // ignore non-JSON errors\n }\n })\n\n // ui\n const isFullscreen = computed(() => props.modifier === 'fullscreen')\n const isPanel = computed(() => props.modifier === 'panel')\n\n /**\n * How much room the chat has, measured on the chat and not on the window.\n *\n * The same chat renders in a phone page, in a 408px widget, in a docked\n * panel and in a preview frame that the side panels squeeze to phone width\n * on a desktop screen, so the viewport says nothing about the space the\n * layout actually has. A CSS container query would read the same number\n * with no JavaScript, but `container-type` makes the element a containing\n * block for `position: fixed` descendants on every engine except Chrome\n * 129 and later, which displaces every dropdown in the chat: see\n * docs/agents/gotchas.md, \"The chat measures its own width, and not with a\n * container query\".\n *\n * The thresholds carry the modifiers, so the CSS stays declarative:\n * `--phone` has as much room as a phone page, `--tight` is too tight for\n * the agent chip beside the field, `--wide` has room for the outline rail\n * beside the reading column. Before the first measurement the width is 0\n * and no modifier applies, which is the roomy layout the base CSS writes.\n */\n const chatbotEl = useTemplateRef<HTMLDivElement>('chatbotEl')\n const { width: chatbotWidth } = useElementSize(chatbotEl)\n const isPhoneWidth = computed(\n () => chatbotWidth.value > 0 && chatbotWidth.value < 576,\n )\n const isTightWidth = computed(\n () => chatbotWidth.value > 0 && chatbotWidth.value < 640,\n )\n const isWideWidth = computed(() => chatbotWidth.value >= 848)\n const isReasoningAgent = computed(() => props.agentType === 'reasoning')\n // The notice says how a reasoning agent reads a message: it stands before\n // the first one, then leaves the room to the answers (pinned, it took a\n // third of a phone screen in the reasoning playground)\n const showReasoningNotice = computed(\n () =>\n isReasoningAgent.value &&\n !messages.value.some((message) => message.role === 'user'),\n )\n // A docked panel keeps a neutral header whatever the agent asks: it sits\n // beside the site or the app as part of the frame, and a colored band\n // made it read as a second site next to the first one.\n const useColorsForAgentHeader = computed(\n () => !isPanel.value && props.agentInterface?.useColorsForAgentHeader,\n )\n // Panel mode promotes the everyday actions (new chat, history) from the\n // dropdown to direct header buttons: the dropdown then only remains for\n // the secondary entries (files, profile, sign-in) and disappears when\n // none of them applies.\n const showHeaderMenu = computed(\n () =>\n !isPanel.value ||\n canManageProfile.value ||\n canSignIn.value ||\n pageAccessAvailable.value ||\n confirmationsAvailable.value ||\n props.closable ||\n showEraseConversations.value ||\n (!!props.userFilesEnabled && !!localChatId.value),\n )\n const themeClass = computed(() => [\n 'theme',\n `theme--${isDark.value ? 'dark' : 'light'}`,\n ])\n const mainColor = computed(() => props.agentInterface?.mainColor)\n const contrastColor = computed(() =>\n resolveContrastColor(props.agentInterface?.textColor, mainColor.value),\n )\n const themeStyle = computed(() =>\n agentThemeStyle(mainColor.value, contrastColor.value),\n )\n const footerMessage = useLocalizedString(\n () => props.agentInterface?.footerMessage,\n )\n const title = computed(() => {\n if (activeView.value === 'conversations') {\n return $t('label.conversations')\n }\n if (activeView.value === 'profile') {\n return $t('label.profile')\n }\n if (activeView.value === 'auth') {\n return $t('label.authentication')\n }\n if (activeView.value === 'files') {\n return $t('userFiles.chatFilesTitle')\n }\n return props.name\n })\n\n // state\n const activeMessage = computed(() => {\n return messages.value?.[messages.value.length - 1]\n })\n\n // expose\n defineExpose({\n startNewChat,\n regenerate,\n stopGeneration,\n sendMessage,\n sendSelection: store.sendSelection,\n })\n\n // load chat, conversations and feedbacks on agent or chat change\n watch(\n [storeAgentId, localChatId],\n async ([newAgentId, newChatId]) => {\n await store.initialize(newAgentId, newChatId)\n emit('loaded', newChatId)\n },\n {\n immediate: true,\n },\n )\n // load conversations when navigating to conversations view\n watch(activeView, (newView) => {\n if (newView === 'conversations') {\n store.loadConversations(storeAgentId.value)\n } else if (newView === 'files') {\n store.loadChatFiles()\n }\n })\n // emit message updates for up-to-date context in parent components\n watch(\n activeMessage,\n (message) => {\n if (message) {\n emit('message-update', message)\n }\n },\n {\n deep: true,\n immediate: true,\n },\n )\n</script>\n\n<template>\n <div\n ref=\"chatbotEl\"\n class=\"pk-chatbot\"\n :class=\"[\n themeClass,\n {\n 'pk-chatbot--fullscreen': isFullscreen,\n 'pk-chatbot--panel': isPanel,\n 'pk-chatbot--phone': isPhoneWidth,\n 'pk-chatbot--tight': isTightWidth,\n 'pk-chatbot--wide': isWideWidth,\n },\n ]\"\n :style=\"themeStyle\">\n <!-- #region title -->\n <div\n v-if=\"!isFullscreen\"\n class=\"pk-chatbot__header\"\n :style=\"\n useColorsForAgentHeader\n ? {\n backgroundColor: mainColor,\n }\n : undefined\n \">\n <div class=\"pk-chatbot__header-start\">\n <template v-if=\"activeView !== 'chat'\">\n <VvButton\n v-bind=\"{\n modifiers: useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet',\n icon: 'ri:arrow-left-s-line',\n title: $t('action.goBack'),\n }\"\n @click=\"navigate('chat')\" />\n <VvIcon\n :name=\"\n activeView === 'conversations'\n ? 'ri:history-line'\n : activeView === 'files'\n ? 'ri:attachment-2'\n : 'ri:user-line'\n \"\n class=\"pk-chatbot__nav-icon\"\n :style=\"\n useColorsForAgentHeader\n ? {\n color: contrastColor,\n }\n : undefined\n \" />\n </template>\n <!-- Panel mode: no avatar, the docked panel identifies the\n agent with the title alone. The title beside it names\n the agent, so the tile is hidden from screen readers:\n VvAvatar would announce it as \"avatar\". -->\n <PkAvatar\n v-else-if=\"!isPanel\"\n class=\"pk-chatbot__avatar\"\n aria-hidden=\"true\"\n :name\n :img-src=\"agentInterface?.logo\" />\n <strong\n class=\"pk-chatbot__title\"\n :title=\"title\"\n :style=\"\n useColorsForAgentHeader\n ? {\n color: contrastColor,\n }\n : undefined\n \">\n {{ title }}\n </strong>\n </div>\n <VvButtonGroup class=\"pk-chatbot__header-end\" modifiers=\"compact\">\n <slot\n name=\"header-actions\"\n v-bind=\"{\n mainColor,\n useColorsForAgentHeader,\n contrastColor,\n startNewChat,\n stopGeneration,\n }\" />\n <template v-if=\"isPanel\">\n <VvButton\n :modifiers=\"\n useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet'\n \"\n icon=\"ri:edit-box-line\"\n :title=\"$t('action.startNewChat')\"\n @click=\"startNewChat()\" />\n <VvButton\n v-if=\"!isReasoningAgent\"\n :modifiers=\"\n useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet'\n \"\n icon=\"ri:history-line\"\n :title=\"$t('action.viewRecentChats')\"\n @click=\"navigate('conversations')\" />\n </template>\n <VvDropdown\n v-if=\"showHeaderMenu\"\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n v-bind=\"{\n modifiers: useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet',\n icon: 'ri:more-2-fill',\n title: $t('action.moreActions'),\n }\" />\n <template #items>\n <VvDropdownAction\n v-if=\"!isPanel\"\n @click=\"startNewChat()\">\n <VvIcon name=\"ri:edit-box-line\" />\n {{ $t('action.startNewChat') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"\n !isReasoningAgent &&\n !isPanel &&\n activeView !== 'conversations'\n \"\n @click=\"navigate('conversations')\">\n <VvIcon name=\"ri:history-line\" />\n {{ $t('action.viewRecentChats') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"\n (canManageProfile || userFilesEnabled) &&\n localChatId\n \"\n @click=\"navigate('files')\">\n <VvIcon name=\"ri:attachment-2\" />\n {{ $t('userFiles.chatFilesTitle') }}\n </VvDropdownAction>\n <!-- The user's own switch for the page tools, for\n this tab (spec page-tools.md) -->\n <VvDropdownAction\n v-if=\"pageAccessAvailable\"\n @click=\"setPageAccessOff(!pageAccessOff)\">\n <VvIcon\n :name=\"\n pageAccessOff\n ? 'ri:pages-line'\n : 'ri:forbid-line'\n \" />\n {{\n pageAccessOff\n ? $t('action.enablePageAccess')\n : $t('action.disablePageAccess')\n }}\n </VvDropdownAction>\n <!-- The user's choice of confirmations, where the\n agent allows it (spec auto-confirmations.md) -->\n <VvDropdownAction\n v-if=\"confirmationsAvailable\"\n @click=\"\n setConfirmationMode(\n confirmationMode === 'automatic'\n ? 'manual'\n : 'automatic',\n )\n \">\n <VvIcon\n :name=\"\n confirmationMode === 'automatic'\n ? 'ri:hand'\n : 'ri:flashlight-line'\n \" />\n {{\n confirmationMode === 'automatic'\n ? $t('action.manualConfirmations')\n : $t('action.automaticConfirmations')\n }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"canManageProfile\"\n @click=\"navigate('profile')\">\n <VvIcon name=\"ri:user-line\" />\n {{ $t('label.profile') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-else-if=\"canSignIn\"\n @click=\"navigate('auth')\">\n <VvIcon name=\"ri:account-circle-line\" />\n {{ $t('action.signIn') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"closable\"\n @click=\"emit('close')\">\n <VvIcon name=\"ri:close-line\" />\n {{ $t('action.close') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"showEraseConversations\"\n modifiers=\"danger\"\n :disabled=\"isErasingConversations\"\n @click=\"handleEraseAll()\">\n <VvIcon name=\"ri:delete-bin-line\" />\n {{ $t('action.deleteMyConversations') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n <slot\n name=\"actions\"\n v-bind=\"{\n mainColor,\n useColorsForAgentHeader,\n contrastColor,\n startNewChat,\n stopGeneration,\n }\" />\n </VvButtonGroup>\n </div>\n <!-- #endregion -->\n\n <div v-if=\"showReasoningNotice\">\n <div class=\"pk-chatbot__warning-body\">\n <VvAlert modifiers=\"callout\">\n <div class=\"pk-chatbot__warning-header\">\n <VvIcon\n name=\"ri:alert-line\"\n class=\"pk-chatbot__warning-icon\" />\n <strong class=\"pk-chatbot__warning-title\">\n {{ $t('message.warning') }}\n </strong>\n </div>\n <p class=\"pk-chatbot__warning-text\">\n {{ $t('message.reasoningAgent') }}\n </p>\n </VvAlert>\n </div>\n </div>\n\n <!-- #region views -->\n <PkChatbotViewChat\n v-if=\"activeView === 'chat'\"\n :agent-id\n :modifier\n :user-name\n @show-info=\"emit('show-info', $event)\"\n @revise=\"emit('revise', $event)\"\n @selection-action=\"emit('selection-action', $event)\">\n <template\n v-for=\"slotName in Object.keys(slots)\"\n #[slotName]=\"slotData\"\n ><slot :name=\"slotName\" v-bind=\"slotData\"\n /></template>\n </PkChatbotViewChat>\n <PkChatbotViewConversations\n v-else-if=\"activeView === 'conversations'\"\n :agent-id>\n <template\n v-for=\"slotName in Object.keys(slots)\"\n #[slotName]=\"slotData\"\n ><slot :name=\"slotName\" v-bind=\"slotData\"\n /></template>\n </PkChatbotViewConversations>\n <PkChatbotViewFiles v-else-if=\"activeView === 'files'\" :agent-id />\n <div\n v-else-if=\"activeView === 'auth'\"\n class=\"pk-chatbot__view-auth flex-1 min-h-0 overflow-y-auto\">\n <!-- Sign-in form provided by the host widget (owns the auth client) -->\n <slot name=\"view-auth\" />\n </div>\n <PkChatbotViewProfile v-else :agent-id>\n <template\n v-for=\"slotName in Object.keys(slots)\"\n #[slotName]=\"slotData\"\n ><slot :name=\"slotName\" v-bind=\"slotData\"\n /></template>\n </PkChatbotViewProfile>\n <!-- #endregion -->\n\n <!-- #region footer -->\n <div v-if=\"footerMessage\" class=\"pk-chatbot__footer\">\n <PkStreamingMarkdown :markdown=\"footerMessage\" class=\"wysiwyg\" />\n </div>\n <!-- #endregion -->\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-chatbot {\n display: flex;\n flex-direction: column;\n position: relative;\n height: 100%;\n background-color: var(--color-surface);\n\n &__header {\n position: sticky;\n top: 0;\n z-index: 1;\n display: flex;\n justify-content: space-between;\n gap: var(--spacing-14);\n background-color: var(--color-surface-1);\n padding: var(--spacing-14);\n border-bottom: 1px solid var(--color-surface-3);\n }\n\n &__header-start {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n min-width: 0;\n }\n\n &__nav-icon {\n font-size: var(--text-18);\n }\n\n &__avatar {\n width: var(--spacing-24);\n height: var(--spacing-24);\n }\n\n &__title {\n font-size: var(--text-16);\n font-weight: var(--font-semibold);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &__header-end {\n flex-shrink: 0;\n }\n\n &__warning-body {\n padding: var(--spacing-md);\n border-bottom: 1px solid var(--color-surface-3);\n }\n\n &__warning-header {\n display: flex;\n align-items: center;\n gap: var(--spacing-4);\n margin-bottom: var(--spacing-4);\n }\n\n &__warning-icon {\n width: var(--spacing-16);\n height: var(--spacing-16);\n }\n\n &__warning-title {\n font-weight: 600;\n font-size: var(--text-14);\n }\n\n &__warning-text {\n font-size: var(--text-12);\n color: var(--color-word-3);\n }\n\n &__footer {\n padding: var(--spacing-md);\n border-top: 1px solid var(--color-surface-3);\n text-align: center;\n font-size: var(--text-12);\n color: var(--color-word-2);\n }\n\n // Modifier: fullscreen — layout full-page (Gemini-style): nessun\n // header interno, sfondo trasparente, input pill centrato.\n // Il chrome (sidebar, navigazione) è gestito dalla pagina ospite.\n &--fullscreen {\n // The dock, 60px. Declared rather than taken from the agent chip,\n // which the tight layout hides: the pill fell to 54px there and\n // the call bar that takes its place stayed at 60. There is no 60\n // in the spacing scale and a raw `60px` would stop following the\n // root font size, which the labels inside do follow.\n --pk-chat-fullscreen-dock-height: calc(\n var(--spacing-56) + var(--spacing-4)\n );\n\n // The pill, the notice that tucks into its top corners and the\n // call bar all round their ends on half of it.\n --pk-chat-dock-radius: calc(\n var(--pk-chat-fullscreen-dock-height) / 2\n );\n\n background-color: transparent;\n\n .pk-chatbot__footer {\n border-top: none;\n padding: 0 var(--spacing-md) var(--spacing-sm) var(--spacing-md);\n }\n\n // Reading column aligned with the input (Gemini-style). The\n // constraint lives on the inner wrapper so the scroll container\n // spans the page and the scrollbar sits at its edge.\n .pk-chatbot-messages {\n // Symmetric gutters: a visible scrollbar would otherwise\n // shrink the content box on one side only, shifting the\n // column off the input axis\n scrollbar-gutter: stable both-edges;\n\n // Dissolve the content at both edges (works on any page\n // background, dots included — a surface-colored fade band\n // would cut through the pattern instead)\n mask-image: linear-gradient(\n to bottom,\n transparent 0,\n #000 var(--spacing-40),\n #000 calc(100% - var(--spacing-40)),\n transparent 100%\n );\n\n // Resting clearance so the first/last lines sit inside the\n // fully opaque zone\n padding-block: var(--spacing-48);\n }\n\n .pk-chatbot-messages__wrapper {\n width: 100%;\n max-width: 768px;\n margin-inline: auto;\n }\n\n // Outline rail: wide chats only, measured on the chat and not on\n // the viewport, so a preview frame squeezed by side panels loses\n // it like a phone does. The rail sits at the edge of the scroll\n // area beside the reading column: below the `--wide` threshold\n // (768px column plus a 40px rail on each side) it would cover the\n // messages instead.\n .pk-chatbot-messages__outline {\n display: none;\n }\n\n &.pk-chatbot--wide .pk-chatbot-messages__outline {\n display: block;\n }\n\n .pk-chatbot-file-preview {\n background-color: var(--color-surface);\n }\n\n .pk-chatbot-input__notice {\n background-color: var(--color-surface);\n border-inline: 1px solid var(--color-surface-3);\n border-top: 1px solid var(--color-surface-2);\n padding: var(--spacing-10) var(--spacing-16);\n\n // As deep as the pill's corners, or the page shows through\n // where their curve leaves the side\n &::after {\n background-color: var(--color-surface);\n border-inline: 1px solid var(--color-surface-2);\n bottom: calc(-1 * var(--pk-chat-dock-radius));\n height: var(--pk-chat-dock-radius);\n left: -1px;\n right: -1px;\n }\n }\n\n .pk-chatbot-input {\n width: calc(100% - var(--spacing-sm) * 2);\n max-width: 768px;\n margin-inline: auto;\n\n &__form {\n // True semicircles at rest, concentric with the send\n // button, whose center sits 30px in. Not `rounded-full`:\n // once Shift+Enter grows the field the ends would swell\n // with it and cut into the first and last line.\n border-radius: var(--pk-chat-dock-radius);\n min-height: var(--pk-chat-fullscreen-dock-height);\n padding: var(--spacing-12) var(--spacing-16);\n background-color: var(--color-surface-1);\n border-color: var(--color-surface-2);\n box-shadow: none;\n transition:\n border-color var(--duration-200) var(--ease-in-out),\n box-shadow var(--duration-200) var(--ease-in-out);\n\n &:has(:focus-within) {\n border-color: var(--color-surface-4);\n box-shadow: var(--shadow-sm);\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n\n &__textarea {\n background-color: transparent;\n }\n }\n\n // A live call takes the place of the input, so it takes its shape,\n // its column and its height: full-bleed here would break the\n // reading axis, and a different height would make the dock jump\n // the moment the call starts.\n .pk-voice-session {\n --pk-chat-dock-height: var(--pk-chat-fullscreen-dock-height);\n --pk-voice-orb-size: var(--spacing-40);\n --pk-voice-orb-bars-height: var(--spacing-20);\n --pk-voice-session-surface: var(--color-surface-1);\n\n width: calc(100% - var(--spacing-sm) * 2);\n max-width: 768px;\n margin-inline: auto;\n padding-inline: var(--spacing-16);\n border-color: var(--color-surface-2);\n border-radius: var(--pk-chat-dock-radius);\n box-shadow: none;\n\n &__timer {\n font-size: var(--text-14);\n }\n }\n\n // A colleague's conversation in a shared project: the line that\n // takes the input's place takes its shape, column and height too,\n // as the call does, so the dock does not jump between chats.\n .pk-chatbot-view-chat__read-only {\n width: calc(100% - var(--spacing-sm) * 2);\n max-width: 768px;\n min-height: var(--pk-chat-fullscreen-dock-height);\n margin-inline: auto;\n padding-inline: var(--spacing-16) var(--spacing-12);\n border-color: var(--color-surface-2);\n border-radius: var(--pk-chat-dock-radius);\n background-color: var(--color-surface-1);\n }\n\n // The chat's tasks above the pill, in its column and its edge\n .pk-chatbot-wakeup-bar {\n --pk-chatbot-wakeup-bar-border: var(--color-surface-2);\n\n width: calc(100% - var(--spacing-sm) * 2);\n max-width: 768px;\n margin-inline: auto;\n }\n }\n\n // Modifier: panel — compact chrome for a docked side panel: the host\n // container owns background and border, the header slims down and\n // drops its own surface so the chat blends into the panel.\n &--panel {\n background-color: transparent;\n\n .pk-chatbot__header {\n background-color: transparent;\n\n // Fixed height so the panel header lines up with the host's\n // own chrome. Custom properties inherit through the shadow\n // root: an embedding host can override it to match its\n // header (the default matches the platform header, 50px).\n height: var(--pk-chatbot-panel-header-height, 50px);\n align-items: center;\n padding-block: 0;\n padding-inline: var(--spacing-10);\n border-bottom: 1px solid var(--color-surface-3);\n }\n\n .pk-chatbot__title {\n font-size: var(--text-14);\n }\n\n .pk-chatbot__footer {\n border-top: none;\n padding: var(--spacing-6) var(--spacing-md);\n }\n }\n\n // A chat given a whole page without the fullscreen layout (the page\n // an iframe embeds, a widget its host lets fill the screen) keeps the\n // reading column of the fullscreen one: at 1440px an answer ran\n // 1408px wide, some two hundred characters a line. Measured on the\n // chat, like `--wide` itself, so a narrow frame is left alone.\n &--wide:not(.pk-chatbot--fullscreen) {\n .pk-chatbot-messages__wrapper,\n .pk-chatbot-input,\n .pk-chatbot-wakeup-bar {\n width: 100%;\n max-width: 768px;\n margin-inline: auto;\n }\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+CI,IAAMsD,IAAQC,GAAS,GAEjB,EAAE,GAAGC,MAAOC,GAAQ,EACtB,UAAU,SACd,CAAC,GAEKC,IAAQC,GA8CRC,IAAOP,GAaPQ,IAAS7D,GAA+B2D,GAAC,QAG9C,GAEKI,IAAQtC,EAAgBiC,EAAM,OAAO;EAI3C,GAAyB,MACrBK,EAAM,UAAU,iBAAiBC,CAAM,CAC3C;EAEA,IAAM,EACF,aACA,kBACA,gBACA,eACA,eACA,YACA,yBACA,kBACA,4BACA,wBACAC,GAAYF,CAAK,GAGfG,KAAeC,GAAMJ,GAAO,SAAS,GAErC,EACF,iBACA,mBACA,gB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