@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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { C as e, D as t, F as n, I as r, O as i, P as a, S as o, U as s, j as c, w as l, z as u } from "./zod-COsN6U8E.js";
|
|
2
2
|
import "./vue.runtime.esm-bundler-DZgpK-ja.js";
|
|
3
|
-
import {
|
|
3
|
+
import { G as d, H as f, J as p, L as m, U as h, V as g, b as _, f as v, k as y, m as ee, t as te, v as ne, z as re } from "./Agent-nB9V45mr.js";
|
|
4
4
|
import "./src-QHwDXo7q.js";
|
|
5
|
-
import { n as
|
|
5
|
+
import { n as ie, r as b, t as x } from "./text-CCurUhdH.js";
|
|
6
6
|
// ../../packages/models/src/schema/ChatTask.ts
|
|
7
|
-
var
|
|
7
|
+
var ae = {
|
|
8
8
|
Active: "active",
|
|
9
9
|
Paused: "paused",
|
|
10
10
|
Completed: "completed",
|
|
11
11
|
Deleted: "deleted",
|
|
12
12
|
Ended: "ended"
|
|
13
|
-
},
|
|
13
|
+
}, oe = {
|
|
14
14
|
Failures: "failures",
|
|
15
15
|
User: "user",
|
|
16
16
|
NoAccess: "no-access",
|
|
@@ -19,11 +19,11 @@ var y = {
|
|
|
19
19
|
ToolDisabled: "tool-disabled",
|
|
20
20
|
Missed: "missed",
|
|
21
21
|
Completed: "completed"
|
|
22
|
-
},
|
|
22
|
+
}, se = [
|
|
23
23
|
"cronCreate",
|
|
24
24
|
"cronList",
|
|
25
25
|
"cronDelete"
|
|
26
|
-
],
|
|
26
|
+
], ce = "reportTaskRun", le = r({
|
|
27
27
|
taskId: s(),
|
|
28
28
|
runAt: e(),
|
|
29
29
|
at: e(),
|
|
@@ -36,8 +36,8 @@ var y = {
|
|
|
36
36
|
timezone: u(),
|
|
37
37
|
reason: u(),
|
|
38
38
|
recurring: i(),
|
|
39
|
-
status: l(
|
|
40
|
-
endedReason: l(
|
|
39
|
+
status: l(ae),
|
|
40
|
+
endedReason: l(oe).nullable(),
|
|
41
41
|
nextRunAt: e().nullable(),
|
|
42
42
|
lastRunAt: e().nullable(),
|
|
43
43
|
createdAt: e()
|
|
@@ -47,7 +47,7 @@ S.extend({
|
|
|
47
47
|
organizationName: u(),
|
|
48
48
|
organizationSlug: u()
|
|
49
49
|
}), S.extend({ prompt: u() });
|
|
50
|
-
var C = /^([01]\d|2[0-3]):[0-5]\d$/,
|
|
50
|
+
var C = /^([01]\d|2[0-3]):[0-5]\d$/, ue = c("kind", [
|
|
51
51
|
r({
|
|
52
52
|
kind: a("once"),
|
|
53
53
|
date: o(),
|
|
@@ -75,15 +75,15 @@ var C = /^([01]\d|2[0-3]):[0-5]\d$/, ne = c("kind", [
|
|
|
75
75
|
r({
|
|
76
76
|
reason: u().trim().min(1).max(200).optional(),
|
|
77
77
|
prompt: u().trim().min(1).max(2e3).optional(),
|
|
78
|
-
schedule:
|
|
78
|
+
schedule: ue.optional()
|
|
79
79
|
});
|
|
80
|
-
var
|
|
80
|
+
var de = {
|
|
81
81
|
Past: "past",
|
|
82
82
|
Never: "never",
|
|
83
83
|
TooFrequent: "too-frequent",
|
|
84
84
|
TooFar: "too-far"
|
|
85
85
|
};
|
|
86
|
-
function
|
|
86
|
+
function fe(e) {
|
|
87
87
|
let [t, n] = e.time.split(":").map(Number), r = `${n} ${t}`;
|
|
88
88
|
switch (e.kind) {
|
|
89
89
|
case "once": {
|
|
@@ -112,7 +112,7 @@ function ie(e) {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
var w = /^\d{1,2}$/;
|
|
115
|
-
function
|
|
115
|
+
function pe(e) {
|
|
116
116
|
if (e === "*") return [
|
|
117
117
|
1,
|
|
118
118
|
2,
|
|
@@ -132,7 +132,7 @@ function T(e) {
|
|
|
132
132
|
}
|
|
133
133
|
return [...t].sort((e, t) => (e + 6) % 7 - (t + 6) % 7);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function me(e) {
|
|
136
136
|
let t = /^(?:\*|(\d{1,2})-(\d{1,2}))(?:\/(\d{1,2}))?$/.exec(e);
|
|
137
137
|
if (!t) return;
|
|
138
138
|
let n = t[3] === void 0 ? 1 : Number(t[3]);
|
|
@@ -145,13 +145,13 @@ function ae(e) {
|
|
|
145
145
|
to: r + Math.floor((i - r) / n) * n
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function he(e, t) {
|
|
149
149
|
if (!t) return { kind: "once" };
|
|
150
150
|
let n = e.trim().split(/\s+/);
|
|
151
151
|
if (n.length !== 5) return { kind: "custom" };
|
|
152
152
|
let [r, i, a, o, s] = n;
|
|
153
153
|
if (w.test(r) && Number(r) <= 59 && !w.test(i) && a === "*" && o === "*") {
|
|
154
|
-
let e =
|
|
154
|
+
let e = me(i), t = pe(s), n = t?.join() === "1,2,3,4,5";
|
|
155
155
|
if (!e || !t || t.length !== 7 && !n) return { kind: "custom" };
|
|
156
156
|
let a = (e) => `${String(e).padStart(2, "0")}:${r.padStart(2, "0")}`;
|
|
157
157
|
return {
|
|
@@ -168,7 +168,7 @@ function oe(e, t) {
|
|
|
168
168
|
if (!w.test(r) || !w.test(i) || Number(r) > 59 || Number(i) > 23 || o !== "*") return { kind: "custom" };
|
|
169
169
|
let c = `${i.padStart(2, "0")}:${r.padStart(2, "0")}`;
|
|
170
170
|
if (a === "*") {
|
|
171
|
-
let e =
|
|
171
|
+
let e = pe(s);
|
|
172
172
|
return e ? e.length === 7 ? {
|
|
173
173
|
kind: "daily",
|
|
174
174
|
time: c
|
|
@@ -188,36 +188,36 @@ function oe(e, t) {
|
|
|
188
188
|
} : { kind: "custom" };
|
|
189
189
|
}
|
|
190
190
|
// ../../packages/utils/src/message.ts
|
|
191
|
-
function
|
|
191
|
+
function T(e) {
|
|
192
192
|
return e ? e.type === "text" : !1;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function E(e) {
|
|
195
195
|
return e ? e.type.startsWith("tool-") : !1;
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
return
|
|
197
|
+
function D(e) {
|
|
198
|
+
return E(e) ? e.type.slice(5) : "";
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function O(e) {
|
|
201
201
|
return e ? e.type === "file" : !1;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
if (!
|
|
203
|
+
function k(e) {
|
|
204
|
+
if (!O(e)) return;
|
|
205
205
|
let t = e.providerMetadata?.["8bot"]?.media;
|
|
206
206
|
return t && typeof t == "object" && !Array.isArray(t) ? t : void 0;
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
if (!
|
|
208
|
+
function ge(e) {
|
|
209
|
+
if (!O(e)) return;
|
|
210
210
|
let t = e.providerMetadata?.["8bot"]?.transcript;
|
|
211
211
|
return t && typeof t == "object" && !Array.isArray(t) ? t : void 0;
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function _e(e, t) {
|
|
214
214
|
return e.map((e) => {
|
|
215
215
|
let n = t.filter((t) => t.messageId === e.id);
|
|
216
216
|
return n.length === 0 ? e : {
|
|
217
217
|
...e,
|
|
218
218
|
parts: e.parts.map((e) => {
|
|
219
|
-
let t = n.find(({ storedFileName: t }) => t ===
|
|
220
|
-
return t &&
|
|
219
|
+
let t = n.find(({ storedFileName: t }) => t === k(e)?.storedFileName);
|
|
220
|
+
return t && O(e) ? {
|
|
221
221
|
...e,
|
|
222
222
|
providerMetadata: {
|
|
223
223
|
...e.providerMetadata,
|
|
@@ -231,59 +231,338 @@ function ce(e, t) {
|
|
|
231
231
|
};
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function A(e) {
|
|
235
235
|
return e ? e.type === "reasoning" : !1;
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
return e ? e.parts.some((e) =>
|
|
237
|
+
function ve(e) {
|
|
238
|
+
return e ? e.parts.some((e) => T(e)) : !1;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function ye(e) {
|
|
241
241
|
if (!e) return;
|
|
242
242
|
let t = e.parts;
|
|
243
|
-
if (Array.isArray(t)) return t.find((e) =>
|
|
243
|
+
if (Array.isArray(t)) return t.find((e) => T(e))?.text;
|
|
244
|
+
}
|
|
245
|
+
// ../../packages/composable/src/chatbot/localFolders.ts
|
|
246
|
+
var be = 12, xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "pdf.doc.docx.xls.xlsx.xlsm.ppt.pptx.odt.ods.odp.rtf.png.jpg.jpeg.gif.webp.heic.svg.mp3.m4a.wav.mp4.mov.zip.7z.rar.gz.tar.exe.dmg.msi.iso.bin".split(".")), Se = (e) => {
|
|
247
|
+
let t = e.lastIndexOf(".");
|
|
248
|
+
return t > 0 ? e.slice(t + 1).toLowerCase() : "";
|
|
249
|
+
}, Ce = (e) => xe.has(Se(e)), we = (e) => ({
|
|
250
|
+
kind: "directory",
|
|
251
|
+
name: e.name,
|
|
252
|
+
children: async function* () {
|
|
253
|
+
for await (let t of e.values()) t.kind === "directory" ? g(t.name) || (yield we(t)) : f(t.name) || (yield {
|
|
254
|
+
kind: "file",
|
|
255
|
+
name: t.name,
|
|
256
|
+
file: () => t.getFile()
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}), Te = (e) => ({
|
|
260
|
+
kind: "directory",
|
|
261
|
+
name: e.name,
|
|
262
|
+
children: async function* () {
|
|
263
|
+
for (let t of e.directories.values()) yield Te(t);
|
|
264
|
+
for (let [t, n] of e.files) yield {
|
|
265
|
+
kind: "file",
|
|
266
|
+
name: t,
|
|
267
|
+
file: async () => n
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
}), Ee = (e) => {
|
|
271
|
+
let t = /* @__PURE__ */ new Map();
|
|
272
|
+
for (let n of e) {
|
|
273
|
+
let e = n.webkitRelativePath || n.name;
|
|
274
|
+
if (h(e)) continue;
|
|
275
|
+
let r = e.split("/").filter(Boolean), i = r.pop(), a = r.shift();
|
|
276
|
+
if (!i || !a) continue;
|
|
277
|
+
let o = t.get(a);
|
|
278
|
+
o || (o = {
|
|
279
|
+
name: a,
|
|
280
|
+
directories: /* @__PURE__ */ new Map(),
|
|
281
|
+
files: /* @__PURE__ */ new Map()
|
|
282
|
+
}, t.set(a, o));
|
|
283
|
+
for (let e of r) {
|
|
284
|
+
let t = o.directories.get(e);
|
|
285
|
+
t || (t = {
|
|
286
|
+
name: e,
|
|
287
|
+
directories: /* @__PURE__ */ new Map(),
|
|
288
|
+
files: /* @__PURE__ */ new Map()
|
|
289
|
+
}, o.directories.set(e, t)), o = t;
|
|
290
|
+
}
|
|
291
|
+
o.files.set(i, n);
|
|
292
|
+
}
|
|
293
|
+
return [...t.values()].map(Te);
|
|
294
|
+
}, De = (e, t) => {
|
|
295
|
+
let n = new Set(t);
|
|
296
|
+
if (!n.has(e)) return e;
|
|
297
|
+
let r = 2;
|
|
298
|
+
for (; n.has(`${e} (${r})`);) r++;
|
|
299
|
+
return `${e} (${r})`;
|
|
300
|
+
}, j = (e) => ({ content: [{
|
|
301
|
+
type: "text",
|
|
302
|
+
text: e
|
|
303
|
+
}] }), M = (e) => ({
|
|
304
|
+
...j(e),
|
|
305
|
+
isError: !0
|
|
306
|
+
}), N = class extends Error {}, P = (e, t) => {
|
|
307
|
+
let n = e?.[t];
|
|
308
|
+
return typeof n == "string" && n.trim() ? n.trim() : void 0;
|
|
309
|
+
}, F = (e) => {
|
|
310
|
+
let t = e?.path;
|
|
311
|
+
return typeof t == "string" && t.trim() ? t : void 0;
|
|
312
|
+
}, I = (e) => F(e)?.split("/").filter(Boolean).pop(), L = (e) => `${new Date(e).toISOString().slice(0, 16).replace("T", " ")} UTC`, R = (e) => JSON.stringify(e).length, Oe = async (e, t) => {
|
|
313
|
+
for await (let n of e.children()) if (n.name === t) return n;
|
|
314
|
+
}, z = async (e, t) => {
|
|
315
|
+
let [n, ...r] = t.split("/").filter(Boolean), i = e.find(({ name: e }) => e === n);
|
|
316
|
+
if (!i) throw new N(`No connected folder is named "${n ?? ""}": call folder_list without a path to see them.`);
|
|
317
|
+
if (!i.root || i.permission !== "granted") throw new N(`The folder "${i.name}" needs the user's permission again on this visit: ask the user to press "Allow" on the folder above the message box.`);
|
|
318
|
+
if (h(r.join("/"))) throw new N("This path is excluded: secrets, keys, version control and dependencies are never read.");
|
|
319
|
+
let a = i.root;
|
|
320
|
+
for (let e of r) {
|
|
321
|
+
if (a.kind !== "directory") throw new N(`"${t}" does not exist.`);
|
|
322
|
+
let n = await Oe(a, e);
|
|
323
|
+
if (!n) throw new N(`"${t}" does not exist.`);
|
|
324
|
+
a = n;
|
|
325
|
+
}
|
|
326
|
+
return a;
|
|
327
|
+
}, ke = (...e) => e.filter(Boolean).join("/");
|
|
328
|
+
async function B(e, t, n, r, i = 0) {
|
|
329
|
+
for await (let a of e.children()) {
|
|
330
|
+
if (r.aborted) return !1;
|
|
331
|
+
let e = ke(t, a.name);
|
|
332
|
+
if (a.kind === "directory") {
|
|
333
|
+
if (i < be && !await B(a, e, n, r, i + 1)) return !1;
|
|
334
|
+
} else if (!await n(a, e)) return !1;
|
|
335
|
+
}
|
|
336
|
+
return !0;
|
|
244
337
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
338
|
+
var V = async (e, t) => {
|
|
339
|
+
let n = new Uint8Array(await e.slice(0, t).arrayBuffer()), r = ie(n, n.byteLength < e.size);
|
|
340
|
+
return r.includes("\0") ? void 0 : r;
|
|
341
|
+
};
|
|
342
|
+
async function Ae(e, t) {
|
|
343
|
+
let n = F(t);
|
|
344
|
+
if (!n) return e.length === 0 ? M("The user has not connected any folder.") : j(["Connected folders:", ...e.map(({ name: e, permission: t, source: n }) => `- ${e}${t === "granted" ? "" : " (waiting for the user to allow it again)"}${n === "snapshot" ? " (a copy taken when the user picked it)" : ""}`)].join("\n"));
|
|
345
|
+
let r = await z(e, n);
|
|
346
|
+
if (r.kind !== "directory") return M(`"${n}" is a file: read it with folder_read or folder_attach.`);
|
|
347
|
+
let i = [], a = 0;
|
|
348
|
+
for await (let e of r.children()) {
|
|
349
|
+
if (i.length >= 200) {
|
|
350
|
+
a++;
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
if (e.kind === "directory") {
|
|
354
|
+
i.push(`${e.name}/`);
|
|
355
|
+
continue;
|
|
356
|
+
}
|
|
357
|
+
let t = await e.file();
|
|
358
|
+
i.push(`${e.name} · ${y(t.size)} · ${L(t.lastModified)}`);
|
|
359
|
+
}
|
|
360
|
+
return i.length === 0 ? j(`"${n}" is empty.`) : j([
|
|
361
|
+
`${n}:`,
|
|
362
|
+
...i,
|
|
363
|
+
...a > 0 ? [`… and ${a} more entries: search with folder_find.`] : []
|
|
364
|
+
].join("\n"));
|
|
365
|
+
}
|
|
366
|
+
async function je(e, t, n) {
|
|
367
|
+
let r = P(t, "name")?.toLowerCase(), i = P(t, "text")?.toLowerCase(), a = F(t);
|
|
368
|
+
if (!r && !i) return M("Give a name, a text, or both.");
|
|
369
|
+
let o = [];
|
|
370
|
+
if (a) {
|
|
371
|
+
let t = await z(e, a);
|
|
372
|
+
if (t.kind !== "directory") return M(`"${a}" is a file, not a folder.`);
|
|
373
|
+
o.push({
|
|
374
|
+
node: t,
|
|
375
|
+
path: a
|
|
376
|
+
});
|
|
377
|
+
} else for (let t of e) t.root && t.permission === "granted" && o.push({
|
|
378
|
+
node: t.root,
|
|
379
|
+
path: t.name
|
|
380
|
+
});
|
|
381
|
+
let s = [], c = 0, l = 0, u = 0, d = async (e, t) => {
|
|
382
|
+
if (c++, c > 5e3) return !1;
|
|
383
|
+
if (r && !e.name.toLowerCase().includes(r)) return !0;
|
|
384
|
+
if (!i) return s.push(t), s.length < 50;
|
|
385
|
+
if (Ce(e.name)) return !0;
|
|
386
|
+
let n = await e.file();
|
|
387
|
+
if (n.size > 2097152 || l + n.size > 20971520) return u++, !0;
|
|
388
|
+
l += n.size;
|
|
389
|
+
let a = await V(n, n.size);
|
|
390
|
+
if (a === void 0) return !0;
|
|
391
|
+
let o = a.split(/\r?\n/).find((e) => e.toLowerCase().includes(i));
|
|
392
|
+
return o !== void 0 && s.push(`${t}: ${o.trim().slice(0, 200)}`), s.length < 50;
|
|
393
|
+
};
|
|
394
|
+
for (let e of o) if (!await B(e.node, e.path, d, n)) break;
|
|
395
|
+
let f = [...c > 5e3 ? [`Stopped after ${m} files: narrow the search with path.`] : [], ...u > 0 ? [`${u} files were too large to search by text: look for them by name.`] : []];
|
|
396
|
+
return s.length === 0 ? j(["No match.", ...f].join("\n")) : j([
|
|
397
|
+
`${s.length} matches${s.length >= 50 ? " (the first ones)" : ""}:`,
|
|
398
|
+
...s,
|
|
399
|
+
...f
|
|
400
|
+
].join("\n"));
|
|
401
|
+
}
|
|
402
|
+
async function Me(e, t) {
|
|
403
|
+
let n = F(t);
|
|
404
|
+
if (!n) return M("Give the path of the file.");
|
|
405
|
+
let r = await z(e, n);
|
|
406
|
+
if (r.kind !== "file") return M(`"${n}" is a folder: list it with folder_list.`);
|
|
407
|
+
if (Ce(r.name)) return M(`"${n}" is not a text file: attach it with folder_attach.`);
|
|
408
|
+
let i = await r.file();
|
|
409
|
+
if (i.size > 10485760) return M(`"${n}" is ${y(i.size)}, too large to read as text: attach it with folder_attach.`);
|
|
410
|
+
let a = await V(i, i.size);
|
|
411
|
+
if (a === void 0) return M(`"${n}" is not a text file: attach it with folder_attach.`);
|
|
412
|
+
let o = t.offset, s = typeof o == "number" && o > 0 ? Math.floor(o) : 0, c = (e) => {
|
|
413
|
+
let t = `${n} · ${y(i.size)} · changed ${L(i.lastModified)} · characters ${s}-${e} of ${a.length}`, r = e < a.length ? `\n[More follows: call folder_read again with offset ${e}.]` : "";
|
|
414
|
+
return j(`${t}\n\n${a.slice(s, e)}${r}`);
|
|
415
|
+
}, l = Math.min(a.length, s + re), u = c(l);
|
|
416
|
+
for (; R(u) > 32e3 && l > s + 1;) l = Math.max(s + 1, l - Math.ceil((R(u) - d) / 2)), u = c(l);
|
|
417
|
+
return u;
|
|
418
|
+
}
|
|
419
|
+
function Ne(e) {
|
|
420
|
+
let t = { timeoutMs: e.timeoutMs }, n = (e) => async (t, { signal: n }) => {
|
|
421
|
+
try {
|
|
422
|
+
let r = await e(t, n);
|
|
423
|
+
return R(r) > 32e3 ? M("The result is too long: narrow it with a path or a more precise name.") : r;
|
|
424
|
+
} catch (e) {
|
|
425
|
+
if (e instanceof N) return M(e.message);
|
|
426
|
+
let t = e?.name;
|
|
427
|
+
return M(t === "NotAllowedError" ? "The browser no longer allows reading this folder: ask the user to allow it again." : t === "NotFoundError" ? "The file or folder is no longer there." : t === "NotReadableError" ? "The file could not be read: it may be open in another app, or a cloud file (OneDrive, iCloud) the computer cannot download now." : "The folder could not be read.");
|
|
428
|
+
}
|
|
429
|
+
}, r = (t) => (n) => e.describe(t, n);
|
|
430
|
+
return [
|
|
431
|
+
{
|
|
432
|
+
name: "folder_list",
|
|
433
|
+
inputSchema: { type: "object" },
|
|
434
|
+
annotations: { readOnlyHint: !0 },
|
|
435
|
+
policy: t,
|
|
436
|
+
describe: r("folder_list"),
|
|
437
|
+
execute: n((t) => Ae(e.folders(), t))
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
name: "folder_find",
|
|
441
|
+
inputSchema: { type: "object" },
|
|
442
|
+
annotations: { readOnlyHint: !0 },
|
|
443
|
+
policy: t,
|
|
444
|
+
describe: r("folder_find"),
|
|
445
|
+
execute: n((t, n) => je(e.folders(), t, n))
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
name: "folder_read",
|
|
449
|
+
inputSchema: { type: "object" },
|
|
450
|
+
annotations: { readOnlyHint: !0 },
|
|
451
|
+
policy: t,
|
|
452
|
+
describe: r("folder_read"),
|
|
453
|
+
execute: n((t) => Me(e.folders(), t))
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
name: "folder_attach",
|
|
457
|
+
inputSchema: { type: "object" },
|
|
458
|
+
annotations: { readOnlyHint: !0 },
|
|
459
|
+
policy: t,
|
|
460
|
+
describe: r("folder_attach"),
|
|
461
|
+
execute: n(async (t, n) => {
|
|
462
|
+
let r = F(t);
|
|
463
|
+
if (!r) return M("Give the path of the file.");
|
|
464
|
+
let i = await z(e.folders(), r);
|
|
465
|
+
if (i.kind !== "file") return M(`"${r}" is a folder, not a file.`);
|
|
466
|
+
let a = await i.file();
|
|
467
|
+
if (n.aborted) return M("The call was stopped before the file was attached.");
|
|
468
|
+
let o = await e.attach(a);
|
|
469
|
+
return o ? M(o) : j(`"${r}" is in the user's message box: it reaches you when the user sends the message. Tell the user, and end your answer.`);
|
|
470
|
+
})
|
|
471
|
+
}
|
|
472
|
+
];
|
|
473
|
+
}
|
|
474
|
+
var Pe = (e) => {
|
|
475
|
+
let t = e.filter(({ permission: e, root: t }) => e === "granted" && t);
|
|
476
|
+
return t.length > 0 ? { folders: t.slice(0, 5).map(({ name: e }) => ({ name: e })) } : void 0;
|
|
477
|
+
}, H = "agentstudio-local-folders", U = "folders", Fe = () => new Promise((e, t) => {
|
|
478
|
+
let n = indexedDB.open(H, 1);
|
|
479
|
+
n.onupgradeneeded = () => {
|
|
480
|
+
n.result.createObjectStore(U, { keyPath: "key" });
|
|
481
|
+
}, n.onsuccess = () => e(n.result), n.onerror = () => t(n.error);
|
|
482
|
+
}), W = async (e, t) => {
|
|
483
|
+
let n = await Fe();
|
|
484
|
+
try {
|
|
485
|
+
return await new Promise((r, i) => {
|
|
486
|
+
let a = t(n.transaction(U, e).objectStore(U));
|
|
487
|
+
a.onsuccess = () => r(a.result), a.onerror = () => i(a.error);
|
|
488
|
+
});
|
|
489
|
+
} finally {
|
|
490
|
+
n.close();
|
|
491
|
+
}
|
|
492
|
+
}, Ie = {
|
|
493
|
+
async load(e) {
|
|
494
|
+
return (await W("readonly", (e) => e.getAll())).filter((t) => t.owner === e).map(({ id: e, name: t, handle: n }) => ({
|
|
495
|
+
id: e,
|
|
496
|
+
name: t,
|
|
497
|
+
handle: n
|
|
498
|
+
}));
|
|
499
|
+
},
|
|
500
|
+
async save(e, t) {
|
|
501
|
+
await W("readwrite", (n) => n.put({
|
|
502
|
+
key: `${e}:${t.id}`,
|
|
503
|
+
owner: e,
|
|
504
|
+
...t
|
|
505
|
+
}));
|
|
506
|
+
},
|
|
507
|
+
async remove(e, t) {
|
|
508
|
+
await W("readwrite", (n) => n.delete(`${e}:${t}`));
|
|
509
|
+
},
|
|
510
|
+
async forgetUser(e) {
|
|
511
|
+
let t = await indexedDB.databases?.();
|
|
512
|
+
if (t && !t.some(({ name: e }) => e === H)) return;
|
|
513
|
+
let n = await W("readonly", (e) => e.getAll());
|
|
514
|
+
for (let { key: t, owner: r } of n) r.startsWith(`${e}:`) && await W("readwrite", (e) => e.delete(t));
|
|
515
|
+
}
|
|
516
|
+
}, Le = () => {
|
|
517
|
+
let e = globalThis.showDirectoryPicker;
|
|
518
|
+
return typeof e == "function" ? e.bind(globalThis) : void 0;
|
|
519
|
+
}, Re = () => {
|
|
520
|
+
try {
|
|
521
|
+
return typeof window < "u" && window.self === window.top;
|
|
522
|
+
} catch {
|
|
523
|
+
return !1;
|
|
524
|
+
}
|
|
525
|
+
}, G = new Set([...se, ce].map((e) => `tool-${e}`));
|
|
526
|
+
function ze(e) {
|
|
248
527
|
let t = [];
|
|
249
528
|
for (let n of e) {
|
|
250
|
-
if (!
|
|
529
|
+
if (!T(n)) {
|
|
251
530
|
t.push(n);
|
|
252
531
|
continue;
|
|
253
532
|
}
|
|
254
533
|
let e = t[t.length - 1];
|
|
255
|
-
e &&
|
|
534
|
+
e && T(e) ? t[t.length - 1] = {
|
|
256
535
|
...e,
|
|
257
536
|
text: e.text + n.text
|
|
258
537
|
} : t.push(n);
|
|
259
538
|
}
|
|
260
539
|
return t;
|
|
261
540
|
}
|
|
262
|
-
var
|
|
263
|
-
function
|
|
541
|
+
var Be = (e) => E(e) && _(D(e));
|
|
542
|
+
function Ve(e) {
|
|
264
543
|
let t = /* @__PURE__ */ new Map();
|
|
265
|
-
for (let [n, r] of e.entries())
|
|
266
|
-
return e.filter((e, n) => !(
|
|
544
|
+
for (let [n, r] of e.entries()) Be(r) && r.state !== "output-error" && !Ze(r) && t.set(r.type, n);
|
|
545
|
+
return e.filter((e, n) => !(Be(e) && e.state === "output-error" && (t.get(e.type) ?? -1) > n));
|
|
267
546
|
}
|
|
268
|
-
var
|
|
547
|
+
var K = /* @__PURE__ */ new Set([
|
|
269
548
|
"tool-editSpreadsheet",
|
|
270
549
|
"tool-shareDocument",
|
|
271
550
|
"tool-editWordDocument",
|
|
272
551
|
"tool-createSpreadsheet",
|
|
273
552
|
"tool-createWordDocument"
|
|
274
553
|
]);
|
|
275
|
-
function
|
|
276
|
-
let t = e.filter((e) =>
|
|
277
|
-
return t.length > 0 ? [...e.filter((e) => !
|
|
554
|
+
function He(e) {
|
|
555
|
+
let t = e.filter((e) => K.has(e.type));
|
|
556
|
+
return t.length > 0 ? [...e.filter((e) => !K.has(e.type)), ...t] : e;
|
|
278
557
|
}
|
|
279
|
-
function
|
|
558
|
+
function Ue(e, t) {
|
|
280
559
|
let n = e.toolCallId;
|
|
281
|
-
return
|
|
560
|
+
return K.has(e.type) && n ? `file-${n}` : t;
|
|
282
561
|
}
|
|
283
|
-
function
|
|
284
|
-
return
|
|
562
|
+
function q(e) {
|
|
563
|
+
return p(e) ? e : void 0;
|
|
285
564
|
}
|
|
286
|
-
var
|
|
565
|
+
var We = {
|
|
287
566
|
page_snapshot: {
|
|
288
567
|
icon: "ri:pages-line",
|
|
289
568
|
label: "messagePart.pageTool.snapshot"
|
|
@@ -328,21 +607,38 @@ var he = {
|
|
|
328
607
|
icon: "ri:links-line",
|
|
329
608
|
label: "messagePart.pageTool.navigate"
|
|
330
609
|
}
|
|
331
|
-
},
|
|
610
|
+
}, Ge = Symbol("hostStepTitles"), Ke = Symbol("hostStepChanges"), qe = {
|
|
332
611
|
icon: "ri:survey-line",
|
|
333
612
|
label: "messagePart.pageTool.form"
|
|
334
|
-
},
|
|
335
|
-
|
|
336
|
-
|
|
613
|
+
}, Je = {
|
|
614
|
+
folder_list: {
|
|
615
|
+
icon: "ri:folder-open-line",
|
|
616
|
+
label: "localFolders.tool.folder_list"
|
|
617
|
+
},
|
|
618
|
+
folder_find: {
|
|
619
|
+
icon: "ri:file-search-line",
|
|
620
|
+
label: "localFolders.tool.folder_find"
|
|
621
|
+
},
|
|
622
|
+
folder_read: {
|
|
623
|
+
icon: "ri:file-text-line",
|
|
624
|
+
label: "localFolders.tool.folder_read"
|
|
625
|
+
},
|
|
626
|
+
folder_attach: {
|
|
627
|
+
icon: "ri:attachment-2",
|
|
628
|
+
label: "localFolders.tool.folder_attach"
|
|
629
|
+
}
|
|
630
|
+
}, Ye = (e) => e.toolMetadata?.provider === "page" ? We[e.toolName] ?? (e.toolName.startsWith("form_") ? qe : void 0) : e.toolMetadata?.provider === "folder" ? Je[e.toolName] : void 0;
|
|
631
|
+
function Xe(e) {
|
|
632
|
+
return q(e)?.toolMetadata?.readOnly === !1;
|
|
337
633
|
}
|
|
338
|
-
function
|
|
634
|
+
function Ze(e) {
|
|
339
635
|
return e && "state" in e ? e.state === "streaming" || e.state === "input-streaming" : !1;
|
|
340
636
|
}
|
|
341
|
-
var
|
|
342
|
-
function
|
|
637
|
+
var Qe = 4e3, $e = /^[ \t]*(?:(?:[-*+]|\d{1,9}[.)])[ \t]+|>[ \t]?)*(`{3,}|~{3,})(.*)$/gm;
|
|
638
|
+
function et(e, t) {
|
|
343
639
|
if (e.length <= t) return e;
|
|
344
640
|
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;
|
|
345
|
-
for (let t of e.matchAll(
|
|
641
|
+
for (let t of e.matchAll($e)) {
|
|
346
642
|
if (t.index >= a) break;
|
|
347
643
|
let [, e, n] = t;
|
|
348
644
|
if (o) e[0] === o[0] && e.length >= o.length && !n.trim() && (o = void 0);
|
|
@@ -353,37 +649,37 @@ function ye(e, t) {
|
|
|
353
649
|
}
|
|
354
650
|
return `…\n\n${o ? `${o}\n` : ""}${e.slice(a)}`;
|
|
355
651
|
}
|
|
356
|
-
var
|
|
652
|
+
var tt = /* @__PURE__ */ new Set([
|
|
357
653
|
"approval-requested",
|
|
358
654
|
"approval-responded",
|
|
359
655
|
"output-denied"
|
|
360
656
|
]);
|
|
361
|
-
function
|
|
362
|
-
return
|
|
657
|
+
function nt(e) {
|
|
658
|
+
return E(e) ? tt.has(e.state) ? !0 : e.approval != null : !1;
|
|
363
659
|
}
|
|
364
|
-
var
|
|
365
|
-
function
|
|
366
|
-
return
|
|
660
|
+
var rt = "requestConfirm";
|
|
661
|
+
function J(e) {
|
|
662
|
+
return E(e) && e.type === "tool-requestConfirm";
|
|
367
663
|
}
|
|
368
|
-
function
|
|
369
|
-
return
|
|
664
|
+
function it(e) {
|
|
665
|
+
return nt(e) || J(e);
|
|
370
666
|
}
|
|
371
|
-
function
|
|
372
|
-
if (
|
|
667
|
+
function at(e) {
|
|
668
|
+
if (E(e)) return e.approval?.id;
|
|
373
669
|
}
|
|
374
|
-
function
|
|
670
|
+
function ot(e) {
|
|
375
671
|
if (e && "state" in e) return e.state;
|
|
376
672
|
}
|
|
377
|
-
function
|
|
673
|
+
function st(e) {
|
|
378
674
|
let t = e.replace("#", "");
|
|
379
675
|
t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
|
|
380
676
|
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;
|
|
381
677
|
return .2126 * a(n) + .7152 * a(r) + .0722 * a(i);
|
|
382
678
|
}
|
|
383
|
-
function
|
|
384
|
-
return
|
|
679
|
+
function ct(e = "000000") {
|
|
680
|
+
return st(e) > .179 ? "black" : "white";
|
|
385
681
|
}
|
|
386
|
-
function
|
|
682
|
+
function lt(e) {
|
|
387
683
|
let t = e?.trim().replace("#", "") ?? "";
|
|
388
684
|
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;
|
|
389
685
|
let n = [
|
|
@@ -393,8 +689,8 @@ function H(e) {
|
|
|
393
689
|
].map((e) => parseInt(t.substring(e, e + 2), 16));
|
|
394
690
|
return Math.max(...n) - Math.min(...n) < 32;
|
|
395
691
|
}
|
|
396
|
-
var
|
|
397
|
-
function
|
|
692
|
+
var ut = (e) => `#${e.map((e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
693
|
+
function Y(e, t) {
|
|
398
694
|
e.style.color = CSS.supports("color", "color-mix(in srgb, red 100%, transparent)") ? `color-mix(in srgb, ${t} 100%, transparent)` : t;
|
|
399
695
|
let n = getComputedStyle(e).color;
|
|
400
696
|
e.style.color = "";
|
|
@@ -409,11 +705,11 @@ function U(e, t) {
|
|
|
409
705
|
i[3]
|
|
410
706
|
].map((e) => Math.round(Number(e))) : null;
|
|
411
707
|
}
|
|
412
|
-
function
|
|
708
|
+
function dt(e, { mainColor: t, tones: n = "auto", secondColor: r }) {
|
|
413
709
|
let i = document.createElement("span");
|
|
414
710
|
i.hidden = !0, e.append(i);
|
|
415
711
|
try {
|
|
416
|
-
return
|
|
712
|
+
return ft(i, {
|
|
417
713
|
mainColor: t,
|
|
418
714
|
tones: n,
|
|
419
715
|
secondColor: r
|
|
@@ -422,20 +718,20 @@ function ke(e, { mainColor: t, tones: n = "auto", secondColor: r }) {
|
|
|
422
718
|
i.remove();
|
|
423
719
|
}
|
|
424
720
|
}
|
|
425
|
-
function
|
|
426
|
-
let i =
|
|
721
|
+
function ft(e, { mainColor: t, tones: n, secondColor: r }) {
|
|
722
|
+
let i = Y(e, t ?? "currentcolor");
|
|
427
723
|
if (!i) return null;
|
|
428
|
-
let a =
|
|
724
|
+
let a = ut(i), o = lt(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 = Y(e, s(o ? "var(--color-accent)" : a)), l = Y(e, r ? s(r) : o ? s("var(--color-info)") : s(a, 40));
|
|
429
725
|
return !c || !l ? null : {
|
|
430
726
|
first: c,
|
|
431
727
|
second: l,
|
|
432
728
|
duo: n === "two" || n === "auto" && o
|
|
433
729
|
};
|
|
434
730
|
}
|
|
435
|
-
function
|
|
436
|
-
return e === "white" || e === "black" ? e :
|
|
731
|
+
function pt(e, t) {
|
|
732
|
+
return e === "white" || e === "black" ? e : ct(t);
|
|
437
733
|
}
|
|
438
|
-
function
|
|
734
|
+
function mt(e, t) {
|
|
439
735
|
if (e) return {
|
|
440
736
|
"--chatbot-main-color": e,
|
|
441
737
|
"--chatbot-contrast-color": t,
|
|
@@ -444,10 +740,10 @@ function Me(e, t) {
|
|
|
444
740
|
"--input-focus-color": "var(--color-brand-graphic)"
|
|
445
741
|
};
|
|
446
742
|
}
|
|
447
|
-
function
|
|
743
|
+
function ht(e, t) {
|
|
448
744
|
if (!(t === void 0 || t < 50)) return e(t / 1e3, "seconds");
|
|
449
745
|
}
|
|
450
|
-
function
|
|
746
|
+
function gt(e) {
|
|
451
747
|
if (e !== void 0) {
|
|
452
748
|
if (typeof e == "string") return e.trim() || void 0;
|
|
453
749
|
try {
|
|
@@ -458,10 +754,10 @@ function W(e) {
|
|
|
458
754
|
}
|
|
459
755
|
}
|
|
460
756
|
}
|
|
461
|
-
function
|
|
462
|
-
return
|
|
757
|
+
function _t(e) {
|
|
758
|
+
return gt(e) !== void 0;
|
|
463
759
|
}
|
|
464
|
-
function
|
|
760
|
+
function vt(e, t) {
|
|
465
761
|
let n = e?.input;
|
|
466
762
|
if (typeof t == "string") {
|
|
467
763
|
let e = n?.question ?? n?.steps?.[0]?.question;
|
|
@@ -473,14 +769,14 @@ function Fe(e, t) {
|
|
|
473
769
|
return i ? `${i} ${n}` : n;
|
|
474
770
|
}).join(". ");
|
|
475
771
|
}
|
|
476
|
-
function
|
|
772
|
+
function yt(e) {
|
|
477
773
|
return e?.options ? e.options.map((e) => ({
|
|
478
774
|
label: e.label,
|
|
479
775
|
value: e.label,
|
|
480
776
|
description: e.description
|
|
481
777
|
})) : [];
|
|
482
778
|
}
|
|
483
|
-
function
|
|
779
|
+
function bt(e, t) {
|
|
484
780
|
let n = {};
|
|
485
781
|
if (t == null) return n;
|
|
486
782
|
if (typeof t == "string") return e.length === 1 && (n[0] = t), n;
|
|
@@ -496,7 +792,7 @@ function Le(e, t) {
|
|
|
496
792
|
for (let [e, n] of Object.entries(t)) n !== void 0 && r(e, n);
|
|
497
793
|
return n;
|
|
498
794
|
}
|
|
499
|
-
var
|
|
795
|
+
var X = ne.map((e) => `tool-${e}`), xt = /* @__PURE__ */ new Set([
|
|
500
796
|
"tool-searchInKnowledgeBase",
|
|
501
797
|
"tool-retrieveRevisedAnswers",
|
|
502
798
|
"tool-expandChunkContext",
|
|
@@ -505,63 +801,63 @@ var G = g.map((e) => `tool-${e}`), Re = /* @__PURE__ */ new Set([
|
|
|
505
801
|
"tool-geocode",
|
|
506
802
|
"tool-recallUserMemory",
|
|
507
803
|
"tool-saveUserMemory",
|
|
508
|
-
...
|
|
804
|
+
...X
|
|
509
805
|
]);
|
|
510
|
-
function
|
|
511
|
-
return
|
|
806
|
+
function St(e) {
|
|
807
|
+
return E(e) && xt.has(e.type);
|
|
512
808
|
}
|
|
513
|
-
var
|
|
809
|
+
var Ct = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, Z = (e, ...t) => {
|
|
514
810
|
for (let n of t) {
|
|
515
811
|
let t = e?.[n];
|
|
516
812
|
if (typeof t == "string" && t.trim()) return t;
|
|
517
813
|
}
|
|
518
814
|
};
|
|
519
|
-
function
|
|
520
|
-
if (!
|
|
521
|
-
let t =
|
|
522
|
-
if (e.type === "tool-searchInKnowledgeBase" ||
|
|
815
|
+
function wt(e) {
|
|
816
|
+
if (!E(e)) return;
|
|
817
|
+
let t = Ct("input" in e ? e.input : void 0), n = Ct("output" in e ? e.output : void 0);
|
|
818
|
+
if (e.type === "tool-searchInKnowledgeBase" || X.includes(e.type)) {
|
|
523
819
|
let e = t?.queries;
|
|
524
820
|
if (Array.isArray(e)) {
|
|
525
821
|
let t = e.filter((e) => typeof e == "string" && !!e.trim());
|
|
526
822
|
return t.length ? t.join(" · ") : void 0;
|
|
527
823
|
}
|
|
528
|
-
return
|
|
824
|
+
return Z(t, "query", "objective");
|
|
529
825
|
}
|
|
530
|
-
if (e.type === "tool-retrieveRevisedAnswers") return
|
|
531
|
-
if (e.type === "tool-getWeather") return
|
|
532
|
-
if (e.type === "tool-geocode") return
|
|
533
|
-
if (e.type === "tool-expandChunkContext") return
|
|
534
|
-
if (e.type === "tool-readDocumentFile" || e.type === "tool-readChatAttachment" || e.type === "tool-sendChatFile" || e.type === "tool-shareDocument") return
|
|
826
|
+
if (e.type === "tool-retrieveRevisedAnswers") return Z(t, "query");
|
|
827
|
+
if (e.type === "tool-getWeather") return Z(n, "location") ?? Z(t, "locationName");
|
|
828
|
+
if (e.type === "tool-geocode") return Z(t, "locationName");
|
|
829
|
+
if (e.type === "tool-expandChunkContext") return Z(n, "documentName");
|
|
830
|
+
if (e.type === "tool-readDocumentFile" || e.type === "tool-readChatAttachment" || e.type === "tool-sendChatFile" || e.type === "tool-shareDocument") return Z(n, "name");
|
|
535
831
|
if (e.type === "tool-readSpreadsheet") {
|
|
536
|
-
let e =
|
|
832
|
+
let e = Z(t, "sheet"), n = Z(t, "range");
|
|
537
833
|
return e && n ? `${e}!${n}` : e;
|
|
538
834
|
}
|
|
539
|
-
if (e.type === "tool-editSpreadsheet") return
|
|
540
|
-
if (e.type === "tool-readWordDocument") return
|
|
541
|
-
if (e.type === "tool-editWordDocument") return
|
|
542
|
-
if (e.type === "tool-createSpreadsheet" || e.type === "tool-createWordDocument") return
|
|
543
|
-
if (e.type === "tool-querySpreadsheet") return
|
|
544
|
-
if (e.type === "tool-recallUserMemory") return
|
|
545
|
-
if (e.type === "tool-saveUserMemory") return
|
|
546
|
-
}
|
|
547
|
-
function
|
|
548
|
-
let t =
|
|
549
|
-
if (t) return
|
|
550
|
-
if (
|
|
551
|
-
if (
|
|
552
|
-
if (
|
|
553
|
-
}
|
|
554
|
-
var
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
835
|
+
if (e.type === "tool-editSpreadsheet") return Z(n, "filename");
|
|
836
|
+
if (e.type === "tool-readWordDocument") return Z(t, "search") ?? Z(t, "from");
|
|
837
|
+
if (e.type === "tool-editWordDocument") return Z(n, "filename");
|
|
838
|
+
if (e.type === "tool-createSpreadsheet" || e.type === "tool-createWordDocument") return Z(n, "filename") ?? Z(t, "filename");
|
|
839
|
+
if (e.type === "tool-querySpreadsheet") return Z(n, "file");
|
|
840
|
+
if (e.type === "tool-recallUserMemory") return Z(t, "query");
|
|
841
|
+
if (e.type === "tool-saveUserMemory") return Z(t, "content", "query");
|
|
842
|
+
}
|
|
843
|
+
function Tt(e) {
|
|
844
|
+
let t = q(e);
|
|
845
|
+
if (t) return Ye(t)?.icon ?? "ri:apps-line";
|
|
846
|
+
if (E(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" : G.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" : X.includes(e.type) ? "ri:global-line" : "ri:tools-line";
|
|
847
|
+
if (A(e)) return "ri:lightbulb-line";
|
|
848
|
+
if (T(e)) return "ri:double-quotes-r";
|
|
849
|
+
}
|
|
850
|
+
var Et = [
|
|
851
|
+
te,
|
|
852
|
+
v,
|
|
853
|
+
ee
|
|
558
854
|
];
|
|
559
|
-
function
|
|
855
|
+
function Q(e, { t, te: n }) {
|
|
560
856
|
if (n(`agent.tool.${e}`)) return t(`agent.tool.${e}`);
|
|
561
|
-
let r =
|
|
562
|
-
return
|
|
857
|
+
let r = Et.find((t) => e.startsWith(t)), i = r ? e.slice(r.length) : e;
|
|
858
|
+
return x(b(i).trim().toLowerCase());
|
|
563
859
|
}
|
|
564
|
-
var
|
|
860
|
+
var Dt = {
|
|
565
861
|
custom: (e) => e("messagePart.type.custom"),
|
|
566
862
|
data: (e) => e("messagePart.type.data"),
|
|
567
863
|
file: (e) => e("messagePart.type.file"),
|
|
@@ -571,13 +867,13 @@ var Ue = {
|
|
|
571
867
|
"step-start": (e) => e("messagePart.type.stepStart"),
|
|
572
868
|
text: (e) => e("messagePart.type.text")
|
|
573
869
|
};
|
|
574
|
-
function
|
|
575
|
-
if (
|
|
576
|
-
if (e.type === "dynamic-tool") return
|
|
577
|
-
let n =
|
|
578
|
-
return n ? n(t.t) :
|
|
870
|
+
function Ot(e, t) {
|
|
871
|
+
if (E(e)) return Q(D(e), t);
|
|
872
|
+
if (e.type === "dynamic-tool") return Q(e.toolName, t);
|
|
873
|
+
let n = Dt[e.type.startsWith("data-") ? "data" : e.type];
|
|
874
|
+
return n ? n(t.t) : x(b(e.type));
|
|
579
875
|
}
|
|
580
|
-
function
|
|
876
|
+
function kt(e, t) {
|
|
581
877
|
if (!e) return e;
|
|
582
878
|
let n = {
|
|
583
879
|
Intent: t("conversationSummary.intent"),
|
|
@@ -587,17 +883,19 @@ function Ge(e, t) {
|
|
|
587
883
|
};
|
|
588
884
|
return e.replace(/\*\*(Intent|Topics covered|Key facts|Open questions)(:?)\*\*/g, (e, t, r) => `**${n[t]}${r}**`);
|
|
589
885
|
}
|
|
590
|
-
function
|
|
591
|
-
let r =
|
|
886
|
+
function At(e, t, n) {
|
|
887
|
+
let r = q(t);
|
|
592
888
|
if (r) {
|
|
593
889
|
let t = r.toolCallId ? n?.[r.toolCallId] : void 0;
|
|
594
890
|
if (t) return t;
|
|
595
|
-
let i =
|
|
596
|
-
|
|
891
|
+
let i = r.toolMetadata?.provider === "folder" ? I(r.input) : void 0;
|
|
892
|
+
if (i) return e(`localFolders.step.${r.toolName}`, { name: i });
|
|
893
|
+
let a = Ye(r);
|
|
894
|
+
return a ? e(a.label) : r.title || r.toolName;
|
|
597
895
|
}
|
|
598
|
-
return
|
|
896
|
+
return E(t) ? t.type.includes("tool-subagent") ? e("messagePart.runSubagent") : t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-scheduleWakeup" ? e("messagePart.scheduleWakeup") : G.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") : X.includes(t.type) ? e("messagePart.webSearch") : e("messagePart.tool") : A(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
|
|
599
897
|
}
|
|
600
|
-
var
|
|
898
|
+
var jt = {
|
|
601
899
|
calibri: "Calibri, Carlito, \"Segoe UI\", Arial, sans-serif",
|
|
602
900
|
"calibri light": "\"Calibri Light\", Calibri, Carlito, \"Segoe UI\", sans-serif",
|
|
603
901
|
aptos: "Aptos, Calibri, Carlito, \"Segoe UI\", Arial, sans-serif",
|
|
@@ -611,7 +909,7 @@ var qe = {
|
|
|
611
909
|
georgia: "Georgia, serif",
|
|
612
910
|
verdana: "Verdana, \"DejaVu Sans\", sans-serif",
|
|
613
911
|
tahoma: "Tahoma, Verdana, sans-serif"
|
|
614
|
-
},
|
|
912
|
+
}, Mt = {
|
|
615
913
|
calibri: 1.22,
|
|
616
914
|
"calibri light": 1.22,
|
|
617
915
|
cambria: 1.17,
|
|
@@ -622,10 +920,10 @@ var qe = {
|
|
|
622
920
|
georgia: 1.14,
|
|
623
921
|
verdana: 1.22,
|
|
624
922
|
tahoma: 1.21
|
|
625
|
-
},
|
|
923
|
+
}, Nt = (e) => Mt[e.toLowerCase()] ?? 1.17, Pt = (e) => jt[e.toLowerCase()] ?? `"${e.replace(/"/g, "")}", ${/roman|garamond|cambria|georgia|serif|book|times/i.test(e) ? "Georgia, serif" : "Calibri, Carlito, \"Segoe UI\", Arial, sans-serif"}`, Ft = Symbol("wordPreviewImages"), It = Symbol("wordPreviewCharts"), Lt = (e, t) => {
|
|
626
924
|
let n = e?.[t];
|
|
627
925
|
return n?.startsWith("data:image/webp;base64,") ? n : void 0;
|
|
628
|
-
},
|
|
926
|
+
}, Rt = (e, t) => {
|
|
629
927
|
let n = e.anchor;
|
|
630
928
|
return {
|
|
631
929
|
left: `${n.xFrom === "page" ? n.x : t.margins.left + n.x}pt`,
|
|
@@ -634,10 +932,10 @@ var qe = {
|
|
|
634
932
|
height: `${e.height}pt`,
|
|
635
933
|
zIndex: n.wrap === "behind" ? -1 : 1
|
|
636
934
|
};
|
|
637
|
-
},
|
|
935
|
+
}, zt = (e) => {
|
|
638
936
|
let t = e.anchor;
|
|
639
937
|
return t ? t.wrap === "around" ? "around" : t.wrap === "block" ? "block" : t.yFrom === "paragraph" ? "paragraph" : "page" : "inline";
|
|
640
|
-
},
|
|
938
|
+
}, $ = (e, t) => e.filter((e) => t === "accepted" ? e.change !== "deleted" : t !== "original" || e.change !== "inserted"), Bt = (e) => e.some((e) => e.image || e.text.trim()), Vt = (e, t) => {
|
|
641
939
|
let n = [], r = !1, i, a = (e, t, a, o, s, c) => {
|
|
642
940
|
let l = s ?? i;
|
|
643
941
|
n.push({
|
|
@@ -655,26 +953,26 @@ var qe = {
|
|
|
655
953
|
if (e.kind === "table") {
|
|
656
954
|
let r = !!e.pageBreakBefore, i = e.section;
|
|
657
955
|
e.rows.forEach((e, o) => {
|
|
658
|
-
(!e.some((e) => e.runs.length) || e.some((e) =>
|
|
956
|
+
(!e.some((e) => e.runs.length) || e.some((e) => Bt($(e.runs, t)))) && (a(`${n}:${o}`, n, o, r, i, e.some((e) => e.keepNext)), r = !1, i = void 0);
|
|
659
957
|
}), o(r, i);
|
|
660
|
-
} else !e.runs.length ||
|
|
958
|
+
} else !e.runs.length || Bt($(e.runs, t)) ? a(`${n}`, n, void 0, !!e.style?.pageBreakBefore, e.section, !!e.style?.keepNext) : o(!!e.style?.pageBreakBefore, e.section);
|
|
661
959
|
}), n;
|
|
662
|
-
},
|
|
960
|
+
}, Ht = (e, t) => e.flatMap((e) => e.kind === "table" ? [] : $(e.runs, t).flatMap((e) => e.picture && zt(e.picture) === "page" ? [e.picture] : [])), Ut = (e, t) => t ? e.replace(RegExp(` \\(v${t}\\)(\\.\\w+)$`), "$1") : e, Wt = /* @__PURE__ */ new Set([
|
|
663
961
|
"image/jpeg",
|
|
664
962
|
"image/png",
|
|
665
963
|
"image/webp"
|
|
666
964
|
]);
|
|
667
|
-
function
|
|
668
|
-
return
|
|
965
|
+
function Gt(e) {
|
|
966
|
+
return Wt.has(e);
|
|
669
967
|
}
|
|
670
|
-
function
|
|
968
|
+
function Kt(e) {
|
|
671
969
|
return e.isComposing || e.keyCode === 229;
|
|
672
970
|
}
|
|
673
|
-
function
|
|
971
|
+
function qt(e, t) {
|
|
674
972
|
let n = t / 2;
|
|
675
973
|
return e.left <= n && e.right >= n && e.top <= 92 && e.bottom >= 48;
|
|
676
974
|
}
|
|
677
|
-
function
|
|
975
|
+
function Jt({ start: e, bottom: t, bar: n, bounds: r, touch: i = !1, gap: a = 8, margin: o = 8 }) {
|
|
678
976
|
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";
|
|
679
977
|
return {
|
|
680
978
|
top: f === "above" ? u : l,
|
|
@@ -682,11 +980,11 @@ function $({ start: e, bottom: t, bar: n, bounds: r, touch: i = !1, gap: a = 8,
|
|
|
682
980
|
placement: f
|
|
683
981
|
};
|
|
684
982
|
}
|
|
685
|
-
function
|
|
983
|
+
function Yt({ start: e, bottom: t, bounds: n, card: r, tallest: i, shortest: a, touch: o = !1, gap: s = 8, margin: c = 8 }) {
|
|
686
984
|
let l = o ? 56 : 0, u = o ? Math.max(s, 28) : s, d = {
|
|
687
985
|
above: e.top - s - l - (n.top + c),
|
|
688
986
|
below: n.top + n.height - c - (t + u)
|
|
689
|
-
}, [f, p] = o ? ["below", "above"] : ["above", "below"], m = d[f] >= i || d[p] < i && d[p] <= d[f] ? f : p, h = Math.min(i, n.height - 2 * c, Math.max(a, d[m])), g = Math.min(r.height, h), _ = Math.max(n.top + c, Math.min(m === "above" ? e.top - s - l - g : t + u, n.top + n.height - c - g)), { left: v } =
|
|
987
|
+
}, [f, p] = o ? ["below", "above"] : ["above", "below"], m = d[f] >= i || d[p] < i && d[p] <= d[f] ? f : p, h = Math.min(i, n.height - 2 * c, Math.max(a, d[m])), g = Math.min(r.height, h), _ = Math.max(n.top + c, Math.min(m === "above" ? e.top - s - l - g : t + u, n.top + n.height - c - g)), { left: v } = Jt({
|
|
690
988
|
start: e,
|
|
691
989
|
bottom: t,
|
|
692
990
|
bounds: n,
|
|
@@ -704,6 +1002,6 @@ function st({ start: e, bottom: t, bounds: n, card: r, tallest: i, shortest: a,
|
|
|
704
1002
|
maxWidth: n.width - 2 * c
|
|
705
1003
|
};
|
|
706
1004
|
}
|
|
707
|
-
export {
|
|
1005
|
+
export { Pe as $, Xe as A, Yt as B, At as C, he as Ct, lt as D, St as E, ze as F, $ as G, Q as H, He as I, Ht as J, Nt as K, pt as L, Ze as M, J as N, it as O, kt as P, Ne as Q, dt as R, at as S, fe as St, _t as T, Vt as U, gt as V, Pt as W, Lt as X, zt as Y, Re as Z, q as _, de as _t, X as a, De as at, ot as b, ce as bt, mt as c, ye as ct, Ve as d, O as dt, Le as et, Ue as f, A as ft, ht as g, oe as gt, yt as h, _e as ht, Qe as i, Ie as it, Kt as j, Gt as k, qt as l, D as lt, bt as m, E as mt, Ke as n, Ee as nt, It as o, k as ot, vt as p, T as pt, Rt as q, Ge as r, I as rt, Ft as s, ge as st, rt as t, we as tt, Ut as u, ve as ut, et as v, ae as vt, wt as w, Ot as x, le as xt, Tt as y, S as yt, Jt as z };
|
|
708
1006
|
|
|
709
|
-
//# sourceMappingURL=utils-
|
|
1007
|
+
//# sourceMappingURL=utils-CRy3kzE3.js.map
|