@8wave/ai-elements 0.127.0-beta.1 → 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
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { onScopeDispose as e, shallowRef as t } from "vue";
|
|
2
|
+
// ../../packages/composable/src/useSettledSelection.ts
|
|
3
|
+
var n = "(hover: hover) and (pointer: fine)", r = "(hover: none) and (pointer: coarse)", i = 400;
|
|
4
|
+
function a() {
|
|
5
|
+
return typeof matchMedia == "function" && matchMedia(r).matches;
|
|
6
|
+
}
|
|
7
|
+
function o(e) {
|
|
8
|
+
let t = document.getSelection();
|
|
9
|
+
if (!t || t.rangeCount === 0) return;
|
|
10
|
+
if (e.nodeType === Node.DOCUMENT_NODE) return t.getRangeAt(0).cloneRange();
|
|
11
|
+
let n = e;
|
|
12
|
+
if (t.getComposedRanges) {
|
|
13
|
+
let e;
|
|
14
|
+
try {
|
|
15
|
+
e = t.getComposedRanges({ shadowRoots: [n] });
|
|
16
|
+
} catch {
|
|
17
|
+
e = t.getComposedRanges(n);
|
|
18
|
+
}
|
|
19
|
+
let [r] = e;
|
|
20
|
+
if (!r) return;
|
|
21
|
+
let i = document.createRange();
|
|
22
|
+
return i.setStart(r.startContainer, r.startOffset), i.setEnd(r.endContainer, r.endOffset), i;
|
|
23
|
+
}
|
|
24
|
+
let r = n.getSelection?.();
|
|
25
|
+
return r && r.rangeCount > 0 ? r.getRangeAt(0).cloneRange() : void 0;
|
|
26
|
+
}
|
|
27
|
+
function s({ root: r, enabled: s = () => !0, delay: c = 150, minChars: l = 2, touch: u = !1 }) {
|
|
28
|
+
let d = t(), f, p = () => {
|
|
29
|
+
clearTimeout(f), d.value = void 0;
|
|
30
|
+
}, m = () => {
|
|
31
|
+
let e = r();
|
|
32
|
+
if (!e || !s()) return;
|
|
33
|
+
let t = o(e);
|
|
34
|
+
if (!t || t.collapsed || t.toString().trim().length < l) return;
|
|
35
|
+
let n = t.getBoundingClientRect();
|
|
36
|
+
return {
|
|
37
|
+
range: t,
|
|
38
|
+
start: t.getClientRects()[0] ?? n,
|
|
39
|
+
box: n
|
|
40
|
+
};
|
|
41
|
+
}, h = typeof document < "u" && typeof matchMedia == "function" && matchMedia(n).matches, g = u && typeof document < "u" && a(), _ = g ? Math.max(c, i) : c, v = () => {
|
|
42
|
+
p(), f = setTimeout(() => {
|
|
43
|
+
d.value = m();
|
|
44
|
+
}, _);
|
|
45
|
+
};
|
|
46
|
+
return (h || g) && (document.addEventListener("selectionchange", v), e(() => {
|
|
47
|
+
clearTimeout(f), document.removeEventListener("selectionchange", v);
|
|
48
|
+
})), {
|
|
49
|
+
selection: d,
|
|
50
|
+
clear: p
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export { s as n, a as t };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=useSettledSelection-1bfM1fzx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSettledSelection-1bfM1fzx.js","names":["settled","FINE_POINTER","TOUCH_SCREEN","TOUCH_DELAY","isTouchScreen","rangeIn","selection","root","shadow","ranges","first","range","own","useSettledSelection","shallowRef","timer","clear","read","node","enabled","minChars","box","finePointer","byTouch","touch","wait","delay","onChange","onScopeDispose"],"sources":["../../../../packages/composable/src/useSettledSelection.ts"],"sourcesContent":["import { onScopeDispose, shallowRef, type ShallowRef } from 'vue'\n\n/** A selection that stayed still: its range and where it is on screen. */\nexport interface SettledSelection {\n range: Range\n /** The box of its first line: a bar goes above the start of a selection. */\n start: DOMRect\n /** The box of the whole selection. */\n box: DOMRect\n}\n\nexport interface UseSettledSelectionOptions {\n /** Where the range is read: the document, or the shadow root the selection is in. */\n root: () => Document | ShadowRoot | null | undefined\n /** Held off while false: the page while the user points, under a modal, during a turn. */\n enabled?: () => boolean\n /** How long the selection stays still before it counts, in ms. */\n delay?: number\n /** The shortest text that counts. */\n minChars?: number\n /**\n * Also on a touch screen, where the bar goes below the selection, away\n * from the system's menu: the chat's file viewer (spec\n * `chat-file-selection-edit.md`, F4) and the page's bar of actions (spec\n * `selection-actions.md`, F3).\n */\n touch?: boolean\n}\n\n/** A pointer that hovers: on a touch screen the system has its own menu on a selection. */\nconst FINE_POINTER = '(hover: hover) and (pointer: fine)'\n/** A screen read by touch: no hover, a coarse pointer. */\nconst TOUCH_SCREEN = '(hover: none) and (pointer: coarse)'\n/**\n * How long a touch selection stays still before it counts: the finger rests\n * between two moves of a handle, and the bar would flash below it.\n */\nconst TOUCH_DELAY = 400\n\n/** True on a touch screen, where a selection's bar goes below it. */\nexport function isTouchScreen(): boolean {\n return typeof matchMedia === 'function' && matchMedia(TOUCH_SCREEN).matches\n}\n\ntype ComposedSelection = Selection & {\n getComposedRanges?: (\n ...args: [{ shadowRoots: ShadowRoot[] }] | ShadowRoot[]\n ) => StaticRange[]\n}\n\n/**\n * The first range of the selection, read inside `root`, as a copy: the\n * selection's own range is live, and Chrome collapses it as soon as the\n * focus moves into the bar's field. In a shadow root the document's\n * selection stops at its host: the composed range reads past it (Chrome 137,\n * Safari 17, Firefox 142; Safari took the roots as arguments before the\n * options object), and Chromium's own selection of the root is the fallback.\n * Without either nothing is read, and no bar appears.\n */\nfunction rangeIn(root: Document | ShadowRoot): Range | undefined {\n const selection = document.getSelection() as ComposedSelection | null\n if (!selection || selection.rangeCount === 0) {\n return undefined\n }\n if (root.nodeType === Node.DOCUMENT_NODE) {\n return selection.getRangeAt(0).cloneRange()\n }\n const shadow = root as ShadowRoot\n if (selection.getComposedRanges) {\n let ranges: StaticRange[]\n try {\n ranges = selection.getComposedRanges({ shadowRoots: [shadow] })\n } catch {\n ranges = selection.getComposedRanges(shadow)\n }\n const [first] = ranges\n if (!first) {\n return undefined\n }\n const range = document.createRange()\n range.setStart(first.startContainer, first.startOffset)\n range.setEnd(first.endContainer, first.endOffset)\n return range\n }\n const own = (\n shadow as ShadowRoot & { getSelection?: () => Selection | null }\n ).getSelection?.()\n return own && own.rangeCount > 0\n ? own.getRangeAt(0).cloneRange()\n : undefined\n}\n\n/**\n * The selection once it stays still (spec `selection-actions.md`, \"Cosa è\n * comune\"): what the bar of actions appears on, on the page that embeds the\n * widget and in the chat's file viewer. `selectionchange` fires on the\n * document wherever the selection is, so the document is always listened to\n * and `root` only says where the range is read. Nothing on a touch screen\n * unless `touch`. Undefined while the selection moves, is collapsed or\n * shorter than `minChars`; each reader then checks that the range is its own.\n */\nexport function useSettledSelection({\n root,\n enabled = () => true,\n delay = 150,\n minChars = 2,\n touch = false,\n}: UseSettledSelectionOptions) {\n const selection = shallowRef<SettledSelection | undefined>()\n let timer: ReturnType<typeof setTimeout> | undefined\n\n const clear = () => {\n clearTimeout(timer)\n selection.value = undefined\n }\n\n const read = (): SettledSelection | undefined => {\n const node = root()\n if (!node || !enabled()) {\n return undefined\n }\n const range = rangeIn(node)\n if (\n !range ||\n range.collapsed ||\n range.toString().trim().length < minChars\n ) {\n return undefined\n }\n const box = range.getBoundingClientRect()\n return { range, start: range.getClientRects()[0] ?? box, box }\n }\n\n const finePointer =\n typeof document !== 'undefined' &&\n typeof matchMedia === 'function' &&\n matchMedia(FINE_POINTER).matches\n const byTouch = touch && typeof document !== 'undefined' && isTouchScreen()\n const wait = byTouch ? Math.max(delay, TOUCH_DELAY) : delay\n\n const onChange = () => {\n clear()\n timer = setTimeout(() => {\n selection.value = read()\n }, wait)\n }\n\n if (finePointer || byTouch) {\n document.addEventListener('selectionchange', onChange)\n onScopeDispose(() => {\n clearTimeout(timer)\n document.removeEventListener('selectionchange', onChange)\n })\n }\n\n // Not `readonly()`: its deep proxy around a Range breaks the Range's methods\n const settled: Readonly<ShallowRef<SettledSelection | undefined>> =\n selection\n return { selection: settled, clear }\n}\n"],"mappings":";;AA8BA,IAAMC,IAAe,sCAEfC,IAAe,uCAKfC,IAAc;AAGpB,SAAgBC,IAAyB;CACrC,OAAO,OAAO,cAAe,cAAc,WAAWF,CAAY,CAAC,CAAC;AACxE;AAiBA,SAASG,EAAQ,GAAgD;CAC7D,IAAMC,IAAY,SAAS,aAAa;CACxC,IAAI,CAACA,KAAaA,EAAU,eAAe,GACvC;CAEJ,IAAIC,EAAK,aAAa,KAAK,eACvB,OAAOD,EAAU,WAAW,CAAC,CAAC,CAAC,WAAW;CAE9C,IAAME,IAASD;CACf,IAAID,EAAU,mBAAmB;EAC7B,IAAIG;EACJ,IAAI;GACA,IAASH,EAAU,kBAAkB,EAAE,aAAa,CAACE,CAAM,EAAE,CAAC;EAClE,QAAQ;GACJ,IAASF,EAAU,kBAAkBE,CAAM;EAC/C;EACA,IAAM,CAACE,KAASD;EAChB,IAAI,CAACC,GACD;EAEJ,IAAMC,IAAQ,SAAS,YAAY;EAGnC,OAFAA,EAAM,SAASD,EAAM,gBAAgBA,EAAM,WAAW,GACtDC,EAAM,OAAOD,EAAM,cAAcA,EAAM,SAAS,GACzCC;CACX;CACA,IAAMC,IACFJ,EACF,eAAe;CACjB,OAAOI,KAAOA,EAAI,aAAa,IACzBA,EAAI,WAAW,CAAC,CAAC,CAAC,WAAW,IAC7B,KAAA;AACV;AAWA,SAAgBC,EAAoB,EAChC,SACA,mBAAgB,IAChB,WAAQ,KACR,cAAW,GACX,WAAQ,MACmB;CAC3B,IAAMP,IAAYQ,EAAyC,GACvDC,GAEEC,UAAc;EAEhB,AADA,aAAaD,CAAK,GAClB,EAAU,QAAQ,KAAA;CACtB,GAEME,UAA2C;EAC7C,IAAMC,IAAOX,EAAK;EAClB,IAAI,CAACW,KAAQ,CAACC,EAAQ,GAClB;EAEJ,IAAMR,IAAQN,EAAQa,CAAI;EAC1B,IACI,CAACP,KACDA,EAAM,aACNA,EAAM,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,SAASS,GAEjC;EAEJ,IAAMC,IAAMV,EAAM,sBAAsB;EACxC,OAAO;GAAE;GAAO,OAAOA,EAAM,eAAe,CAAC,CAAC,MAAMU;GAAK;EAAI;CACjE,GAEMC,IACF,OAAO,WAAa,OACpB,OAAO,cAAe,cACtB,WAAWrB,CAAY,CAAC,CAAC,SACvBsB,IAAUC,KAAS,OAAO,WAAa,OAAepB,EAAc,GACpEqB,IAAOF,IAAU,KAAK,IAAIG,GAAOvB,CAAW,IAAIuB,GAEhDC,UAAiB;EAEnB,AADAX,EAAM,GACN,IAAQ,iBAAiB;GACrB,EAAU,QAAQC,EAAK;EAC3B,GAAGQ,CAAI;CACX;CAaA,QAXIH,KAAeC,OACf,SAAS,iBAAiB,mBAAmBI,CAAQ,GACrDC,QAAqB;EAEjB,AADA,aAAab,CAAK,GAClB,SAAS,oBAAoB,mBAAmBY,CAAQ;CAC5D,CAAC,IAME;EAAa3B;EAAS;CAAM;AACvC"}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { B as e, C as t, M as n, O as r, gt as i, n as a } from "./Agent-DKefaJeG.js";
|
|
2
|
+
import { o, t as s } from "./ChatTask-2-ffbJFK.js";
|
|
3
3
|
import "./src-nb8MU1sh.js";
|
|
4
|
-
import { c,
|
|
4
|
+
import { C as c, S as l, _ as u, d, s as f, u as p, x as m } from "./localFolders-ChZp8dLu.js";
|
|
5
5
|
import "vue";
|
|
6
|
-
// ../../packages/
|
|
7
|
-
var
|
|
8
|
-
function
|
|
6
|
+
// ../../packages/components/src/chat/utils.ts
|
|
7
|
+
var h = new Set([...s, o].map((e) => `tool-${e}`));
|
|
8
|
+
function ee(e) {
|
|
9
9
|
let t = [];
|
|
10
10
|
for (let n of e) {
|
|
11
|
-
if (!
|
|
11
|
+
if (!l(n)) {
|
|
12
12
|
t.push(n);
|
|
13
13
|
continue;
|
|
14
14
|
}
|
|
15
15
|
let e = t[t.length - 1];
|
|
16
|
-
e &&
|
|
16
|
+
e && l(e) ? t[t.length - 1] = {
|
|
17
17
|
...e,
|
|
18
18
|
text: e.text + n.text
|
|
19
19
|
} : t.push(n);
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
}
|
|
23
|
-
var
|
|
24
|
-
function
|
|
23
|
+
var g = (t) => c(t) && e(u(t));
|
|
24
|
+
function _(e) {
|
|
25
25
|
let t = /* @__PURE__ */ new Map();
|
|
26
|
-
for (let [n, r] of e.entries())
|
|
27
|
-
return e.filter((e, n) => !(
|
|
26
|
+
for (let [n, r] of e.entries()) g(r) && r.state !== "output-error" && !E(r) && t.set(r.type, n);
|
|
27
|
+
return e.filter((e, n) => !(g(e) && e.state === "output-error" && (t.get(e.type) ?? -1) > n));
|
|
28
28
|
}
|
|
29
|
-
var
|
|
29
|
+
var v = /* @__PURE__ */ new Set([
|
|
30
30
|
"tool-editSpreadsheet",
|
|
31
31
|
"tool-shareDocument",
|
|
32
32
|
"tool-editWordDocument",
|
|
33
33
|
"tool-createSpreadsheet",
|
|
34
34
|
"tool-createWordDocument"
|
|
35
35
|
]);
|
|
36
|
-
function
|
|
37
|
-
let t = e.filter((e) =>
|
|
38
|
-
return t.length > 0 ? [...e.filter((e) => !
|
|
36
|
+
function te(e) {
|
|
37
|
+
let t = e.filter((e) => v.has(e.type));
|
|
38
|
+
return t.length > 0 ? [...e.filter((e) => !v.has(e.type)), ...t] : e;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function y(e, t) {
|
|
41
41
|
let n = e.toolCallId;
|
|
42
|
-
return
|
|
42
|
+
return v.has(e.type) && n ? `file-${n}` : t;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
return
|
|
44
|
+
function b(e) {
|
|
45
|
+
return i(e) ? e : void 0;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
47
|
+
var x = {
|
|
48
48
|
page_snapshot: {
|
|
49
49
|
icon: "ri:pages-line",
|
|
50
50
|
label: "messagePart.pageTool.snapshot"
|
|
@@ -89,21 +89,38 @@ var C = {
|
|
|
89
89
|
icon: "ri:links-line",
|
|
90
90
|
label: "messagePart.pageTool.navigate"
|
|
91
91
|
}
|
|
92
|
-
},
|
|
92
|
+
}, S = Symbol("hostStepTitles"), C = Symbol("hostStepChanges"), w = {
|
|
93
93
|
icon: "ri:survey-line",
|
|
94
94
|
label: "messagePart.pageTool.form"
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
}, ne = {
|
|
96
|
+
folder_list: {
|
|
97
|
+
icon: "ri:folder-open-line",
|
|
98
|
+
label: "localFolders.tool.folder_list"
|
|
99
|
+
},
|
|
100
|
+
folder_find: {
|
|
101
|
+
icon: "ri:file-search-line",
|
|
102
|
+
label: "localFolders.tool.folder_find"
|
|
103
|
+
},
|
|
104
|
+
folder_read: {
|
|
105
|
+
icon: "ri:file-text-line",
|
|
106
|
+
label: "localFolders.tool.folder_read"
|
|
107
|
+
},
|
|
108
|
+
folder_attach: {
|
|
109
|
+
icon: "ri:attachment-2",
|
|
110
|
+
label: "localFolders.tool.folder_attach"
|
|
111
|
+
}
|
|
112
|
+
}, T = (e) => e.toolMetadata?.provider === "page" ? x[e.toolName] ?? (e.toolName.startsWith("form_") ? w : void 0) : e.toolMetadata?.provider === "folder" ? ne[e.toolName] : void 0;
|
|
113
|
+
function re(e) {
|
|
114
|
+
return b(e)?.toolMetadata?.readOnly === !1;
|
|
98
115
|
}
|
|
99
116
|
function E(e) {
|
|
100
117
|
return e && "state" in e ? e.state === "streaming" || e.state === "input-streaming" : !1;
|
|
101
118
|
}
|
|
102
|
-
var
|
|
103
|
-
function
|
|
119
|
+
var ie = 4e3, ae = /^[ \t]*(?:(?:[-*+]|\d{1,9}[.)])[ \t]+|>[ \t]?)*(`{3,}|~{3,})(.*)$/gm;
|
|
120
|
+
function oe(e, t) {
|
|
104
121
|
if (e.length <= t) return e;
|
|
105
122
|
let n = e.length - t, r = n + t / 2, i = (e, t) => e !== -1 && e < r ? e + t : void 0, a = i(e.indexOf("\n\n", n), 2) ?? i(e.indexOf("\n", n), 1) ?? n, o;
|
|
106
|
-
for (let t of e.matchAll(
|
|
123
|
+
for (let t of e.matchAll(ae)) {
|
|
107
124
|
if (t.index >= a) break;
|
|
108
125
|
let [, e, n] = t;
|
|
109
126
|
if (o) e[0] === o[0] && e.length >= o.length && !n.trim() && (o = void 0);
|
|
@@ -114,40 +131,40 @@ function se(e, t) {
|
|
|
114
131
|
}
|
|
115
132
|
return `…\n\n${o ? `${o}\n` : ""}${e.slice(a)}`;
|
|
116
133
|
}
|
|
117
|
-
var
|
|
134
|
+
var se = /* @__PURE__ */ new Set([
|
|
118
135
|
"approval-requested",
|
|
119
136
|
"approval-responded",
|
|
120
137
|
"output-denied"
|
|
121
138
|
]);
|
|
122
|
-
function
|
|
123
|
-
return
|
|
139
|
+
function ce(e) {
|
|
140
|
+
return c(e) ? se.has(e.state) ? !0 : e.approval != null : !1;
|
|
141
|
+
}
|
|
142
|
+
var D = "requestConfirm";
|
|
143
|
+
function O(e) {
|
|
144
|
+
return c(e) && e.type === "tool-requestConfirm";
|
|
124
145
|
}
|
|
125
|
-
var O = "requestConfirm";
|
|
126
146
|
function k(e) {
|
|
127
|
-
return
|
|
147
|
+
return ce(e) || O(e);
|
|
128
148
|
}
|
|
129
149
|
function A(e) {
|
|
130
|
-
|
|
150
|
+
if (c(e)) return e.approval?.id;
|
|
131
151
|
}
|
|
132
152
|
function j(e) {
|
|
133
|
-
if (d(e)) return e.approval?.id;
|
|
134
|
-
}
|
|
135
|
-
function M(e) {
|
|
136
153
|
if (e && "state" in e) return e.state;
|
|
137
154
|
}
|
|
138
|
-
function
|
|
155
|
+
function M(e) {
|
|
139
156
|
return e ? ["streaming"].includes(e) : !1;
|
|
140
157
|
}
|
|
141
|
-
function
|
|
158
|
+
function N(e) {
|
|
142
159
|
let t = e.replace("#", "");
|
|
143
160
|
t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
|
|
144
161
|
let n = parseInt(t.substring(0, 2), 16) / 255, r = parseInt(t.substring(2, 4), 16) / 255, i = parseInt(t.substring(4, 6), 16) / 255, a = (e) => e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
|
|
145
162
|
return .2126 * a(n) + .7152 * a(r) + .0722 * a(i);
|
|
146
163
|
}
|
|
147
|
-
function
|
|
148
|
-
return
|
|
164
|
+
function P(e = "000000") {
|
|
165
|
+
return N(e) > .179 ? "black" : "white";
|
|
149
166
|
}
|
|
150
|
-
function
|
|
167
|
+
function F(e) {
|
|
151
168
|
let t = e?.trim().replace("#", "") ?? "";
|
|
152
169
|
if (/^[0-9a-f]{3}$/i.test(t) && (t = t.split("").map((e) => e + e).join("")), !/^[0-9a-f]{6}$/i.test(t)) return !1;
|
|
153
170
|
let n = [
|
|
@@ -157,8 +174,8 @@ function I(e) {
|
|
|
157
174
|
].map((e) => parseInt(t.substring(e, e + 2), 16));
|
|
158
175
|
return Math.max(...n) - Math.min(...n) < 32;
|
|
159
176
|
}
|
|
160
|
-
var
|
|
161
|
-
function
|
|
177
|
+
var I = (e) => `#${e.map((e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
178
|
+
function L(e, t) {
|
|
162
179
|
e.style.color = CSS.supports("color", "color-mix(in srgb, red 100%, transparent)") ? `color-mix(in srgb, ${t} 100%, transparent)` : t;
|
|
163
180
|
let n = getComputedStyle(e).color;
|
|
164
181
|
e.style.color = "";
|
|
@@ -173,11 +190,11 @@ function R(e, t) {
|
|
|
173
190
|
i[3]
|
|
174
191
|
].map((e) => Math.round(Number(e))) : null;
|
|
175
192
|
}
|
|
176
|
-
function
|
|
193
|
+
function R(e, { mainColor: t, tones: n = "auto", secondColor: r }) {
|
|
177
194
|
let i = document.createElement("span");
|
|
178
195
|
i.hidden = !0, e.append(i);
|
|
179
196
|
try {
|
|
180
|
-
return
|
|
197
|
+
return z(i, {
|
|
181
198
|
mainColor: t,
|
|
182
199
|
tones: n,
|
|
183
200
|
secondColor: r
|
|
@@ -186,24 +203,24 @@ function z(e, { mainColor: t, tones: n = "auto", secondColor: r }) {
|
|
|
186
203
|
i.remove();
|
|
187
204
|
}
|
|
188
205
|
}
|
|
189
|
-
function
|
|
190
|
-
let i =
|
|
206
|
+
function z(e, { mainColor: t, tones: n, secondColor: r }) {
|
|
207
|
+
let i = L(e, t ?? "currentcolor");
|
|
191
208
|
if (!i) return null;
|
|
192
|
-
let a =
|
|
209
|
+
let a = I(i), o = F(a), s = (e, t = 0) => CSS.supports("color", "oklch(from red l c h)") ? `oklch(from ${e} clamp(0.55, l, 0.75) c calc(h + ${t}))` : e, c = L(e, s(o ? "var(--color-accent)" : a)), l = L(e, r ? s(r) : o ? s("var(--color-info)") : s(a, 40));
|
|
193
210
|
return !c || !l ? null : {
|
|
194
211
|
first: c,
|
|
195
212
|
second: l,
|
|
196
213
|
duo: n === "two" || n === "auto" && o
|
|
197
214
|
};
|
|
198
215
|
}
|
|
199
|
-
function
|
|
200
|
-
return e === "white" || e === "black" ? e :
|
|
216
|
+
function B(e, t) {
|
|
217
|
+
return e === "white" || e === "black" ? e : P(t);
|
|
201
218
|
}
|
|
202
|
-
function
|
|
203
|
-
let n = t ?
|
|
219
|
+
function V(e, t) {
|
|
220
|
+
let n = t ? N(t) : NaN;
|
|
204
221
|
if (!Number.isNaN(n)) return e === "white" ? 1.05 / (n + .05) : (n + .05) / .05;
|
|
205
222
|
}
|
|
206
|
-
function
|
|
223
|
+
function H(e, t) {
|
|
207
224
|
if (e) return {
|
|
208
225
|
"--chatbot-main-color": e,
|
|
209
226
|
"--chatbot-contrast-color": t,
|
|
@@ -212,10 +229,10 @@ function U(e, t) {
|
|
|
212
229
|
"--input-focus-color": "var(--color-brand-graphic)"
|
|
213
230
|
};
|
|
214
231
|
}
|
|
215
|
-
function
|
|
232
|
+
function U(e, t) {
|
|
216
233
|
if (!(t === void 0 || t < 50)) return e(t / 1e3, "seconds");
|
|
217
234
|
}
|
|
218
|
-
function
|
|
235
|
+
function W(e) {
|
|
219
236
|
if (e !== void 0) {
|
|
220
237
|
if (typeof e == "string") return e.trim() || void 0;
|
|
221
238
|
try {
|
|
@@ -226,10 +243,10 @@ function G(e) {
|
|
|
226
243
|
}
|
|
227
244
|
}
|
|
228
245
|
}
|
|
229
|
-
function
|
|
230
|
-
return
|
|
246
|
+
function G(e) {
|
|
247
|
+
return W(e) !== void 0;
|
|
231
248
|
}
|
|
232
|
-
function
|
|
249
|
+
function le(e, t) {
|
|
233
250
|
let n = e?.input;
|
|
234
251
|
if (typeof t == "string") {
|
|
235
252
|
let e = n?.question ?? n?.steps?.[0]?.question;
|
|
@@ -241,14 +258,14 @@ function ue(e, t) {
|
|
|
241
258
|
return i ? `${i} ${n}` : n;
|
|
242
259
|
}).join(". ");
|
|
243
260
|
}
|
|
244
|
-
function
|
|
261
|
+
function ue(e) {
|
|
245
262
|
return e?.options ? e.options.map((e) => ({
|
|
246
263
|
label: e.label,
|
|
247
264
|
value: e.label,
|
|
248
265
|
description: e.description
|
|
249
266
|
})) : [];
|
|
250
267
|
}
|
|
251
|
-
function
|
|
268
|
+
function de(e, t) {
|
|
252
269
|
let n = {};
|
|
253
270
|
if (t == null) return n;
|
|
254
271
|
if (typeof t == "string") return e.length === 1 && (n[0] = t), n;
|
|
@@ -264,7 +281,7 @@ function fe(e, t) {
|
|
|
264
281
|
for (let [e, n] of Object.entries(t)) n !== void 0 && r(e, n);
|
|
265
282
|
return n;
|
|
266
283
|
}
|
|
267
|
-
var K =
|
|
284
|
+
var K = n.map((e) => `tool-${e}`), fe = /* @__PURE__ */ new Set([
|
|
268
285
|
"tool-searchInKnowledgeBase",
|
|
269
286
|
"tool-retrieveRevisedAnswers",
|
|
270
287
|
"tool-expandChunkContext",
|
|
@@ -275,8 +292,8 @@ var K = i.map((e) => `tool-${e}`), pe = /* @__PURE__ */ new Set([
|
|
|
275
292
|
"tool-saveUserMemory",
|
|
276
293
|
...K
|
|
277
294
|
]);
|
|
278
|
-
function
|
|
279
|
-
return
|
|
295
|
+
function pe(e) {
|
|
296
|
+
return c(e) && fe.has(e.type);
|
|
280
297
|
}
|
|
281
298
|
var q = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, J = (e, ...t) => {
|
|
282
299
|
for (let n of t) {
|
|
@@ -284,8 +301,8 @@ var q = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, J =
|
|
|
284
301
|
if (typeof t == "string" && t.trim()) return t;
|
|
285
302
|
}
|
|
286
303
|
};
|
|
287
|
-
function
|
|
288
|
-
if (!
|
|
304
|
+
function me(e) {
|
|
305
|
+
if (!c(e)) return;
|
|
289
306
|
let t = q("input" in e ? e.input : void 0), n = q("output" in e ? e.output : void 0);
|
|
290
307
|
if (e.type === "tool-searchInKnowledgeBase" || K.includes(e.type)) {
|
|
291
308
|
let e = t?.queries;
|
|
@@ -312,24 +329,24 @@ function he(e) {
|
|
|
312
329
|
if (e.type === "tool-recallUserMemory") return J(t, "query");
|
|
313
330
|
if (e.type === "tool-saveUserMemory") return J(t, "content", "query");
|
|
314
331
|
}
|
|
315
|
-
function
|
|
316
|
-
let t =
|
|
332
|
+
function he(e) {
|
|
333
|
+
let t = b(e);
|
|
317
334
|
if (t) return T(t)?.icon ?? "ri:apps-line";
|
|
318
|
-
if (
|
|
319
|
-
if (
|
|
320
|
-
if (
|
|
321
|
-
}
|
|
322
|
-
var
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
335
|
+
if (c(e)) return e.type.includes("tool-subagent") ? "ri:robot-2-line" : e.type === "tool-runWorker" ? "ri:flow-chart" : e.type === "tool-scheduleWakeup" ? "ri:alarm-line" : h.has(e.type) ? "ri:calendar-schedule-line" : e.type === "tool-fetchTeamsChannelHistory" ? "ri:chat-history-line" : e.type === "tool-readEarlierMessages" ? "ri:history-line" : e.type === "tool-readChatAttachment" ? "ri:attachment-line" : e.type === "tool-sendChatFile" ? "ri:send-plane-line" : e.type === "tool-enableTools" ? "ri:toggle-line" : e.type.includes("tool-mcp") ? "mcp" : e.type === "tool-retrieveRevisedAnswers" ? "ri:file-edit-line" : e.type === "tool-searchInKnowledgeBase" ? "ri:search-line" : e.type === "tool-expandChunkContext" ? "ri:file-search-line" : e.type === "tool-readDocumentFile" ? "ri:file-text-line" : e.type === "tool-readSpreadsheet" ? "ri:table-line" : e.type === "tool-editSpreadsheet" || e.type === "tool-createSpreadsheet" ? "ri:file-excel-2-line" : e.type === "tool-shareDocument" ? "ri:file-download-line" : e.type === "tool-readWordDocument" ? "ri:file-text-line" : e.type === "tool-editWordDocument" || e.type === "tool-createWordDocument" ? "ri:file-word-2-line" : e.type === "tool-querySpreadsheet" ? "ri:database-2-line" : e.type === "tool-geocode" ? "ri:map-2-line" : e.type === "tool-getWeather" ? "ri:sun-cloudy-line" : e.type === "tool-recallUserMemory" ? "ri:brain-line" : e.type === "tool-saveUserMemory" ? "ri:save-3-line" : e.type === "tool-showWeather" ? "ri:sun-line" : e.type === "tool-showChart" ? "ri:bar-chart-2-line" : e.type === "tool-showDiagram" ? "ri:flow-chart" : e.type === "tool-showSources" ? "ri:book-2-line" : e.type === "tool-showForm" ? "ri:survey-line" : e.type === "tool-showMultipleChoice" ? "ri:checkbox-multiple-line" : e.type === "tool-showArtifact" ? "ri:file-code-line" : e.type === "tool-showEmail" ? "ri:mail-line" : e.type === "tool-showMessage" ? "ri:chat-1-line" : e.type === "tool-showWebPages" ? "ri:pages-line" : e.type === "tool-showProductList" ? "ri:shopping-bag-line" : e.type === "tool-showContactForm" ? "ri:send-plane-2-line" : e.type === "tool-showCalendarEvent" ? "ri:calendar-event-line" : e.type === "tool-showComparison" ? "ri:scales-line" : e.type === "tool-showLocation" ? "ri:map-pin-line" : e.type === "tool-showQrCode" ? "ri:qr-code-line" : e.type === "tool-showImageGallery" ? "ri:image-line" : e.type === "tool-showVideo" ? "ri:film-line" : e.type === "tool-showSuggestedReply" ? "ri:corner-down-right-line" : e.type === "tool-requestGeolocation" ? "ri:map-pin-user-line" : e.type === "tool-disconnectOAuthConnection" ? "ri:link-unlink" : e.type === "tool-requestAccountLink" ? "ri:link" : e.type === "tool-unlinkAccount" ? "ri:link-unlink" : K.includes(e.type) ? "ri:global-line" : "ri:tools-line";
|
|
336
|
+
if (m(e)) return "ri:lightbulb-line";
|
|
337
|
+
if (l(e)) return "ri:double-quotes-r";
|
|
338
|
+
}
|
|
339
|
+
var ge = [
|
|
340
|
+
a,
|
|
341
|
+
t,
|
|
342
|
+
r
|
|
326
343
|
];
|
|
327
344
|
function Y(e, { t, te: n }) {
|
|
328
345
|
if (n(`agent.tool.${e}`)) return t(`agent.tool.${e}`);
|
|
329
|
-
let r =
|
|
330
|
-
return
|
|
346
|
+
let r = ge.find((t) => e.startsWith(t)), i = r ? e.slice(r.length) : e;
|
|
347
|
+
return p(d(i).trim().toLowerCase());
|
|
331
348
|
}
|
|
332
|
-
var
|
|
349
|
+
var _e = {
|
|
333
350
|
custom: (e) => e("messagePart.type.custom"),
|
|
334
351
|
data: (e) => e("messagePart.type.data"),
|
|
335
352
|
file: (e) => e("messagePart.type.file"),
|
|
@@ -339,13 +356,13 @@ var ve = {
|
|
|
339
356
|
"step-start": (e) => e("messagePart.type.stepStart"),
|
|
340
357
|
text: (e) => e("messagePart.type.text")
|
|
341
358
|
};
|
|
342
|
-
function
|
|
343
|
-
if (
|
|
359
|
+
function ve(e, t) {
|
|
360
|
+
if (c(e)) return Y(u(e), t);
|
|
344
361
|
if (e.type === "dynamic-tool") return Y(e.toolName, t);
|
|
345
|
-
let n =
|
|
346
|
-
return n ? n(t.t) :
|
|
362
|
+
let n = _e[e.type.startsWith("data-") ? "data" : e.type];
|
|
363
|
+
return n ? n(t.t) : p(d(e.type));
|
|
347
364
|
}
|
|
348
|
-
var
|
|
365
|
+
var ye = {
|
|
349
366
|
alibaba: "Alibaba Cloud",
|
|
350
367
|
anthropic: "Anthropic",
|
|
351
368
|
azure: "Microsoft Azure",
|
|
@@ -367,10 +384,10 @@ var be = {
|
|
|
367
384
|
xai: "xAI",
|
|
368
385
|
zai: "Z.ai"
|
|
369
386
|
};
|
|
370
|
-
function
|
|
371
|
-
return
|
|
387
|
+
function be(e) {
|
|
388
|
+
return ye[e.toLowerCase()] ?? p(d(e));
|
|
372
389
|
}
|
|
373
|
-
function
|
|
390
|
+
function xe(e, t) {
|
|
374
391
|
if (!e) return e;
|
|
375
392
|
let n = {
|
|
376
393
|
Intent: t("conversationSummary.intent"),
|
|
@@ -380,17 +397,19 @@ function Se(e, t) {
|
|
|
380
397
|
};
|
|
381
398
|
return e.replace(/\*\*(Intent|Topics covered|Key facts|Open questions)(:?)\*\*/g, (e, t, r) => `**${n[t]}${r}**`);
|
|
382
399
|
}
|
|
383
|
-
function
|
|
384
|
-
let r =
|
|
400
|
+
function Se(e, t, n) {
|
|
401
|
+
let r = b(t);
|
|
385
402
|
if (r) {
|
|
386
403
|
let t = r.toolCallId ? n?.[r.toolCallId] : void 0;
|
|
387
404
|
if (t) return t;
|
|
388
|
-
let i =
|
|
389
|
-
|
|
405
|
+
let i = r.toolMetadata?.provider === "folder" ? f(r.input) : void 0;
|
|
406
|
+
if (i) return e(`localFolders.step.${r.toolName}`, { name: i });
|
|
407
|
+
let a = T(r);
|
|
408
|
+
return a ? e(a.label) : r.title || r.toolName;
|
|
390
409
|
}
|
|
391
|
-
return
|
|
410
|
+
return c(t) ? t.type.includes("tool-subagent") ? e("messagePart.runSubagent") : t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-scheduleWakeup" ? e("messagePart.scheduleWakeup") : h.has(t.type) ? e(`messagePart.${t.type.slice(5)}`) : t.type === "tool-fetchTeamsChannelHistory" ? e("messagePart.fetchTeamsChannelHistory") : t.type === "tool-readEarlierMessages" ? e("messagePart.readEarlierMessages") : t.type === "tool-readChatAttachment" ? e("messagePart.readChatAttachment") : t.type === "tool-sendChatFile" ? e("messagePart.sendChatFile") : t.type === "tool-enableTools" ? e("messagePart.enableTools") : t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : t.type === "tool-expandChunkContext" ? e("messagePart.expandChunkContext") : t.type === "tool-readDocumentFile" ? e("messagePart.readDocumentFile") : t.type === "tool-readSpreadsheet" ? e("messagePart.readSpreadsheet") : t.type === "tool-editSpreadsheet" ? e("messagePart.editSpreadsheet") : t.type === "tool-shareDocument" ? e("messagePart.shareDocument") : t.type === "tool-readWordDocument" ? e("messagePart.readWordDocument") : t.type === "tool-editWordDocument" ? e("messagePart.editWordDocument") : t.type === "tool-createSpreadsheet" ? e("messagePart.createSpreadsheet") : t.type === "tool-createWordDocument" ? e("messagePart.createWordDocument") : t.type === "tool-querySpreadsheet" ? e("messagePart.querySpreadsheet") : t.type === "tool-geocode" ? e("messagePart.geocode") : t.type === "tool-getWeather" ? e("messagePart.getWeather") : t.type === "tool-recallUserMemory" ? e("messagePart.recallUserMemory") : t.type === "tool-saveUserMemory" ? e("messagePart.saveUserMemory") : t.type === "tool-showWeather" ? e("messagePart.showWeather") : t.type === "tool-showForm" ? e("messagePart.showForm") : t.type === "tool-showChart" ? e("messagePart.showChart") : t.type === "tool-showDiagram" ? e("messagePart.showDiagram") : t.type === "tool-showSources" ? e("messagePart.showSources") : t.type === "tool-showMultipleChoice" ? e("messagePart.showMultipleChoice") : t.type === "tool-showArtifact" ? e("messagePart.showArtifact") : t.type === "tool-showEmail" ? e("messagePart.showEmail") : t.type === "tool-showMessage" ? e("messagePart.showMessage") : t.type === "tool-showWebPages" ? e("messagePart.showWebPages") : t.type === "tool-showProducts" ? e("messagePart.showProducts") : t.type === "tool-showContactForm" ? e("messagePart.showContactForm") : t.type === "tool-showCalendarEvent" ? e("messagePart.showCalendarEvent") : t.type === "tool-showComparison" ? e("messagePart.showComparison") : t.type === "tool-showLocation" ? e("messagePart.showLocation") : t.type === "tool-showQrCode" ? e("messagePart.showQrCode") : t.type === "tool-showImageGallery" ? e("messagePart.showImageGallery") : t.type === "tool-showVideo" ? e("messagePart.showVideo") : t.type === "tool-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : t.type === "tool-disconnectOAuthConnection" ? e("messagePart.disconnectOAuthConnection") : t.type === "tool-requestAccountLink" ? e("messagePart.requestAccountLink") : t.type === "tool-unlinkAccount" ? e("messagePart.unlinkAccount") : K.includes(t.type) ? e("messagePart.webSearch") : e("messagePart.tool") : m(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
|
|
392
411
|
}
|
|
393
|
-
var
|
|
412
|
+
var Ce = {
|
|
394
413
|
calibri: "Calibri, Carlito, \"Segoe UI\", Arial, sans-serif",
|
|
395
414
|
"calibri light": "\"Calibri Light\", Calibri, Carlito, \"Segoe UI\", sans-serif",
|
|
396
415
|
aptos: "Aptos, Calibri, Carlito, \"Segoe UI\", Arial, sans-serif",
|
|
@@ -404,7 +423,7 @@ var we = {
|
|
|
404
423
|
georgia: "Georgia, serif",
|
|
405
424
|
verdana: "Verdana, \"DejaVu Sans\", sans-serif",
|
|
406
425
|
tahoma: "Tahoma, Verdana, sans-serif"
|
|
407
|
-
},
|
|
426
|
+
}, we = {
|
|
408
427
|
calibri: 1.22,
|
|
409
428
|
"calibri light": 1.22,
|
|
410
429
|
cambria: 1.17,
|
|
@@ -415,10 +434,10 @@ var we = {
|
|
|
415
434
|
georgia: 1.14,
|
|
416
435
|
verdana: 1.22,
|
|
417
436
|
tahoma: 1.21
|
|
418
|
-
},
|
|
437
|
+
}, Te = (e) => we[e.toLowerCase()] ?? 1.17, Ee = (e) => Ce[e.toLowerCase()] ?? `"${e.replace(/"/g, "")}", ${/roman|garamond|cambria|georgia|serif|book|times/i.test(e) ? "Georgia, serif" : "Calibri, Carlito, \"Segoe UI\", Arial, sans-serif"}`, De = Symbol("wordPreviewImages"), Oe = Symbol("wordPreviewCharts"), ke = (e, t) => {
|
|
419
438
|
let n = e?.[t];
|
|
420
439
|
return n?.startsWith("data:image/webp;base64,") ? n : void 0;
|
|
421
|
-
},
|
|
440
|
+
}, Ae = (e, t) => {
|
|
422
441
|
let n = e.anchor;
|
|
423
442
|
return {
|
|
424
443
|
left: `${n.xFrom === "page" ? n.x : t.margins.left + n.x}pt`,
|
|
@@ -427,10 +446,10 @@ var we = {
|
|
|
427
446
|
height: `${e.height}pt`,
|
|
428
447
|
zIndex: n.wrap === "behind" ? -1 : 1
|
|
429
448
|
};
|
|
430
|
-
},
|
|
449
|
+
}, X = (e) => {
|
|
431
450
|
let t = e.anchor;
|
|
432
451
|
return t ? t.wrap === "around" ? "around" : t.wrap === "block" ? "block" : t.yFrom === "paragraph" ? "paragraph" : "page" : "inline";
|
|
433
|
-
},
|
|
452
|
+
}, Z = (e, t) => e.filter((e) => t === "accepted" ? e.change !== "deleted" : t !== "original" || e.change !== "inserted"), Q = (e) => e.some((e) => e.image || e.text.trim()), $ = (e, t) => {
|
|
434
453
|
let n = [], r = !1, i, a = (e, t, a, o, s, c) => {
|
|
435
454
|
let l = s ?? i;
|
|
436
455
|
n.push({
|
|
@@ -448,22 +467,22 @@ var we = {
|
|
|
448
467
|
if (e.kind === "table") {
|
|
449
468
|
let r = !!e.pageBreakBefore, i = e.section;
|
|
450
469
|
e.rows.forEach((e, o) => {
|
|
451
|
-
(!e.some((e) => e.runs.length) || e.some((e) =>
|
|
470
|
+
(!e.some((e) => e.runs.length) || e.some((e) => Q(Z(e.runs, t)))) && (a(`${n}:${o}`, n, o, r, i, e.some((e) => e.keepNext)), r = !1, i = void 0);
|
|
452
471
|
}), o(r, i);
|
|
453
|
-
} else !e.runs.length ||
|
|
472
|
+
} else !e.runs.length || Q(Z(e.runs, t)) ? a(`${n}`, n, void 0, !!e.style?.pageBreakBefore, e.section, !!e.style?.keepNext) : o(!!e.style?.pageBreakBefore, e.section);
|
|
454
473
|
}), n;
|
|
455
|
-
},
|
|
474
|
+
}, je = (e, t) => e.flatMap((e) => e.kind === "table" ? [] : Z(e.runs, t).flatMap((e) => e.picture && X(e.picture) === "page" ? [e.picture] : [])), Me = (e, t) => t ? e.replace(RegExp(` \\(v${t}\\)(\\.\\w+)$`), "$1") : e, Ne = /* @__PURE__ */ new Set([
|
|
456
475
|
"image/jpeg",
|
|
457
476
|
"image/png",
|
|
458
477
|
"image/webp"
|
|
459
478
|
]);
|
|
460
|
-
function
|
|
461
|
-
return
|
|
479
|
+
function Pe(e) {
|
|
480
|
+
return Ne.has(e);
|
|
462
481
|
}
|
|
463
|
-
function
|
|
482
|
+
function Fe(e) {
|
|
464
483
|
return e.isComposing || e.keyCode === 229;
|
|
465
484
|
}
|
|
466
|
-
function
|
|
485
|
+
function Ie({ start: e, bottom: t, bar: n, bounds: r, touch: i = !1, gap: a = 8, margin: o = 8 }) {
|
|
467
486
|
let s = r.top + r.height - o - n.height, c = t + (i ? Math.max(a, 28) : a), l = Math.max(r.top + o, Math.min(c, s)), u = e.top - a - n.height - (i ? 56 : 0), d = u >= r.top + o, f = (i ? c > s && d : d) ? "above" : "below";
|
|
468
487
|
return {
|
|
469
488
|
top: f === "above" ? u : l,
|
|
@@ -471,6 +490,6 @@ function Le({ start: e, bottom: t, bar: n, bounds: r, touch: i = !1, gap: a = 8,
|
|
|
471
490
|
placement: f
|
|
472
491
|
};
|
|
473
492
|
}
|
|
474
|
-
export {
|
|
493
|
+
export { re as A, R as B, Se as C, F as D, pe as E, xe as F, $ as G, W as H, ee as I, Te as J, Ee as K, te as L, M, E as N, k as O, O as P, ke as Q, be as R, A as S, G as T, V as U, Ie as V, Y as W, je as X, Ae as Y, X as Z, b as _, K as a, j as b, H as c, _ as d, y as f, U as g, ue as h, ie as i, Fe as j, Pe as k, I as l, de as m, C as n, Oe as o, le as p, Z as q, S as r, De as s, D as t, Me as u, oe as v, me as w, ve as x, he as y, B as z };
|
|
475
494
|
|
|
476
|
-
//# sourceMappingURL=utils-
|
|
495
|
+
//# sourceMappingURL=utils-CY0jFRnG.js.map
|