@8wave/ai-elements 0.115.0-beta.60 → 0.115.0-beta.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{Agent-Bz23Ejuh.js → Agent-B5gICwnq.js} +2 -5
- package/dist/_chunks/Agent-B5gICwnq.js.map +1 -0
- package/dist/_chunks/{PkChatbotFilePreview-CyaNjBrA.js → PkChatbotFilePreview-Dc9NJ0WF.js} +2 -2
- package/dist/_chunks/{PkChatbotFilePreview-CyaNjBrA.js.map → PkChatbotFilePreview-Dc9NJ0WF.js.map} +1 -1
- package/dist/_chunks/{PkHeldImage-CtqqMvpW.js → PkHeldImage-B4gZSfa6.js} +2 -2
- package/dist/_chunks/{PkHeldImage-CtqqMvpW.js.map → PkHeldImage-B4gZSfa6.js.map} +1 -1
- package/dist/_chunks/{PkLazyImg-Ci06XyhW.js → PkLazyImg-DT3U67q-.js} +3 -2
- package/dist/_chunks/PkLazyImg-DT3U67q-.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-DbSttKVa.js → PkStreamingMarkdown-LBiDnEgV.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-DbSttKVa.js.map → PkStreamingMarkdown-LBiDnEgV.js.map} +1 -1
- package/dist/_chunks/{PkToolEditSpreadsheet-BrYSJlT4.js → PkToolEditSpreadsheet-YoiuyH9p.js} +3 -3
- package/dist/_chunks/{PkToolEditSpreadsheet-BrYSJlT4.js.map → PkToolEditSpreadsheet-YoiuyH9p.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-D4rIR3LN.js → PkToolRequestGeolocation-m-IXD3Dg.js} +7 -4
- package/dist/_chunks/PkToolRequestGeolocation-m-IXD3Dg.js.map +1 -0
- package/dist/_chunks/{PkToolRequestOAuthConnection-epwcNb5F.js → PkToolRequestOAuthConnection-BLEQZ51Y.js} +3 -3
- package/dist/_chunks/{PkToolRequestOAuthConnection-epwcNb5F.js.map → PkToolRequestOAuthConnection-BLEQZ51Y.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-BGUn1sMi.js → PkToolShowArtifact-KbxEd7Tv.js} +3 -3
- package/dist/_chunks/{PkToolShowArtifact-BGUn1sMi.js.map → PkToolShowArtifact-KbxEd7Tv.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-DwxqgAUr.js → PkToolShowCalendarEvent-DcaMadO7.js} +3 -3
- package/dist/_chunks/PkToolShowCalendarEvent-DcaMadO7.js.map +1 -0
- package/dist/_chunks/{PkToolShowComparison-hDhhVvwp.js → PkToolShowComparison-DcXSOyMw.js} +2 -2
- package/dist/_chunks/{PkToolShowComparison-hDhhVvwp.js.map → PkToolShowComparison-DcXSOyMw.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-ChaAOt5I.js → PkToolShowContactForm-BjlnuEVy.js} +4 -4
- package/dist/_chunks/{PkToolShowContactForm-ChaAOt5I.js.map → PkToolShowContactForm-BjlnuEVy.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-CyNPq6j7.js → PkToolShowDiagram-BgyU0CGk.js} +2 -2
- package/dist/_chunks/{PkToolShowDiagram-CyNPq6j7.js.map → PkToolShowDiagram-BgyU0CGk.js.map} +1 -1
- package/dist/_chunks/{PkToolShowEmail-BM16pMjW.js → PkToolShowEmail-AWhVo3l3.js} +2 -2
- package/dist/_chunks/{PkToolShowEmail-BM16pMjW.js.map → PkToolShowEmail-AWhVo3l3.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-BpTuRgHg.js → PkToolShowForm-CaYPCOeb.js} +110 -100
- package/dist/_chunks/PkToolShowForm-CaYPCOeb.js.map +1 -0
- package/dist/_chunks/{PkToolShowImageGallery-CgjP34RE.js → PkToolShowImageGallery-CTuPFowW.js} +4 -4
- package/dist/_chunks/{PkToolShowImageGallery-CgjP34RE.js.map → PkToolShowImageGallery-CTuPFowW.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-rK5fcW4y.js → PkToolShowLocation-Bf4jmDYQ.js} +2 -2
- package/dist/_chunks/{PkToolShowLocation-rK5fcW4y.js.map → PkToolShowLocation-Bf4jmDYQ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMessage-DgT-JkYg.js → PkToolShowMessage-DlckklB3.js} +2 -2
- package/dist/_chunks/{PkToolShowMessage-DgT-JkYg.js.map → PkToolShowMessage-DlckklB3.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-BIeg8NR-.js → PkToolShowProductList-CThKOr9K.js} +5 -5
- package/dist/_chunks/{PkToolShowProductList-BIeg8NR-.js.map → PkToolShowProductList-CThKOr9K.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-C2hZDGqM.js → PkToolShowQrCode-CFueYo4P.js} +2 -2
- package/dist/_chunks/{PkToolShowQrCode-C2hZDGqM.js.map → PkToolShowQrCode-CFueYo4P.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-B9nZyCAn.js → PkToolShowSources-DW4LZzdI.js} +49 -28
- package/dist/_chunks/PkToolShowSources-DW4LZzdI.js.map +1 -0
- package/dist/_chunks/{PkToolShowSuggestedReply-D6g3UYqI.js → PkToolShowSuggestedReply-C81p7lmP.js} +3 -3
- package/dist/_chunks/{PkToolShowSuggestedReply-D6g3UYqI.js.map → PkToolShowSuggestedReply-C81p7lmP.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-B6GG8PJm.js → PkToolShowVideo-BBdH255K.js} +4 -4
- package/dist/_chunks/{PkToolShowVideo-B6GG8PJm.js.map → PkToolShowVideo-BBdH255K.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-C80WsCYi.js → PkToolShowWeather-BVllZARr.js} +2 -2
- package/dist/_chunks/{PkToolShowWeather-C80WsCYi.js.map → PkToolShowWeather-BVllZARr.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BkUh-IyZ.js → PkToolShowWebPages-Bbc8WuLf.js} +5 -5
- package/dist/_chunks/{PkToolShowWebPages-BkUh-IyZ.js.map → PkToolShowWebPages-Bbc8WuLf.js.map} +1 -1
- package/dist/_chunks/{VvCheckbox.es-UTRUhwdC.js → VvCheckbox.es-DKT8ys4U.js} +2 -2
- package/dist/_chunks/{VvCheckbox.es-UTRUhwdC.js.map → VvCheckbox.es-DKT8ys4U.js.map} +1 -1
- package/dist/_chunks/{VvCheckboxGroup.es-Cj7KLXHq.js → VvCheckboxGroup.es-BR2Zrit_.js} +2 -2
- package/dist/_chunks/{VvCheckboxGroup.es-Cj7KLXHq.js.map → VvCheckboxGroup.es-BR2Zrit_.js.map} +1 -1
- package/dist/_chunks/{VvCombobox.es-DptfdnAe.js → VvCombobox.es-DWJtN8ha.js} +2 -2
- package/dist/_chunks/{VvCombobox.es-DptfdnAe.js.map → VvCombobox.es-DWJtN8ha.js.map} +1 -1
- package/dist/_chunks/{VvInputText.es-DqLQDq9I.js → VvInputText.es-BH6ohnZF.js} +2 -2
- package/dist/_chunks/{VvInputText.es-DqLQDq9I.js.map → VvInputText.es-BH6ohnZF.js.map} +1 -1
- package/dist/_chunks/{VvRadio.es-D7Ws1in6.js → VvRadio.es-L9HmgYh4.js} +2 -2
- package/dist/_chunks/{VvRadio.es-D7Ws1in6.js.map → VvRadio.es-L9HmgYh4.js.map} +1 -1
- package/dist/_chunks/{VvRadioGroup.es-BDgpsR9Z.js → VvRadioGroup.es-Dyip2x3c.js} +2 -2
- package/dist/_chunks/{VvRadioGroup.es-BDgpsR9Z.js.map → VvRadioGroup.es-Dyip2x3c.js.map} +1 -1
- package/dist/_chunks/{VvSelect.es-DWbNpZKw.js → VvSelect.es-B8GZOw4X.js} +2 -2
- package/dist/_chunks/{VvSelect.es-DWbNpZKw.js.map → VvSelect.es-B8GZOw4X.js.map} +1 -1
- package/dist/_chunks/{VvTextarea.es-5UD9_C3G.js → VvTextarea.es-7E1SuavW.js} +2 -2
- package/dist/_chunks/{VvTextarea.es-5UD9_C3G.js.map → VvTextarea.es-7E1SuavW.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-Cnmsgd96.js → chatImagePolicy-LzNQAjTs.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-Cnmsgd96.js.map → chatImagePolicy-LzNQAjTs.js.map} +1 -1
- package/dist/_chunks/{index.es-D9VqgSyV.js → index.es-DJbHM2zZ.js} +10 -10
- package/dist/_chunks/{index.es-D9VqgSyV.js.map → index.es-DJbHM2zZ.js.map} +1 -1
- package/dist/_chunks/{index.es-B9zAw2XU.js → index.es-D_E1Gj_U.js} +2 -2
- package/dist/_chunks/{index.es-B9zAw2XU.js.map → index.es-D_E1Gj_U.js.map} +1 -1
- package/dist/_chunks/{markdown-25UY48qE.js → markdown-CQLsnBKV.js} +2 -2
- package/dist/_chunks/{markdown-25UY48qE.js.map → markdown-CQLsnBKV.js.map} +1 -1
- package/dist/ai-elements.es.js +293 -221
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAuth.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotFeedbackForm.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-Ci7XnQ12.js → Agent-iJ7nRWUV.js} +3 -7
- package/dist-vue/_chunks/Agent-iJ7nRWUV.js.map +1 -0
- package/dist-vue/_chunks/{Document-Bhlc3wdt.js → Document-BFyHxMgI.js} +2 -2
- package/dist-vue/_chunks/{Document-Bhlc3wdt.js.map → Document-BFyHxMgI.js.map} +1 -1
- package/dist-vue/_chunks/{PkAvatar-paEJByEA.js → PkAvatar-ZgCsoO-p.js} +2 -2
- package/dist-vue/_chunks/PkAvatar-ZgCsoO-p.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-C05Rv5zO.js → PkChatbot-Ct2nH8y4.js} +9 -9
- package/dist-vue/_chunks/{PkChatbot-C05Rv5zO.js.map → PkChatbot-Ct2nH8y4.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotAuth-DD5RF7kY.js → PkChatbotAuth-CwsXLIku.js} +4 -4
- package/dist-vue/_chunks/PkChatbotAuth-CwsXLIku.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-B5qeL1kv.js → PkChatbotEmptyState-CQCBF59f.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotEmptyState-B5qeL1kv.js.map → PkChatbotEmptyState-CQCBF59f.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BJ_Omuq2.js → PkChatbotFeedbackForm-CYiwvSs_.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BJ_Omuq2.js.map → PkChatbotFeedbackForm-CYiwvSs_.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-BLzTQmvy.js → PkChatbotInput-D7IIfTw1.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-BLzTQmvy.js.map → PkChatbotInput-D7IIfTw1.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-CxTz0W0d.js → PkChatbotMessages-DJPqKh-G.js} +19 -19
- package/dist-vue/_chunks/{PkChatbotMessages-CxTz0W0d.js.map → PkChatbotMessages-DJPqKh-G.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-B04aqOGu.js → PkChatbotStepPayload-dl2-8f27.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-B04aqOGu.js.map → PkChatbotStepPayload-dl2-8f27.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-yII_Dk3p.js → PkChatbotStepToolDetail-f8zOnu2W.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-yII_Dk3p.js.map → PkChatbotStepToolDetail-f8zOnu2W.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-DYiCeWOd.js → PkChatbotSteps-CeuoK2Gk.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-DYiCeWOd.js.map → PkChatbotSteps-CeuoK2Gk.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-s-Vx4U1E.js → PkChatbotViewChat-X9L9a53H.js} +8 -8
- package/dist-vue/_chunks/{PkChatbotViewChat-s-Vx4U1E.js.map → PkChatbotViewChat-X9L9a53H.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-D7XHDBGS.js → PkChatbotViewConversations-NNzeW5c6.js} +4 -2
- package/dist-vue/_chunks/PkChatbotViewConversations-NNzeW5c6.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewFiles-t07w-VNZ.js → PkChatbotViewFiles-nn23dc0W.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-t07w-VNZ.js.map → PkChatbotViewFiles-nn23dc0W.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-DJT5AEkZ.js → PkChatbotViewProfile-CzY3lj4N.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewProfile-DJT5AEkZ.js.map → PkChatbotViewProfile-CzY3lj4N.js.map} +1 -1
- package/dist-vue/_chunks/{PkLazyImg-CDxX9xnq.js → PkLazyImg-X5BMNU_R.js} +2 -1
- package/dist-vue/_chunks/PkLazyImg-X5BMNU_R.js.map +1 -0
- package/dist-vue/_chunks/{PkStreamingMarkdown-ALhm02o3.js → PkStreamingMarkdown-CCu2pX2c.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-ALhm02o3.js.map → PkStreamingMarkdown-CCu2pX2c.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-DU3RBd6q.js → PkToolEditSpreadsheet-DYcRLINr.js} +2 -2
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-DU3RBd6q.js.map → PkToolEditSpreadsheet-DYcRLINr.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-CE4zQofM.js → PkToolRequestGeolocation-DLU21rbD.js} +6 -3
- package/dist-vue/_chunks/PkToolRequestGeolocation-DLU21rbD.js.map +1 -0
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CAk5s541.js → PkToolRequestOAuthConnection-BS9Wtn1m.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CAk5s541.js.map → PkToolRequestOAuthConnection-BS9Wtn1m.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-CA1sKasD.js → PkToolShowArtifact-B3b6LYSx.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CA1sKasD.js.map → PkToolShowArtifact-B3b6LYSx.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowCalendarEvent-Cb3lmDQZ.js → PkToolShowCalendarEvent-CL5valn9.js} +2 -2
- package/dist-vue/_chunks/PkToolShowCalendarEvent-CL5valn9.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowContactForm-C0QHEj5k.js → PkToolShowContactForm-C7LaYE_c.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowContactForm-C0QHEj5k.js.map → PkToolShowContactForm-C7LaYE_c.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-CQUd_reA.js → PkToolShowDiagram-CR-TthJm.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-CQUd_reA.js.map → PkToolShowDiagram-CR-TthJm.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-B_ezmfuo.js → PkToolShowForm-BDaYT4E0.js} +100 -90
- package/dist-vue/_chunks/PkToolShowForm-BDaYT4E0.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowImageGallery-B8gmmHvk.js → PkToolShowImageGallery-ER7LyVJD.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-B8gmmHvk.js.map → PkToolShowImageGallery-ER7LyVJD.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-BMvt5mKe.js → PkToolShowProductList-B3iZIwOJ.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowProductList-BMvt5mKe.js.map → PkToolShowProductList-B3iZIwOJ.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowSources-ITHEa-D-.js +263 -0
- package/dist-vue/_chunks/PkToolShowSources-ITHEa-D-.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BE6gBA-2.js → PkToolShowSuggestedReply-CZm_THD0.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BE6gBA-2.js.map → PkToolShowSuggestedReply-CZm_THD0.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-ZPDVzjPX.js → PkToolShowVideo-Pe0DhYm5.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-ZPDVzjPX.js.map → PkToolShowVideo-Pe0DhYm5.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-dI4WMr7F.js → PkToolShowWebPages-ZfGH4XNP.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowWebPages-dI4WMr7F.js.map → PkToolShowWebPages-ZfGH4XNP.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-IlTQndxL.js → createChatbotApiClient-BVC9GxV_.js} +2 -2
- package/dist-vue/_chunks/createChatbotApiClient-BVC9GxV_.js.map +1 -0
- package/dist-vue/_chunks/{index.es-VzNLOQUv.js → index.es-Io4Mdm4X.js} +2 -2
- package/dist-vue/_chunks/{index.es-VzNLOQUv.js.map → index.es-Io4Mdm4X.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-CtJ3bwuy.js → useChatbotStore-Drg3gBff.js} +3 -3
- package/dist-vue/_chunks/{useChatbotStore-CtJ3bwuy.js.map → useChatbotStore-Drg3gBff.js.map} +1 -1
- package/dist-vue/_chunks/{utils-BzypADaU.js → utils-wUVFCJMG.js} +2 -2
- package/dist-vue/_chunks/{utils-BzypADaU.js.map → utils-wUVFCJMG.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +261 -191
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +249 -201
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +171 -169
- package/dist-vue/packages/ability/src/types.d.ts +0 -1
- package/dist-vue/packages/components/src/chat/PkDocumentHeader.d.ts +5 -0
- package/dist-vue/packages/components/src/chat/PkMessageDetail.d.ts +2 -2
- package/dist-vue/packages/components/src/table/PkTableSortable.d.ts +4 -0
- package/dist-vue/packages/composable/src/useBranding.d.ts +0 -1
- package/dist-vue/packages/models/src/schema/Branding.d.ts +21 -9
- package/dist-vue/packages/models/src/schema/TimingLog.d.ts +4 -6
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-Bz23Ejuh.js.map +0 -1
- package/dist/_chunks/PkLazyImg-Ci06XyhW.js.map +0 -1
- package/dist/_chunks/PkToolRequestGeolocation-D4rIR3LN.js.map +0 -1
- package/dist/_chunks/PkToolShowCalendarEvent-DwxqgAUr.js.map +0 -1
- package/dist/_chunks/PkToolShowForm-BpTuRgHg.js.map +0 -1
- package/dist/_chunks/PkToolShowSources-B9nZyCAn.js.map +0 -1
- package/dist-vue/_chunks/Agent-Ci7XnQ12.js.map +0 -1
- package/dist-vue/_chunks/PkAvatar-paEJByEA.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotAuth-DD5RF7kY.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-D7XHDBGS.js.map +0 -1
- package/dist-vue/_chunks/PkLazyImg-CDxX9xnq.js.map +0 -1
- package/dist-vue/_chunks/PkToolRequestGeolocation-CE4zQofM.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowCalendarEvent-Cb3lmDQZ.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowForm-B_ezmfuo.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowSources-DEmjN0Ou.js +0 -242
- package/dist-vue/_chunks/PkToolShowSources-DEmjN0Ou.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-IlTQndxL.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $ as e, C as t, Ct as n, L as r, O as i, T as a, Tt as o, b as s, bt as c, h as l, it as u, m as d, v as f, x as p, xt as m } from "./vue.runtime.esm-bundler-B-NVlZCY.js";
|
|
2
2
|
import { i as h } from "./dist-Ce9Hi58x.js";
|
|
3
|
-
import { a as g, d as _, r as v, t as y, u as b } from "./index.es-
|
|
3
|
+
import { a as g, d as _, r as v, t as y, u as b } from "./index.es-D_E1Gj_U.js";
|
|
4
4
|
import { n as x } from "./useShortUrlResolver-Ddb9IUei.js";
|
|
5
5
|
//#region ../../packages/components/src/chat/PkToolShowMessage.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
i(), m(), u();
|
|
@@ -75,4 +75,4 @@ var S = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-s
|
|
|
75
75
|
//#endregion
|
|
76
76
|
export { O as default };
|
|
77
77
|
|
|
78
|
-
//# sourceMappingURL=PkToolShowMessage-
|
|
78
|
+
//# sourceMappingURL=PkToolShowMessage-DlckklB3.js.map
|
package/dist/_chunks/{PkToolShowMessage-DgT-JkYg.js.map → PkToolShowMessage-DlckklB3.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PkToolShowMessage-DgT-JkYg.js","names":["$t","__unplugin_components_0","__unplugin_components_1","__unplugin_components_2","__unplugin_components_3","__unplugin_components_4","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_withCtx","_unref","_normalizeProps","_guardReactiveProps","_createTextVNode","_sfc_main","withCtx","defineComponent","normalizeProps","openBlock","init_runtime_core_esm_bundler","guardReactiveProps","toDisplayString","createTextVNode","unref","createBaseVNode","init_reactivity_esm_bundler","computed","createElementBlock","createVNode","init_shared_esm_bundler","useClipboard","Qi","ru","Ca","Ae","ra","useShortUrlResolver","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","PkToolShowMessage_default","props","__props","toolPart","body","resolveText","openInWhatsApp","url","openInTelegram","openInSms","_component_VvIcon","_component_VvButton","_component_VvDropdownAction","_component_VvDropdown","_component_VvButtonGroup","_ctx","copied","_cache","copy"],"sources":["../../../../packages/components/src/chat/PkToolShowMessage.vue","../../../../packages/components/src/chat/PkToolShowMessage.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useShortUrlResolver } from 'composables'\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 body: string\n }\n }\n return part\n })\n\n // Messages leave the app (WhatsApp/Telegram/SMS/clipboard), so expand short\n // urls to their real target rather than keeping the fragile `/api/r/` link.\n const { resolveText } = useShortUrlResolver()\n const body = resolveText(() => toolPart.value.input?.body)\n\n const openInWhatsApp = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://wa.me/?text=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInTelegram = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://t.me/share/url?text=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInSms = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `sms:?body=${encodeURIComponent(body.value)}`\n window.open(url)\n }\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:chat-1-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.message') }}\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=\"copy(body)\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n icon=\"ri:send-plane-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.send')\" />\n <template #items>\n <VvDropdownAction @click=\"openInWhatsApp\">\n <VvIcon name=\"ri:whatsapp-line\" />\n {{ $t('action.openInWhatsApp') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInTelegram\">\n <VvIcon name=\"ri:telegram-line\" />\n {{ $t('action.openInTelegram') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInSms\">\n <VvIcon name=\"ri:message-2-line\" />\n {{ $t('action.openInSms') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.body') }}\n </div>\n <pre class=\"text-word-2 whitespace-pre-wrap break-words\">{{\n body\n }}</pre>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useShortUrlResolver } from 'composables'\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 body: string\n }\n }\n return part\n })\n\n // Messages leave the app (WhatsApp/Telegram/SMS/clipboard), so expand short\n // urls to their real target rather than keeping the fragile `/api/r/` link.\n const { resolveText } = useShortUrlResolver()\n const body = resolveText(() => toolPart.value.input?.body)\n\n const openInWhatsApp = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://wa.me/?text=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInTelegram = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://t.me/share/url?text=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInSms = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `sms:?body=${encodeURIComponent(body.value)}`\n window.open(url)\n }\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:chat-1-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.message') }}\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=\"copy(body)\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n icon=\"ri:send-plane-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.send')\" />\n <template #items>\n <VvDropdownAction @click=\"openInWhatsApp\">\n <VvIcon name=\"ri:whatsapp-line\" />\n {{ $t('action.openInWhatsApp') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInTelegram\">\n <VvIcon name=\"ri:telegram-line\" />\n {{ $t('action.openInTelegram') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInSms\">\n <VvIcon name=\"ri:message-2-line\" />\n {{ $t('action.openInSms') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.body') }}\n </div>\n <pre class=\"text-word-2 whitespace-pre-wrap break-words\">{{\n body\n }}</pre>\n </div>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,EAAAC,EAzBD;;;;;;KAMP,CAAA,CAAA,GAAA;MAKU,OAAKH,QAIO;OAHnBF,EAGmBgD,GAAA,EAHA,SAAON,EAAc,GAAA;QACpC,SAAAxC,QAAkC,CAAlCF,EAAkC8C,GAAA,EAA1B,MAAK,mBAAkB,CAAA,GAAGxC,EAAA,MAClCL,EAAGV,EAAAA,GAAE,uBAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;;OAETS,EAGmBgD,GAAA,EAHA,SAAOJ,EAAc,GAAA;QACpC,SAAA1C,QAAkC,CAAlCF,EAAkC8C,GAAA,EAA1B,MAAK,mBAAkB,CAAA,GAAGxC,EAAA,MAClCL,EAAGV,EAAAA,GAAE,uBAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;;OAETS,EAGmBgD,GAAA,EAHA,SAAOH,EAAS,GAAA;QAC/B,SAAA3C,QAAmC,CAAnCF,EAAmC8C,GAAA,EAA3B,MAAK,oBAAmB,CAAA,GAAGxC,EAAA,MACnCL,EAAGV,EAAAA,GAAE,kBAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;;;MAfb,SAAAW,QAGiC,CAHjCF,EAGiC+C,GAAA;OAF7B,MAAK;OACL,WAAU;OACT,OAAOxD,EAAAA,GAAE,aAAA;;;;;;GAkB1BQ,CAAAA,GAAAA,EAOM,OAPNkC,GAOM,CANFlC,EAEM,OAFNmC,GAEMjC,EADCV,EAAAA,GAAE,YAAA,CAAA,GAAA,CAAA,GAETQ,EAEQ,OAFRoC,GAEQlC,EADJE,EAAAqC,CAAA,CAAI,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"PkToolShowMessage-DlckklB3.js","names":["$t","__unplugin_components_0","__unplugin_components_1","__unplugin_components_2","__unplugin_components_3","__unplugin_components_4","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_withCtx","_unref","_normalizeProps","_guardReactiveProps","_createTextVNode","_sfc_main","withCtx","defineComponent","normalizeProps","openBlock","init_runtime_core_esm_bundler","guardReactiveProps","toDisplayString","createTextVNode","unref","createBaseVNode","init_reactivity_esm_bundler","computed","createElementBlock","createVNode","init_shared_esm_bundler","useClipboard","Qi","ru","Ca","Ae","ra","useShortUrlResolver","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","PkToolShowMessage_default","props","__props","toolPart","body","resolveText","openInWhatsApp","url","openInTelegram","openInSms","_component_VvIcon","_component_VvButton","_component_VvDropdownAction","_component_VvDropdown","_component_VvButtonGroup","_ctx","copied","_cache","copy"],"sources":["../../../../packages/components/src/chat/PkToolShowMessage.vue","../../../../packages/components/src/chat/PkToolShowMessage.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useShortUrlResolver } from 'composables'\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 body: string\n }\n }\n return part\n })\n\n // Messages leave the app (WhatsApp/Telegram/SMS/clipboard), so expand short\n // urls to their real target rather than keeping the fragile `/api/r/` link.\n const { resolveText } = useShortUrlResolver()\n const body = resolveText(() => toolPart.value.input?.body)\n\n const openInWhatsApp = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://wa.me/?text=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInTelegram = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://t.me/share/url?text=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInSms = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `sms:?body=${encodeURIComponent(body.value)}`\n window.open(url)\n }\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:chat-1-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.message') }}\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=\"copy(body)\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n icon=\"ri:send-plane-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.send')\" />\n <template #items>\n <VvDropdownAction @click=\"openInWhatsApp\">\n <VvIcon name=\"ri:whatsapp-line\" />\n {{ $t('action.openInWhatsApp') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInTelegram\">\n <VvIcon name=\"ri:telegram-line\" />\n {{ $t('action.openInTelegram') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInSms\">\n <VvIcon name=\"ri:message-2-line\" />\n {{ $t('action.openInSms') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.body') }}\n </div>\n <pre class=\"text-word-2 whitespace-pre-wrap break-words\">{{\n body\n }}</pre>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useShortUrlResolver } from 'composables'\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 body: string\n }\n }\n return part\n })\n\n // Messages leave the app (WhatsApp/Telegram/SMS/clipboard), so expand short\n // urls to their real target rather than keeping the fragile `/api/r/` link.\n const { resolveText } = useShortUrlResolver()\n const body = resolveText(() => toolPart.value.input?.body)\n\n const openInWhatsApp = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://wa.me/?text=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInTelegram = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://t.me/share/url?text=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInSms = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `sms:?body=${encodeURIComponent(body.value)}`\n window.open(url)\n }\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:chat-1-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.message') }}\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=\"copy(body)\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n icon=\"ri:send-plane-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.send')\" />\n <template #items>\n <VvDropdownAction @click=\"openInWhatsApp\">\n <VvIcon name=\"ri:whatsapp-line\" />\n {{ $t('action.openInWhatsApp') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInTelegram\">\n <VvIcon name=\"ri:telegram-line\" />\n {{ $t('action.openInTelegram') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInSms\">\n <VvIcon name=\"ri:message-2-line\" />\n {{ $t('action.openInSms') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.body') }}\n </div>\n <pre class=\"text-word-2 whitespace-pre-wr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AAA,GAAAA,EA0BaiD,GAAA7C,EAAAC,EAzBD;;;;;;KAMP,CAAA,CAAA,GAAA;MAKU,OAAKH,QAIO;OAHnBF,EAGmBgD,GAAA,EAHA,SAAON,EAAc,GAAA;QACpC,SAAAxC,QAAkC,CAAlCF,EAAkC8C,GAAA,EAA1B,MAAK,mBAAkB,CAAA,GAAGxC,EAAA,MAClCL,EAAGV,EAAAA,GAAE,uBAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;;OAETS,EAGmBgD,GAAA,EAHA,SAAOJ,EAAc,GAAA;QACpC,SAAA1C,QAAkC,CAAlCF,EAAkC8C,GAAA,EAA1B,MAAK,mBAAkB,CAAA,GAAGxC,EAAA,MAClCL,EAAGV,EAAAA,GAAE,uBAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;;OAETS,EAGmBgD,GAAA,EAHA,SAAOH,EAAS,GAAA;QAC/B,SAAA3C,QAAmC,CAAnCF,EAAmC8C,GAAA,EAA3B,MAAK,oBAAmB,CAAA,GAAGxC,EAAA,MACnCL,EAAGV,EAAAA,GAAE,kBAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;;;MAfb,SAAAW,QAGiC,CAHjCF,EAGiC+C,GAAA;OAF7B,MAAK;OACL,WAAU;OACT,OAAOxD,EAAAA,GAAE,aAAA;;;;;;GAkB1BQ,CAAAA,GAAAA,EAOM,OAPNkC,GAOM,CANFlC,EAEM,OAFNmC,GAEMjC,EADCV,EAAAA,GAAE,YAAA,CAAA,GAAA,CAAA,GAETQ,EAEQ,OAFRoC,GAEQlC,EADJE,EAAAqC,CAAA,CAAI,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
|
package/dist/_chunks/{PkToolShowProductList-BIeg8NR-.js → PkToolShowProductList-CThKOr9K.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { $ as e, C as t, H as n, L as r, O as i, St as a, Tt as o, _ as s, bt as c, d as l, g as u, h as d, it as f, m as p, v as m, x as h, xt as g, z as _ } from "./vue.runtime.esm-bundler-B-NVlZCY.js";
|
|
2
|
-
import { t as v } from "./index.es-
|
|
3
|
-
import { n as y } from "./chatImagePolicy-
|
|
4
|
-
import { t as b } from "./PkHeldImage-
|
|
5
|
-
import { t as x } from "./PkLazyImg-
|
|
2
|
+
import { t as v } from "./index.es-D_E1Gj_U.js";
|
|
3
|
+
import { n as y } from "./chatImagePolicy-LzNQAjTs.js";
|
|
4
|
+
import { t as b } from "./PkHeldImage-B4gZSfa6.js";
|
|
5
|
+
import { t as x } from "./PkLazyImg-DT3U67q-.js";
|
|
6
6
|
import { t as S } from "./PkUrl-Bf9k9TRh.js";
|
|
7
7
|
//#region ../../packages/components/src/chat/PkToolShowProductList.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
i(), f(), g();
|
|
@@ -69,4 +69,4 @@ var C = {
|
|
|
69
69
|
//#endregion
|
|
70
70
|
export { j as default };
|
|
71
71
|
|
|
72
|
-
//# sourceMappingURL=PkToolShowProductList-
|
|
72
|
+
//# sourceMappingURL=PkToolShowProductList-CThKOr9K.js.map
|
package/dist/_chunks/{PkToolShowProductList-BIeg8NR-.js.map → PkToolShowProductList-CThKOr9K.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PkToolShowProductList-BIeg8NR-.js","names":["__unplugin_components_0","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeClass","_createBlock","_resolveDynamicComponent","_withCtx","_unref","PkHeldImage","PkLazyImg","_createCommentVNode","_createElementVNode","_toDisplayString","_createVNode","PkUrl","_sfc_main","withCtx","defineComponent","resolveDynamicComponent","openBlock","init_runtime_core_esm_bundler","normalizeClass","toDisplayString","createCommentVNode","unref","Fragment","createBlock","createBaseVNode","init_reactivity_esm_bundler","computed","createElementBlock","createVNode","init_shared_esm_bundler","renderList","Ae","useChatImageGate","PkHeldImage_default","PkLazyImg_default","PkUrl_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","PkToolShowProductList_default","props","__props","toolPart","imageGate","_component_VvIcon","index","product"],"sources":["../../../../packages/components/src/chat/PkToolShowProductList.vue","../../../../packages/components/src/chat/PkToolShowProductList.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import PkLazyImg from '../PkLazyImg.vue'\n import { useChatImageGate } from './chatImagePolicy'\n import PkHeldImage from './PkHeldImage.vue'\n import PkUrl from '../PkUrl.vue'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n products: Array<{\n name: string\n url?: string\n image?: string\n price?: string\n availability?: string\n description?: string\n }>\n }\n }\n return part\n })\n\n // The model writes these urls: one from a host the agent does not list\n // waits for a click (chatImagePolicy.ts).\n const imageGate = useChatImageGate()\n</script>\n\n<template>\n <ul\n v-if=\"toolPart?.input?.products?.length\"\n class=\"vv-item-group vv-item-group--framed w-full\">\n <li\n v-for=\"(product, index) in toolPart.input.products\"\n :key=\"index\"\n class=\"vv-item\"\n :class=\"{ 'vv-item--plain': !product.url }\">\n <!-- A product without a link answers no click: no hover, no hand -->\n <component\n :is=\"product.url ? 'a' : 'div'\"\n :href=\"product.url\"\n :target=\"product.url ? '_blank' : undefined\"\n :rel=\"product.url ? 'noopener noreferrer' : undefined\"\n class=\"vv-item__entry\">\n <!-- Merchant images rot over time: a dead one degrades to an icon\n so the row keeps its thumbnail slot -->\n <PkHeldImage\n v-if=\"product.image && !imageGate.canLoad(product.image)\"\n :host=\"imageGate.hostOf(product.image)\"\n class=\"w-48 h-48 rounded-lg shrink-0 border border-surface-3 bg-surface\"\n @release=\"imageGate.release(product.image)\" />\n <PkLazyImg\n v-else-if=\"product.image\"\n :src=\"product.image\"\n :alt=\"product.name\"\n fallback-icon=\"ri:image-off-line\"\n class=\"w-48 h-48 object-contain rounded-lg shrink-0 border border-surface-3 bg-surface\" />\n <div class=\"flex flex-col gap-4 min-w-0 flex-1\">\n <strong class=\"font-bold text-12 text-word-1 truncate\">\n {{ product.name }}\n </strong>\n <span\n v-if=\"product.url\"\n class=\"text-10 text-word-4 truncate flex items-center gap-4\">\n <VvIcon name=\"ri:link\" class=\"shrink-0 text-12\" />\n <PkUrl :url=\"product.url\" />\n </span>\n <div class=\"flex items-center gap-sm flex-wrap text-12\">\n <span\n v-if=\"product.price\"\n class=\"font-semibold text-word-1\">\n {{ product.price }}\n </span>\n <!-- Free text from the merchant: it was colour-coded by\n substring, which only ever matched English and\n Italian. It reads as the note it is. -->\n <span\n v-if=\"product.availability\"\n class=\"text-10 text-word-3\">\n {{ product.availability }}\n </span>\n </div>\n <p\n v-if=\"product.description\"\n class=\"text-12 text-word-3 line-clamp-2\">\n {{ product.description }}\n </p>\n </div>\n </component>\n </li>\n </ul>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import PkLazyImg from '../PkLazyImg.vue'\n import { useChatImageGate } from './chatImagePolicy'\n import PkHeldImage from './PkHeldImage.vue'\n import PkUrl from '../PkUrl.vue'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n products: Array<{\n name: string\n url?: string\n image?: string\n price?: string\n availability?: string\n description?: string\n }>\n }\n }\n return part\n })\n\n // The model writes these urls: one from a host the agent does not list\n // waits for a click (chatImagePolicy.ts).\n const imageGate = useChatImageGate()\n</script>\n\n<template>\n <ul\n v-if=\"toolPart?.input?.products?.length\"\n class=\"vv-item-group vv-item-group--framed w-full\">\n <li\n v-for=\"(product, index) in toolPart.input.products\"\n :key=\"index\"\n class=\"vv-item\"\n :class=\"{ 'vv-item--plain': !product.url }\">\n <!-- A product without a link answers no click: no hover, no hand -->\n <component\n :is=\"product.url ? 'a' : 'div'\"\n :href=\"product.url\"\n :target=\"product.url ? '_blank' : undefined\"\n :rel=\"product.url ? 'noopener noreferrer' : undefined\"\n class=\"vv-item__entry\">\n <!-- Merchant images rot over time: a dead one degrades to an icon\n so the row keeps its thumbnail slot -->\n <PkHeldImage\n v-if=\"product.image && !imageGate.canLoad(product.image)\"\n :host=\"imageGate.hostOf(product.image)\"\n class=\"w-48 h-48 rounded-lg shrink-0 border border-surface-3 bg-surface\"\n @release=\"imageGate.release(product.image)\" />\n <PkLazyImg\n v-else-if=\"product.image\"\n :src=\"product.image\"\n :alt=\"product.name\"\n fallback-icon=\"ri:image-off-line\"\n class=\"w-48 h-48 object-contain rounded-lg shrink-0 border border-surface-3 bg-surface\" />\n <div class=\"flex flex-col gap-4 min-w-0 flex-1\">\n <strong class=\"font-bold text-12 text-word-1 truncate\">\n {{ product.name }}\n </strong>\n <span\n v-if=\"product.url\"\n class=\"text-10 text-word-4 truncate flex items-center gap-4\">\n <VvIcon name=\"ri:link\" class=\"shrink-0 text-12\" />\n <PkUrl :url=\"product.url\" />\n </span>\n <div class=\"flex items-center gap-sm flex-wrap text-12\">\n <span\n v-if=\"product.price\"\n class=\"font-semibold text-word-1\">\n {{ product.price }}\n </span>\n <!-- Free text from the merchant: it was colour-coded by\n substring, which only ever matched English and\n Italian. It reads as the note it is. -->\n <span\n v-if=\"product.availability\"\n class=\"text-10 text-word-3\">\n {{ product.availability }}\n </span>\n </div>\n <p\n v-if=\"product.description\"\n class=\"text-12 text-word-3 line-clamp-2\">\n {{ product.description }}\n </p>\n </div>\n </component>\n </li>\n </ul>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAOI,IAAMkD,IAAQC,GAIRC,IAAWrB,QACAmB,EAAM,IAatB,GAIKG,IAAYhB,EAAiB;;;GAKzB,OAAAe,EAAA,OAAU,OAAO,UAAU,UADrCnD,EAAA,GAAAC,EA6DK,MA7DLuC,GA6DK,EA1DDxC,EAAA,EAAA,GAAAC,EAyDKC,GAAA,MAAAC,EAxD0BgD,EAAA,MAAS,MAAM,WAAlC,GAAS,OADrBnD,EAAA,GAAAC,EAyDK,MAAA;IAvDA,KAAKqD;IACN,OAAKlD,EAAA,CAAC,WAAS,EAAA,kBAAA,C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A,IAAA,EAAA,GAMV+B,EAAQ,gBADlBvD,EAAA,GAAAC,EAIO,QAJP6C,GAIOjC,EADA0C,EAAQ,YAAY,GAAA,CAAA,KAAA/B,EAAA,IAAA,EAAA,CAAA,CAAA;KAIrB+B,EAAQ,eADlBvD,EAAA,GAAAC,EAII,KAJJ8C,GAIIlC,EADG0C,EAAQ,WAAW,GAAA,CAAA,KAAA/B,EAAA,IAAA,EAAA"}
|
|
1
|
+
{"version":3,"file":"PkToolShowProductList-CThKOr9K.js","names":["__unplugin_components_0","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeClass","_createBlock","_resolveDynamicComponent","_withCtx","_unref","PkHeldImage","PkLazyImg","_createCommentVNode","_createElementVNode","_toDisplayString","_createVNode","PkUrl","_sfc_main","withCtx","defineComponent","resolveDynamicComponent","openBlock","init_runtime_core_esm_bundler","normalizeClass","toDisplayString","createCommentVNode","unref","Fragment","createBlock","createBaseVNode","init_reactivity_esm_bundler","computed","createElementBlock","createVNode","init_shared_esm_bundler","renderList","Ae","useChatImageGate","PkHeldImage_default","PkLazyImg_default","PkUrl_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","PkToolShowProductList_default","props","__props","toolPart","imageGate","_component_VvIcon","index","product"],"sources":["../../../../packages/components/src/chat/PkToolShowProductList.vue","../../../../packages/components/src/chat/PkToolShowProductList.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import PkLazyImg from '../PkLazyImg.vue'\n import { useChatImageGate } from './chatImagePolicy'\n import PkHeldImage from './PkHeldImage.vue'\n import PkUrl from '../PkUrl.vue'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n products: Array<{\n name: string\n url?: string\n image?: string\n price?: string\n availability?: string\n description?: string\n }>\n }\n }\n return part\n })\n\n // The model writes these urls: one from a host the agent does not list\n // waits for a click (chatImagePolicy.ts).\n const imageGate = useChatImageGate()\n</script>\n\n<template>\n <ul\n v-if=\"toolPart?.input?.products?.length\"\n class=\"vv-item-group vv-item-group--framed w-full\">\n <li\n v-for=\"(product, index) in toolPart.input.products\"\n :key=\"index\"\n class=\"vv-item\"\n :class=\"{ 'vv-item--plain': !product.url }\">\n <!-- A product without a link answers no click: no hover, no hand -->\n <component\n :is=\"product.url ? 'a' : 'div'\"\n :href=\"product.url\"\n :target=\"product.url ? '_blank' : undefined\"\n :rel=\"product.url ? 'noopener noreferrer' : undefined\"\n class=\"vv-item__entry\">\n <!-- Merchant images rot over time: a dead one degrades to an icon\n so the row keeps its thumbnail slot -->\n <PkHeldImage\n v-if=\"product.image && !imageGate.canLoad(product.image)\"\n :host=\"imageGate.hostOf(product.image)\"\n class=\"w-48 h-48 rounded-lg shrink-0 border border-surface-3 bg-surface\"\n @release=\"imageGate.release(product.image)\" />\n <PkLazyImg\n v-else-if=\"product.image\"\n :src=\"product.image\"\n :alt=\"product.name\"\n fallback-icon=\"ri:image-off-line\"\n class=\"w-48 h-48 object-contain rounded-lg shrink-0 border border-surface-3 bg-surface\" />\n <div class=\"flex flex-col gap-4 min-w-0 flex-1\">\n <strong class=\"font-bold text-12 text-word-1 truncate\">\n {{ product.name }}\n </strong>\n <span\n v-if=\"product.url\"\n class=\"text-10 text-word-4 truncate flex items-center gap-4\">\n <VvIcon name=\"ri:link\" class=\"shrink-0 text-12\" />\n <PkUrl :url=\"product.url\" />\n </span>\n <div class=\"flex items-center gap-sm flex-wrap text-12\">\n <span\n v-if=\"product.price\"\n class=\"font-semibold text-word-1\">\n {{ product.price }}\n </span>\n <!-- Free text from the merchant: it was colour-coded by\n substring, which only ever matched English and\n Italian. It reads as the note it is. -->\n <span\n v-if=\"product.availability\"\n class=\"text-10 text-word-3\">\n {{ product.availability }}\n </span>\n </div>\n <p\n v-if=\"product.description\"\n class=\"text-12 text-word-3 line-clamp-2\">\n {{ product.description }}\n </p>\n </div>\n </component>\n </li>\n </ul>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import PkLazyImg from '../PkLazyImg.vue'\n import { useChatImageGate } from './chatImagePolicy'\n import PkHeldImage from './PkHeldImage.vue'\n import PkUrl from '../PkUrl.vue'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n products: Array<{\n name: string\n url?: string\n image?: string\n price?: string\n availability?: string\n description?: string\n }>\n }\n }\n return part\n })\n\n // The model writes these urls: one from a host the agent does not list\n // waits for a click (chatImagePolicy.ts).\n const imageGate = useChatImageGate()\n</script>\n\n<template>\n <ul\n v-if=\"toolPart?.input?.products?.length\"\n class=\"vv-item-group vv-item-group--framed w-full\">\n <li\n v-for=\"(product, index) in toolPart.input.products\"\n :key=\"index\"\n class=\"vv-item\"\n :class=\"{ 'vv-item--plain': !product.url }\">\n <!-- A product without a link answers no click: no hover, no hand -->\n <component\n :is=\"product.url ? 'a' : 'div'\"\n :href=\"product.url\"\n :target=\"product.url ? '_blank' : undefined\"\n :rel=\"product.url ? 'noopener noreferrer' : undefined\"\n class=\"vv-item__entry\">\n <!-- Merchant images rot over time: a dead one degrades to an icon\n so the row keeps its thumbnail slot -->\n <PkHeldImage\n v-if=\"product.image && !imageGate.canLoad(product.image)\"\n :host=\"imageGate.hostOf(product.image)\"\n class=\"w-48 h-48 rounded-lg shrink-0 border border-surface-3 bg-surface\"\n @release=\"imageGate.release(product.image)\" />\n <PkLazyImg\n v-else-if=\"product.image\"\n :src=\"product.image\"\n :alt=\"product.name\"\n fallback-icon=\"ri:image-off-line\"\n class=\"w-48 h-48 object-contain rounded-lg shrink-0 border border-surface-3 bg-surface\" />\n <div class=\"flex flex-col gap-4 min-w-0 flex-1\">\n <strong class=\"font-bold text-12 text-word-1 truncate\">\n {{ product.name }}\n </strong>\n <span\n v-if=\"product.url\"\n class=\"text-10 text-word-4 truncate flex items-center gap-4\">\n <VvIcon name=\"ri:link\" class=\"shrink-0 text-12\" />\n <PkUrl :url=\"product.url\" />\n </span>\n <div class=\"flex items-center gap-sm flex-wrap text-12\">\n <span\n v-if=\"product.price\"\n class=\"font-semibold text-word-1\">\n {{ product.price }}\n </span>\n <!-- Free text from the merchant: it was colour-coded by\n substring, which only ever matched English and\n Italian. It reads as the note it is. -->\n <span\n v-if=\"product.availability\"\n class=\"text-10 text-word-3\">\n {{ product.availability }}\n </span>\n </div>\n <p\n v-if=\"product.description\"\n class=\"text-12 text-word-3 line-clamp-2\">\n {{ product.description }}\n </p>\n </div>\n </component>\n </li>\n </ul>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAOI,IAAMkD,IAAQC,GAIRC,IAAWrB,QACAmB,EAAM,IAatB,GAIKG,IAAYhB,EAAiB;;;GAKzB,OAAAe,EAAA,OAAU,OAAO,UAAU,UADrCnD,EAAA,GAAAC,EA6DK,MA7DLuC,GA6DK,EA1DDxC,EAAA,EAAA,GAAAC,EAyDKC,GAAA,MAAAC,EAxD0BgD,EAAA,MAAS,MAAM,WAAlC,GAAS,OADrBnD,EAAA,GAAAC,EAyDK,MAAA;IAvDA,KAAKqD;IACN,OAAKlD,EAAA,CAAC,WAAS,EAAA,kBAAA,CACcmD,EAAQ,IAAG,CAAA,CAAA;GAExCvD,GAAAA,EAAAA,EAAA,GAAAK,EAkDYC,EAjDHiD,EAAQ,MAAG,MAAA,KAAA,GAAA;IACf,MAAMA,EAAQ;IACd,QAAQA,EAAQ,MAAG,WAAc,KAAA;IACjC,KAAKA,EAAQ,MAAG,wBAA2B,KAAA;IAC5C,OAAM;;IAGN,SAAAhD,QAIkD,CAHxCgD,EAAQ,SAAK,CAAK/C,EAAA4C,CAAA,CAAS,CAAC,QAAQG,EAAQ,KAAK,KAD3DvD,EAAA,GAAAK,EAIkDI,GAAA;;KAF7C,MAAMD,EAAA4C,CAAA,CAAS,CAAC,OAAOG,EAAQ,KAAK;KACrC,OAAM;KACL,YAAO,MAAE/C,EAAA4C,CAAA,CAAS,CAAC,QAAQG,EAAQ,KAAK;IAE9B,GAAA,MAAA,GAAA,CAAA,QAAA,WAAA,CAAA,KAAAA,EAAQ,SADvBvD,EAAA,GAAAK,EAK8FK,GAAA;;KAHzF,KAAK6C,EAAQ;KACb,KAAKA,EAAQ;KACd,iBAAc;KACd,OAAM;IACV3C,GAAAA,MAAAA,GAAAA,CAAAA,OAAAA,KAAAA,CAAAA,KAAAA,EAAAA,IAAAA,EAAAA,GAAAA,EA8BM,OA9BN6B,GA8BM;KA7BF7B,EAES,UAFT8B,GAES7B,EADF0C,EAAQ,IAAI,GAAA,CAAA;KAGTA,EAAQ,OADlBvD,EAAA,GAAAC,EAKO,QALP0C,GAKO,CAFH7B,EAAkDuC,GAAA;MAA1C,MAAK;MAAU,OAAM;KAC7BvC,CAAAA,GAAAA,EAA4BC,GAAA,EAApB,KAAKwC,EAAQ,IAAA,GAAA,MAAA,GAAA,CAAA,KAAA,CAAA,CAAA,CAAA,KAAA/B,EAAA,IAAA,EAAA;KAEzBZ,EAcM,OAdNgC,GAcM,CAZQW,EAAQ,SADlBvD,EAAA,GAAAC,EAIO,QAJP4C,GAIOhC,EADA0C,EAAQ,KAAK,GAAA,CAAA,KAAA/B,EAAA,IAAA,EAAA,GAMV+B,EAAQ,gBADlBvD,EAAA,GAAAC,EAIO,QAJP6C,GAIOjC,EADA0C,EAAQ,YAAY,GAAA,CAAA,KAAA/B,EAAA,IAAA,EAAA,CAAA,CAAA;KAIrB+B,EAAQ,eADlBvD,EAAA,GAAAC,EAII,KAJJ8C,GAIIlC,EADG0C,EAAQ,WAAW,GAAA,CAAA,KAAA/B,EAAA,IAAA,EAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $ as e, C as t, F as n, L as r, O as i, Tt as a, _ as o, bt as s, h as c, it as l, m as u, pt as d, v as f, x as p, xt as m } from "./vue.runtime.esm-bundler-B-NVlZCY.js";
|
|
2
2
|
import { i as h } from "./dist-Ce9Hi58x.js";
|
|
3
|
-
import { a as g, r as _, t as v } from "./index.es-
|
|
3
|
+
import { a as g, r as _, t as v } from "./index.es-D_E1Gj_U.js";
|
|
4
4
|
//#region ../../packages/components/src/chat/PkToolShowQrCode.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
i(), m(), l();
|
|
6
6
|
var y = {
|
|
@@ -69,4 +69,4 @@ var y = {
|
|
|
69
69
|
//#endregion
|
|
70
70
|
export { T as default };
|
|
71
71
|
|
|
72
|
-
//# sourceMappingURL=PkToolShowQrCode-
|
|
72
|
+
//# sourceMappingURL=PkToolShowQrCode-CFueYo4P.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PkToolShowQrCode-
|
|
1
|
+
{"version":3,"file":"PkToolShowQrCode-CFueYo4P.js","names":["$t","__unplugin_components_0","__unplugin_components_1","__unplugin_components_2","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_withCtx","_unref","_createCommentVNode","_sfc_main","withCtx","defineComponent","onMounted","openBlock","init_runtime_core_esm_bundler","toDisplayString","createCommentVNode","unref","createBaseVNode","init_reactivity_esm_bundler","computed","ref","createElementBlock","createVNode","init_shared_esm_bundler","useClipboard","Qi","Ca","Ae","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","PkToolShowQrCode_default","props","__props","toolPart","svgContent","qrContainerRef","content","QRCode","downloadQr","svgEl","svgData","svgBlob","svgUrl","canvas","ctx","img","a","_component_VvIcon","_component_VvButton","_component_VvButtonGroup","_ctx","copied","_cache","copy"],"sources":["../../../../packages/components/src/chat/PkToolShowQrCode.vue","../../../../packages/components/src/chat/PkToolShowQrCode.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, onMounted } 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 content: string\n label?: string\n }\n }\n return part\n })\n\n const svgContent = ref('')\n const qrContainerRef = ref<HTMLElement>()\n\n onMounted(async () => {\n const content = toolPart.value.input?.content\n if (!content) {\n return\n }\n const { default: QRCode } = await import('qrcode')\n svgContent.value = await QRCode.toString(content, { type: 'svg' })\n })\n\n const downloadQr = async () => {\n const svgEl = qrContainerRef.value?.querySelector('svg')\n if (!svgEl) {\n return\n }\n const svgData = new XMLSerializer().serializeToString(svgEl)\n const svgBlob = new Blob([svgData], {\n type: 'image/svg+xml;charset=utf-8',\n })\n const svgUrl = URL.createObjectURL(svgBlob)\n\n const canvas = document.createElement('canvas')\n canvas.width = 512\n canvas.height = 512\n const ctx = canvas.getContext('2d')\n const img = new Image()\n img.onload = () => {\n ctx?.drawImage(img, 0, 0, 512, 512)\n URL.revokeObjectURL(svgUrl)\n const a = document.createElement('a')\n a.href = canvas.toDataURL('image/png')\n a.download = 'qrcode.png'\n a.click()\n }\n img.src = svgUrl\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 bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:qr-code-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.qrCode') }}</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=\"copy(toolPart?.input?.content ?? '')\" />\n <VvButton\n modifiers=\"action-quiet-small\"\n icon=\"ri:download-line\"\n :label=\"$t('action.download')\"\n @click=\"downloadQr\" />\n </VvButtonGroup>\n </div>\n <div class=\"p-sm flex flex-col items-center\">\n <div ref=\"qrContainerRef\" class=\"w-144 h-144\" v-html=\"svgContent\" />\n <p\n v-if=\"toolPart.input.label\"\n class=\"text-12 text-word-3 text-center\">\n {{ toolPart.input.label }}\n </p>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, onMounted } 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 content: string\n label?: string\n }\n }\n return part\n })\n\n const svgContent = ref('')\n const qrContainerRef = ref<HTMLElement>()\n\n onMounted(async () => {\n const content = toolPart.value.input?.content\n if (!content) {\n return\n }\n const { default: QRCode } = await import('qrcode')\n svgContent.value = await QRCode.toString(content, { type: 'svg' })\n })\n\n const downloadQr = async () => {\n const svgEl = qrContainerRef.value?.querySelector('svg')\n if (!svgEl) {\n return\n }\n const svgData = new XMLSerializer().serializeToString(svgEl)\n const svgBlob = new Blob([svgData], {\n type: 'image/svg+xml;charset=utf-8',\n })\n const svgUrl = URL.createObjectURL(svgBlob)\n\n const canvas = document.createElement('canvas')\n canvas.width = 512\n canvas.height = 512\n const ctx = canvas.getContext('2d')\n const img = new Image()\n img.onload = () => {\n ctx?.drawImage(img, 0, 0, 512, 512)\n URL.revokeObjectURL(svgUrl)\n const a = document.createElement('a')\n a.href = canvas.toDataURL('image/png')\n a.download = 'qrcode.png'\n a.click()\n }\n img.src = svgUrl\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 bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:qr-code-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.qrCode') }}</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=\"copy(toolPart?.input?.content ?? '')\" />\n <VvButton\n modifiers=\"action-quiet-small\"\n icon=\"ri:download-line\"\n :label=\"$t('action.download')\"\n @click=\"downloadQr\" />\n </VvButtonGroup>\n </div>\n <div class=\"p-sm flex flex-col items-center\">\n <div ref=\"qrContainerRef\" class=\"w-144 h-144\" v-html=\"svgContent\" />\n <p\n v-if=\"toolPart.input.label\"\n class=\"text-12 text-word-3 text-center\">\n {{ toolPart.input.label }}\n </p>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAII,IAAMuC,IAAQC,GAIR,EAAE,SAAM,cAAWZ,EAAa,GAEhCa,IAAWlB,QACAgB,EAAM,IAOtB,GAEKG,IAAalB,EAAI,EAAE,GACnBmB,IAAiBnB,EAAiB;EAExC,EAAU,YAAY;GAClB,IAAMoB,IAAUH,EAAS,MAAM,OAAO;GACtC,IAAI,CAACG,GACD;GAEJ,IAAM,EAAE,SAASC,MAAW,MAAM,OAAO;GACzC,EAAW,QAAQ,MAAMA,EAAO,SAASD,GAAS,EAAE,MAAM,MAAM,CAAC;EACrE,CAAC;EAED,IAAME,IAAa,YAAY;GAC3B,IAAMC,IAAQJ,EAAe,OAAO,cAAc,KAAK;GACvD,IAAI,CAACI,GACD;GAEJ,IAAMC,IAAU,IAAI,cAAc,CAAC,CAAC,kBAAkBD,CAAK,GACrDE,IAAU,IAAI,KAAK,CAACD,CAAO,GAAG,EAChC,MAAM,8BACV,CAAC,GACKE,IAAS,IAAI,gBAAgBD,CAAO,GAEpCE,IAAS,SAAS,cAAc,QAAQ;GAE9C,AADA,EAAO,QAAQ,KACf,EAAO,SAAS;GAChB,IAAMC,IAAMD,EAAO,WAAW,IAAI,GAC5BE,IAAM,IAAI,MAAM;GAStB,AARA,EAAI,eAAe;IAEf,AADAD,GAAK,UAAUC,GAAK,GAAG,GAAG,KAAK,GAAG,GAClC,IAAI,gBAAgBH,CAAM;IAC1B,IAAMI,IAAI,SAAS,cAAc,GAAG;IAGpC,AAFA,EAAE,OAAOH,EAAO,UAAU,WA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c, d as l, dt as u, g as d, h as f, it as p, m, pt as h, r as g, t as _, v, x as y, xt as b, z as x } from "./vue.runtime.esm-bundler-B-NVlZCY.js";
|
|
2
|
-
import { t as S } from "./PkStreamingMarkdown-
|
|
3
|
-
import { r as C, t as w } from "./markdown-
|
|
2
|
+
import { t as S } from "./PkStreamingMarkdown-LBiDnEgV.js";
|
|
3
|
+
import { r as C, t as w } from "./markdown-CQLsnBKV.js";
|
|
4
4
|
import "./src-CrSt0jv_.js";
|
|
5
|
-
import { t as T } from "./index.es-
|
|
5
|
+
import { r as ee, t as T } from "./index.es-D_E1Gj_U.js";
|
|
6
6
|
import { t as E } from "./PkUrl-Bf9k9TRh.js";
|
|
7
7
|
//#region ../../packages/components/src/chat/PkChunkPreview.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
r(), p(), b();
|
|
@@ -58,7 +58,8 @@ var A = { class: "flex flex-col gap-2 min-w-0 flex-1" }, j = { class: "font-bold
|
|
|
58
58
|
type: { type: String },
|
|
59
59
|
name: { type: String },
|
|
60
60
|
url: { type: String },
|
|
61
|
-
filename: { type: String }
|
|
61
|
+
filename: { type: String },
|
|
62
|
+
mutedUrl: { type: Boolean }
|
|
62
63
|
},
|
|
63
64
|
setup(e) {
|
|
64
65
|
return (t, r) => {
|
|
@@ -72,7 +73,10 @@ var A = { class: "flex flex-col gap-2 min-w-0 flex-1" }, j = { class: "font-bold
|
|
|
72
73
|
e.url ? (n(), v("span", N, [y(i, {
|
|
73
74
|
name: "ri:link",
|
|
74
75
|
class: "shrink-0 text-10"
|
|
75
|
-
}), y(E, {
|
|
76
|
+
}), y(E, {
|
|
77
|
+
url: e.url,
|
|
78
|
+
muted: e.mutedUrl
|
|
79
|
+
}, null, 8, ["url", "muted"])])) : o("", !0)
|
|
76
80
|
])], 64);
|
|
77
81
|
};
|
|
78
82
|
}
|
|
@@ -83,16 +87,16 @@ r(), b(), g(), p();
|
|
|
83
87
|
var F = {
|
|
84
88
|
key: 0,
|
|
85
89
|
class: "flex flex-col gap-xs w-full"
|
|
86
|
-
}, I = { class: "flex items-center gap-4 text-12 text-word-3 font-semibold" }, L = { class: "text-word-4 font-normal" }, R = { class: "flex flex-col gap-xs" }, z = ["onClick"],
|
|
90
|
+
}, I = { class: "flex items-center gap-4 text-12 text-word-3 font-semibold" }, L = { class: "text-word-4 font-normal" }, R = { class: "flex flex-col gap-xs" }, z = { class: "flex items-center hover:bg-surface-1 transition-colors" }, B = ["aria-expanded", "onClick"], V = { class: "flex items-center gap-4 shrink-0" }, H = {
|
|
87
91
|
key: 0,
|
|
88
92
|
class: "text-10 text-word-4 bg-surface-2 rounded px-4 py-2"
|
|
89
|
-
},
|
|
93
|
+
}, U = { class: "text-10 text-word-4 bg-surface-2 rounded px-4 py-2 uppercase" }, W = {
|
|
90
94
|
key: 0,
|
|
91
95
|
class: "border-t border-surface-3"
|
|
92
|
-
},
|
|
96
|
+
}, G = ["onClick"], K = {
|
|
93
97
|
key: 0,
|
|
94
98
|
class: "bg-surface-1 border-t border-surface-3"
|
|
95
|
-
},
|
|
99
|
+
}, q = { class: "p-8 text-10 text-word-3" }, J = { class: "flex items-center gap-8 px-8 py-6 border-t border-surface-3 bg-surface" }, Y = ["disabled", "onClick"], X = ["onClick"], Z = ["href"], Q = ["onClick"], $ = /* @__PURE__ */ t({
|
|
96
100
|
__name: "PkToolShowSources",
|
|
97
101
|
props: {
|
|
98
102
|
part: { type: null },
|
|
@@ -129,9 +133,9 @@ var F = {
|
|
|
129
133
|
}
|
|
130
134
|
}, M = (e) => {
|
|
131
135
|
E.delete(e);
|
|
132
|
-
}, N = h(!1),
|
|
136
|
+
}, N = h(!1), $ = m(() => N.value ? g.value : g.value.slice(0, 3)), te = m(() => g.value.length > 3);
|
|
133
137
|
return (r, c) => {
|
|
134
|
-
let u = T;
|
|
138
|
+
let u = T, m = ee;
|
|
135
139
|
return p.value.length ? (n(), v("div", F, [
|
|
136
140
|
f("div", I, [
|
|
137
141
|
y(u, {
|
|
@@ -141,30 +145,47 @@ var F = {
|
|
|
141
145
|
s(" " + a(r.$t("label.sources")) + " ", 1),
|
|
142
146
|
f("span", L, " (" + a(g.value.length) + ") ", 1)
|
|
143
147
|
]),
|
|
144
|
-
f("ul", R, [(n(!0), v(l, null, x(
|
|
148
|
+
f("ul", R, [(n(!0), v(l, null, x($.value, (c) => (n(), v("li", {
|
|
145
149
|
key: c.document.documentId,
|
|
146
150
|
class: "border border-surface-3 rounded-xl overflow-hidden"
|
|
147
|
-
}, [f("button", {
|
|
148
|
-
|
|
151
|
+
}, [f("div", z, [f("button", {
|
|
152
|
+
type: "button",
|
|
153
|
+
class: "flex items-center gap-8 p-8 flex-1 min-w-0 text-left cursor-pointer",
|
|
154
|
+
"aria-expanded": C.has(c.document.documentId),
|
|
149
155
|
onClick: (e) => O(c.document.documentId)
|
|
150
156
|
}, [y(P, {
|
|
151
157
|
type: c.document.documentType,
|
|
152
158
|
name: c.document.documentName,
|
|
153
159
|
url: c.document.sourceUrl,
|
|
154
|
-
filename: c.document.sourceFilename
|
|
160
|
+
filename: c.document.sourceFilename,
|
|
161
|
+
"muted-url": ""
|
|
155
162
|
}, null, 8, [
|
|
156
163
|
"type",
|
|
157
164
|
"name",
|
|
158
165
|
"url",
|
|
159
166
|
"filename"
|
|
160
|
-
]), f("div",
|
|
161
|
-
c.chunks.length > 1 ? (n(), v("span",
|
|
162
|
-
f("span",
|
|
167
|
+
]), f("div", V, [
|
|
168
|
+
c.chunks.length > 1 ? (n(), v("span", H, a(c.chunks.length), 1)) : o("", !0),
|
|
169
|
+
f("span", U, a(c.document.language), 1),
|
|
163
170
|
y(u, {
|
|
164
171
|
name: C.has(c.document.documentId) ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
|
|
165
172
|
class: "text-16 text-word-3"
|
|
166
173
|
}, null, 8, ["name"])
|
|
167
|
-
])], 8,
|
|
174
|
+
])], 8, B), c.document.sourceUrl ? (n(), d(m, {
|
|
175
|
+
key: 0,
|
|
176
|
+
modifiers: "action-quiet-small",
|
|
177
|
+
icon: "ri:external-link-line",
|
|
178
|
+
class: "text-10 shrink-0 mr-8",
|
|
179
|
+
href: c.document.sourceUrl,
|
|
180
|
+
target: "_blank",
|
|
181
|
+
rel: "noopener noreferrer",
|
|
182
|
+
title: r.$t("action.open"),
|
|
183
|
+
"aria-label": r.$t("action.open")
|
|
184
|
+
}, null, 8, [
|
|
185
|
+
"href",
|
|
186
|
+
"title",
|
|
187
|
+
"aria-label"
|
|
188
|
+
])) : o("", !0)]), C.has(c.document.documentId) ? (n(), v("div", W, [c.document.sourceDescription ? (n(), d(S, {
|
|
168
189
|
key: 0,
|
|
169
190
|
markdown: c.document.sourceDescription,
|
|
170
191
|
class: "px-8 py-4 text-10 text-word-3 bg-surface-1 border-b border-surface-3"
|
|
@@ -184,7 +205,7 @@ var F = {
|
|
|
184
205
|
"similarity",
|
|
185
206
|
"max-similarity",
|
|
186
207
|
"expanded"
|
|
187
|
-
])], 8,
|
|
208
|
+
])], 8, G), w.has(c.chunkId) ? (n(), v("div", K, [f("div", q, [y(_, { mode: "out-in" }, {
|
|
188
209
|
default: e(() => [E.has(c.chunkId) ? (n(), d(S, {
|
|
189
210
|
key: 0,
|
|
190
211
|
markdown: E.get(c.chunkId),
|
|
@@ -195,7 +216,7 @@ var F = {
|
|
|
195
216
|
class: "wysiwyg"
|
|
196
217
|
}, null, 8, ["markdown"]))]),
|
|
197
218
|
_: 2
|
|
198
|
-
}, 1024)]), f("div",
|
|
219
|
+
}, 1024)]), f("div", J, [
|
|
199
220
|
t.onExpandContext && c.chunkIndex != null && !E.has(c.chunkId) ? (n(), v("button", {
|
|
200
221
|
key: 0,
|
|
201
222
|
class: "text-10 text-word-3 hover:text-word flex items-center gap-4 cursor-pointer",
|
|
@@ -204,14 +225,14 @@ var F = {
|
|
|
204
225
|
}, [y(u, {
|
|
205
226
|
name: D.has(c.chunkId) ? "loading-loop" : "ri:expand-up-down-line",
|
|
206
227
|
class: "text-12"
|
|
207
|
-
}, null, 8, ["name"]), s(" " + a(r.$t("label.expandContext")), 1)], 8,
|
|
228
|
+
}, null, 8, ["name"]), s(" " + a(r.$t("label.expandContext")), 1)], 8, Y)) : E.has(c.chunkId) ? (n(), v("button", {
|
|
208
229
|
key: 1,
|
|
209
230
|
class: "text-10 text-word-3 hover:text-word-1 flex items-center gap-4 cursor-pointer",
|
|
210
231
|
onClick: (e) => M(c.chunkId)
|
|
211
232
|
}, [y(u, {
|
|
212
233
|
name: "ri:collapse-vertical-line",
|
|
213
234
|
class: "text-12"
|
|
214
|
-
}), s(" " + a(r.$t("label.collapseContext")), 1)], 8,
|
|
235
|
+
}), s(" " + a(r.$t("label.collapseContext")), 1)], 8, X)) : o("", !0),
|
|
215
236
|
c.sourceUrl ? (n(), v("a", {
|
|
216
237
|
key: 2,
|
|
217
238
|
href: c.sourceUrl,
|
|
@@ -221,7 +242,7 @@ var F = {
|
|
|
221
242
|
}, [y(u, {
|
|
222
243
|
name: "ri:external-link-line",
|
|
223
244
|
class: "text-12"
|
|
224
|
-
}), s(" " + a(r.$t("label.openSource")), 1)], 8,
|
|
245
|
+
}), s(" " + a(r.$t("label.openSource")), 1)], 8, Z)) : o("", !0),
|
|
225
246
|
t.onDownload && c.documentType === "file" ? (n(), v("button", {
|
|
226
247
|
key: 3,
|
|
227
248
|
class: i(["text-10 text-word-3 hover:text-word-1 flex items-center gap-4 cursor-pointer", { "ml-auto": !c.sourceUrl }]),
|
|
@@ -229,9 +250,9 @@ var F = {
|
|
|
229
250
|
}, [y(u, {
|
|
230
251
|
name: "ri:download-line",
|
|
231
252
|
class: "text-12"
|
|
232
|
-
}), s(" " + a(r.$t("label.downloadFile")), 1)], 10,
|
|
253
|
+
}), s(" " + a(r.$t("label.downloadFile")), 1)], 10, Q)) : o("", !0)
|
|
233
254
|
])])) : o("", !0)]))), 128))])) : o("", !0)]))), 128))]),
|
|
234
|
-
|
|
255
|
+
te.value ? (n(), v("button", {
|
|
235
256
|
key: 0,
|
|
236
257
|
class: "text-12 text-word-3 cursor-pointer hover:underline flex items-center gap-4 mx-auto",
|
|
237
258
|
onClick: c[0] ||= (e) => N.value = !N.value
|
|
@@ -244,6 +265,6 @@ var F = {
|
|
|
244
265
|
}
|
|
245
266
|
});
|
|
246
267
|
//#endregion
|
|
247
|
-
export {
|
|
268
|
+
export { $ as default };
|
|
248
269
|
|
|
249
|
-
//# sourceMappingURL=PkToolShowSources-
|
|
270
|
+
//# sourceMappingURL=PkToolShowSources-DW4LZzdI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PkToolShowSources-DW4LZzdI.js","names":["_hoisted_1","_hoisted_2","__unplugin_components_0","_openBlock","_createElementBlock","_Fragment","_createVNode","_createElementVNode","_toDisplayString","_unref","_createCommentVNode","_sfc_main","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","__unplugin_components_0","_openBlock","_createElementBlock","_Fragment","_createVNode","_unref","_createElementVNode","_toDisplayString","_createCommentVNode","PkUrl","_sfc_main","$t","__unplugin_components_0","__unplugin_components_1","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_createTextVNode","_toDisplayString","_Fragment","_renderList","PkDocumentHeader","_createCommentVNode","_createBlock","PkStreamingMarkdown","PkChunkPreview","_Transition","_withCtx","_normalizeClass","_sfc_main","withCtx","defineComponent","openBlock","init_runtime_core_esm_bundler","normalizeClass","toDisplayString","createCommentVNode","createTextVNode","unref","Fragment","reactive","createBlock","createBaseVNode","init_reactivity_esm_bundler","ref","init_runtime_dom_esm_bundler","Transition","createVNode","init_shared_esm_bundler","renderList","PkStreamingMarkdown_default","getTypeIcon","stripMarkdown","Ca","Ae","PkUrl_default","_hoisted_1$2","_hoisted_2$2","PkChunkPreview_default","props","__props","similarityPercent","computed","max","_component_VvIcon","createElementBlock","_hoisted_1$1","_hoisted_2$1","_hoisted_3$1","_hoisted_4$1","PkDocumentHeader_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","PkToolShowSources_default","toolPart","sources","groupedSources","groups","source","existing","maxSimilarity","s","expandedDocuments","expandedChunks","contextData","loadingContext","toggleDocument","documentId","toggleChunk","chunkId","handleExpandContext","content","clearContext","showMore","visibleGroups","hasMore","_component_VvButton","_ctx","group","chunk","_cache"],"sources":["../../../../packages/components/src/chat/PkChunkPreview.vue","../../../../packages/components/src/chat/PkChunkPreview.vue","../../../../packages/components/src/chat/PkDocumentHeader.vue","../../../../packages/components/src/chat/PkDocumentHeader.vue","../../../../packages/components/src/chat/PkToolShowSources.vue","../../../../packages/components/src/chat/PkToolShowSources.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { stripMarkdown } from 'utils'\n\n const props = defineProps<{\n content: string\n similarity?: number\n maxSimilarity?: number\n expanded: boolean\n }>()\n\n const similarityPercent = computed(() => {\n if (props.similarity == null) {\n return null\n }\n const max =\n props.maxSimilarity && props.maxSimilarity > 0\n ? props.maxSimilarity\n : 1\n return Math.round((props.similarity / max) * 100)\n })\n</script>\n\n<template>\n <VvIcon name=\"ri:text-snippet\" class=\"shrink-0 text-12 text-word-4\" />\n <span class=\"text-10 text-word-2 truncate flex-1\" :title=\"content\">\n {{ stripMarkdown(content) }}\n </span>\n <span v-if=\"similarityPercent != null\" class=\"text-10 text-word-4 shrink-0\">\n {{ similarityPercent }}%\n </span>\n <VvIcon\n :name=\"expanded ? 'ri:arrow-up-s-line' : 'ri:arrow-down-s-line'\"\n class=\"text-14 text-word-4 shrink-0\" />\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { stripMarkdown } from 'utils'\n\n const props = defineProps<{\n content: string\n similarity?: number\n maxSimilarity?: number\n expanded: boolean\n }>()\n\n const similarityPercent = computed(() => {\n if (props.similarity == null) {\n return null\n }\n const max =\n props.maxSimilarity && props.maxSimilarity > 0\n ? props.maxSimilarity\n : 1\n return Math.round((props.similarity / max) * 100)\n })\n</script>\n\n<template>\n <VvIcon name=\"ri:text-snippet\" class=\"shrink-0 text-12 text-word-4\" />\n <span class=\"text-10 text-word-2 truncate flex-1\" :title=\"content\">\n {{ stripMarkdown(content) }}\n </span>\n <span v-if=\"similarityPercent != null\" class=\"text-10 text-word-4 shrink-0\">\n {{ similarityPercent }}%\n </span>\n <VvIcon\n :name=\"expanded ? 'ri:arrow-up-s-line' : 'ri:arrow-down-s-line'\"\n class=\"text-14 text-word-4 shrink-0\" />\n</template>\n","<script setup lang=\"ts\">\n import type { DocumentType } from 'models'\n import { getTypeIcon } from 'models'\n import PkUrl from '../PkUrl.vue'\n\n defineProps<{\n type: string\n name: string\n url?: string\n filename?: string\n /**\n * The address as text, not a link: for a header drawn inside a button,\n * where a link is invalid HTML and its click also toggles the row\n */\n mutedUrl?: boolean\n }>()\n</script>\n\n<template>\n <VvIcon\n :name=\"getTypeIcon(type as DocumentType)\"\n class=\"shrink-0 text-14 text-word-3\" />\n <div class=\"flex flex-col gap-2 min-w-0 flex-1\">\n <strong class=\"font-bold text-12 text-word-1 truncate block\">\n {{ name }}\n </strong>\n <span v-if=\"filename\" class=\"text-10 text-word-4 truncate\">\n {{ filename }}\n </span>\n <span\n v-if=\"url\"\n class=\"text-10 text-word-4 truncate flex items-center gap-4\">\n <VvIcon name=\"ri:link\" class=\"shrink-0 text-10\" />\n <PkUrl :url=\"url\" :muted=\"mutedUrl\" />\n </span>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import type { DocumentType } from 'models'\n import { getTypeIcon } from 'models'\n import PkUrl from '../PkUrl.vue'\n\n defineProps<{\n type: string\n name: string\n url?: string\n filename?: string\n /**\n * The address as text, not a link: for a header drawn inside a button,\n * where a link is invalid HTML and its click also toggles the row\n */\n mutedUrl?: boolean\n }>()\n</script>\n\n<template>\n <VvIcon\n :name=\"getTypeIcon(type as DocumentType)\"\n class=\"shrink-0 text-14 text-word-3\" />\n <div class=\"flex flex-col gap-2 min-w-0 flex-1\">\n <strong class=\"font-bold text-12 text-word-1 truncate block\">\n {{ name }}\n </strong>\n <span v-if=\"filename\" class=\"text-10 text-word-4 truncate\">\n {{ filename }}\n </span>\n <span\n v-if=\"url\"\n class=\"text-10 text-word-4 truncate flex items-center gap-4\">\n <VvIcon name=\"ri:link\" class=\"shrink-0 text-10\" />\n <PkUrl :url=\"url\" :muted=\"mutedUrl\" />\n </span>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, reactive } from 'vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n import PkChunkPreview from './PkChunkPreview.vue'\n import PkDocumentHeader from './PkDocumentHeader.vue'\n\n interface SourceItem {\n chunkId: string\n documentId: string\n documentName: string\n documentType: string\n language: string\n content: string\n chunkIndex?: number | null\n similarity?: number\n sourceUrl?: string\n sourceFilename?: string\n sourceDescription?: string\n sourceImageUrl?: string\n }\n\n const props = defineProps<{\n part: unknown\n onExpandContext?: (payload: {\n documentId: string\n chunkIndex: number\n }) => Promise<string>\n onDownload?: (documentId: string) => void\n }>()\n\n const toolPart = computed(() => {\n return props.part as {\n input?: {\n sources: SourceItem[]\n }\n }\n })\n\n const sources = computed(() => toolPart.value.input?.sources || [])\n\n const groupedSources = computed(() => {\n const groups = new Map<\n string,\n { document: SourceItem; chunks: SourceItem[] }\n >()\n for (const source of sources.value) {\n const existing = groups.get(source.documentId)\n if (existing) {\n existing.chunks.push(source)\n } else {\n groups.set(source.documentId, {\n document: source,\n chunks: [source],\n })\n }\n }\n return [...groups.values()]\n })\n\n const maxSimilarity = computed(() => {\n return Math.max(...sources.value.map((s) => s.similarity ?? 0), 0)\n })\n\n const expandedDocuments = reactive(new Set<string>())\n const expandedChunks = reactive(new Set<string>())\n const contextData = reactive(new Map<string, string>())\n const loadingContext = reactive(new Set<string>())\n\n const toggleDocument = (documentId: string) => {\n if (expandedDocuments.has(documentId)) {\n expandedDocuments.delete(documentId)\n } else {\n expandedDocuments.add(documentId)\n }\n }\n\n const toggleChunk = (chunkId: string) => {\n if (expandedChunks.has(chunkId)) {\n expandedChunks.delete(chunkId)\n } else {\n expandedChunks.add(chunkId)\n }\n }\n\n const handleExpandContext = async (source: SourceItem) => {\n if (source.chunkIndex == null || !props.onExpandContext) {\n return\n }\n loadingContext.add(source.chunkId)\n try {\n const content = await props.onExpandContext({\n documentId: source.documentId,\n chunkIndex: source.chunkIndex,\n })\n contextData.set(source.chunkId, content)\n } finally {\n loadingContext.delete(source.chunkId)\n }\n }\n\n const clearContext = (chunkId: string) => {\n contextData.delete(chunkId)\n }\n\n const showMore = ref(false)\n const visibleGroups = computed(() => {\n if (showMore.value) {\n return groupedSources.value\n }\n return groupedSources.value.slice(0, 3)\n })\n const hasMore = computed(() => groupedSources.value.length > 3)\n</script>\n\n<template>\n <div v-if=\"sources.length\" class=\"flex flex-col gap-xs w-full\">\n <div class=\"flex items-center gap-4 text-12 text-word-3 font-semibold\">\n <VvIcon name=\"ri:article-line\" class=\"text-14\" />\n {{ $t('label.sources') }}\n <span class=\"text-word-4 font-normal\">\n ({{ groupedSources.length }})\n </span>\n </div>\n\n <ul class=\"flex flex-col gap-xs\">\n <li\n v-for=\"group in visibleGroups\"\n :key=\"group.document.documentId\"\n class=\"border border-surface-3 rounded-xl overflow-hidden\">\n <!-- Document header: the toggle, and beside it the link to\n the source, because a link inside a button is invalid\n HTML and its click also toggled the row -->\n <div\n class=\"flex items-center hover:bg-surface-1 transition-colors\">\n <button\n type=\"button\"\n class=\"flex items-center gap-8 p-8 flex-1 min-w-0 text-left cursor-pointer\"\n :aria-expanded=\"\n expandedDocuments.has(group.document.documentId)\n \"\n @click=\"toggleDocument(group.document.documentId)\">\n <PkDocumentHeader\n :type=\"group.document.documentType\"\n :name=\"group.document.documentName\"\n :url=\"group.document.sourceUrl\"\n :filename=\"group.document.sourceFilename\"\n muted-url />\n <div class=\"flex items-center gap-4 shrink-0\">\n <span\n v-if=\"group.chunks.length > 1\"\n class=\"text-10 text-word-4 bg-surface-2 rounded px-4 py-2\">\n {{ group.chunks.length }}\n </span>\n <span\n class=\"text-10 text-word-4 bg-surface-2 rounded px-4 py-2 uppercase\">\n {{ group.document.language }}\n </span>\n <VvIcon\n :name=\"\n expandedDocuments.has(\n group.document.documentId,\n )\n ? 'ri:arrow-up-s-line'\n : 'ri:arrow-down-s-line'\n \"\n class=\"text-16 text-word-3\" />\n </div>\n </button>\n <VvButton\n v-if=\"group.document.sourceUrl\"\n modifiers=\"action-quiet-small\"\n icon=\"ri:external-link-line\"\n class=\"text-10 shrink-0 mr-8\"\n :href=\"group.document.sourceUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :title=\"$t('action.open')\"\n :aria-label=\"$t('action.open')\" />\n </div>\n\n <!-- Expanded content -->\n <div\n v-if=\"expandedDocuments.has(group.document.documentId)\"\n class=\"border-t border-surface-3\">\n <PkStreamingMarkdown\n v-if=\"group.document.sourceDescription\"\n :markdown=\"group.document.sourceDescription\"\n class=\"px-8 py-4 text-10 text-word-3 bg-surface-1 border-b border-surface-3\" />\n\n <!-- Chunk excerpts -->\n <div\n v-for=\"chunk in group.chunks\"\n :key=\"chunk.chunkId\"\n class=\"border-b border-surface-3 last:border-b-0\">\n <button\n class=\"flex items-center gap-8 px-8 py-6 w-full text-left hover:bg-surface-1 transition-colors cursor-pointer\"\n @click=\"toggleChunk(chunk.chunkId)\">\n <PkChunkPreview\n :content=\"chunk.content\"\n :similarity=\"chunk.similarity\"\n :max-similarity=\"maxSimilarity\"\n :expanded=\"expandedChunks.has(chunk.chunkId)\" />\n </button>\n\n <!-- Expanded chunk content -->\n <div\n v-if=\"expandedChunks.has(chunk.chunkId)\"\n class=\"bg-surface-1 border-t border-surface-3\">\n <div class=\"p-8 text-10 text-word-3\">\n <transition mode=\"out-in\">\n <!-- Context expansion -->\n <PkStreamingMarkdown\n v-if=\"contextData.has(chunk.chunkId)\"\n :markdown=\"\n contextData.get(chunk.chunkId)!\n \"\n class=\"wysiwyg\" />\n\n <!-- Chunk content -->\n <PkStreamingMarkdown\n v-else\n :markdown=\"chunk.content\"\n class=\"wysiwyg\" />\n </transition>\n </div>\n\n <!-- Actions bar -->\n <div\n class=\"flex items-center gap-8 px-8 py-6 border-t border-surface-3 bg-surface\">\n <!-- Expand / collapse context -->\n <button\n v-if=\"\n onExpandContext &&\n chunk.chunkIndex != null &&\n !contextData.has(chunk.chunkId)\n \"\n class=\"text-10 text-word-3 hover:text-word flex items-center gap-4 cursor-pointer\"\n :disabled=\"\n loadingContext.has(chunk.chunkId)\n \"\n @click=\"handleExpandContext(chunk)\">\n <VvIcon\n :name=\"\n loadingContext.has(chunk.chunkId)\n ? 'loading-loop'\n : 'ri:expand-up-down-line'\n \"\n class=\"text-12\" />\n {{ $t('label.expandContext') }}\n </button>\n <button\n v-else-if=\"contextData.has(chunk.chunkId)\"\n class=\"text-10 text-word-3 hover:text-word-1 flex items-center gap-4 cursor-pointer\"\n @click=\"clearContext(chunk.chunkId)\">\n <VvIcon\n name=\"ri:collapse-vertical-line\"\n class=\"text-12\" />\n {{ $t('label.collapseContext') }}\n </button>\n\n <!-- Open source URL -->\n <a\n v-if=\"chunk.sourceUrl\"\n :href=\"chunk.sourceUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"text-10 text-word-3 hover:text-word-1 flex items-center gap-4 ml-auto\">\n <VvIcon\n name=\"ri:external-link-line\"\n class=\"text-12\" />\n {{ $t('label.openSource') }}\n </a>\n\n <!-- Download file -->\n <button\n v-if=\"\n onDownload &&\n chunk.documentType === 'file'\n \"\n class=\"text-10 text-word-3 hover:text-word-1 flex items-center gap-4 cursor-pointer\"\n :class=\"{\n 'ml-auto': !chunk.sourceUrl,\n }\"\n @click=\"onDownload(chunk.documentId)\">\n <VvIcon\n name=\"ri:download-line\"\n class=\"text-12\" />\n {{ $t('label.downloadFile') }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </li>\n </ul>\n\n <!-- Show more -->\n <button\n v-if=\"hasMore\"\n class=\"text-12 text-word-3 cursor-pointer hover:underline flex items-center gap-4 mx-auto\"\n @click=\"showMore = !showMore\">\n <VvIcon\n :name=\"showMore ? 'ri:arrow-up-s-line' : 'ri:arrow-down-s-line'\"\n class=\"text-16\" />\n {{\n showMore\n ? $t('action.showLess')\n : $t('action.showMore', {\n count: groupedSources.length - 3,\n })\n }}\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, reactive } from 'vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n import PkChunkPreview from './PkChunkPreview.vue'\n import PkDocumentHeader from './PkDocumentHeader.vue'\n\n interface SourceItem {\n chunkId: string\n documentId: string\n documentName: string\n documentType: string\n language: string\n content: string\n chunkIndex?: number | null\n similarity?: number\n sourceUrl?: string\n sourceFilename?: string\n sourceDescription?: string\n sourceImageUrl?: string\n }\n\n const props = defineProps<{\n part: unknown\n onExpandContext?: (payload: {\n documentId: string\n chunkIndex: number\n }) => Promise<string>\n onDownload?: (documentId: string) => void\n }>()\n\n const toolPart = computed(() => {\n return props.part as {\n input?: {\n sources: SourceItem[]\n }\n }\n })\n\n const sources = computed(() => toolPart.value.input?.sources || [])\n\n const groupedSources = computed(() => {\n const groups = new Map<\n string,\n { document: SourceItem; chunks: SourceItem[] }\n >()\n for (const source of sources.value) {\n const existing = groups.get(source.documentId)\n if (existing) {\n existing.chunks.push(source)\n } else {\n groups.set(source.documentId, {\n document: source,\n chunks: [source],\n })\n }\n }\n return [...groups.values()]\n })\n\n const maxSimilarity = computed(() => {\n return Math.max(...sources.value.map((s) => s.similarity ?? 0), 0)\n })\n\n const expandedDocuments = reactive(new Set<string>())\n const expandedChunks = reactive(new Set<string>())\n const contextData = reactive(new Map<string, string>())\n const loadingContext = reactive(new Set<string>())\n\n const toggleDocument = (documentId: string) => {\n if (expandedDocuments.has(documentId)) {\n expandedDocuments.delete(documentId)\n } else {\n expandedDocuments.add(documentId)\n }\n }\n\n const toggleChunk = (chunkId: string) => {\n if (expandedChunks.has(chunkId)) {\n expandedChunks.delete(chunkId)\n } else {\n expandedChunks.add(chunkId)\n }\n }\n\n const handleExpandContext = async (source: SourceItem) => {\n if (source.chunkIndex == null || !props.onExpandContext) {\n return\n }\n loadingContext.add(source.chunkId)\n try {\n const content = await props.onExpandContext({\n documentId: source.documentId,\n chunkIndex: source.chunkIndex,\n })\n contextData.set(source.chunkId, content)\n } finally {\n loadingContext.delete(source.chunkId)\n }\n }\n\n const clearContext = (chunkId: string) => {\n contextData.delete(chunkId)\n }\n\n const showMore = ref(false)\n const visibleGroups = computed(() => {\n if (showMore.value) {\n return groupedSources.value\n }\n return groupedSources.value.slice(0, 3)\n })\n const hasMore = computed(() => groupedSources.value.length > 3)\n</script>\n\n<template>\n <div v-if=\"sources.length\" class=\"flex flex-col gap-xs w-full\">\n <div class=\"flex items-center gap-4 text-12 text-word-3 font-semibold\">\n <VvIcon name=\"ri:article-line\" class=\"text-14\" />\n {{ $t('label.sources') }}\n <span class=\"text-word-4 font-normal\">\n ({{ groupedSources.length }})\n </span>\n </div>\n\n <ul class=\"flex flex-col gap-xs\">\n <li\n v-for=\"group in visibleGroups\"\n :key=\"group.document.documentId\"\n class=\"border border-surface-3 rounded-xl overflow-hidden\">\n <!-- Document header: the toggle, and beside it the link to\n the source, because a link inside a button is invalid\n HTML and its click also toggled the row -->\n <div\n class=\"flex items-center hover:bg-surface-1 transition-colors\">\n <button\n type=\"button\"\n class=\"flex items-center gap-8 p-8 flex-1 min-w-0 text-left cursor-pointer\"\n :aria-expanded=\"\n expandedDocuments.has(group.document.documentId)\n \"\n @click=\"toggleDocument(group.document.documentId)\">\n <PkDocumentHeader\n :type=\"group.document.documentType\"\n :name=\"group.document.documentName\"\n :url=\"group.document.sourceUrl\"\n :filename=\"group.document.sourceFilename\"\n muted-url />\n <div class=\"flex items-center gap-4 shrink-0\">\n <span\n v-if=\"group.chunks.length > 1\"\n class=\"text-10 text-word-4 bg-surface-2 rounded px-4 py-2\">\n {{ group.chunks.length }}\n </span>\n <span\n class=\"text-10 text-word-4 bg-surface-2 rounded px-4 py-2 uppercase\">\n {{ group.document.language }}\n </span>\n <VvIcon\n :name=\"\n expandedDocuments.has(\n group.document.documentId,\n )\n ? 'ri:arrow-up-s-line'\n : 'ri:arrow-down-s-line'\n \"\n class=\"text-16 text-word-3\" />\n </div>\n </button>\n <VvButton\n v-if=\"group.document.sourceUrl\"\n modifiers=\"action-quiet-small\"\n icon=\"ri:external-link-line\"\n class=\"text-10 shrink-0 mr-8\"\n :href=\"group.document.sourceUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n :title=\"$t('action.open')\"\n :aria-label=\"$t('action.open')\" />\n </div>\n\n <!-- Expanded content -->\n <div\n v-if=\"expandedDocuments.has(group.document.documentId)\"\n class=\"border-t border-surface-3\">\n <PkStreamingMarkdown\n v-if=\"group.document.sourceDescription\"\n :markdown=\"group.document.sourceDescription\"\n class=\"px-8 py-4 text-10 text-word-3 bg-surface-1 border-b border-surface-3\" />\n\n <!-- Chunk excerpts -->\n <div\n v-for=\"chunk in group.chunks\"\n :key=\"chunk.chunkId\"\n class=\"border-b border-surface-3 last:border-b-0\">\n <button\n class=\"flex items-center gap-8 px-8 py-6 w-full text-left hover:bg-surface-1 transition-colors cursor-pointer\"\n @click=\"toggleChunk(chunk.chunkId)\">\n <PkChunkPreview\n :content=\"chunk.content\"\n :similarity=\"chunk.similarity\"\n :max-similarity=\"maxSimilarity\"\n :expanded=\"expandedChunks.has(chunk.chunkId)\" />\n </button>\n\n <!-- Expanded chunk content -->\n <div\n v-if=\"expandedChunks.has(chunk.chunkId)\"\n class=\"bg-surface-1 border-t border-surface-3\">\n <div class=\"p-8 text-10 text-word-3\">\n <transition mode=\"out-in\">\n <!-- Context expansion -->\n <PkStreamingMarkdown\n v-if=\"contextData.has(chunk.chunkId)\"\n :markdown=\"\n contextData.get(chunk.chunkId)!\n \"\n class=\"wysiwyg\" />\n\n <!-- Chunk content -->\n <PkStreamingMarkdown\n v-else\n :markdown=\"chunk.content\"\n class=\"wysiwyg\" />\n </transition>\n </div>\n\n <!-- Actions bar -->\n <div\n class=\"flex items-center gap-8 px-8 py-6 border-t border-surface-3 bg-surface\">\n <!-- Expand / collapse context -->\n <button\n v-if=\"\n onExpandContext &&\n chunk.chunkIndex != null &&\n !contextData.has(chunk.chunkId)\n \"\n class=\"text-10 text-word-3 hover:text-word flex items-center gap-4 cursor-pointer\"\n :disabled=\"\n loadingContext.has(chunk.chunkId)\n \"\n @click=\"handleExpandContext(chunk)\">\n <VvIcon\n :name=\"\n loadingContext.has(chunk.chunkId)\n ? 'loading-loop'\n : 'ri:expand-up-down-line'\n \"\n class=\"text-12\" />\n {{ $t('label.expandContext') }}\n </button>\n <button\n v-else-if=\"contextData.has(chunk.chunkId)\"\n class=\"text-10 text-word-3 hover:text-word-1 flex items-center gap-4 cursor-pointer\"\n @click=\"clearContext(chunk.chunkId)\">\n <VvIcon\n name=\"ri:collapse-vertical-line\"\n class=\"text-12\" />\n {{ $t('label.collapseContext') }}\n </button>\n\n <!-- Open source URL -->\n <a\n v-if=\"chunk.sourceUrl\"\n :href=\"chunk.sourceUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"text-10 text-word-3 hover:text-word-1 flex items-center gap-4 ml-auto\">\n <VvIcon\n name=\"ri:external-link-line\"\n class=\"text-12\" />\n {{ $t('label.openSource') }}\n </a>\n\n <!-- Download file -->\n <button\n v-if=\"\n onDownload &&\n chunk.documentType === 'file'\n \"\n class=\"text-10 text-word-3 hover:text-word-1 flex items-center gap-4 cursor-pointer\"\n :class=\"{\n 'ml-auto': !chunk.sourceUrl,\n }\"\n @click=\"onDownload(chunk.documentId)\">\n <VvIcon\n name=\"ri:download-line\"\n class=\"text-12\" />\n {{ $t('label.downloadFile') }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </li>\n </ul>\n\n <!-- Show more -->\n <button\n v-if=\"hasMore\"\n class=\"text-12 text-word-3 cursor-pointer hover:underline flex items-center gap-4 mx-auto\"\n @click=\"showMore = !showMore\">\n <VvIcon\n :name=\"showMore ? 'ri:arrow-up-s-line' : 'ri:arrow-down-s-line'\"\n class=\"text-16\" />\n {{\n showMore\n ? $t('action.showLess')\n : $t('action.showMore', {\n count: groupedSources.length - 3,\n })\n }}\n </button>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAII,IAAM4E,IAAQC,GAORC,IAAoBC,QAAe;GACrC,IAAIH,EAAM,cAAc,MACpB,OAAO;GAEX,IAAMI,IACFJ,EAAM,iBAAiBA,EAAM,gBAAgB,IACvCA,EAAM,gBACN;GACV,OAAO,KAAK,MAAOA,EAAM,aAAaI,IAAO,GAAG;EACpD,CAAC;;;;IAID1E,EAAsE2E,GAAA;KAA9D,MAAK;KAAkB,OAAM;;IACrC1E,EAEO,QAAA;KAFD,OAAM;KAAuC,OAAOsE,EAAA;IACnD,GAAArE,EAAAC,EAAA4D,CAAA,CAAa,CAACQ,EAAA,OAAO,CAAA,GAAA,GAAA7E,CAAA;IAEhB8E,EAAA,SAAiB,OAE7BzB,EAAA,IAAA,EAAA,KAFAlD,EAAA,GAAAC,EAEO,QAFPH,GAEOO,EADAsE,EAAA,KAAiB,IAAG,MAC3B,CAAA;IACAxE,EAE2C2E,GAAA;KADtC,MAAMJ,EAAA,WAAQ,uBAAA;KACf,OAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;GEdVzD,OAAAA,EAAAA,GAAAA,EAAAA,GAAAA,MAAAA,CAAAA,EAE2C6D,GAAA;IADtC,MAAM5D,EAAA+C,CAAA,CAAW,CAACS,EAAA,IAAI;IACvB,OAAM;GACVvD,GAAAA,MAAAA,GAAAA,CAAAA,MAAAA,CAAAA,GAAAA,EAaM,OAbNV,GAaM;IAZFU,EAES,UAFTT,GAESU,EADFsD,EAAA,IAAI,GAAA,CAAA;IAECA,EAAA,YAAZ5D,EAAA,GAAAC,EAEO,QAFPJ,GAEOS,EADAsD,EAAA,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2F,EAAA,QAA+BnG,EAAAA,GAAE,iBAAA,IAA0CA,EAAAA,GAAE,mBAAA,EAAuD,OAAAkF,EAAA,MAAe,SAAM,EAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,KAAAxD,EAAA,IAAA,EAAA"}
|
package/dist/_chunks/{PkToolShowSuggestedReply-D6g3UYqI.js → PkToolShowSuggestedReply-C81p7lmP.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as e, L as t, O as n, St as r, Tt as i, _ as a, d as o, h as s, it as c, m as l, pt as u, r as d, u as f, v as p, x as m, xt as h, z as g } from "./vue.runtime.esm-bundler-B-NVlZCY.js";
|
|
2
|
-
import { d as _ } from "./Agent-
|
|
3
|
-
import { t as v } from "./index.es-
|
|
2
|
+
import { d as _ } from "./Agent-B5gICwnq.js";
|
|
3
|
+
import { t as v } from "./index.es-D_E1Gj_U.js";
|
|
4
4
|
import { t as y } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
5
5
|
//#region ../../packages/components/src/chat/PkToolShowSuggestedReply.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
n(), h(), d(), c();
|
|
@@ -46,4 +46,4 @@ var b = {
|
|
|
46
46
|
//#endregion
|
|
47
47
|
export { S as default };
|
|
48
48
|
|
|
49
|
-
//# sourceMappingURL=PkToolShowSuggestedReply-
|
|
49
|
+
//# sourceMappingURL=PkToolShowSuggestedReply-C81p7lmP.js.map
|