@8wave/ai-elements 0.71.0 → 0.74.0
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/README.md +62 -15
- package/dist/_chunks/{PkToolShowArtifact-D-dU41VG.js → PkToolShowArtifact-c_vCWUpQ.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-D-dU41VG.js.map → PkToolShowArtifact-c_vCWUpQ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-B33fWbkk.js → PkToolShowCalendarEvent-D2VHu1V3.js} +3 -3
- package/dist/_chunks/{PkToolShowCalendarEvent-B33fWbkk.js.map → PkToolShowCalendarEvent-D2VHu1V3.js.map} +1 -1
- package/dist/_chunks/{PkToolShowComparison-CcKHsr36.js → PkToolShowComparison-C2ZUH0w4.js} +3 -3
- package/dist/_chunks/{PkToolShowComparison-CcKHsr36.js.map → PkToolShowComparison-C2ZUH0w4.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-SmOSbCsp.js → PkToolShowContactForm-6C4uWDtf.js} +3 -3
- package/dist/_chunks/{PkToolShowContactForm-SmOSbCsp.js.map → PkToolShowContactForm-6C4uWDtf.js.map} +1 -1
- package/dist/_chunks/{PkToolShowEmail-BOivL2p_.js → PkToolShowEmail-BuyCHUU5.js} +3 -3
- package/dist/_chunks/{PkToolShowEmail-BOivL2p_.js.map → PkToolShowEmail-BuyCHUU5.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-Dy0vFEU-.js → PkToolShowImageGallery-ByldZ0nj.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-Dy0vFEU-.js.map → PkToolShowImageGallery-ByldZ0nj.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-US6u26ra.js → PkToolShowLocation-BCFnC5c7.js} +3 -3
- package/dist/_chunks/{PkToolShowLocation-US6u26ra.js.map → PkToolShowLocation-BCFnC5c7.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMessage-Cjslxq94.js → PkToolShowMessage-6Bsfi3BC.js} +3 -3
- package/dist/_chunks/{PkToolShowMessage-Cjslxq94.js.map → PkToolShowMessage-6Bsfi3BC.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMultipleChoice-BEwiJCLu.js → PkToolShowMultipleChoice-BLNTD2lK.js} +3 -3
- package/dist/_chunks/{PkToolShowMultipleChoice-BEwiJCLu.js.map → PkToolShowMultipleChoice-BLNTD2lK.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-D3Qe8yQM.js → PkToolShowProductList-B4S5_m-f.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-D3Qe8yQM.js.map → PkToolShowProductList-B4S5_m-f.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-B64sdI0N.js → PkToolShowQrCode-BVZlzYDq.js} +3 -3
- package/dist/_chunks/{PkToolShowQrCode-B64sdI0N.js.map → PkToolShowQrCode-BVZlzYDq.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-CK3lqqoU.js → PkToolShowSources-BQo5DRwt.js} +13 -4
- package/dist/_chunks/PkToolShowSources-BQo5DRwt.js.map +1 -0
- package/dist/_chunks/{PkToolShowSuggestedReply-BGWA08C7.js → PkToolShowSuggestedReply-BxDI6yp_.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-BGWA08C7.js.map → PkToolShowSuggestedReply-BxDI6yp_.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-ClMzD04y.js → PkToolShowWeather-DR6egBIP.js} +3 -3
- package/dist/_chunks/{PkToolShowWeather-ClMzD04y.js.map → PkToolShowWeather-DR6egBIP.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BCqywwEK.js → PkToolShowWebPages-D8RngE-F.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-BCqywwEK.js.map → PkToolShowWebPages-D8RngE-F.js.map} +1 -1
- package/dist/_chunks/{index.es-Z3Hu-QIb.js → index.es-BGFmj59S.js} +2429 -1559
- package/dist/_chunks/{index.es-Z3Hu-QIb.js.map → index.es-BGFmj59S.js.map} +1 -1
- package/dist/ai-elements.es.js +3026 -3063
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotFeedbackForm.js +1 -1
- package/dist-vue/PkChatbotFilePreview.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/PkChatbot-woRkjgP5.js +190 -0
- package/dist-vue/_chunks/{PkChatbot-CkxgCXC4.js.map → PkChatbot-woRkjgP5.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-CUnS-WyR.js → PkChatbotFeedbackForm-D-lx1URv.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-CUnS-WyR.js.map → PkChatbotFeedbackForm-D-lx1URv.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFilePreview-JSpi3pmN.js → PkChatbotFilePreview-DHzuGtz5.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFilePreview-JSpi3pmN.js.map → PkChatbotFilePreview-DHzuGtz5.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-ODPhsqZt.js → PkChatbotInput-LHE0HZ9z.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotInput-ODPhsqZt.js.map → PkChatbotInput-LHE0HZ9z.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-B5EK-qDo.js → PkChatbotMessages-BxTeEm3j.js} +15 -15
- package/dist-vue/_chunks/{PkChatbotMessages-B5EK-qDo.js.map → PkChatbotMessages-BxTeEm3j.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-C4haTRtG.js → PkChatbotViewChat-BoEfZeco.js} +9 -9
- package/dist-vue/_chunks/{PkChatbotViewChat-C4haTRtG.js.map → PkChatbotViewChat-BoEfZeco.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-DvVc1arX.js +163 -0
- package/dist-vue/_chunks/PkChatbotViewConversations-DvVc1arX.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewProfile-Cafl_Jf8.js → PkChatbotViewProfile-Dev_6pki.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-Cafl_Jf8.js.map → PkChatbotViewProfile-Dev_6pki.js.map} +1 -1
- package/dist-vue/_chunks/{PkRelativeTime-jP41qAJ5.js → PkRelativeTime-WZ2aPcp_.js} +1 -1
- package/dist-vue/_chunks/{PkRelativeTime-jP41qAJ5.js.map → PkRelativeTime-WZ2aPcp_.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-CtiMH6FD.js → PkStreamingMarkdown-B4gnJ4hk.js} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-CtiMH6FD.js.map → PkStreamingMarkdown-B4gnJ4hk.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-C2DgB_1z.js → PkToolShowArtifact-EvbUZSOf.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-C2DgB_1z.js.map → PkToolShowArtifact-EvbUZSOf.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BzzbXuhh.js → PkToolShowContactForm-CsDOqSJK.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowContactForm-BzzbXuhh.js.map → PkToolShowContactForm-CsDOqSJK.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-DQXrJYop.js → PkToolShowImageGallery-B7Bt6ZGv.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-DQXrJYop.js.map → PkToolShowImageGallery-B7Bt6ZGv.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowLocation-McDIqI8y.js → PkToolShowLocation-DteWf0Cs.js} +1 -1
- package/dist-vue/_chunks/{PkToolShowLocation-McDIqI8y.js.map → PkToolShowLocation-DteWf0Cs.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowMultipleChoice-DW3m6VbJ.js → PkToolShowMultipleChoice-DZXfWtQp.js} +1 -1
- package/dist-vue/_chunks/{PkToolShowMultipleChoice-DW3m6VbJ.js.map → PkToolShowMultipleChoice-DZXfWtQp.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-BDSJs7bn.js → PkToolShowProductList-CtqWK0x4.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-BDSJs7bn.js.map → PkToolShowProductList-CtqWK0x4.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-BXeGRm4D.js → PkToolShowSources-ZtXFkIHt.js} +14 -5
- package/dist-vue/_chunks/PkToolShowSources-ZtXFkIHt.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Dm3BTWYg.js → PkToolShowSuggestedReply-30m9yWDL.js} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Dm3BTWYg.js.map → PkToolShowSuggestedReply-30m9yWDL.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-DnYVhLVU.js → PkToolShowWebPages-DZIdrdWs.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-DnYVhLVU.js.map → PkToolShowWebPages-DZIdrdWs.js.map} +1 -1
- package/dist-vue/_chunks/{PkUrl-CH4pWBR8.js → PkUrl-CGbSBfuP.js} +1 -1
- package/dist-vue/_chunks/{PkUrl-CH4pWBR8.js.map → PkUrl-CGbSBfuP.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-OA7JscBS.js → createChatbotApiClient-YJegM3ni.js} +141 -119
- package/dist-vue/_chunks/createChatbotApiClient-YJegM3ni.js.map +1 -0
- package/dist-vue/_chunks/{dist-Bs6dYy7x.js → dist-21vPGg1O.js} +3 -3
- package/dist-vue/_chunks/{dist-Bs6dYy7x.js.map → dist-21vPGg1O.js.map} +1 -1
- package/dist-vue/_chunks/{dist-Bb1zRSg4.js → dist-BGXTbYew2.js} +4 -4
- package/dist-vue/_chunks/dist-BGXTbYew2.js.map +1 -0
- package/dist-vue/_chunks/{dist-BrlD3co0.js → dist-BL9cumqH.js} +2 -2
- package/dist-vue/_chunks/{dist-BrlD3co0.js.map → dist-BL9cumqH.js.map} +1 -1
- package/dist-vue/_chunks/{dist-B9Pw4_a5.js → dist-BU-VgsYM.js} +3 -3
- package/dist-vue/_chunks/{dist-B9Pw4_a5.js.map → dist-BU-VgsYM.js.map} +1 -1
- package/dist-vue/_chunks/{dist-D-tjAaHK.js → dist-BU5m1pTR.js} +3 -3
- package/dist-vue/_chunks/{dist-D-tjAaHK.js.map → dist-BU5m1pTR.js.map} +1 -1
- package/dist-vue/_chunks/{dist-Dn0cKZ5Q.js → dist-BbP2I_Or.js} +2 -2
- package/dist-vue/_chunks/{dist-Dn0cKZ5Q.js.map → dist-BbP2I_Or.js.map} +1 -1
- package/dist-vue/_chunks/{dist-Cvsv0YEw.js → dist-BvmTki6w.js} +3 -3
- package/dist-vue/_chunks/{dist-Cvsv0YEw.js.map → dist-BvmTki6w.js.map} +1 -1
- package/dist-vue/_chunks/{dist-QzbLuLIV.js → dist-C3dPzENq.js} +3 -3
- package/dist-vue/_chunks/{dist-QzbLuLIV.js.map → dist-C3dPzENq.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BMWOJZqC.js → dist-C6AWJq9a.js} +2 -2
- package/dist-vue/_chunks/{dist-BMWOJZqC.js.map → dist-C6AWJq9a.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BQCdUoYc.js → dist-CGNGkvWf.js} +4 -4
- package/dist-vue/_chunks/{dist-BQCdUoYc.js.map → dist-CGNGkvWf.js.map} +1 -1
- package/dist-vue/_chunks/{dist-JOgG1zY3.js → dist-CIN_Avbm.js} +1 -1
- package/dist-vue/_chunks/{dist-JOgG1zY3.js.map → dist-CIN_Avbm.js.map} +1 -1
- package/dist-vue/_chunks/{dist-NKG-Bt-Q.js → dist-CePpgudw.js} +3 -3
- package/dist-vue/_chunks/{dist-NKG-Bt-Q.js.map → dist-CePpgudw.js.map} +1 -1
- package/dist-vue/_chunks/{dist-C13mHkC-.js → dist-CtMo7ig_.js} +2 -2
- package/dist-vue/_chunks/{dist-C13mHkC-.js.map → dist-CtMo7ig_.js.map} +1 -1
- package/dist-vue/_chunks/{dist-DucfoJQX.js → dist-CwG072cD.js} +3 -3
- package/dist-vue/_chunks/{dist-DucfoJQX.js.map → dist-CwG072cD.js.map} +1 -1
- package/dist-vue/_chunks/{dist-_4yQQX_L.js → dist-DFvVVU0-.js} +2 -2
- package/dist-vue/_chunks/{dist-_4yQQX_L.js.map → dist-DFvVVU0-.js.map} +1 -1
- package/dist-vue/_chunks/{dist-C_tRbeXQ.js → dist-DGz57kzK.js} +2 -2
- package/dist-vue/_chunks/{dist-C_tRbeXQ.js.map → dist-DGz57kzK.js.map} +1 -1
- package/dist-vue/_chunks/{dist-C2tC3pDh.js → dist-DT30Xa-D.js} +2 -2
- package/dist-vue/_chunks/{dist-C2tC3pDh.js.map → dist-DT30Xa-D.js.map} +1 -1
- package/dist-vue/_chunks/{dist-DNn7FqmI.js → dist-DoRhRpjL.js} +2 -2
- package/dist-vue/_chunks/{dist-DNn7FqmI.js.map → dist-DoRhRpjL.js.map} +1 -1
- package/dist-vue/_chunks/{dist-CQmgfFIN.js → dist-GnhLE5-A.js} +4 -4
- package/dist-vue/_chunks/{dist-CQmgfFIN.js.map → dist-GnhLE5-A.js.map} +1 -1
- package/dist-vue/_chunks/{dist-1ToEz3Zq.js → dist-QzWOn2Kx.js} +3 -3
- package/dist-vue/_chunks/{dist-1ToEz3Zq.js.map → dist-QzWOn2Kx.js.map} +1 -1
- package/dist-vue/_chunks/{dist-e9UFeG14.js → dist-uYEYs0EJ.js} +2 -2
- package/dist-vue/_chunks/{dist-e9UFeG14.js.map → dist-uYEYs0EJ.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BpT8aqtS.js → dist-ukeBjdwq.js} +4 -4
- package/dist-vue/_chunks/{dist-BpT8aqtS.js.map → dist-ukeBjdwq.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BHTSdHeX.js → dist-wLB8N32T.js} +3 -3
- package/dist-vue/_chunks/{dist-BHTSdHeX.js.map → dist-wLB8N32T.js.map} +1 -1
- package/dist-vue/_chunks/{index.es-BnOT0fHY.js → index.es-CrPSzhoZ.js} +1 -1
- package/dist-vue/_chunks/{index.es-BnOT0fHY.js.map → index.es-CrPSzhoZ.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-BNGyIqjI.js → useChatbotStore-DGL81KJa.js} +868 -852
- package/dist-vue/_chunks/{useChatbotStore-BNGyIqjI.js.map → useChatbotStore-DGL81KJa.js.map} +1 -1
- package/dist-vue/_chunks/{useLightbox-BiZUwsmB.js → useLightbox-1sB7fmFb.js} +1 -1
- package/dist-vue/_chunks/{useLightbox-BiZUwsmB.js.map → useLightbox-1sB7fmFb.js.map} +1 -1
- package/dist-vue/_chunks/{utils-DO7emdsn.js → utils-BegUBK7s.js} +1 -1
- package/dist-vue/_chunks/{utils-DO7emdsn.js.map → utils-BegUBK7s.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +3 -1
- package/dist-vue/composables.js +3 -3
- package/dist-vue/index.js +3780 -3498
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +56 -20
- package/dist-vue/packages/components/src/PkEditorPrompt.d.ts +2 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -3
- package/dist-vue/packages/components/src/chat/PkEditorChannels.d.ts +16 -0
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +2 -0
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +2 -3553
- package/dist-vue/packages/models/src/schema/Agent.d.ts +15 -5
- package/dist-vue/packages/models/src/schema/AgentChatStatistics.d.ts +160 -0
- package/dist-vue/packages/models/src/schema/Chat.d.ts +6 -0
- package/dist-vue/packages/models/src/schema/Document.d.ts +18 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +4 -2
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +5 -3
- package/dist-vue/style.css +1 -1
- package/package.json +2 -2
- package/dist/_chunks/PkToolShowSources-CK3lqqoU.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-CkxgCXC4.js +0 -190
- package/dist-vue/_chunks/PkChatbotViewConversations--vd3MWYy.js +0 -40
- package/dist-vue/_chunks/PkChatbotViewConversations--vd3MWYy.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowSources-BXeGRm4D.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-OA7JscBS.js.map +0 -1
- package/dist-vue/_chunks/dist-Bb1zRSg4.js.map +0 -1
package/README.md
CHANGED
|
@@ -211,21 +211,25 @@ import PkChatbot from '@8wave/ai-elements/vue/PkChatbot'
|
|
|
211
211
|
|
|
212
212
|
### `PkChatbot` props
|
|
213
213
|
|
|
214
|
-
| Prop
|
|
215
|
-
|
|
|
216
|
-
| `baseUrl`
|
|
217
|
-
| `
|
|
218
|
-
| `
|
|
219
|
-
| `
|
|
220
|
-
| `
|
|
221
|
-
| `
|
|
222
|
-
| `
|
|
223
|
-
| `
|
|
224
|
-
| `
|
|
225
|
-
| `
|
|
226
|
-
| `
|
|
227
|
-
| `
|
|
228
|
-
| `
|
|
214
|
+
| Prop | Type | Required | Description |
|
|
215
|
+
| ----------------- | ------------------------------------- | -------- | -------------------------------------------------------------- |
|
|
216
|
+
| `baseUrl` | `string` | ✅ | Base URL of the Eight Wave backend API. |
|
|
217
|
+
| `basePath` | `string` | ❌ | Path prefix appended to `baseUrl` for all API requests. |
|
|
218
|
+
| `agentId` | `string` | ✅ | Unique identifier of the AI agent. |
|
|
219
|
+
| `agentType` | `'chat' \| 'reasoning'` | ❌ | Enables reasoning mode (hides feedback actions). |
|
|
220
|
+
| `userId` | `string` | ❌ | Optional user identifier forwarded to the backend. |
|
|
221
|
+
| `name` | `string` | ❌ | Display name shown in the chat header. |
|
|
222
|
+
| `model` | `string` | ❌ | Override the default language model. |
|
|
223
|
+
| `agentModel` | `AgentModel` | ❌ | Full model configuration object. |
|
|
224
|
+
| `agentTools` | `AgentTools` | ❌ | Tool configuration exposed to the agent. |
|
|
225
|
+
| `agentInterface` | `AgentInterface` | ❌ | Interface customization (colors, placeholder text, etc.). |
|
|
226
|
+
| `actions` | `ChatMessageActions[]` | ❌ | Actions available on each message (`'upvote'`, `'downvote'`, `'copy'`, `'feedback'`, …). |
|
|
227
|
+
| `revisedAnswers` | `RevisedAnswer[]` | ❌ | List of revised answers to display inline. |
|
|
228
|
+
| `headers` | `Record<string, string>` | ❌ | Extra HTTP headers forwarded to every API request. |
|
|
229
|
+
| `systemTheme` | `'light' \| 'dark'` | ❌ | Override the OS color scheme preference. |
|
|
230
|
+
| `agentFileUpload` | `AgentFileUpload` | ❌ | File upload configuration (accepted types, size limits). |
|
|
231
|
+
| `fallbackModels` | `string[]` | ❌ | Ordered list of fallback model identifiers. |
|
|
232
|
+
| `gatewayOptions` | `Partial<AgentGatewayOptions>` | ❌ | Gateway-level options (routing, caching, etc.). |
|
|
229
233
|
|
|
230
234
|
### `PkChatbot` v-model
|
|
231
235
|
|
|
@@ -430,6 +434,12 @@ const agent = await client.getAgent('my-org', 'my-agent-id')
|
|
|
430
434
|
// Fetch an existing conversation
|
|
431
435
|
const chat = await client.getChat('my-agent-id', 'my-chat-id')
|
|
432
436
|
|
|
437
|
+
// Rename a conversation
|
|
438
|
+
await client.updateChatTitle('my-agent-id', 'my-chat-id', 'New Title')
|
|
439
|
+
|
|
440
|
+
// Delete a conversation
|
|
441
|
+
await client.deleteChat('my-agent-id', 'my-chat-id')
|
|
442
|
+
|
|
433
443
|
// Submit a message feedback
|
|
434
444
|
await client.submitMessageFeedback({
|
|
435
445
|
messageId: 'msg-123',
|
|
@@ -461,6 +471,8 @@ const endpoint = client.getChatEndpoint('my-agent-id')
|
|
|
461
471
|
| `getAgent` | `(orgSlug, agentId) => Promise<AgentPublic>` | Fetches the public agent configuration. |
|
|
462
472
|
| `getConversations` | `(agentId, userId?) => Promise<Chat[]>` | Returns the last 100 conversations for the given agent / user. |
|
|
463
473
|
| `getChat` | `(agentId, chatId) => Promise<Chat \| null>` | Fetches a single conversation. Returns `null` when not found (204). |
|
|
474
|
+
| `updateChatTitle` | `(agentId, chatId, title) => Promise<Chat>` | Updates the title of a conversation. |
|
|
475
|
+
| `deleteChat` | `(agentId, chatId) => Promise<void>` | Deletes (soft-deletes) a conversation. |
|
|
464
476
|
| `getMessageFeedbacks` | `(chatId) => Promise<MessageFeedback[]>` | Returns all feedback entries for a conversation. |
|
|
465
477
|
| `submitMessageFeedback` | `(payload: SubmitFeedbackPayload) => Promise<MessageFeedback>` | Creates or updates a feedback entry for a message. |
|
|
466
478
|
| `submitLead` | `(payload: SubmitLeadPayload) => Promise<void>` | Submits a lead form associated with the current conversation. |
|
|
@@ -468,6 +480,10 @@ const endpoint = client.getChatEndpoint('my-agent-id')
|
|
|
468
480
|
| `uploadMedia` | `(agentId, chatId, file: File) => Promise<MediaSource>` | Uploads a file to a conversation and returns its media source metadata. |
|
|
469
481
|
| `getMediaUrl` | `(agentId, chatId, storedFileName) => string` | Returns the authenticated URL for viewing an uploaded media file. |
|
|
470
482
|
| `appendAuthToken` | `(url) => string` | Appends the current Bearer token as a `token` query parameter to a URL. |
|
|
483
|
+
| `expandSourceContext` | `(agentId, documentId, chunkIndex, windowSize?) => Promise<{ content: string }>` | Fetches expanded context around a source chunk. |
|
|
484
|
+
| `downloadSourceDocument`| `(agentId, documentId) => Promise<{ downloadUrl, filename, mimeType }>` | Returns a download URL for a source document. |
|
|
485
|
+
| `reverseGeocode` | `(lat, lon, lang?) => Promise<string \| undefined>` | Resolves coordinates to a display name. |
|
|
486
|
+
| `forwardGeocode` | `(query, lang?) => Promise<{ latitude, longitude, displayName } \| undefined>` | Resolves a text query to coordinates. |
|
|
471
487
|
|
|
472
488
|
---
|
|
473
489
|
|
|
@@ -520,6 +536,12 @@ await store.initialize('my-agent-id', store.localChatId)
|
|
|
520
536
|
store.input = 'Hello!'
|
|
521
537
|
await store.handleSubmit()
|
|
522
538
|
|
|
539
|
+
// Rename a conversation
|
|
540
|
+
await store.renameChatTitle('chat-id', 'New Title')
|
|
541
|
+
|
|
542
|
+
// Delete a conversation
|
|
543
|
+
await store.deleteChat('chat-id')
|
|
544
|
+
|
|
523
545
|
// Navigate between views
|
|
524
546
|
store.navigate('conversations')
|
|
525
547
|
```
|
|
@@ -535,7 +557,32 @@ store.navigate('conversations')
|
|
|
535
557
|
| `localChatId` | `WritableComputedRef<string>` | Active conversation ID, persisted to `localStorage`. |
|
|
536
558
|
| `input` | `Ref<string>` | Current value of the text input. |
|
|
537
559
|
| `activeView` | `Ref<'chat' \| 'conversations' \| 'profile'>` | Currently visible view. |
|
|
560
|
+
| `pendingAttachments` | `Ref<PendingAttachment[]>` | Files queued for upload or already uploaded. |
|
|
561
|
+
| `isConversationBlocked`| `Ref<boolean>` | Whether the current conversation is blocked. |
|
|
562
|
+
| `chatError` | `Ref<Error \| undefined>` | Latest chat error, if any. |
|
|
538
563
|
| `isLeadSubmitted` | `Ref<boolean>` | Whether the lead form was submitted successfully. |
|
|
539
564
|
| `messageFeedbacks` | `Ref<MessageFeedback[]>` | Feedback entries for the current conversation. |
|
|
540
565
|
|
|
566
|
+
### Store actions
|
|
567
|
+
|
|
568
|
+
| Action | Signature | Description |
|
|
569
|
+
| ---------------------- | ------------------------------------------------ | ----------------------------------------------------------------- |
|
|
570
|
+
| `initialize` | `(agentId, chatId) => Promise<void>` | Loads conversation, feedbacks, and agent config. |
|
|
571
|
+
| `loadConversations` | `(agentId) => Promise<void>` | Fetches the conversation list for the agent. |
|
|
572
|
+
| `handleSubmit` | `(options?) => Promise<void>` | Sends the current input as a message. |
|
|
573
|
+
| `stopGeneration` | `() => Promise<void>` | Aborts the current streaming response. |
|
|
574
|
+
| `startNewChat` | `() => Promise<string>` | Clears state and generates a new chat ID. |
|
|
575
|
+
| `regenerate` | `(options?) => Promise<void>` | Regenerates the last assistant response. |
|
|
576
|
+
| `addToolOutput` | `(params) => void` | Provides output for a pending tool call. |
|
|
577
|
+
| `handleFileSelect` | `(file: File) => Promise<void>` | Uploads a file and adds it to pending attachments. |
|
|
578
|
+
| `clearPendingAttachments` | `(revoke?) => void` | Removes all pending attachments. |
|
|
579
|
+
| `onUpvote` | `(message) => Promise<void>` | Submits an upvote for a message. |
|
|
580
|
+
| `onDownvote` | `(message) => Promise<void>` | Submits a downvote for a message. |
|
|
581
|
+
| `onFeedback` | `(message) => void` | Opens the feedback dialog for a message. |
|
|
582
|
+
| `onFeedbackSubmit` | `(comment) => Promise<void>` | Submits feedback with a comment. |
|
|
583
|
+
| `onLeadSubmit` | `(data) => Promise<void>` | Submits a lead form. |
|
|
584
|
+
| `navigate` | `(view) => void` | Switches the active view. |
|
|
585
|
+
| `renameChatTitle` | `(chatId, title) => Promise<void>` | Updates the title of a conversation. |
|
|
586
|
+
| `deleteChat` | `(chatId) => Promise<void>` | Deletes a conversation and navigates to a new chat if needed. |
|
|
587
|
+
|
|
541
588
|
> **Note:** `agentId` is immutable per component lifecycle. If you need to switch agents, use `:key="agentId"` on the parent component to force a remount and a fresh store instance.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Bt as e, C as t, E as n, Gt as r, Z as i, _ as a, ft as o, v as s, w as c, x as l, y as u, yt as d, z as f } from "./vue.runtime.esm-bundler-BmggS4HU.js";
|
|
2
2
|
import { i as p } from "./dist-DtF6poRc.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as m } from "./index.es-BGFmj59S.js";
|
|
4
4
|
import { t as h } from "./PkStreamingMarkdown-orhL2kzD.js";
|
|
5
5
|
//#region ../../packages/components/src/chat/PkCode.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var g = ["innerHTML"], _ = /* @__PURE__ */ n({
|
|
@@ -87,4 +87,4 @@ var g = ["innerHTML"], _ = /* @__PURE__ */ n({
|
|
|
87
87
|
//#endregion
|
|
88
88
|
export { C as default };
|
|
89
89
|
|
|
90
|
-
//# sourceMappingURL=PkToolShowArtifact-
|
|
90
|
+
//# sourceMappingURL=PkToolShowArtifact-c_vCWUpQ.js.map
|
package/dist/_chunks/{PkToolShowArtifact-D-dU41VG.js.map → PkToolShowArtifact-c_vCWUpQ.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PkToolShowArtifact-D-dU41VG.js","names":["$attrs","$t"],"sources":["../../../../packages/components/src/chat/PkCode.vue","../../../../packages/components/src/chat/PkCode.vue","../../../../packages/components/src/chat/PkToolShowArtifact.vue","../../../../packages/components/src/chat/PkToolShowArtifact.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue'\n\n defineOptions({\n inheritAttrs: false,\n })\n\n const props = defineProps<{\n code: unknown\n language: string\n line?: boolean\n }>()\n\n const highlightedHtml = ref('')\n\n const hasCode = computed(() => {\n if (typeof props.code === 'string') {\n return props.code\n }\n return JSON.stringify(props.code, null, 2)\n })\n\n async function highlight() {\n const hljs = (await import('highlight.js/lib/common')).default\n try {\n const result = props.language\n ? hljs.highlight(hasCode.value, { language: props.language })\n : hljs.highlightAuto(hasCode.value)\n highlightedHtml.value = result.value\n } catch {\n highlightedHtml.value = hasCode.value\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n }\n }\n\n watch(hasCode, highlight, { immediate: true })\n</script>\n\n<template>\n <pre\n :class=\"\n $attrs.class\n ? $attrs.class\n : 'font-mono leading-snug text-smaller bg-surface-1'\n \">\n <code :class=\"['hljs', line ? 'whitespace-pre-line' : 'whitespace-pre', language]\" v-html=\"highlightedHtml\"></code>\n </pre>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue'\n\n defineOptions({\n inheritAttrs: false,\n })\n\n const props = defineProps<{\n code: unknown\n language: string\n line?: boolean\n }>()\n\n const highlightedHtml = ref('')\n\n const hasCode = computed(() => {\n if (typeof props.code === 'string') {\n return props.code\n }\n return JSON.stringify(props.code, null, 2)\n })\n\n async function highlight() {\n const hljs = (await import('highlight.js/lib/common')).default\n try {\n const result = props.language\n ? hljs.highlight(hasCode.value, { language: props.language })\n : hljs.highlightAuto(hasCode.value)\n highlightedHtml.value = result.value\n } catch {\n highlightedHtml.value = hasCode.value\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n }\n }\n\n watch(hasCode, highlight, { immediate: true })\n</script>\n\n<template>\n <pre\n :class=\"\n $attrs.class\n ? $attrs.class\n : 'font-mono leading-snug text-smaller bg-surface-1'\n \">\n <code :class=\"['hljs', line ? 'whitespace-pre-line' : 'whitespace-pre', language]\" v-html=\"highlightedHtml\"></code>\n </pre>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import PkCode from './PkCode.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n const { copy, copied } = useClipboard()\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n content: string\n artifactType: string\n language?: string\n }\n }\n return part\n })\n\n const artifactTypeLabel = computed(() => {\n const labels: Record<string, string> = {\n code: 'Code',\n document: 'Document',\n markdown: 'Markdown',\n json: 'JSON',\n xml: 'XML',\n csv: 'CSV',\n html: 'HTML',\n yaml: 'YAML',\n sql: 'SQL',\n text: 'Text',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'Artifact'\n }\n return labels[toolPart.value.input.artifactType] || 'Artifact'\n })\n\n const languageLabel = computed(() => {\n if (!toolPart.value.input?.language) {\n return ''\n }\n return ` (${toolPart.value.input.language})`\n })\n\n const isCodeType = computed(() => {\n return (\n toolPart.value.input?.artifactType === 'code' ||\n toolPart.value.input?.artifactType === 'json' ||\n toolPart.value.input?.artifactType === 'xml' ||\n toolPart.value.input?.artifactType === 'yaml' ||\n toolPart.value.input?.artifactType === 'html' ||\n toolPart.value.input?.artifactType === 'sql'\n )\n })\n\n const isMarkdownType = computed(() => {\n return toolPart.value.input?.artifactType === 'markdown'\n })\n\n const codeLanguage = computed(() => {\n if (toolPart.value.input?.language) {\n return toolPart.value.input.language\n }\n // Map artifact types to highlight.js languages\n const languageMap: Record<string, string> = {\n json: 'json',\n xml: 'xml',\n yaml: 'yaml',\n html: 'html',\n sql: 'sql',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'plaintext'\n }\n return languageMap[toolPart.value.input.artifactType] || 'plaintext'\n })\n</script>\n\n<template>\n <div class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 font-bold bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex justify-between items-center\">\n <div class=\"flex flex-col items-start gap-4\">\n <span>{{ toolPart?.input?.title }}</span>\n <span class=\"text-10 opacity-60 font-normal\">\n {{ artifactTypeLabel }}{{ languageLabel }}\n </span>\n </div>\n <VvButton\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n modifiers=\"action-quiet-small\"\n :title=\"$t('action.copy')\"\n class=\"shrink-0\"\n @click=\"copy(toolPart?.input?.content || '')\" />\n </div>\n <div class=\"px-sm py-10\">\n <PkCode\n v-if=\"isCodeType\"\n :code=\"toolPart?.input?.content\"\n :language=\"codeLanguage\" />\n <PkStreamingMarkdown\n v-else-if=\"isMarkdownType\"\n :markdown=\"toolPart?.input?.content\"\n class=\"wysiwyg text-word-2\" />\n <pre\n v-else\n class=\"text-word-2 whitespace-pre-wrap break-words\"\n :class=\"{\n italic:\n toolPart?.input?.artifactType === 'document' ||\n toolPart?.input?.artifactType === 'text',\n }\"\n >{{ toolPart?.input?.content }}</pre\n >\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import PkCode from './PkCode.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n const { copy, copied } = useClipboard()\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n content: string\n artifactType: string\n language?: string\n }\n }\n return part\n })\n\n const artifactTypeLabel = computed(() => {\n const labels: Record<string, string> = {\n code: 'Code',\n document: 'Document',\n markdown: 'Markdown',\n json: 'JSON',\n xml: 'XML',\n csv: 'CSV',\n html: 'HTML',\n yaml: 'YAML',\n sql: 'SQL',\n text: 'Text',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'Artifact'\n }\n return labels[toolPart.value.input.artifactType] || 'Artifact'\n })\n\n const languageLabel = computed(() => {\n if (!toolPart.value.input?.language) {\n return ''\n }\n return ` (${toolPart.value.input.language})`\n })\n\n const isCodeType = computed(() => {\n return (\n toolPart.value.input?.artifactType === 'code' ||\n toolPart.value.input?.artifactType === 'json' ||\n toolPart.value.input?.artifactType === 'xml' ||\n toolPart.value.input?.artifactType === 'yaml' ||\n toolPart.value.input?.artifactType === 'html' ||\n toolPart.value.input?.artifactType === 'sql'\n )\n })\n\n const isMarkdownType = computed(() => {\n return toolPart.value.input?.artifactType === 'markdown'\n })\n\n const codeLanguage = computed(() => {\n if (toolPart.value.input?.language) {\n return toolPart.value.input.language\n }\n // Map artifact types to highlight.js languages\n const languageMap: Record<string, string> = {\n json: 'json',\n xml: 'xml',\n yaml: 'yaml',\n html: 'html',\n sql: 'sql',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'plaintext'\n }\n return languageMap[toolPart.value.input.artifactType] || 'plaintext'\n })\n</script>\n\n<template>\n <div class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 font-bold bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex justify-between items-center\">\n <div class=\"flex flex-col items-start gap-4\">\n <span>{{ toolPart?.input?.title }}</span>\n <span class=\"text-10 opacity-60 font-normal\">\n {{ artifactTypeLabel }}{{ languageLabel }}\n </span>\n </div>\n <VvButton\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n modifiers=\"action-quiet-small\"\n :title=\"$t('action.copy')\"\n class=\"shrink-0\"\n @click=\"copy(toolPart?.input?.content || '')\" />\n </div>\n <div class=\"px-sm py-10\">\n <PkCode\n v-if=\"isCodeType\"\n :code=\"toolPart?.input?.content\"\n :language=\"codeLanguage\" />\n <PkStreamingMarkdown\n v-else-if=\"isMarkdownType\"\n :markdown=\"toolPart?.input?.content\"\n class=\"wysiwyg text-word-2\" />\n <pre\n v-else\n class=\"text-word-2 whitespace-pre-wrap break-words\"\n :class=\"{\n italic:\n toolPart?.input?.artifactType === 'document' ||\n toolPart?.input?.artifactType === 'text',\n }\"\n >{{ toolPart?.input?.content }}</pre\n >\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAOI,IAAM,IAAQ,GAMR,IAAkB,EAAI,GAAE,EAExB,IAAU,QACR,OAAO,EAAM,QAAS,WACf,EAAM,OAEV,KAAK,UAAU,EAAM,MAAM,MAAM,EAAC,CAC5C;EAED,eAAe,IAAY;GACvB,IAAM,KAAQ,MAAM,OAAO,8DAA4B;AACvD,OAAI;AAIA,MAAgB,SAHD,EAAM,WACf,EAAK,UAAU,EAAQ,OAAO,EAAE,UAAU,EAAM,UAAU,CAAA,GAC1D,EAAK,cAAc,EAAQ,MAAK,EACP;WAC3B;AACJ,MAAgB,QAAQ,EAAQ,MAC3B,QAAQ,MAAM,QAAO,CACrB,QAAQ,MAAM,OAAM,CACpB,QAAQ,MAAM,OAAM;;;SAIjC,EAAM,GAAS,GAAW,EAAE,WAAW,IAAM,CAAA,kBAI7C,EAOM,OAAA,EAND,OAAK,EAAeA,EAAAA,OAAO,QAAwBA,EAAAA,OAAO,QAAA,mDAAA,EAAA,EAAA;cAI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AA;IAL/C,MAAM,EAAA,EAAM,GAAA,kBAAA;IACZ,OAAO,EAAA,EAAM,GAAGC,EAAAA,GAAE,gBAAA,GAAoBA,EAAAA,GAAE,cAAA;IACzC,WAAU;IACT,OAAOA,EAAAA,GAAE,cAAA;IACV,OAAM;IACL,SAAK,AAAA,EAAA,QAAA,MAAE,EAAA,EAAI,CAAC,EAAA,OAAU,OAAO,WAAO,GAAA;;;;;SAE7C,EAmBM,OAnBN,GAmBM,CAjBQ,EAAA,SAAA,GAAA,EADV,EAG+B,GAAA;;IAD1B,MAAM,EAAA,OAAU,OAAO;IACvB,UAAU,EAAA;wCAEA,EAAA,SAAA,GAAA,EADf,EAGkC,GAAA;;IAD7B,UAAU,EAAA,OAAU,OAAO;IAC5B,OAAM;sCACV,EASC,OAAA;;IAPG,OAAK,EAAA,CAAC,+CAA6C,EAAA,QACW,EAAA,OAAU,OAAO,iBAAY,cAA2C,EAAA,OAAU,OAAO,iBAAY,QAAA,CAAA,CAAA;QAK/J,EAAA,OAAU,OAAO,QAAO,EAAA,EAAA,EAAA,CAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"PkToolShowArtifact-c_vCWUpQ.js","names":["$attrs","$t"],"sources":["../../../../packages/components/src/chat/PkCode.vue","../../../../packages/components/src/chat/PkCode.vue","../../../../packages/components/src/chat/PkToolShowArtifact.vue","../../../../packages/components/src/chat/PkToolShowArtifact.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue'\n\n defineOptions({\n inheritAttrs: false,\n })\n\n const props = defineProps<{\n code: unknown\n language: string\n line?: boolean\n }>()\n\n const highlightedHtml = ref('')\n\n const hasCode = computed(() => {\n if (typeof props.code === 'string') {\n return props.code\n }\n return JSON.stringify(props.code, null, 2)\n })\n\n async function highlight() {\n const hljs = (await import('highlight.js/lib/common')).default\n try {\n const result = props.language\n ? hljs.highlight(hasCode.value, { language: props.language })\n : hljs.highlightAuto(hasCode.value)\n highlightedHtml.value = result.value\n } catch {\n highlightedHtml.value = hasCode.value\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n }\n }\n\n watch(hasCode, highlight, { immediate: true })\n</script>\n\n<template>\n <pre\n :class=\"\n $attrs.class\n ? $attrs.class\n : 'font-mono leading-snug text-smaller bg-surface-1'\n \">\n <code :class=\"['hljs', line ? 'whitespace-pre-line' : 'whitespace-pre', language]\" v-html=\"highlightedHtml\"></code>\n </pre>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue'\n\n defineOptions({\n inheritAttrs: false,\n })\n\n const props = defineProps<{\n code: unknown\n language: string\n line?: boolean\n }>()\n\n const highlightedHtml = ref('')\n\n const hasCode = computed(() => {\n if (typeof props.code === 'string') {\n return props.code\n }\n return JSON.stringify(props.code, null, 2)\n })\n\n async function highlight() {\n const hljs = (await import('highlight.js/lib/common')).default\n try {\n const result = props.language\n ? hljs.highlight(hasCode.value, { language: props.language })\n : hljs.highlightAuto(hasCode.value)\n highlightedHtml.value = result.value\n } catch {\n highlightedHtml.value = hasCode.value\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n }\n }\n\n watch(hasCode, highlight, { immediate: true })\n</script>\n\n<template>\n <pre\n :class=\"\n $attrs.class\n ? $attrs.class\n : 'font-mono leading-snug text-smaller bg-surface-1'\n \">\n <code :class=\"['hljs', line ? 'whitespace-pre-line' : 'whitespace-pre', language]\" v-html=\"highlightedHtml\"></code>\n </pre>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import PkCode from './PkCode.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n const { copy, copied } = useClipboard()\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n content: string\n artifactType: string\n language?: string\n }\n }\n return part\n })\n\n const artifactTypeLabel = computed(() => {\n const labels: Record<string, string> = {\n code: 'Code',\n document: 'Document',\n markdown: 'Markdown',\n json: 'JSON',\n xml: 'XML',\n csv: 'CSV',\n html: 'HTML',\n yaml: 'YAML',\n sql: 'SQL',\n text: 'Text',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'Artifact'\n }\n return labels[toolPart.value.input.artifactType] || 'Artifact'\n })\n\n const languageLabel = computed(() => {\n if (!toolPart.value.input?.language) {\n return ''\n }\n return ` (${toolPart.value.input.language})`\n })\n\n const isCodeType = computed(() => {\n return (\n toolPart.value.input?.artifactType === 'code' ||\n toolPart.value.input?.artifactType === 'json' ||\n toolPart.value.input?.artifactType === 'xml' ||\n toolPart.value.input?.artifactType === 'yaml' ||\n toolPart.value.input?.artifactType === 'html' ||\n toolPart.value.input?.artifactType === 'sql'\n )\n })\n\n const isMarkdownType = computed(() => {\n return toolPart.value.input?.artifactType === 'markdown'\n })\n\n const codeLanguage = computed(() => {\n if (toolPart.value.input?.language) {\n return toolPart.value.input.language\n }\n // Map artifact types to highlight.js languages\n const languageMap: Record<string, string> = {\n json: 'json',\n xml: 'xml',\n yaml: 'yaml',\n html: 'html',\n sql: 'sql',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'plaintext'\n }\n return languageMap[toolPart.value.input.artifactType] || 'plaintext'\n })\n</script>\n\n<template>\n <div class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 font-bold bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex justify-between items-center\">\n <div class=\"flex flex-col items-start gap-4\">\n <span>{{ toolPart?.input?.title }}</span>\n <span class=\"text-10 opacity-60 font-normal\">\n {{ artifactTypeLabel }}{{ languageLabel }}\n </span>\n </div>\n <VvButton\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n modifiers=\"action-quiet-small\"\n :title=\"$t('action.copy')\"\n class=\"shrink-0\"\n @click=\"copy(toolPart?.input?.content || '')\" />\n </div>\n <div class=\"px-sm py-10\">\n <PkCode\n v-if=\"isCodeType\"\n :code=\"toolPart?.input?.content\"\n :language=\"codeLanguage\" />\n <PkStreamingMarkdown\n v-else-if=\"isMarkdownType\"\n :markdown=\"toolPart?.input?.content\"\n class=\"wysiwyg text-word-2\" />\n <pre\n v-else\n class=\"text-word-2 whitespace-pre-wrap break-words\"\n :class=\"{\n italic:\n toolPart?.input?.artifactType === 'document' ||\n toolPart?.input?.artifactType === 'text',\n }\"\n >{{ toolPart?.input?.content }}</pre\n >\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import PkCode from './PkCode.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n const { copy, copied } = useClipboard()\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n content: string\n artifactType: string\n language?: string\n }\n }\n return part\n })\n\n const artifactTypeLabel = computed(() => {\n const labels: Record<string, string> = {\n code: 'Code',\n document: 'Document',\n markdown: 'Markdown',\n json: 'JSON',\n xml: 'XML',\n csv: 'CSV',\n html: 'HTML',\n yaml: 'YAML',\n sql: 'SQL',\n text: 'Text',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'Artifact'\n }\n return labels[toolPart.value.input.artifactType] || 'Artifact'\n })\n\n const languageLabel = computed(() => {\n if (!toolPart.value.input?.language) {\n return ''\n }\n return ` (${toolPart.value.input.language})`\n })\n\n const isCodeType = computed(() => {\n return (\n toolPart.value.input?.artifactType === 'code' ||\n toolPart.value.input?.artifactType === 'json' ||\n toolPart.value.input?.artifactType === 'xml' ||\n toolPart.value.input?.artifactType === 'yaml' ||\n toolPart.value.input?.artifactType === 'html' ||\n toolPart.value.input?.artifactType === 'sql'\n )\n })\n\n const isMarkdownType = computed(() => {\n return toolPart.value.input?.artifactType === 'markdown'\n })\n\n const codeLanguage = computed(() => {\n if (toolPart.value.input?.language) {\n return toolPart.value.input.language\n }\n // Map artifact types to highlight.js languages\n const languageMap: Record<string, string> = {\n json: 'json',\n xml: 'xml',\n yaml: 'yaml',\n html: 'html',\n sql: 'sql',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'plaintext'\n }\n return languageMap[toolPart.value.input.artifactType] || 'plaintext'\n })\n</script>\n\n<template>\n <div class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 font-bold bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex justify-between items-center\">\n <div class=\"flex flex-col items-start gap-4\">\n <span>{{ toolPart?.input?.title }}</span>\n <span class=\"text-10 opacity-60 font-normal\">\n {{ artifactTypeLabel }}{{ languageLabel }}\n </span>\n </div>\n <VvButton\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n modifiers=\"action-quiet-small\"\n :title=\"$t('action.copy')\"\n class=\"shrink-0\"\n @click=\"copy(toolPart?.input?.content || '')\" />\n </div>\n <div class=\"px-sm py-10\">\n <PkCode\n v-if=\"isCodeType\"\n :code=\"toolPart?.input?.content\"\n :language=\"codeLanguage\" />\n <PkStreamingMarkdown\n v-else-if=\"isMarkdownType\"\n :markdown=\"toolPart?.input?.content\"\n class=\"wysiwyg text-word-2\" />\n <pre\n v-else\n class=\"text-word-2 whitespace-pre-wrap break-words\"\n :class=\"{\n italic:\n toolPart?.input?.artifactType === 'document' ||\n toolPart?.input?.artifactType === 'text',\n }\"\n >{{ toolPart?.input?.content }}</pre\n >\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAOI,IAAM,IAAQ,GAMR,IAAkB,EAAI,GAAE,EAExB,IAAU,QACR,OAAO,EAAM,QAAS,WACf,EAAM,OAEV,KAAK,UAAU,EAAM,MAAM,MAAM,EAAC,CAC5C;EAED,eAAe,IAAY;GACvB,IAAM,KAAQ,MAAM,OAAO,8DAA4B;AACvD,OAAI;AAIA,MAAgB,SAHD,EAAM,WACf,EAAK,UAAU,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,MAAM;GACN,KAAK;GACL,MAAM;GACN,MAAM;GACN,KAAK;GAKF,CAAY,EAAS,MAAM,MAAM,iBAF7B,YAGd;;;eAID,EAqCM,OArCN,GAqCM,CApCF,EAeM,OAfN,GAeM,CAbF,EAKM,OALN,GAKM,CAJF,EAAyC,QAAA,MAAA,EAAhC,EAAA,OAAU,OAAO,MAAK,EAAA,EAAA,EAC/B,EAEO,QAFP,GAEO,EADA,EAAA,MAAiB,GAAA,EAAM,EAAA,MAAa,EAAA,EAAA,CAAA,CAAA,EAG/C,EAMoD,GAAA;IAL/C,MAAM,EAAA,EAAM,GAAA,kBAAA;IACZ,OAAO,EAAA,EAAM,GAAGC,EAAAA,GAAE,gBAAA,GAAoBA,EAAAA,GAAE,cAAA;IACzC,WAAU;IACT,OAAOA,EAAAA,GAAE,cAAA;IACV,OAAM;IACL,SAAK,AAAA,EAAA,QAAA,MAAE,EAAA,EAAI,CAAC,EAAA,OAAU,OAAO,WAAO,GAAA;;;;;SAE7C,EAmBM,OAnBN,GAmBM,CAjBQ,EAAA,SAAA,GAAA,EADV,EAG+B,GAAA;;IAD1B,MAAM,EAAA,OAAU,OAAO;IACvB,UAAU,EAAA;wCAEA,EAAA,SAAA,GAAA,EADf,EAGkC,GAAA;;IAD7B,UAAU,EAAA,OAAU,OAAO;IAC5B,OAAM;sCACV,EASC,OAAA;;IAPG,OAAK,EAAA,CAAC,+CAA6C,EAAA,QACW,EAAA,OAAU,OAAO,iBAAY,cAA2C,EAAA,OAAU,OAAO,iBAAY,QAAA,CAAA,CAAA;QAK/J,EAAA,OAAU,OAAO,QAAO,EAAA,EAAA,EAAA,CAAA,CAAA,CAAA"}
|
package/dist/_chunks/{PkToolShowCalendarEvent-B33fWbkk.js → PkToolShowCalendarEvent-D2VHu1V3.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $ as e, C as t, E as n, Gt as r, O as i, Vt as a, _ as o, b as s, v as c, w as l, x as u, yt as d, z as f } from "./vue.runtime.esm-bundler-BmggS4HU.js";
|
|
2
2
|
import { n as p } from "./vue-i18n-KvYvoek4.js";
|
|
3
3
|
import { i as m } from "./dist-DtF6poRc.js";
|
|
4
|
-
import {
|
|
4
|
+
import { c as h, n as g, o as _, r as v, s as y } from "./index.es-BGFmj59S.js";
|
|
5
5
|
import { n as b } from "./src-C_wl-KYN.js";
|
|
6
6
|
//#region ../../packages/components/src/chat/PkToolShowCalendarEvent.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var x = {
|
|
@@ -70,7 +70,7 @@ var x = {
|
|
|
70
70
|
e.location && t.push(e.location), e.additionalInfo && t.push(e.additionalInfo), L(t.join("\n"));
|
|
71
71
|
};
|
|
72
72
|
return (n, o) => {
|
|
73
|
-
let p =
|
|
73
|
+
let p = _, m = h, I = v, L = y, z = g;
|
|
74
74
|
return B.value?.input ? (f(), u("div", x, [c("div", S, [
|
|
75
75
|
l(p, {
|
|
76
76
|
name: "ri:calendar-event-line",
|
|
@@ -142,4 +142,4 @@ var x = {
|
|
|
142
142
|
//#endregion
|
|
143
143
|
export { I as default };
|
|
144
144
|
|
|
145
|
-
//# sourceMappingURL=PkToolShowCalendarEvent-
|
|
145
|
+
//# sourceMappingURL=PkToolShowCalendarEvent-D2VHu1V3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PkToolShowCalendarEvent-B33fWbkk.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowCalendarEvent.vue","../../../../packages/components/src/chat/PkToolShowCalendarEvent.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useClipboard } from '@vueuse/core'\n import { isSameSite } from 'utils'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n const { d } = useI18n()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n startDate: string\n endDate: string\n location?: string\n additionalInfo?: string\n allDay?: boolean\n }\n }\n return part\n })\n\n const dateDisplay = computed(() => {\n const input = toolPart.value.input\n if (!input) {\n return ''\n }\n const { startDate, endDate, allDay } = input\n const start = new Date(startDate)\n const end = new Date(endDate)\n const startDay = startDate.slice(0, 10)\n const endDay = endDate.slice(0, 10)\n if (allDay) {\n if (startDay === endDay) {\n return d(start, 'date-medium')\n }\n return `${d(start, 'date-medium')} - ${d(end, 'date-medium')}`\n }\n if (startDay === endDay) {\n return `${d(start, 'date-time-medium')} - ${d(end, 'time')}`\n }\n return `${d(start, 'date-time-medium')} - ${d(end, 'date-time-medium')}`\n })\n\n const calendarStart = computed(() =>\n toolPart.value.input ? new Date(toolPart.value.input.startDate) : null,\n )\n\n const calendarDay = computed(\n () => calendarStart.value?.getDate().toString() ?? '',\n )\n\n const calendarMonth = computed(() =>\n calendarStart.value ? d(calendarStart.value, 'month-short') : '',\n )\n\n // Floating time: remove dashes/colons without converting to UTC\n const toIcsDateTime = (iso: string) =>\n iso.replace(/[-:]/g, '').replace(/\\.\\d{3}$/, '')\n\n const escapeIcs = (str: string) =>\n str\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/;/g, '\\\\;')\n .replace(/,/g, '\\\\,')\n .replace(/\\n/g, '\\\\n')\n\n const generateIcs = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const ics = [\n 'BEGIN:VCALENDAR',\n 'VERSION:2.0',\n 'PRODID:-//8wave//8bot//EN',\n 'BEGIN:VEVENT',\n `DTSTART:${toIcsDateTime(startDate)}`,\n `DTEND:${toIcsDateTime(endDate)}`,\n `SUMMARY:${escapeIcs(title)}`,\n location ? `LOCATION:${escapeIcs(location)}` : '',\n additionalInfo ? `DESCRIPTION:${escapeIcs(additionalInfo)}` : '',\n `DTSTAMP:${new Date()\n .toISOString()\n .replace(/[-:]/g, '')\n .replace(/\\.\\d{3}/, '')}`,\n `UID:${crypto.randomUUID()}@8bot.ai`,\n 'END:VEVENT',\n 'END:VCALENDAR',\n ]\n .filter(Boolean)\n .join('\\r\\n')\n\n const blob = new Blob([ics], { type: 'text/calendar;charset=utf-8' })\n const url = URL.createObjectURL(blob)\n const a = document.createElement('a')\n a.href = url\n a.download = `${title.replace(/[^a-zA-Z0-9\\s-]/g, '')}.ics`\n a.click()\n URL.revokeObjectURL(url)\n }\n\n const openGoogleCalendar = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const start = toIcsDateTime(startDate)\n const end = toIcsDateTime(endDate)\n const params = new URLSearchParams({\n action: 'TEMPLATE',\n text: title,\n dates: `${start}/${end}`,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('details', additionalInfo)\n }\n window.open(\n `https://calendar.google.com/calendar/render?${params.toString()}`,\n '_blank',\n )\n }\n\n const openOutlook = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const params = new URLSearchParams({\n subject: title,\n startdt: startDate,\n enddt: endDate,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('body', additionalInfo)\n }\n window.open(\n `https://outlook.office.com/calendar/0/action/compose?${params.toString()}`,\n '_blank',\n )\n }\n\n const copyEvent = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const lines = [input.title, dateDisplay.value]\n if (input.location) {\n lines.push(input.location)\n }\n if (input.additionalInfo) {\n lines.push(input.additionalInfo)\n }\n copy(lines.join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:calendar-event-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.calendarEvent') }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyEvent\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n }\">\n <VvButton\n icon=\"ri:calendar-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.addToCalendar')\" />\n <template #items>\n <VvDropdownAction @click=\"openGoogleCalendar\">\n <VvIcon name=\"ri:google-line\" />\n Google Calendar\n </VvDropdownAction>\n <VvDropdownAction @click=\"openOutlook\">\n <VvIcon name=\"ri:microsoft-line\" />\n Outlook\n </VvDropdownAction>\n <VvDropdownAction @click=\"generateIcs\">\n <VvIcon name=\"ri:download-line\" />\n {{ $t('action.downloadIcs') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm flex gap-sm items-start\">\n <div\n class=\"shrink-0 w-44 rounded-lg overflow-hidden border border-surface-3 text-center select-none\">\n <div\n class=\"bg-brand px-8 py-2 text-white text-10 font-bold uppercase tracking-wide\">\n {{ calendarMonth }}\n </div>\n <div\n class=\"bg-surface-1 py-4 text-word-1 text-24 font-bold leading-none\">\n {{ calendarDay }}\n </div>\n </div>\n <div class=\"flex flex-col gap-4 min-w-0\">\n <p class=\"font-semibold text-word-1 text-14\">\n {{ toolPart.input.title }}\n </p>\n <div class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:time-line\" class=\"text-14 shrink-0\" />\n <time :datetime=\"toolPart.input.startDate\">{{\n dateDisplay\n }}</time>\n </div>\n <div\n v-if=\"toolPart.input.location\"\n class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:map-pin-line\" class=\"text-14 shrink-0\" />\n <a\n v-if=\"toolPart.input.location.startsWith('http')\"\n :href=\"toolPart.input.location\"\n :target=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : '_blank'\n \"\n :rel=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : 'noopener noreferrer'\n \"\n class=\"underline truncate\">\n {{ toolPart.input.location }}\n </a>\n <span v-else>{{ toolPart.input.location }}</span>\n </div>\n <div\n v-if=\"toolPart.input.additionalInfo\"\n class=\"flex items-start gap-8 text-12 text-word-3\">\n <VvIcon\n name=\"ri:sticky-note-line\"\n class=\"text-14 shrink-0 mt-1\" />\n <span>{{ toolPart.input.additionalInfo }}</span>\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useClipboard } from '@vueuse/core'\n import { isSameSite } from 'utils'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n const { d } = useI18n()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n startDate: string\n endDate: string\n location?: string\n additionalInfo?: string\n allDay?: boolean\n }\n }\n return part\n })\n\n const dateDisplay = computed(() => {\n const input = toolPart.value.input\n if (!input) {\n return ''\n }\n const { startDate, endDate, allDay } = input\n const start = new Date(startDate)\n const end = new Date(endDate)\n const startDay = startDate.slice(0, 10)\n const endDay = endDate.slice(0, 10)\n if (allDay) {\n if (startDay === endDay) {\n return d(start, 'date-medium')\n }\n return `${d(start, 'date-medium')} - ${d(end, 'date-medium')}`\n }\n if (startDay === endDay) {\n return `${d(start, 'date-time-medium')} - ${d(end, 'time')}`\n }\n return `${d(start, 'date-time-medium')} - ${d(end, 'date-time-medium')}`\n })\n\n const calendarStart = computed(() =>\n toolPart.value.input ? new Date(toolPart.value.input.startDate) : null,\n )\n\n const calendarDay = computed(\n () => calendarStart.value?.getDate().toString() ?? '',\n )\n\n const calendarMonth = computed(() =>\n calendarStart.value ? d(calendarStart.value, 'month-short') : '',\n )\n\n // Floating time: remove dashes/colons without converting to UTC\n const toIcsDateTime = (iso: string) =>\n iso.replace(/[-:]/g, '').replace(/\\.\\d{3}$/, '')\n\n const escapeIcs = (str: string) =>\n str\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/;/g, '\\\\;')\n .replace(/,/g, '\\\\,')\n .replace(/\\n/g, '\\\\n')\n\n const generateIcs = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const ics = [\n 'BEGIN:VCALENDAR',\n 'VERSION:2.0',\n 'PRODID:-//8wave//8bot//EN',\n 'BEGIN:VEVENT',\n `DTSTART:${toIcsDateTime(startDate)}`,\n `DTEND:${toIcsDateTime(endDate)}`,\n `SUMMARY:${escapeIcs(title)}`,\n location ? `LOCATION:${escapeIcs(location)}` : '',\n additionalInfo ? `DESCRIPTION:${escapeIcs(additionalInfo)}` : '',\n `DTSTAMP:${new Date()\n .toISOString()\n .replace(/[-:]/g, '')\n .replace(/\\.\\d{3}/, '')}`,\n `UID:${crypto.randomUUID()}@8bot.ai`,\n 'END:VEVENT',\n 'END:VCALENDAR',\n ]\n .filter(Boolean)\n .join('\\r\\n')\n\n const blob = new Blob([ics], { type: 'text/calendar;charset=utf-8' })\n const url = URL.createObjectURL(blob)\n const a = document.createElement('a')\n a.href = url\n a.download = `${title.replace(/[^a-zA-Z0-9\\s-]/g, '')}.ics`\n a.click()\n URL.revokeObjectURL(url)\n }\n\n const openGoogleCalendar = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const start = toIcsDateTime(startDate)\n const end = toIcsDateTime(endDate)\n const params = new URLSearchParams({\n action: 'TEMPLATE',\n text: title,\n dates: `${start}/${end}`,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('details', additionalInfo)\n }\n window.open(\n `https://calendar.google.com/calendar/render?${params.toString()}`,\n '_blank',\n )\n }\n\n const openOutlook = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const params = new URLSearchParams({\n subject: title,\n startdt: startDate,\n enddt: endDate,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('body', additionalInfo)\n }\n window.open(\n `https://outlook.office.com/calendar/0/action/compose?${params.toString()}`,\n '_blank',\n )\n }\n\n const copyEvent = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const lines = [input.title, dateDisplay.value]\n if (input.location) {\n lines.push(input.location)\n }\n if (input.additionalInfo) {\n lines.push(input.additionalInfo)\n }\n copy(lines.join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:calendar-event-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.calendarEvent') }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyEvent\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n }\">\n <VvButton\n icon=\"ri:calendar-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.addToCalendar')\" />\n <template #items>\n <VvDropdownAction @click=\"openGoogleCalendar\">\n <VvIcon name=\"ri:google-line\" />\n Google Calendar\n </VvDropdownAction>\n <VvDropdownAction @click=\"openOutlook\">\n <VvIcon name=\"ri:microsoft-line\" />\n Outlook\n </VvDropdownAction>\n <VvDropdownAction @click=\"generateIcs\">\n <VvIcon name=\"ri:download-line\" />\n {{ $t('action.downloadIcs') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm flex gap-sm items-start\">\n <div\n class=\"shrink-0 w-44 rounded-lg overflow-hidden border border-surface-3 text-center select-none\">\n <div\n class=\"bg-brand px-8 py-2 text-white text-10 font-bold uppercase tracking-wide\">\n {{ calendarMonth }}\n </div>\n <div\n class=\"bg-surface-1 py-4 text-word-1 text-24 font-bold leading-none\">\n {{ calendarDay }}\n </div>\n </div>\n <div class=\"flex flex-col gap-4 min-w-0\">\n <p class=\"font-semibold text-word-1 text-14\">\n {{ toolPart.input.title }}\n </p>\n <div class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:time-line\" class=\"text-14 shrink-0\" />\n <time :datetime=\"toolPart.input.startDate\">{{\n dateDisplay\n }}</time>\n </div>\n <div\n v-if=\"toolPart.input.location\"\n class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:map-pin-line\" class=\"text-14 shrink-0\" />\n <a\n v-if=\"toolPart.input.location.startsWith('http')\"\n :href=\"toolPart.input.location\"\n :target=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : '_blank'\n \"\n :rel=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : 'noopener noreferrer'\n \"\n class=\"underline truncate\">\n {{ toolPart.input.location }}\n </a>\n <span v-else>{{ toolPart.input.location }}</span>\n </div>\n <div\n v-if=\"toolPart.input.additionalInfo\"\n class=\"flex items-start gap-8 text-12 text-word-3\">\n <VvIcon\n name=\"ri:sticky-note-line\"\n class=\"text-14 shrink-0 mt-1\" />\n <span>{{ toolPart.input.additionalInfo }}</span>\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAMI,IAAM,IAAQ,GAIR,EAAE,SAAM,cAAW,GAAa,EAChC,EAAE,SAAM,GAAQ,EAEhB,IAAW,QACA,EAAM,KAWtB,EAEK,IAAc,QAAe;GAC/B,IAAM,IAAQ,EAAS,MAAM;AAC7B,OAAI,CAAC,EACD,QAAO;GAEX,IAAM,EAAE,cAAW,YAAS,cAAW,GACjC,IAAQ,IAAI,KAAK,EAAS,EAC1B,IAAM,IAAI,KAAK,EAAO,EACtB,IAAW,EAAU,M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;IAvCF,EAEI,KAFJ,GAEI,EADG,EAAA,MAAS,MAAM,MAAK,EAAA,EAAA;IAE3B,EAKM,OALN,GAKM,CAJF,EAAuD,GAAA;KAA/C,MAAK;KAAe,OAAM;QAClC,EAES,QAAA,EAFF,UAAU,EAAA,MAAS,MAAM,WAAA,EAAA,EAC5B,EAAA,MAAW,EAAA,GAAA,EAAA,CAAA,CAAA;IAIT,EAAA,MAAS,MAAM,YAAA,GAAA,EADzB,EAqBM,OArBN,GAqBM,CAlBF,EAA0D,GAAA;KAAlD,MAAK;KAAkB,OAAM;QAE3B,EAAA,MAAS,MAAM,SAAS,WAAU,OAAA,IAAA,GAAA,EAD5C,EAeI,KAAA;;KAbC,MAAM,EAAA,MAAS,MAAM;KACrB,QAAqC,EAAA,EAAU,CAAC,EAAA,MAAS,MAAM,SAAQ,GAAoC,KAAA,IAAA;KAK3G,KAAkC,EAAA,EAAU,CAAC,EAAA,MAAS,MAAM,SAAQ,GAAoC,KAAA,IAAA;KAKzG,OAAM;SACH,EAAA,MAAS,MAAM,SAAQ,EAAA,GAAA,EAAA,KAAA,GAAA,EAE9B,EAAiD,QAAA,GAAA,EAAjC,EAAA,MAAS,MAAM,SAAQ,EAAA,EAAA,EAAA,CAAA,IAAA,EAAA,IAAA,GAAA;IAGjC,EAAA,MAAS,MAAM,kBAAA,GAAA,EADzB,EAOM,OAPN,GAOM,CAJF,EAEoC,GAAA;KADhC,MAAK;KACL,OAAM;QACV,EAAgD,QAAA,MAAA,EAAvC,EAAA,MAAS,MAAM,eAAc,EAAA,EAAA,CAAA,CAAA,IAAA,EAAA,IAAA,GAAA"}
|
|
1
|
+
{"version":3,"file":"PkToolShowCalendarEvent-D2VHu1V3.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowCalendarEvent.vue","../../../../packages/components/src/chat/PkToolShowCalendarEvent.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useClipboard } from '@vueuse/core'\n import { isSameSite } from 'utils'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n const { d } = useI18n()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n startDate: string\n endDate: string\n location?: string\n additionalInfo?: string\n allDay?: boolean\n }\n }\n return part\n })\n\n const dateDisplay = computed(() => {\n const input = toolPart.value.input\n if (!input) {\n return ''\n }\n const { startDate, endDate, allDay } = input\n const start = new Date(startDate)\n const end = new Date(endDate)\n const startDay = startDate.slice(0, 10)\n const endDay = endDate.slice(0, 10)\n if (allDay) {\n if (startDay === endDay) {\n return d(start, 'date-medium')\n }\n return `${d(start, 'date-medium')} - ${d(end, 'date-medium')}`\n }\n if (startDay === endDay) {\n return `${d(start, 'date-time-medium')} - ${d(end, 'time')}`\n }\n return `${d(start, 'date-time-medium')} - ${d(end, 'date-time-medium')}`\n })\n\n const calendarStart = computed(() =>\n toolPart.value.input ? new Date(toolPart.value.input.startDate) : null,\n )\n\n const calendarDay = computed(\n () => calendarStart.value?.getDate().toString() ?? '',\n )\n\n const calendarMonth = computed(() =>\n calendarStart.value ? d(calendarStart.value, 'month-short') : '',\n )\n\n // Floating time: remove dashes/colons without converting to UTC\n const toIcsDateTime = (iso: string) =>\n iso.replace(/[-:]/g, '').replace(/\\.\\d{3}$/, '')\n\n const escapeIcs = (str: string) =>\n str\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/;/g, '\\\\;')\n .replace(/,/g, '\\\\,')\n .replace(/\\n/g, '\\\\n')\n\n const generateIcs = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const ics = [\n 'BEGIN:VCALENDAR',\n 'VERSION:2.0',\n 'PRODID:-//8wave//8bot//EN',\n 'BEGIN:VEVENT',\n `DTSTART:${toIcsDateTime(startDate)}`,\n `DTEND:${toIcsDateTime(endDate)}`,\n `SUMMARY:${escapeIcs(title)}`,\n location ? `LOCATION:${escapeIcs(location)}` : '',\n additionalInfo ? `DESCRIPTION:${escapeIcs(additionalInfo)}` : '',\n `DTSTAMP:${new Date()\n .toISOString()\n .replace(/[-:]/g, '')\n .replace(/\\.\\d{3}/, '')}`,\n `UID:${crypto.randomUUID()}@8bot.ai`,\n 'END:VEVENT',\n 'END:VCALENDAR',\n ]\n .filter(Boolean)\n .join('\\r\\n')\n\n const blob = new Blob([ics], { type: 'text/calendar;charset=utf-8' })\n const url = URL.createObjectURL(blob)\n const a = document.createElement('a')\n a.href = url\n a.download = `${title.replace(/[^a-zA-Z0-9\\s-]/g, '')}.ics`\n a.click()\n URL.revokeObjectURL(url)\n }\n\n const openGoogleCalendar = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const start = toIcsDateTime(startDate)\n const end = toIcsDateTime(endDate)\n const params = new URLSearchParams({\n action: 'TEMPLATE',\n text: title,\n dates: `${start}/${end}`,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('details', additionalInfo)\n }\n window.open(\n `https://calendar.google.com/calendar/render?${params.toString()}`,\n '_blank',\n )\n }\n\n const openOutlook = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const params = new URLSearchParams({\n subject: title,\n startdt: startDate,\n enddt: endDate,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('body', additionalInfo)\n }\n window.open(\n `https://outlook.office.com/calendar/0/action/compose?${params.toString()}`,\n '_blank',\n )\n }\n\n const copyEvent = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const lines = [input.title, dateDisplay.value]\n if (input.location) {\n lines.push(input.location)\n }\n if (input.additionalInfo) {\n lines.push(input.additionalInfo)\n }\n copy(lines.join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:calendar-event-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.calendarEvent') }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyEvent\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n }\">\n <VvButton\n icon=\"ri:calendar-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.addToCalendar')\" />\n <template #items>\n <VvDropdownAction @click=\"openGoogleCalendar\">\n <VvIcon name=\"ri:google-line\" />\n Google Calendar\n </VvDropdownAction>\n <VvDropdownAction @click=\"openOutlook\">\n <VvIcon name=\"ri:microsoft-line\" />\n Outlook\n </VvDropdownAction>\n <VvDropdownAction @click=\"generateIcs\">\n <VvIcon name=\"ri:download-line\" />\n {{ $t('action.downloadIcs') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm flex gap-sm items-start\">\n <div\n class=\"shrink-0 w-44 rounded-lg overflow-hidden border border-surface-3 text-center select-none\">\n <div\n class=\"bg-brand px-8 py-2 text-white text-10 font-bold uppercase tracking-wide\">\n {{ calendarMonth }}\n </div>\n <div\n class=\"bg-surface-1 py-4 text-word-1 text-24 font-bold leading-none\">\n {{ calendarDay }}\n </div>\n </div>\n <div class=\"flex flex-col gap-4 min-w-0\">\n <p class=\"font-semibold text-word-1 text-14\">\n {{ toolPart.input.title }}\n </p>\n <div class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:time-line\" class=\"text-14 shrink-0\" />\n <time :datetime=\"toolPart.input.startDate\">{{\n dateDisplay\n }}</time>\n </div>\n <div\n v-if=\"toolPart.input.location\"\n class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:map-pin-line\" class=\"text-14 shrink-0\" />\n <a\n v-if=\"toolPart.input.location.startsWith('http')\"\n :href=\"toolPart.input.location\"\n :target=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : '_blank'\n \"\n :rel=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : 'noopener noreferrer'\n \"\n class=\"underline truncate\">\n {{ toolPart.input.location }}\n </a>\n <span v-else>{{ toolPart.input.location }}</span>\n </div>\n <div\n v-if=\"toolPart.input.additionalInfo\"\n class=\"flex items-start gap-8 text-12 text-word-3\">\n <VvIcon\n name=\"ri:sticky-note-line\"\n class=\"text-14 shrink-0 mt-1\" />\n <span>{{ toolPart.input.additionalInfo }}</span>\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useClipboard } from '@vueuse/core'\n import { isSameSite } from 'utils'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n const { d } = useI18n()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n startDate: string\n endDate: string\n location?: string\n additionalInfo?: string\n allDay?: boolean\n }\n }\n return part\n })\n\n const dateDisplay = computed(() => {\n const input = toolPart.value.input\n if (!input) {\n return ''\n }\n const { startDate, endDate, allDay } = input\n const start = new Date(startDate)\n const end = new Date(endDate)\n const startDay = startDate.slice(0, 10)\n const endDay = endDate.slice(0, 10)\n if (allDay) {\n if (startDay === endDay) {\n return d(start, 'date-medium')\n }\n return `${d(start, 'date-medium')} - ${d(end, 'date-medium')}`\n }\n if (startDay === endDay) {\n return `${d(start, 'date-time-medium')} - ${d(end, 'time')}`\n }\n return `${d(start, 'date-time-medium')} - ${d(end, 'date-time-medium')}`\n })\n\n const calendarStart = computed(() =>\n toolPart.value.input ? new Date(toolPart.value.input.startDate) : null,\n )\n\n const calendarDay = computed(\n () => calendarStart.value?.getDate().toString() ?? '',\n )\n\n const calendarMonth = computed(() =>\n calendarStart.value ? d(calendarStart.value, 'month-short') : '',\n )\n\n // Floating time: remove dashes/colons without converting to UTC\n const toIcsDateTime = (iso: string) =>\n iso.replace(/[-:]/g, '').replace(/\\.\\d{3}$/, '')\n\n const escapeIcs = (str: string) =>\n str\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/;/g, '\\\\;')\n .replace(/,/g, '\\\\,')\n .replace(/\\n/g, '\\\\n')\n\n const generateIcs = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const ics = [\n 'BEGIN:VCALENDAR',\n 'VERSION:2.0',\n 'PRODID:-//8wave//8bot//EN',\n 'BEGIN:VEVENT',\n `DTSTART:${toIcsDateTime(startDate)}`,\n `DTEND:${toIcsDateTime(endDate)}`,\n `SUMMARY:${escapeIcs(title)}`,\n location ? `LOCATION:${escapeIcs(location)}` : '',\n additionalInfo ? `DESCRIPTION:${escapeIcs(additionalInfo)}` : '',\n `DTSTAMP:${new Date()\n .toISOString()\n .replace(/[-:]/g, '')\n .replace(/\\.\\d{3}/, '')}`,\n `UID:${crypto.randomUUID()}@8bot.ai`,\n 'END:VEVENT',\n 'END:VCALENDAR',\n ]\n .filter(Boolean)\n .join('\\r\\n')\n\n const blob = new Blob([ics], { type: 'text/calendar;charset=utf-8' })\n const url = URL.createObjectURL(blob)\n const a = document.createElement('a')\n a.href = url\n a.download = `${title.replace(/[^a-zA-Z0-9\\s-]/g, '')}.ics`\n a.click()\n URL.revokeObjectURL(url)\n }\n\n const openGoogleCalendar = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const start = toIcsDateTime(startDate)\n const end = toIcsDateTime(endDate)\n const params = new URLSearchParams({\n action: 'TEMPLATE',\n text: title,\n dates: `${start}/${end}`,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('details', additionalInfo)\n }\n window.open(\n `https://calendar.google.com/calendar/render?${params.toString()}`,\n '_blank',\n )\n }\n\n const openOutlook = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const params = new URLSearchParams({\n subject: title,\n startdt: startDate,\n enddt: endDate,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('body', additionalInfo)\n }\n window.open(\n `https://outlook.office.com/calendar/0/action/compose?${params.toString()}`,\n '_blank',\n )\n }\n\n const copyEvent = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const lines = [input.title, dateDisplay.value]\n if (input.location) {\n lines.push(input.location)\n }\n if (input.additionalInfo) {\n lines.push(input.additionalInfo)\n }\n copy(lines.join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:calendar-event-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.calendarEvent') }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyEvent\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n }\">\n <VvButton\n icon=\"ri:calendar-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.addToCalendar')\" />\n <template #items>\n <VvDropdownAction @click=\"openGoogleCalendar\">\n <VvIcon name=\"ri:google-line\" />\n Google Calendar\n </VvDropdownAction>\n <VvDropdownAction @click=\"openOutlook\">\n <VvIcon name=\"ri:microsoft-line\" />\n Outlook\n </VvDropdownAction>\n <VvDropdownAction @click=\"generateIcs\">\n <VvIcon name=\"ri:download-line\" />\n {{ $t('action.downloadIcs') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm flex gap-sm items-start\">\n <div\n class=\"shrink-0 w-44 rounded-lg overflow-hidden border border-surface-3 text-center select-none\">\n <div\n class=\"bg-brand px-8 py-2 text-white text-10 font-bold uppercase tracking-wide\">\n {{ calendarMonth }}\n </div>\n <div\n class=\"bg-surface-1 py-4 text-word-1 text-24 font-bold leading-none\">\n {{ calendarDay }}\n </div>\n </div>\n <div class=\"flex flex-col gap-4 min-w-0\">\n <p class=\"font-semibold text-word-1 text-14\">\n {{ toolPart.input.title }}\n </p>\n <div class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:time-line\" class=\"text-14 shrink-0\" />\n <time :datetime=\"toolPart.input.startDate\">{{\n dateDisplay\n }}</time>\n </div>\n <div\n v-if=\"toolPart.input.location\"\n class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:map-pin-line\" class=\"text-14 shrink-0\" />\n <a\n v-if=\"toolPart.input.location.startsWith('http')\"\n :href=\"toolPart.input.location\"\n :target=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : '_blank'\n \"\n :rel=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : 'noopener noreferrer'\n \"\n class=\"underline truncate\">\n {{ toolPart.input.location }}\n </a>\n <span v-else>{{ toolPart.input.location }}</span>\n </div>\n <div\n v-if=\"toolPart.input.additionalInfo\"\n class=\"flex items-start gap-8 text-12 text-word-3\">\n <VvIcon\n name=\"ri:sticky-note-line\"\n class=\"text-14 shrink-0 mt-1\" />\n <span>{{ toolPart.input.additionalInfo }}</span>\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAMI,IAAM,IAAQ,GAIR,EAAE,SAAM,cAAW,GAAa,EAChC,EAAE,SAAM,GAAQ,EAEhB,IAAW,QACA,EAAM,KAWtB,E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
1
1
|
import { $ as e, Bt as t, C as n, E as r, Gt as i, V as a, _ as o, b as s, h as c, v as l, w as u, x as d, yt as f, z as p } from "./vue.runtime.esm-bundler-BmggS4HU.js";
|
|
2
2
|
import { i as m } from "./dist-DtF6poRc.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as h, n as g, o as _ } from "./index.es-BGFmj59S.js";
|
|
4
4
|
//#region ../../packages/components/src/chat/PkToolShowComparison.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var v = {
|
|
6
6
|
key: 0,
|
|
@@ -20,7 +20,7 @@ var v = {
|
|
|
20
20
|
e && T([["", ...e.map((e) => e.name)].join(" "), ...O.value.map((t) => [t.replace(/_/g, " "), ...e.map((e) => e.values[t] ?? "")].join(" "))].join("\n"));
|
|
21
21
|
};
|
|
22
22
|
return (r, o) => {
|
|
23
|
-
let m =
|
|
23
|
+
let m = _, w = h, T = g;
|
|
24
24
|
return D.value?.input?.items?.length ? (p(), d("div", v, [l("div", y, [
|
|
25
25
|
u(m, {
|
|
26
26
|
name: "ri:scales-line",
|
|
@@ -61,4 +61,4 @@ var v = {
|
|
|
61
61
|
//#endregion
|
|
62
62
|
export { w as default };
|
|
63
63
|
|
|
64
|
-
//# sourceMappingURL=PkToolShowComparison-
|
|
64
|
+
//# sourceMappingURL=PkToolShowComparison-C2ZUH0w4.js.map
|
package/dist/_chunks/{PkToolShowComparison-CcKHsr36.js.map → PkToolShowComparison-C2ZUH0w4.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PkToolShowComparison-CcKHsr36.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowComparison.vue","../../../../packages/components/src/chat/PkToolShowComparison.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title?: string\n items: Array<{\n name: string\n values: Record<string, string>\n highlighted?: boolean\n }>\n }\n }\n return part\n })\n\n const features = computed(() => {\n const items = toolPart.value.input?.items\n if (!items || items.length === 0) {\n return []\n }\n return Object.keys(items[0].values)\n })\n\n const copyTable = () => {\n const items = toolPart.value.input?.items\n if (!items) {\n return\n }\n const header = ['', ...items.map((i) => i.name)].join('\\t')\n const rows = features.value.map((f) =>\n [f.replace(/_/g, ' '), ...items.map((i) => i.values[f] ?? '')].join(\n '\\t',\n ),\n )\n copy([header, ...rows].join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.items?.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:scales-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{\n toolPart.input.title ?? $t('label.comparison')\n }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyTable\" />\n </VvButtonGroup>\n </div>\n <div class=\"overflow-x-auto\">\n <table class=\"w-full text-12 border-collapse\">\n <thead>\n <tr>\n <th\n class=\"text-left text-word-3 font-medium p-8 border-b border-surface-3 min-w-32\"></th>\n <th\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center font-semibold text-word-1 p-8 border-b border-surface-3 min-w-24\"\n :class=\"\n item.highlighted\n ? 'bg-primary/5 border-primary/20'\n : ''\n \">\n {{ item.name }}\n <span v-if=\"item.highlighted\" class=\"ml-4\">⭐</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(feature, fIdx) in features\"\n :key=\"feature\"\n :class=\"{ 'bg-surface-1': fIdx % 2 !== 0 }\">\n <td\n class=\"text-word-3 font-medium p-8 whitespace-nowrap\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n }\">\n {{ feature.replace(/_/g, ' ') }}\n </td>\n <td\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center p-8\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n 'bg-surface-info': item.highlighted,\n 'text-success': item.values[feature] === '✓',\n 'text-danger':\n item.values[feature] === '\\u2717',\n 'text-word-2':\n item.values[feature] !== '✓' &&\n item.values[feature] !== '\\u2717',\n }\">\n {{ item.values[feature] ?? '—' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title?: string\n items: Array<{\n name: string\n values: Record<string, string>\n highlighted?: boolean\n }>\n }\n }\n return part\n })\n\n const features = computed(() => {\n const items = toolPart.value.input?.items\n if (!items || items.length === 0) {\n return []\n }\n return Object.keys(items[0].values)\n })\n\n const copyTable = () => {\n const items = toolPart.value.input?.items\n if (!items) {\n return\n }\n const header = ['', ...items.map((i) => i.name)].join('\\t')\n const rows = features.value.map((f) =>\n [f.replace(/_/g, ' '), ...items.map((i) => i.values[f] ?? '')].join(\n '\\t',\n ),\n )\n copy([header, ...rows].join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.items?.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:scales-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{\n toolPart.input.title ?? $t('label.comparison')\n }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyTable\" />\n </VvButtonGroup>\n </div>\n <div class=\"overflow-x-auto\">\n <table class=\"w-full text-12 border-collapse\">\n <thead>\n <tr>\n <th\n class=\"text-left text-word-3 font-medium p-8 border-b border-surface-3 min-w-32\"></th>\n <th\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center font-semibold text-word-1 p-8 border-b border-surface-3 min-w-24\"\n :class=\"\n item.highlighted\n ? 'bg-primary/5 border-primary/20'\n : ''\n \">\n {{ item.name }}\n <span v-if=\"item.highlighted\" class=\"ml-4\">⭐</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(feature, fIdx) in features\"\n :key=\"feature\"\n :class=\"{ 'bg-surface-1': fIdx % 2 !== 0 }\">\n <td\n class=\"text-word-3 font-medium p-8 whitespace-nowrap\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n }\">\n {{ feature.replace(/_/g, ' ') }}\n </td>\n <td\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center p-8\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n 'bg-surface-info': item.highlighted,\n 'text-success': item.values[feature] === '✓',\n 'text-danger':\n item.values[feature] === '\\u2717',\n 'text-word-2':\n item.values[feature] !== '✓' &&\n item.values[feature] !== '\\u2717',\n }\">\n {{ item.values[feature] ?? '—' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAII,IAAM,IAAQ,GAIR,EAAE,SAAM,cAAW,GAAa,EAEhC,IAAW,QACA,EAAM,KAWtB,EAEK,IAAW,QAAe;GAC5B,IAAM,IAAQ,EAAS,MAAM,OAAO;AAIpC,UAHI,CAAC,KAAS,EAAM,WAAW,IACpB,EAAC,GAEL,OAAO,KAAK,E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,EAAmD,QAAnD,GAA2C,IAAC,IAAA,EAAA,IAAA,GAAA,CAAA,EAAA,EAAA,eAIxD,EA+BQ,SAAA,MAAA,EAAA,EAAA,GAAA,EA9BJ,EA6BK,GAAA,MAAA,EA5ByB,EAAA,QAAlB,GAAS,YADrB,EA6BK,MAAA;IA3BA,KAAK;IACL,OAAK,EAAA,EAAA,gBAAoB,IAAI,KAAA,GAAA,CAAA;OAC9B,EAOK,MAAA,EAND,OAAK,EAAA,CAAC,iDAA+C,EAAA,6BACsD,MAAS,EAAA,MAAS,SAAM,GAAA,CAAA,CAAA,EAAA,EAAA,EAIhI,EAAQ,QAAO,MAAA,IAAA,CAAA,EAAA,EAAA,GAAA,EAAA,GAAA,EAEtB,EAgBK,GAAA,MAAA,EAfc,EAAA,MAAS,MAAM,QAAvB,YADX,EAgBK,MAAA;IAdA,KAAK,EAAK;IACX,OAAK,EAAA,CAAC,mBAAiB;kCACoF,MAAS,EAAA,MAAS,SAAM;wBAAyD,EAAK;qBAA6D,EAAK,OAAO,OAAO;oBAA8F,EAAK,OAAO,OAAO;oBAAmG,EAAK,OAAO,OAAO,OAAiD,EAAK,OAAO,OAAO;;QAWzjB,EAAK,OAAO,MAAO,IAAA,EAAA,EAAA"}
|
|
1
|
+
{"version":3,"file":"PkToolShowComparison-C2ZUH0w4.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowComparison.vue","../../../../packages/components/src/chat/PkToolShowComparison.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title?: string\n items: Array<{\n name: string\n values: Record<string, string>\n highlighted?: boolean\n }>\n }\n }\n return part\n })\n\n const features = computed(() => {\n const items = toolPart.value.input?.items\n if (!items || items.length === 0) {\n return []\n }\n return Object.keys(items[0].values)\n })\n\n const copyTable = () => {\n const items = toolPart.value.input?.items\n if (!items) {\n return\n }\n const header = ['', ...items.map((i) => i.name)].join('\\t')\n const rows = features.value.map((f) =>\n [f.replace(/_/g, ' '), ...items.map((i) => i.values[f] ?? '')].join(\n '\\t',\n ),\n )\n copy([header, ...rows].join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.items?.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:scales-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{\n toolPart.input.title ?? $t('label.comparison')\n }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyTable\" />\n </VvButtonGroup>\n </div>\n <div class=\"overflow-x-auto\">\n <table class=\"w-full text-12 border-collapse\">\n <thead>\n <tr>\n <th\n class=\"text-left text-word-3 font-medium p-8 border-b border-surface-3 min-w-32\"></th>\n <th\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center font-semibold text-word-1 p-8 border-b border-surface-3 min-w-24\"\n :class=\"\n item.highlighted\n ? 'bg-primary/5 border-primary/20'\n : ''\n \">\n {{ item.name }}\n <span v-if=\"item.highlighted\" class=\"ml-4\">⭐</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(feature, fIdx) in features\"\n :key=\"feature\"\n :class=\"{ 'bg-surface-1': fIdx % 2 !== 0 }\">\n <td\n class=\"text-word-3 font-medium p-8 whitespace-nowrap\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n }\">\n {{ feature.replace(/_/g, ' ') }}\n </td>\n <td\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center p-8\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n 'bg-surface-info': item.highlighted,\n 'text-success': item.values[feature] === '✓',\n 'text-danger':\n item.values[feature] === '\\u2717',\n 'text-word-2':\n item.values[feature] !== '✓' &&\n item.values[feature] !== '\\u2717',\n }\">\n {{ item.values[feature] ?? '—' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title?: string\n items: Array<{\n name: string\n values: Record<string, string>\n highlighted?: boolean\n }>\n }\n }\n return part\n })\n\n const features = computed(() => {\n const items = toolPart.value.input?.items\n if (!items || items.length === 0) {\n return []\n }\n return Object.keys(items[0].values)\n })\n\n const copyTable = () => {\n const items = toolPart.value.input?.items\n if (!items) {\n return\n }\n const header = ['', ...items.map((i) => i.name)].join('\\t')\n const rows = features.value.map((f) =>\n [f.replace(/_/g, ' '), ...items.map((i) => i.values[f] ?? '')].join(\n '\\t',\n ),\n )\n copy([header, ...rows].join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.items?.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:scales-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{\n toolPart.input.title ?? $t('label.comparison')\n }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyTable\" />\n </VvButtonGroup>\n </div>\n <div class=\"overflow-x-auto\">\n <table class=\"w-full text-12 border-collapse\">\n <thead>\n <tr>\n <th\n class=\"text-left text-word-3 font-medium p-8 border-b border-surface-3 min-w-32\"></th>\n <th\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center font-semibold text-word-1 p-8 border-b border-surface-3 min-w-24\"\n :class=\"\n item.highlighted\n ? 'bg-primary/5 border-primary/20'\n : ''\n \">\n {{ item.name }}\n <span v-if=\"item.highlighted\" class=\"ml-4\">⭐</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(feature, fIdx) in features\"\n :key=\"feature\"\n :class=\"{ 'bg-surface-1': fIdx % 2 !== 0 }\">\n <td\n class=\"text-word-3 font-medium p-8 whitespace-nowrap\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n }\">\n {{ feature.replace(/_/g, ' ') }}\n </td>\n <td\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center p-8\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n 'bg-surface-info': item.highlighted,\n 'text-success': item.values[feature] === '✓',\n 'text-danger':\n item.values[feature] === '\\u2717',\n 'text-word-2':\n item.values[feature] !== '✓' &&\n item.values[feature] !== '\\u2717',\n }\">\n {{ item.values[feature] ?? '—' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAII,IAAM,IAAQ,GAIR,EAAE,SAAM,cAAW,GAAa,EAEhC,IAAW,QACA,EAAM,KAWtB,EAEK,IAAW,QAAe;GAC5B,IAAM,IAAQ,EAAS,MAAM,OAAO;AAIpC,UAHI,CAAC,KAAS,EAAM,WAAW,IACpB,EAAC,GAEL,OAAO,KAAK,EAAM,GAAG,OAAM;IACrC,EAEK,UAAkB;GACpB,IAAM,IAAQ,EAAS,MAAM,OAAO;AAC/B,QASL,EAAK,CANU,CAAC,IAAI,GAAG,EAAM,KAAK,MAAM,EAAE,KAAK,CAAC,CAAC,KAAK,I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B,GAAS,YADrB,EA6BK,MAAA;IA3BA,KAAK;IACL,OAAK,EAAA,EAAA,gBAAoB,IAAI,KAAA,GAAA,CAAA;OAC9B,EAOK,MAAA,EAND,OAAK,EAAA,CAAC,iDAA+C,EAAA,6BACsD,MAAS,EAAA,MAAS,SAAM,GAAA,CAAA,CAAA,EAAA,EAAA,EAIhI,EAAQ,QAAO,MAAA,IAAA,CAAA,EAAA,EAAA,GAAA,EAAA,GAAA,EAEtB,EAgBK,GAAA,MAAA,EAfc,EAAA,MAAS,MAAM,QAAvB,YADX,EAgBK,MAAA;IAdA,KAAK,EAAK;IACX,OAAK,EAAA,CAAC,mBAAiB;kCACoF,MAAS,EAAA,MAAS,SAAM;wBAAyD,EAAK;qBAA6D,EAAK,OAAO,OAAO;oBAA8F,EAAK,OAAO,OAAO;oBAAmG,EAAK,OAAO,OAAO,OAAiD,EAAK,OAAO,OAAO;;QAWzjB,EAAK,OAAO,MAAO,IAAA,EAAA,EAAA"}
|
package/dist/_chunks/{PkToolShowContactForm-SmOSbCsp.js → PkToolShowContactForm-6C4uWDtf.js}
RENAMED
|
@@ -3,7 +3,7 @@ import { $ as t, B as n, D as r, E as i, Gt as a, I as o, L as s, T as c, U as l
|
|
|
3
3
|
import { n as k } from "./vue-i18n-KvYvoek4.js";
|
|
4
4
|
import { g as A, h as j, u as M } from "./dist-DtF6poRc.js";
|
|
5
5
|
import { n as N, t as P } from "./dot-prop-ByInxMX6.js";
|
|
6
|
-
import {
|
|
6
|
+
import { c as F, o as I } from "./index.es-BGFmj59S.js";
|
|
7
7
|
import { D as L, E as R, O as z, T as ee, l as te, m as ne, v as B } from "./schemas-Bp3a8tYV.js";
|
|
8
8
|
import { f as re } from "./src-C_wl-KYN.js";
|
|
9
9
|
import { t as ie } from "./PkStreamingMarkdown-orhL2kzD.js";
|
|
@@ -1028,7 +1028,7 @@ var Le = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
1028
1028
|
});
|
|
1029
1029
|
}, v = Ie(() => i.privacyPolicyNotice, "message.defaultPrivacyPolicyNotice");
|
|
1030
1030
|
return (n, i) => {
|
|
1031
|
-
let o =
|
|
1031
|
+
let o = I, s = F;
|
|
1032
1032
|
return O(), E("div", Le, [C("div", Re, [T(o, {
|
|
1033
1033
|
name: "ri:send-plane-2-line",
|
|
1034
1034
|
class: "text-16"
|
|
@@ -1100,4 +1100,4 @@ var Le = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
|
|
|
1100
1100
|
//#endregion
|
|
1101
1101
|
export { W as a, H as c, Fe as i, oe as l, Je as n, U as o, Ie as r, se as s, Ye as t, V as u };
|
|
1102
1102
|
|
|
1103
|
-
//# sourceMappingURL=PkToolShowContactForm-
|
|
1103
|
+
//# sourceMappingURL=PkToolShowContactForm-6C4uWDtf.js.map
|