@8wave/ai-elements 0.119.0-beta.26 → 0.119.0-beta.27
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-D8YrsP52.js → Agent-Gdgpd3LA.js} +66 -66
- package/dist/_chunks/Agent-Gdgpd3LA.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-Bry3y6Ru.js → PkStreamingMarkdown-BK9O_NLx.js} +889 -852
- package/dist/_chunks/{PkStreamingMarkdown-Bry3y6Ru.js.map → PkStreamingMarkdown-BK9O_NLx.js.map} +1 -1
- package/dist/_chunks/{PkToolEditSpreadsheet-5vHzEy4P.js → PkToolEditSpreadsheet-D-RCfnrN.js} +2 -2
- package/dist/_chunks/{PkToolEditSpreadsheet-5vHzEy4P.js.map → PkToolEditSpreadsheet-D-RCfnrN.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-Cj8hTfNF.js → PkToolRequestGeolocation-PxhQxMP1.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-Cj8hTfNF.js.map → PkToolRequestGeolocation-PxhQxMP1.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-BWxR1hV4.js → PkToolRequestOAuthConnection-QYDJPUFF.js} +5 -4
- package/dist/_chunks/PkToolRequestOAuthConnection-QYDJPUFF.js.map +1 -0
- package/dist/_chunks/{PkToolShowArtifact-CfJLe8vD.js → PkToolShowArtifact-DGUj8f1k.js} +3 -3
- package/dist/_chunks/PkToolShowArtifact-DGUj8f1k.js.map +1 -0
- package/dist/_chunks/{PkToolShowCalendarEvent-Bp_yv8S7.js → PkToolShowCalendarEvent-BEjPZC1F.js} +4 -3
- package/dist/_chunks/PkToolShowCalendarEvent-BEjPZC1F.js.map +1 -0
- package/dist/_chunks/{PkToolShowComparison-Bvd4f4tJ.js → PkToolShowComparison-DLC22e1W.js} +4 -3
- package/dist/_chunks/PkToolShowComparison-DLC22e1W.js.map +1 -0
- package/dist/_chunks/{PkToolShowContactForm--9XOVqNB.js → PkToolShowContactForm-DXJI0MPZ.js} +5 -4
- package/dist/_chunks/PkToolShowContactForm-DXJI0MPZ.js.map +1 -0
- package/dist/_chunks/{PkToolShowDiagram-C-pNbC9n.js → PkToolShowDiagram-C5mSqZDp.js} +9 -8
- package/dist/_chunks/PkToolShowDiagram-C5mSqZDp.js.map +1 -0
- package/dist/_chunks/{PkToolShowEmail-BKel_O29.js → PkToolShowEmail-C7mUCqGL.js} +4 -3
- package/dist/_chunks/PkToolShowEmail-C7mUCqGL.js.map +1 -0
- package/dist/_chunks/{PkToolShowForm-CGAc1O6K.js → PkToolShowForm-UQo0Xdiq.js} +6 -5
- package/dist/_chunks/PkToolShowForm-UQo0Xdiq.js.map +1 -0
- package/dist/_chunks/{PkToolShowImageGallery-CIhIrIcY.js → PkToolShowImageGallery-rZ3AtIEP.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-CIhIrIcY.js.map → PkToolShowImageGallery-rZ3AtIEP.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-78C7jFiV.js → PkToolShowLocation-BOmxHZKd.js} +4 -3
- package/dist/_chunks/PkToolShowLocation-BOmxHZKd.js.map +1 -0
- package/dist/_chunks/{PkToolShowMessage-BScy-w4J.js → PkToolShowMessage-vw4XS4TR.js} +4 -3
- package/dist/_chunks/PkToolShowMessage-vw4XS4TR.js.map +1 -0
- package/dist/_chunks/{PkToolShowProductList-BjWKnbyD.js → PkToolShowProductList-ByeSoIwq.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-BjWKnbyD.js.map → PkToolShowProductList-ByeSoIwq.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-B70jPHDw.js → PkToolShowQrCode-BhcAUXSZ.js} +4 -3
- package/dist/_chunks/PkToolShowQrCode-BhcAUXSZ.js.map +1 -0
- package/dist/_chunks/{PkToolShowSources-BJ-XFrLD.js → PkToolShowSources-q4XBOwJl.js} +51 -50
- package/dist/_chunks/PkToolShowSources-q4XBOwJl.js.map +1 -0
- package/dist/_chunks/{PkToolShowSuggestedReply-0KahUIlw.js → PkToolShowSuggestedReply-BISQY1ce.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-0KahUIlw.js.map → PkToolShowSuggestedReply-BISQY1ce.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-_V_d-PDr.js → PkToolShowVideo-BmHHW4Ep.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-_V_d-PDr.js.map → PkToolShowVideo-BmHHW4Ep.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-D55VEPjK.js → PkToolShowWebPages-BaapF0CC.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-D55VEPjK.js.map → PkToolShowWebPages-BaapF0CC.js.map} +1 -1
- package/dist/_chunks/VvButtonLocalized-DV-zbH9b.js +21 -0
- package/dist/_chunks/VvButtonLocalized-DV-zbH9b.js.map +1 -0
- package/dist/_chunks/{chatImagePolicy-DXkhb-N_.js → chatImagePolicy-CDNkMKdT.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-DXkhb-N_.js.map → chatImagePolicy-CDNkMKdT.js.map} +1 -1
- package/dist/_chunks/{markdown-DpoAzJSk.js → markdown-BbaLt57-.js} +8 -8
- package/dist/_chunks/{markdown-DpoAzJSk.js.map → markdown-BbaLt57-.js.map} +1 -1
- package/dist/_chunks/text-BHCGblDQ.js +6 -0
- package/dist/_chunks/text-BHCGblDQ.js.map +1 -0
- package/dist/ai-elements.es.js +2789 -2526
- 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/PkChatbotError.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/PkChatbotWakeupBar.js +1 -1
- package/dist-vue/_chunks/{Agent-dGF8mkG9.js → Agent-DU1WWaHR.js} +87 -87
- package/dist-vue/_chunks/Agent-DU1WWaHR.js.map +1 -0
- package/dist-vue/_chunks/{Document-CV-RJu_p.js → Document-Cto-Qws0.js} +2 -2
- package/dist-vue/_chunks/{Document-CV-RJu_p.js.map → Document-Cto-Qws0.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbot-536vsOfp.js → PkChatbot-D0BQ3VnX.js} +86 -85
- package/dist-vue/_chunks/PkChatbot-D0BQ3VnX.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotAuth-BMLLTSwK.js → PkChatbotAuth-BVZzjbK9.js} +4 -3
- package/dist-vue/_chunks/PkChatbotAuth-BVZzjbK9.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-Toj4CqXV.js → PkChatbotEmptyState-CGjFcwwB.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-Toj4CqXV.js.map → PkChatbotEmptyState-CGjFcwwB.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotError-CRGbK09-.js → PkChatbotError-BV5ga7hk.js} +4 -3
- package/dist-vue/_chunks/PkChatbotError-BV5ga7hk.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-CMFXjoKR.js → PkChatbotFeedbackForm-B5cYsWBr.js} +8 -7
- package/dist-vue/_chunks/PkChatbotFeedbackForm-B5cYsWBr.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotInput-BfZqRpQ2.js → PkChatbotInput-BVBQY0V5.js} +8 -7
- package/dist-vue/_chunks/PkChatbotInput-BVBQY0V5.js.map +1 -0
- package/dist-vue/_chunks/PkChatbotMessages-CK0lhcDj.js +876 -0
- package/dist-vue/_chunks/PkChatbotMessages-CK0lhcDj.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-D0eoPBQ8.js → PkChatbotStepPayload-l57qHqVf.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-D0eoPBQ8.js.map → PkChatbotStepPayload-l57qHqVf.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-CMx4cw1D.js → PkChatbotStepToolDetail-ChrOa4W4.js} +16 -16
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-CMx4cw1D.js.map → PkChatbotStepToolDetail-ChrOa4W4.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-DeZQhGRU.js → PkChatbotSteps-DnU9r4XT.js} +40 -40
- package/dist-vue/_chunks/{PkChatbotSteps-DeZQhGRU.js.map → PkChatbotSteps-DnU9r4XT.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-CVT6OUIv.js → PkChatbotViewChat-DIx3nwEg.js} +12 -12
- package/dist-vue/_chunks/{PkChatbotViewChat-CVT6OUIv.js.map → PkChatbotViewChat-DIx3nwEg.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-DDWO1Ci_.js +199 -0
- package/dist-vue/_chunks/PkChatbotViewConversations-DDWO1Ci_.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewFiles-CA20TBFY.js → PkChatbotViewFiles-O9YjrGP0.js} +18 -17
- package/dist-vue/_chunks/PkChatbotViewFiles-O9YjrGP0.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewProfile-CyzRxE3D.js → PkChatbotViewProfile-BoImMMj2.js} +11 -10
- package/dist-vue/_chunks/PkChatbotViewProfile-BoImMMj2.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotWakeupBar-jBti21FQ.js → PkChatbotWakeupBar-Cjgarxnw.js} +3 -2
- package/dist-vue/_chunks/PkChatbotWakeupBar-Cjgarxnw.js.map +1 -0
- package/dist-vue/_chunks/{PkStreamingMarkdown-C55Fi0Pd.js → PkStreamingMarkdown-JEkbkY5k.js} +23 -23
- package/dist-vue/_chunks/{PkStreamingMarkdown-C55Fi0Pd.js.map → PkStreamingMarkdown-JEkbkY5k.js.map} +1 -1
- package/dist-vue/_chunks/{PkSvgViewer-Ts3gQ1hB.js → PkSvgViewer-DrA4yi8Q.js} +7 -6
- package/dist-vue/_chunks/PkSvgViewer-DrA4yi8Q.js.map +1 -0
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-HAskd6d3.js → PkToolEditSpreadsheet-BX_h8Hut.js} +2 -2
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-HAskd6d3.js.map → PkToolEditSpreadsheet-BX_h8Hut.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-BE22qwxB.js → PkToolRequestGeolocation-JZYgc-2X.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-BE22qwxB.js.map → PkToolRequestGeolocation-JZYgc-2X.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-GfSalEJG.js → PkToolRequestOAuthConnection-Bwj84qHq.js} +11 -10
- package/dist-vue/_chunks/PkToolRequestOAuthConnection-Bwj84qHq.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowArtifact-z1qTnFkA.js → PkToolShowArtifact-BIvl5I2I.js} +5 -5
- package/dist-vue/_chunks/PkToolShowArtifact-BIvl5I2I.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowCalendarEvent-Dv_rss26.js → PkToolShowCalendarEvent-ve1I0xaV.js} +7 -6
- package/dist-vue/_chunks/PkToolShowCalendarEvent-ve1I0xaV.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowComparison-DQs3E6-k.js → PkToolShowComparison-c2e239T4.js} +3 -2
- package/dist-vue/_chunks/PkToolShowComparison-c2e239T4.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowContactForm-Y0lrHXhr.js → PkToolShowContactForm-CddxrLBZ.js} +13 -12
- package/dist-vue/_chunks/PkToolShowContactForm-CddxrLBZ.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowDiagram-7WxDObZ6.js → PkToolShowDiagram-DdR4x6pP.js} +10 -9
- package/dist-vue/_chunks/PkToolShowDiagram-DdR4x6pP.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowEmail-C591LR5N.js → PkToolShowEmail-CUgZN0J5.js} +8 -7
- package/dist-vue/_chunks/PkToolShowEmail-CUgZN0J5.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowForm-CZFWZub7.js → PkToolShowForm-DiXcYws_.js} +14 -13
- package/dist-vue/_chunks/PkToolShowForm-DiXcYws_.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowImageGallery-CkfXP_lD.js → PkToolShowImageGallery-COrJEjSv.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-CkfXP_lD.js.map → PkToolShowImageGallery-COrJEjSv.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowLocation-Dyz6h_0n.js → PkToolShowLocation-CHi_cONJ.js} +13 -12
- package/dist-vue/_chunks/PkToolShowLocation-CHi_cONJ.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowMessage-CbXERPHI.js → PkToolShowMessage-ATTN5Hac.js} +8 -7
- package/dist-vue/_chunks/PkToolShowMessage-ATTN5Hac.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowProductList-De-PtmD-.js → PkToolShowProductList-BIvJlpMT.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-De-PtmD-.js.map → PkToolShowProductList-BIvJlpMT.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowQrCode-DEAvfLFu.js → PkToolShowQrCode-D_5VUtEB.js} +3 -2
- package/dist-vue/_chunks/PkToolShowQrCode-D_5VUtEB.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSources-CSN7S0zo.js → PkToolShowSources-CC-0Oh4K.js} +57 -56
- package/dist-vue/_chunks/PkToolShowSources-CC-0Oh4K.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-DjutyiEi.js → PkToolShowSuggestedReply-I6FBos-F.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-DjutyiEi.js.map → PkToolShowSuggestedReply-I6FBos-F.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-B_Q93E2y.js → PkToolShowVideo-UUNkUlrg.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-B_Q93E2y.js.map → PkToolShowVideo-UUNkUlrg.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-D3CdjJUc.js → PkToolShowWebPages-CLYx_PgL.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-D3CdjJUc.js.map → PkToolShowWebPages-CLYx_PgL.js.map} +1 -1
- package/dist-vue/_chunks/VvButtonLocalized-BuzLsXp3.js +20 -0
- package/dist-vue/_chunks/VvButtonLocalized-BuzLsXp3.js.map +1 -0
- package/dist-vue/_chunks/{createChatbotApiClient-DSLxswr4.js → createChatbotApiClient-BdmGCAQR.js} +17 -17
- package/dist-vue/_chunks/{createChatbotApiClient-DSLxswr4.js.map → createChatbotApiClient-BdmGCAQR.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-rtl-oKqU.js → useChatbotStore-BAv5K91p.js} +3 -3
- package/dist-vue/_chunks/{useChatbotStore-rtl-oKqU.js.map → useChatbotStore-BAv5K91p.js.map} +1 -1
- package/dist-vue/_chunks/{utils-CwIMEuAv.js → utils-BqPJ6DJT.js} +142 -78
- package/dist-vue/_chunks/utils-BqPJ6DJT.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +276 -24
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +4214 -4186
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +42 -6
- package/dist-vue/packages/components/src/PkEditorMarkdown.d.ts +3 -2
- package/dist-vue/packages/components/src/VvButtonLocalized.d.ts +11 -0
- package/dist-vue/packages/components/src/chat/index.d.ts +1 -0
- package/dist-vue/packages/components/src/chat/utils.d.ts +30 -0
- package/dist-vue/packages/components/src/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/_chunks/Agent-D8YrsP52.js.map +0 -1
- package/dist/_chunks/PkToolRequestOAuthConnection-BWxR1hV4.js.map +0 -1
- package/dist/_chunks/PkToolShowArtifact-CfJLe8vD.js.map +0 -1
- package/dist/_chunks/PkToolShowCalendarEvent-Bp_yv8S7.js.map +0 -1
- package/dist/_chunks/PkToolShowComparison-Bvd4f4tJ.js.map +0 -1
- package/dist/_chunks/PkToolShowContactForm--9XOVqNB.js.map +0 -1
- package/dist/_chunks/PkToolShowDiagram-C-pNbC9n.js.map +0 -1
- package/dist/_chunks/PkToolShowEmail-BKel_O29.js.map +0 -1
- package/dist/_chunks/PkToolShowForm-CGAc1O6K.js.map +0 -1
- package/dist/_chunks/PkToolShowLocation-78C7jFiV.js.map +0 -1
- package/dist/_chunks/PkToolShowMessage-BScy-w4J.js.map +0 -1
- package/dist/_chunks/PkToolShowQrCode-B70jPHDw.js.map +0 -1
- package/dist/_chunks/PkToolShowSources-BJ-XFrLD.js.map +0 -1
- package/dist/_chunks/text-DbSEK8si.js +0 -6
- package/dist/_chunks/text-DbSEK8si.js.map +0 -1
- package/dist-vue/_chunks/Agent-dGF8mkG9.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-536vsOfp.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotAuth-BMLLTSwK.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotError-CRGbK09-.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotFeedbackForm-CMFXjoKR.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-BfZqRpQ2.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-CnI3e9wF.js +0 -869
- package/dist-vue/_chunks/PkChatbotMessages-CnI3e9wF.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-DHeFtAfN.js +0 -197
- package/dist-vue/_chunks/PkChatbotViewConversations-DHeFtAfN.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewFiles-CA20TBFY.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewProfile-CyzRxE3D.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotWakeupBar-jBti21FQ.js.map +0 -1
- package/dist-vue/_chunks/PkSvgViewer-Ts3gQ1hB.js.map +0 -1
- package/dist-vue/_chunks/PkToolRequestOAuthConnection-GfSalEJG.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowArtifact-z1qTnFkA.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowCalendarEvent-Dv_rss26.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowContactForm-Y0lrHXhr.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowDiagram-7WxDObZ6.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowEmail-C591LR5N.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowForm-CZFWZub7.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowLocation-Dyz6h_0n.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowMessage-CbXERPHI.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowQrCode-DEAvfLFu.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowSources-CSN7S0zo.js.map +0 -1
- package/dist-vue/_chunks/utils-CwIMEuAv.js.map +0 -1
|
@@ -1,869 +0,0 @@
|
|
|
1
|
-
import { A as e, E as t, S as n, n as r, v as i } from "./schemas-Bu1lick6.js";
|
|
2
|
-
import { a } from "./Media-C6RS-s98.js";
|
|
3
|
-
import { S as o, j as s, n as c, x as l } from "./Agent-dGF8mkG9.js";
|
|
4
|
-
import { t as u } from "./PkStreamingMarkdown-C55Fi0Pd.js";
|
|
5
|
-
import "./src-DCfvejyT.js";
|
|
6
|
-
import { c as d, i as f, l as p, n as m, o as h, s as g, t as _ } from "./message-BOiF6Bt5.js";
|
|
7
|
-
import { t as ee } from "./PkChatbotAudioTranscript-BUxBHanA.js";
|
|
8
|
-
import { t as v } from "./PkChatbotError-CRGbK09-.js";
|
|
9
|
-
import { t as te } from "./PkRelativeTime--1cIphlA.js";
|
|
10
|
-
import { C as y, S as ne, T as re, a as ie, f as b, h as x, m as ae, n as oe, o as se, p as ce, t as S, u as le, w as ue, x as de, y as fe } from "./utils-CwIMEuAv.js";
|
|
11
|
-
import { t as pe } from "./PkChatbotFilePreview-DIP8KLkS.js";
|
|
12
|
-
import { t as me } from "./PkChatbotFeedbackForm-CMFXjoKR.js";
|
|
13
|
-
import { t as he } from "./PkChatbotMessageFeedback-BYmrVaCE.js";
|
|
14
|
-
import { n as ge, t as _e } from "./PkChatbotSteps-DeZQhGRU.js";
|
|
15
|
-
import { t as ve } from "./PkChatbotOutlineRail-np4g6vsz.js";
|
|
16
|
-
import { VvButton as ye, VvButtonGroup as be, VvIcon as xe } from "@volverjs/ui-vue/components";
|
|
17
|
-
import { Fragment as C, Transition as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createTextVNode as Se, createVNode as A, defineAsyncComponent as j, defineComponent as Ce, mergeProps as we, nextTick as M, normalizeClass as N, normalizeStyle as Te, onBeforeUnmount as Ee, onMounted as De, openBlock as P, ref as F, renderList as Oe, renderSlot as ke, resolveDynamicComponent as Ae, toDisplayString as I, unref as L, useSlots as je, useTemplateRef as Me, watch as R, withCtx as z, withModifiers as B } from "vue";
|
|
18
|
-
import { useI18n as Ne } from "vue-i18n";
|
|
19
|
-
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/iso.js
|
|
20
|
-
function Pe(t) {
|
|
21
|
-
return e(r, t);
|
|
22
|
-
}
|
|
23
|
-
i({
|
|
24
|
-
platform: n(),
|
|
25
|
-
threadId: n()
|
|
26
|
-
});
|
|
27
|
-
var Fe = i({
|
|
28
|
-
wakeId: t(),
|
|
29
|
-
dueAt: Pe(),
|
|
30
|
-
reason: n()
|
|
31
|
-
});
|
|
32
|
-
i({ pendingWakeup: Fe.nullable() }), i({ wakeId: t() });
|
|
33
|
-
var V = (e) => e?.role === "user" && !!e.metadata?.wakeup, Ie = /* @__PURE__ */ new Set([
|
|
34
|
-
"input-streaming",
|
|
35
|
-
"input-available",
|
|
36
|
-
"approval-requested"
|
|
37
|
-
]), Le = /* @__PURE__ */ new Set([
|
|
38
|
-
...o,
|
|
39
|
-
...l,
|
|
40
|
-
"editSpreadsheet"
|
|
41
|
-
]);
|
|
42
|
-
[...l, c.ShowContactForm];
|
|
43
|
-
var H = (e) => e.state, Re = (e) => e.type.startsWith("tool-") ? e.type.slice(5) : void 0, ze = (e) => e?.role === "assistant" && e.parts.some((e) => {
|
|
44
|
-
if (e.type === "text") return e.text.trim().length > 0;
|
|
45
|
-
if (e.type === "file") return !0;
|
|
46
|
-
let t = H(e);
|
|
47
|
-
if (t && Ie.has(t)) return !0;
|
|
48
|
-
let n = Re(e);
|
|
49
|
-
return n !== void 0 && Le.has(n) && t === "output-available";
|
|
50
|
-
}), Be = (e) => {
|
|
51
|
-
if (e?.role !== "assistant" || ze(e)) return !1;
|
|
52
|
-
let t = !1;
|
|
53
|
-
for (let n of e.parts) n.type === "tool-scheduleWakeup" && (t = H(n) === "output-available" && n.input?.noop === !0);
|
|
54
|
-
return t;
|
|
55
|
-
}, Ve = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), He = (e) => e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[-_]+/g, " ") : "", Ue = (e) => e ? Ve(e).replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase() : "", U = (e) => e ? Ve(e).replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").toLowerCase() : "", W = (e) => e ? e.charAt(0).toUpperCase() + e.slice(1) : "", We = {
|
|
56
|
-
requestOAuthConnection: j(() => import("./PkToolRequestOAuthConnection-GfSalEJG.js")),
|
|
57
|
-
showArtifact: j(() => import("./PkToolShowArtifact-z1qTnFkA.js").then((e) => e.n)),
|
|
58
|
-
showCalendarEvent: j(() => import("./PkToolShowCalendarEvent-Dv_rss26.js").then((e) => e.n)),
|
|
59
|
-
showComparison: j(() => import("./PkToolShowComparison-DQs3E6-k.js").then((e) => e.n)),
|
|
60
|
-
showContactForm: j(() => import("./PkToolShowContactForm-Y0lrHXhr.js").then((e) => e.n)),
|
|
61
|
-
showDiagram: j(() => import("./PkToolShowDiagram-7WxDObZ6.js")),
|
|
62
|
-
showEmail: j(() => import("./PkToolShowEmail-C591LR5N.js").then((e) => e.n)),
|
|
63
|
-
showImageGallery: j(() => import("./PkToolShowImageGallery-CkfXP_lD.js").then((e) => e.n)),
|
|
64
|
-
showLocation: j(() => import("./PkToolShowLocation-Dyz6h_0n.js").then((e) => e.n)),
|
|
65
|
-
showMessage: j(() => import("./PkToolShowMessage-CbXERPHI.js").then((e) => e.n)),
|
|
66
|
-
showForm: j(() => import("./PkToolShowForm-CZFWZub7.js").then((e) => e.n)),
|
|
67
|
-
showMultipleChoice: j(() => import("./PkToolShowForm-CZFWZub7.js").then((e) => e.n)),
|
|
68
|
-
showProductList: j(() => import("./PkToolShowProductList-De-PtmD-.js").then((e) => e.n)),
|
|
69
|
-
showQrCode: j(() => import("./PkToolShowQrCode-DEAvfLFu.js").then((e) => e.n)),
|
|
70
|
-
showSources: j(() => import("./PkToolShowSources-CSN7S0zo.js").then((e) => e.n)),
|
|
71
|
-
showSuggestedReply: j(() => import("./PkToolShowSuggestedReply-DjutyiEi.js").then((e) => e.n)),
|
|
72
|
-
showVideo: j(() => import("./PkToolShowVideo-B_Q93E2y.js")),
|
|
73
|
-
showWeather: j(() => import("./PkToolShowWeather-BOuNrvY2.js")),
|
|
74
|
-
showWebPages: j(() => import("./PkToolShowWebPages-D3CdjJUc.js").then((e) => e.n))
|
|
75
|
-
}, Ge = {
|
|
76
|
-
key: 0,
|
|
77
|
-
class: "text-12 text-word-3 m-0 mb-xs"
|
|
78
|
-
}, G = /* @__PURE__ */ Ce({
|
|
79
|
-
__name: "PkToolApprovalPreviewMessage",
|
|
80
|
-
props: { input: {} },
|
|
81
|
-
setup(e) {
|
|
82
|
-
let t = e, n = T(() => {
|
|
83
|
-
let e = t.input;
|
|
84
|
-
return typeof e?.message == "string" ? e.message : "";
|
|
85
|
-
});
|
|
86
|
-
return (e, t) => n.value ? (P(), O("p", Ge, I(n.value), 1)) : D("", !0);
|
|
87
|
-
}
|
|
88
|
-
}), K = { [S]: G }, Ke = {
|
|
89
|
-
key: 0,
|
|
90
|
-
class: "text-12 text-word-3 m-0 mb-xs"
|
|
91
|
-
}, qe = /* @__PURE__ */ Ce({
|
|
92
|
-
__name: "PkToolApprovalCard",
|
|
93
|
-
props: {
|
|
94
|
-
part: {},
|
|
95
|
-
actionable: { type: Boolean },
|
|
96
|
-
callVerdict: { type: Boolean }
|
|
97
|
-
},
|
|
98
|
-
emits: ["respond"],
|
|
99
|
-
setup(e, { emit: t }) {
|
|
100
|
-
let n = e, r = t, { t: i } = Ne({ useScope: "global" }), a = T(() => n.part), o = T(() => f(n.part)), c = T(() => o.value === S), l = T(() => c.value ? (a.value.state === "input-available" || s(a.value.output)) && n.callVerdict === void 0 : a.value.state === "approval-requested"), u = T(() => l.value && n.actionable === !0), d = T(() => l.value && n.actionable !== !0), p = T(() => c.value ? a.value.output === "confirmed" || n.callVerdict === !0 : a.value.approval?.approved === !0), m = T(() => c.value ? a.value.output === "cancelled" || n.callVerdict === !1 : a.value.approval?.approved === !1 || a.value.state === "output-denied"), h = T(() => K[o.value]), g = T(() => {
|
|
101
|
-
if (d.value) return {
|
|
102
|
-
icon: "ri:time-line",
|
|
103
|
-
message: i("toolApproval.expired")
|
|
104
|
-
};
|
|
105
|
-
if (p.value) return {
|
|
106
|
-
icon: "ri:check-line",
|
|
107
|
-
message: i(c.value ? "toolApproval.confirmed" : "toolApproval.approved")
|
|
108
|
-
};
|
|
109
|
-
if (m.value) return {
|
|
110
|
-
icon: "ri:close-line",
|
|
111
|
-
message: i(c.value ? "toolApproval.cancelled" : "toolApproval.denied")
|
|
112
|
-
};
|
|
113
|
-
}), _ = T(() => !!g.value && !h.value);
|
|
114
|
-
return (t, n) => {
|
|
115
|
-
let o = ye, s = be, d = xe;
|
|
116
|
-
return P(), O("div", { class: N(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !_.value }]) }, [
|
|
117
|
-
A(w, null, {
|
|
118
|
-
default: z(() => [!c.value && l.value ? (P(), O("p", Ke, I(L(i)("toolApproval.prompt")), 1)) : D("", !0)]),
|
|
119
|
-
_: 1
|
|
120
|
-
}),
|
|
121
|
-
h.value ? (P(), E(Ae(h.value), {
|
|
122
|
-
key: 0,
|
|
123
|
-
part: e.part,
|
|
124
|
-
input: a.value.input
|
|
125
|
-
}, null, 8, ["part", "input"])) : D("", !0),
|
|
126
|
-
A(w, { mode: "out-in" }, {
|
|
127
|
-
default: z(() => [g.value ? (P(), O("p", {
|
|
128
|
-
key: 1,
|
|
129
|
-
class: N(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": h.value }])
|
|
130
|
-
}, [A(d, {
|
|
131
|
-
name: g.value.icon,
|
|
132
|
-
class: "shrink-0"
|
|
133
|
-
}, null, 8, ["name"]), Se(" " + I(g.value.message), 1)], 2)) : (P(), E(s, { key: 0 }, {
|
|
134
|
-
default: z(() => [A(o, {
|
|
135
|
-
modifiers: "primary-small",
|
|
136
|
-
disabled: !u.value,
|
|
137
|
-
icon: "ri:check-line",
|
|
138
|
-
label: L(i)("action.proceed"),
|
|
139
|
-
onClick: n[0] ||= B((e) => r("respond", !0), ["stop"])
|
|
140
|
-
}, null, 8, ["disabled", "label"]), A(o, {
|
|
141
|
-
modifiers: "action-quiet-small",
|
|
142
|
-
disabled: !u.value,
|
|
143
|
-
icon: "ri:close-line",
|
|
144
|
-
label: L(i)("action.cancel"),
|
|
145
|
-
onClick: n[1] ||= B((e) => r("respond", !1), ["stop"])
|
|
146
|
-
}, null, 8, ["disabled", "label"])]),
|
|
147
|
-
_: 1
|
|
148
|
-
}))]),
|
|
149
|
-
_: 1
|
|
150
|
-
})
|
|
151
|
-
], 2);
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
}), Je = 30, q = 500;
|
|
155
|
-
function Ye(e) {
|
|
156
|
-
let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = F(!1), u = F(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, _ = (e = "smooth") => {
|
|
157
|
-
!t.value || l.value ? d = !1 : (d = !0, t.value.scrollTo({
|
|
158
|
-
top: t.value.scrollHeight,
|
|
159
|
-
behavior: e
|
|
160
|
-
}), setTimeout(() => {
|
|
161
|
-
d = !1;
|
|
162
|
-
}, e === "instant" ? 0 : q));
|
|
163
|
-
}, ee = (e) => {
|
|
164
|
-
e.deltaY < 0 && (l.value = !0);
|
|
165
|
-
}, v = 0, te = (e) => {
|
|
166
|
-
v = e.touches[0]?.clientY ?? 0;
|
|
167
|
-
}, y = (e) => {
|
|
168
|
-
let t = e.touches[0]?.clientY ?? 0;
|
|
169
|
-
t > v && (l.value = !0), v = t;
|
|
170
|
-
}, ne = () => {
|
|
171
|
-
if (!t.value) return;
|
|
172
|
-
let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
|
|
173
|
-
u.value = n - r - e < Je, d || (e < g && s?.(), e > g && (u.value && (l.value = !1), c?.())), g = e;
|
|
174
|
-
}, re = () => {
|
|
175
|
-
if (d || l.value || !t.value) return;
|
|
176
|
-
let e = t.value, n = e.scrollHeight - e.clientHeight;
|
|
177
|
-
n <= e.scrollTop || (u.value = !0, d = !0, e.scrollTop = n, requestAnimationFrame(() => {
|
|
178
|
-
d = !1;
|
|
179
|
-
}));
|
|
180
|
-
}, ie = () => {
|
|
181
|
-
!f && t.value && (f = new MutationObserver(re), f.observe(t.value, {
|
|
182
|
-
childList: !0,
|
|
183
|
-
subtree: !0,
|
|
184
|
-
characterData: !0
|
|
185
|
-
}));
|
|
186
|
-
}, b = () => {
|
|
187
|
-
f?.disconnect(), f = null;
|
|
188
|
-
};
|
|
189
|
-
R(n, (e, t) => {
|
|
190
|
-
e === "streaming" || e === "submitted" ? ie() : (e !== "ready" || t !== "streaming") && b();
|
|
191
|
-
}), R(r, async () => {
|
|
192
|
-
if (r() && i() !== "assistant") {
|
|
193
|
-
oe(), l.value = !1, d = !0;
|
|
194
|
-
try {
|
|
195
|
-
await M(), await o?.(), await M();
|
|
196
|
-
} finally {
|
|
197
|
-
_();
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
let x = null, ae = () => {
|
|
202
|
-
t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, x && clearTimeout(x), x = setTimeout(oe, 300)));
|
|
203
|
-
}, oe = () => {
|
|
204
|
-
p?.disconnect(), p = null, m?.disconnect(), m = null, x &&= (clearTimeout(x), null);
|
|
205
|
-
};
|
|
206
|
-
return De(() => {
|
|
207
|
-
if (!t.value) return;
|
|
208
|
-
t.value.addEventListener("wheel", ee, { passive: !0 }), t.value.addEventListener("touchstart", te, { passive: !0 }), t.value.addEventListener("touchmove", y, { passive: !0 });
|
|
209
|
-
let e = n() === "submitted" || n() === "streaming";
|
|
210
|
-
e ? ie() : (p = new ResizeObserver(ae), p.observe(t.value), m = new MutationObserver(ae), m.observe(t.value, {
|
|
211
|
-
childList: !0,
|
|
212
|
-
subtree: !0
|
|
213
|
-
}));
|
|
214
|
-
let r = a?.() ?? t.value.firstElementChild;
|
|
215
|
-
r && (h = new ResizeObserver(re), h.observe(r)), e || ae();
|
|
216
|
-
}), Ee(() => {
|
|
217
|
-
t.value?.removeEventListener("wheel", ee), t.value?.removeEventListener("touchstart", te), t.value?.removeEventListener("touchmove", y), h?.disconnect(), h = null, b(), oe();
|
|
218
|
-
}), {
|
|
219
|
-
handleScroll: ne,
|
|
220
|
-
scrollToBottom: _,
|
|
221
|
-
userScrolledUp: l,
|
|
222
|
-
isAtBottom: u
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
//#endregion
|
|
226
|
-
//#region ../../packages/components/src/chat/wakeupFeed.ts
|
|
227
|
-
function Xe(e, t = () => !1) {
|
|
228
|
-
let n = (e) => Be(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
|
|
229
|
-
for (; a < e.length;) {
|
|
230
|
-
let t = e[a];
|
|
231
|
-
if (V(t) && n(e[a + 1])) {
|
|
232
|
-
let o = t.id, s = 0, c;
|
|
233
|
-
for (; V(e[a]) && n(e[a + 1]);) s += 1, c = e[a].metadata?.createdAt ?? c, r.add(e[a].id), r.add(e[a + 1].id), a += 2;
|
|
234
|
-
i.set(o, {
|
|
235
|
-
count: s,
|
|
236
|
-
lastAt: c
|
|
237
|
-
});
|
|
238
|
-
} else n(t) && r.add(t.id), a += 1;
|
|
239
|
-
}
|
|
240
|
-
return {
|
|
241
|
-
hidden: r,
|
|
242
|
-
quietRuns: i
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
//#endregion
|
|
246
|
-
//#region ../../packages/components/src/chat/PkChatbotMessages.vue?vue&type=script&setup=true&lang.ts
|
|
247
|
-
var Ze = ["aria-busy"], Qe = {
|
|
248
|
-
key: 0,
|
|
249
|
-
class: "pk-chatbot-messages__outline"
|
|
250
|
-
}, $e = {
|
|
251
|
-
key: 0,
|
|
252
|
-
class: "pk-chatbot-divider vv-separator"
|
|
253
|
-
}, et = { class: "pk-chatbot-divider__label" }, tt = {
|
|
254
|
-
key: 1,
|
|
255
|
-
class: "pk-chatbot-wakeup"
|
|
256
|
-
}, nt = ["title"], rt = { class: "pk-chatbot-message__text" }, it = ["title"], at = {
|
|
257
|
-
key: 0,
|
|
258
|
-
class: "pk-chatbot-message__reaction-emoji"
|
|
259
|
-
}, ot = {
|
|
260
|
-
key: 0,
|
|
261
|
-
class: "flex flex-col items-end gap-8 w-full"
|
|
262
|
-
}, st = {
|
|
263
|
-
key: 0,
|
|
264
|
-
class: "pk-chatbot-message__loading-info"
|
|
265
|
-
}, ct = { class: "flex gap-8 items-center" }, lt = { class: "font-mono rounded text-12" }, ut = { class: "flex gap-8 items-center" }, dt = {
|
|
266
|
-
key: 0,
|
|
267
|
-
class: "pk-chatbot-message__footer"
|
|
268
|
-
}, ft = {
|
|
269
|
-
key: 0,
|
|
270
|
-
class: "pk-chatbot-message__hover-meta"
|
|
271
|
-
}, pt = ["datetime", "title"], mt = { class: "truncate" }, ht = {
|
|
272
|
-
key: 0,
|
|
273
|
-
class: "flex items-center gap-4 min-w-0"
|
|
274
|
-
}, gt = { class: "truncate" }, _t = ["title"], vt = {
|
|
275
|
-
key: 2,
|
|
276
|
-
class: "flex items-center gap-4 text-12 text-word-3"
|
|
277
|
-
}, yt = { class: "truncate" }, bt = ["datetime"], xt = { class: "truncate" }, St = {
|
|
278
|
-
key: 4,
|
|
279
|
-
class: "flex items-center gap-4 text-12 text-word-3"
|
|
280
|
-
}, Ct = { class: "pk-chatbot-message__loading-info" }, wt = { class: "flex gap-8 items-center" }, Tt = { class: "text-12" }, Et = ["title", "aria-label"], J = /* @__PURE__ */ Ce({
|
|
281
|
-
__name: "PkChatbotMessages",
|
|
282
|
-
props: {
|
|
283
|
-
status: {},
|
|
284
|
-
messages: {},
|
|
285
|
-
error: {},
|
|
286
|
-
actions: {},
|
|
287
|
-
mainColor: {},
|
|
288
|
-
textColor: {},
|
|
289
|
-
revisedAnswers: {},
|
|
290
|
-
messageFeedbacks: {},
|
|
291
|
-
readonlyFeedback: { type: Boolean },
|
|
292
|
-
disableHeightAdjustment: { type: Boolean },
|
|
293
|
-
showMessageDateTime: { type: Boolean },
|
|
294
|
-
showMessageTokensCount: { type: Boolean },
|
|
295
|
-
showMessageNumber: { type: Boolean },
|
|
296
|
-
showAllMessageParts: { type: Boolean },
|
|
297
|
-
interactive: { type: Boolean },
|
|
298
|
-
showExtendedSteps: { type: Boolean },
|
|
299
|
-
awaitingSpokenAnswer: { type: Boolean },
|
|
300
|
-
confirmVerdictsOnCall: {},
|
|
301
|
-
isDark: { type: Boolean },
|
|
302
|
-
showScrollToBottom: { type: Boolean },
|
|
303
|
-
feedbackMessageId: {},
|
|
304
|
-
feedbackLoading: { type: Boolean },
|
|
305
|
-
feedbackSubmitted: { type: Boolean },
|
|
306
|
-
feedbackError: {}
|
|
307
|
-
},
|
|
308
|
-
emits: [
|
|
309
|
-
"show-info",
|
|
310
|
-
"regenerate",
|
|
311
|
-
"revise",
|
|
312
|
-
"upvote",
|
|
313
|
-
"downvote",
|
|
314
|
-
"feedback",
|
|
315
|
-
"feedback-submit",
|
|
316
|
-
"feedback-close",
|
|
317
|
-
"scroll-up",
|
|
318
|
-
"scroll-down",
|
|
319
|
-
"auto-retry",
|
|
320
|
-
"reset-chat",
|
|
321
|
-
"approval-respond",
|
|
322
|
-
"confirm-respond"
|
|
323
|
-
],
|
|
324
|
-
setup(e, { emit: t }) {
|
|
325
|
-
let n = e, r = t, { t: i, d: o, n: s } = Ne({ useScope: "global" }), c = je(), l = (e, t) => {
|
|
326
|
-
if (ne(e)) {
|
|
327
|
-
let n = e.toolCallId;
|
|
328
|
-
n && r("confirm-respond", {
|
|
329
|
-
toolCallId: n,
|
|
330
|
-
confirmed: t
|
|
331
|
-
});
|
|
332
|
-
return;
|
|
333
|
-
}
|
|
334
|
-
let n = ae(e);
|
|
335
|
-
n && r("approval-respond", {
|
|
336
|
-
id: n,
|
|
337
|
-
approved: t
|
|
338
|
-
});
|
|
339
|
-
}, S = Me("scrollEl"), j = Me("wrapperEl"), Ce = T(() => re(n.textColor, n.mainColor)), { handleScroll: Ee, scrollToBottom: Pe, userScrolledUp: Fe, isAtBottom: Ie } = Ye({
|
|
340
|
-
scrollEl: S,
|
|
341
|
-
status: () => n.status,
|
|
342
|
-
messagesLength: () => n.messages?.length,
|
|
343
|
-
lastMessageRole: () => n.messages?.[n.messages.length - 1]?.role,
|
|
344
|
-
contentEl: () => j.value,
|
|
345
|
-
beforeNewMessageScroll: () => Ge(),
|
|
346
|
-
onScrollUp: () => r("scroll-up"),
|
|
347
|
-
onScrollDown: () => r("scroll-down")
|
|
348
|
-
}), Le = () => {
|
|
349
|
-
Fe.value = !1, Pe();
|
|
350
|
-
}, H = T(() => (n.messages ?? []).filter((e) => e.role === "user" && !V(e)).map((e) => ({
|
|
351
|
-
id: e.id,
|
|
352
|
-
preview: e.parts.find(d)?.text.trim().slice(0, 120) || "…"
|
|
353
|
-
}))), Re = F(), ze = () => S.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], Be = () => {
|
|
354
|
-
let e = S.value;
|
|
355
|
-
if (!e || !n.showScrollToBottom) return;
|
|
356
|
-
let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = H.value[0]?.id;
|
|
357
|
-
ze().forEach((e, n) => {
|
|
358
|
-
e.getBoundingClientRect().top <= t && (r = H.value[n]?.id);
|
|
359
|
-
}), Re.value = r;
|
|
360
|
-
};
|
|
361
|
-
R(H, async () => {
|
|
362
|
-
await M(), Be();
|
|
363
|
-
});
|
|
364
|
-
let Ve = () => {
|
|
365
|
-
Ee(), Be();
|
|
366
|
-
}, He = (e) => {
|
|
367
|
-
let t = S.value, n = H.value.findIndex((t) => t.id === e), r = ze()[n];
|
|
368
|
-
t && r && (Fe.value = !0, t.scrollTo({
|
|
369
|
-
top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
|
|
370
|
-
behavior: "smooth"
|
|
371
|
-
}));
|
|
372
|
-
}, U = F(0), W = F(!1), Ge = async () => {
|
|
373
|
-
let e = n.messages;
|
|
374
|
-
if (!e?.length || n.disableHeightAdjustment || e[e.length - 1].role !== "user" && n.status !== "submitted" && n.status !== "streaming" || (W.value = !1, await M(), !S.value)) return;
|
|
375
|
-
let { paddingTop: t, paddingBottom: r } = getComputedStyle(S.value), i = S.value.clientHeight - Number.parseFloat(t) - Number.parseFloat(r), a = j.value && Number.parseFloat(getComputedStyle(j.value).rowGap) || 0, o = ze(), s = i - (o[o.length - 1]?.clientHeight ?? 0) - a;
|
|
376
|
-
i > 0 && (U.value = Math.max(s, 0)), await M();
|
|
377
|
-
};
|
|
378
|
-
R(() => [n.messages?.length, n.messages?.[n.messages.length - 1]?.id], () => Ge()), De(() => {
|
|
379
|
-
(n.status === "submitted" || n.status === "streaming" || n.awaitingSpokenAnswer) && Ge();
|
|
380
|
-
}), R(() => n.status, (e) => {
|
|
381
|
-
(e === "ready" || e === "error") && (W.value = !0, U.value = 0);
|
|
382
|
-
});
|
|
383
|
-
let G = (e) => n.revisedAnswers?.some((t) => t.messageId === e), K = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), Ke = (e, t) => !n.readonlyFeedback && Vt(e, t), Je = (e) => n.readonlyFeedback ? K(e) : void 0, q = (e) => Je(e)?.vote, J = (e) => {
|
|
384
|
-
let t = Je(e);
|
|
385
|
-
if (t?.vote) return;
|
|
386
|
-
let n = t?.metadata?.reactionEmoji;
|
|
387
|
-
return typeof n == "string" && /\p{Extended_Pictographic}/u.test(n) ? n : void 0;
|
|
388
|
-
}, Dt = (e) => !!(q(e) || J(e)), Ot = (e) => {
|
|
389
|
-
if (J(e)) return "pk-chatbot-message__reaction--neutral";
|
|
390
|
-
let t = q(e);
|
|
391
|
-
return t === "upvote" ? "pk-chatbot-message__reaction--positive" : t === "downvote" ? "pk-chatbot-message__reaction--negative" : "pk-chatbot-message__reaction--neutral";
|
|
392
|
-
}, kt = (e) => {
|
|
393
|
-
let t = q(e);
|
|
394
|
-
return i(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
|
|
395
|
-
}, At = (e) => {
|
|
396
|
-
let t = Nt(e);
|
|
397
|
-
for (let e = t.length - 1; e >= 0; --e) if (d(t[e])) return e;
|
|
398
|
-
return -1;
|
|
399
|
-
}, jt = T(() => n.messages?.[n.messages.length - 1]), Y = T(() => {
|
|
400
|
-
let e = jt.value;
|
|
401
|
-
return e ? e.parts[e.parts.length - 1] : null;
|
|
402
|
-
}), Mt = T(() => {
|
|
403
|
-
let e = /* @__PURE__ */ new Map();
|
|
404
|
-
for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, ue(ie(y(t.parts))));
|
|
405
|
-
return e;
|
|
406
|
-
}), Nt = (e) => Mt.value.get(e.id) ?? e.parts, X = T(() => n.status === "submitted" || n.status === "streaming"), Pt = T(() => n.status === "error"), Ft = T(() => n.awaitingSpokenAnswer === !0 && !X.value), It = T(() => Ft.value && jt.value?.role === "user" && !Pt.value), Lt = T(() => {
|
|
407
|
-
let e = Y.value;
|
|
408
|
-
return x(i, e);
|
|
409
|
-
}), Rt = T(() => {
|
|
410
|
-
let e = Y.value;
|
|
411
|
-
return b(e);
|
|
412
|
-
}), zt = (e) => n.messages?.findIndex((t) => t.id === e), Z = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, Bt = (e) => Z(e) && n.status === "ready" && !!n.actions?.includes("regenerate"), Vt = (e, t) => (!Z(t) || n.status === "ready") && !!n.actions?.includes(e), Ht = (e) => {
|
|
413
|
-
let t = e.parts[e.parts.length - 1];
|
|
414
|
-
return d(t);
|
|
415
|
-
}, Ut = (e) => e.parts.some((e) => g(e) || p(e)), Wt = (e) => !!n.showExtendedSteps && Q(e) && Ut(e), Gt = (e) => p(e) && !de(e) && !!(We[f(e)] || c[e.type] || n.showAllMessageParts), Kt = (e) => e.parts.some((e) => d(e) && !!e.text.trim() || h(e) || fe(e) && !de(e) || Gt(e)), Q = (e) => e.role === "assistant", qt = (e) => e.role === "user", Jt = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), Yt = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), Xt = (e) => {
|
|
416
|
-
let t = Jt(e)?.metadata?.createdAt, n = Yt(e)?.metadata?.createdAt;
|
|
417
|
-
if (!t || !n) return;
|
|
418
|
-
let r = new Date(t), i = new Date(n);
|
|
419
|
-
return r.toDateString() === i.toDateString() ? void 0 : i;
|
|
420
|
-
}, $ = T(() => n.showAllMessageParts ? Xe([]) : Xe(n.messages ?? [], Kt)), Zt = T(() => {
|
|
421
|
-
let e = 0;
|
|
422
|
-
return (n.messages ?? []).map((t) => t.parts.length > 0 ? ++e : void 0);
|
|
423
|
-
}), Qt = (e, t) => t === 0 || e.role !== "assistant" ? !1 : !!(n.actions?.length || n.showMessageNumber || n.showMessageDateTime && e.metadata?.createdAt !== void 0 || e.metadata?.completedAt !== void 0 || n.showMessageTokensCount && e.metadata?.totalTokens !== void 0), $t = (e) => {
|
|
424
|
-
let t = new Date(e), n = t.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
425
|
-
return o(t, n ? "time" : "date-time");
|
|
426
|
-
}, en = (e) => {
|
|
427
|
-
let { createdAt: t, completedAt: n } = e.metadata ?? {};
|
|
428
|
-
if (t && n) return le(s, n - t);
|
|
429
|
-
}, tn = Me("feedbackMessageEl");
|
|
430
|
-
return R(() => n.feedbackMessageId, async () => {
|
|
431
|
-
if (await M(), !n.feedbackMessageId) return;
|
|
432
|
-
let e = tn.value?.[0]?.$el;
|
|
433
|
-
e && (Z(zt(n.feedbackMessageId)) ? Pe() : e.scrollIntoView({
|
|
434
|
-
behavior: "smooth",
|
|
435
|
-
block: "center"
|
|
436
|
-
}));
|
|
437
|
-
}), (t, n) => {
|
|
438
|
-
let r = xe, p = ye, g = be;
|
|
439
|
-
return P(), O("div", {
|
|
440
|
-
ref_key: "scrollEl",
|
|
441
|
-
ref: S,
|
|
442
|
-
class: N(["pk-chatbot-messages scrollbar-thin", { "pk-chatbot-messages--settling": W.value }]),
|
|
443
|
-
role: "log",
|
|
444
|
-
"aria-live": "polite",
|
|
445
|
-
"aria-relevant": "additions text",
|
|
446
|
-
"aria-busy": X.value,
|
|
447
|
-
style: Te({
|
|
448
|
-
"--chatbot-main-color": e.mainColor,
|
|
449
|
-
"--chatbot-contrast-color": Ce.value
|
|
450
|
-
}),
|
|
451
|
-
onScroll: Ve
|
|
452
|
-
}, [
|
|
453
|
-
e.showScrollToBottom && H.value.length > 1 ? (P(), O("div", Qe, [A(ve, {
|
|
454
|
-
items: H.value,
|
|
455
|
-
"active-id": Re.value,
|
|
456
|
-
onSelect: He
|
|
457
|
-
}, null, 8, ["items", "active-id"])])) : D("", !0),
|
|
458
|
-
k("div", {
|
|
459
|
-
ref_key: "wrapperEl",
|
|
460
|
-
ref: j,
|
|
461
|
-
class: "pk-chatbot-messages__wrapper"
|
|
462
|
-
}, [
|
|
463
|
-
(P(!0), O(C, null, Oe(e.messages, (v, y) => (P(), O(C, { key: v.id }, [
|
|
464
|
-
qt(v) && Xt(y) ? (P(), O("div", $e, [k("span", et, I(L(o)(Xt(y), "short")), 1)])) : D("", !0),
|
|
465
|
-
$.value.quietRuns.has(v.id) ? (P(), O("div", tt, [A(r, {
|
|
466
|
-
name: "ri:alarm-line",
|
|
467
|
-
class: "shrink-0"
|
|
468
|
-
}), k("span", null, I(L(i)("label.wakeupQuietRun", {
|
|
469
|
-
count: $.value.quietRuns.get(v.id).count,
|
|
470
|
-
time: L(o)($.value.quietRuns.get(v.id).lastAt ?? Date.now(), "time")
|
|
471
|
-
}, $.value.quietRuns.get(v.id).count)), 1)])) : L(V)(v) && !$.value.hidden.has(v.id) && !e.showAllMessageParts ? (P(), O("div", {
|
|
472
|
-
key: 2,
|
|
473
|
-
class: "pk-chatbot-wakeup",
|
|
474
|
-
title: v.metadata?.wakeup?.reason
|
|
475
|
-
}, [A(r, {
|
|
476
|
-
name: "ri:alarm-line",
|
|
477
|
-
class: "shrink-0"
|
|
478
|
-
}), k("span", null, [Se(I(L(i)("label.wakeupCheck")) + " ", 1), v.metadata?.createdAt ? (P(), O(C, { key: 0 }, [Se(" · " + I(L(o)(v.metadata.createdAt, "time")), 1)], 64)) : D("", !0)])], 8, nt)) : D("", !0),
|
|
479
|
-
(!L(V)(v) || e.showAllMessageParts) && (!$.value.hidden.has(v.id) || X.value && Z(y)) && (v.parts.length || Z(y) && X.value && Q(v)) ? (P(), O("div", {
|
|
480
|
-
key: 3,
|
|
481
|
-
class: N(["pk-chatbot-message", [`pk-chatbot-message--${v.role}`, { "pk-chatbot-message--loading": X.value && Z(y) && Q(v) }]]),
|
|
482
|
-
style: Te({ minHeight: Z(y) && Q(v) && !Pt.value ? `${U.value}px` : void 0 })
|
|
483
|
-
}, [
|
|
484
|
-
A(w, {
|
|
485
|
-
appear: "",
|
|
486
|
-
name: "pk-chatbot-part"
|
|
487
|
-
}, {
|
|
488
|
-
default: z(() => [Wt(v) ? (P(), E(_e, {
|
|
489
|
-
key: 0,
|
|
490
|
-
message: v,
|
|
491
|
-
"is-streaming": X.value && Z(y),
|
|
492
|
-
"has-content": Kt(v),
|
|
493
|
-
"is-dark": e.isDark
|
|
494
|
-
}, null, 8, [
|
|
495
|
-
"message",
|
|
496
|
-
"is-streaming",
|
|
497
|
-
"has-content",
|
|
498
|
-
"is-dark"
|
|
499
|
-
])) : D("", !0)]),
|
|
500
|
-
_: 2
|
|
501
|
-
}, 1024),
|
|
502
|
-
(P(!0), O(C, null, Oe(Nt(v), (n, i) => (P(), O(C, { key: L(se)(n, i) }, [L(d)(n) && n.text.trim() ? (P(), E(w, {
|
|
503
|
-
key: 0,
|
|
504
|
-
appear: "",
|
|
505
|
-
name: "pk-chatbot-part"
|
|
506
|
-
}, {
|
|
507
|
-
default: z(() => [k("div", rt, [ke(t.$slots, "text", we({ ref_for: !0 }, {
|
|
508
|
-
message: v,
|
|
509
|
-
part: n,
|
|
510
|
-
index: y,
|
|
511
|
-
isLoading: X.value
|
|
512
|
-
}), () => [Q(v) ? (P(), E(u, {
|
|
513
|
-
key: 0,
|
|
514
|
-
class: "wysiwyg",
|
|
515
|
-
markdown: n.text,
|
|
516
|
-
"is-dark": e.isDark,
|
|
517
|
-
loading: Z(y) && e.status === "streaming"
|
|
518
|
-
}, null, 8, [
|
|
519
|
-
"markdown",
|
|
520
|
-
"is-dark",
|
|
521
|
-
"loading"
|
|
522
|
-
])) : (P(), O(C, { key: 1 }, [Se(I(n.text), 1)], 64))]), Dt(v.id) && !K(v.id)?.comment && i === At(v) ? (P(), O("span", {
|
|
523
|
-
key: 0,
|
|
524
|
-
class: N(["pk-chatbot-message__reaction", Ot(v.id)]),
|
|
525
|
-
title: kt(v.id)
|
|
526
|
-
}, [J(v.id) ? (P(), O("span", at, I(J(v.id)), 1)) : (P(), E(r, {
|
|
527
|
-
key: 1,
|
|
528
|
-
name: q(v.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
|
|
529
|
-
}, null, 8, ["name"]))], 10, it)) : D("", !0)])]),
|
|
530
|
-
_: 2
|
|
531
|
-
}, 1024)) : L(h)(n) ? (P(), E(w, {
|
|
532
|
-
key: 1,
|
|
533
|
-
appear: "",
|
|
534
|
-
name: "pk-chatbot-part"
|
|
535
|
-
}, {
|
|
536
|
-
default: z(() => [L(a)(n.filename, n.mediaType) ? (P(), O("div", ot, [A(pe, {
|
|
537
|
-
"media-type": n.mediaType,
|
|
538
|
-
url: n.url,
|
|
539
|
-
filename: n.filename,
|
|
540
|
-
size: L(_)(n)?.bytesCount
|
|
541
|
-
}, null, 8, [
|
|
542
|
-
"media-type",
|
|
543
|
-
"url",
|
|
544
|
-
"filename",
|
|
545
|
-
"size"
|
|
546
|
-
]), A(ee, {
|
|
547
|
-
url: n.url,
|
|
548
|
-
transcript: L(m)(n),
|
|
549
|
-
pending: e.status === "submitted" && Z(y)
|
|
550
|
-
}, null, 8, [
|
|
551
|
-
"url",
|
|
552
|
-
"transcript",
|
|
553
|
-
"pending"
|
|
554
|
-
])])) : (P(), E(pe, {
|
|
555
|
-
key: 1,
|
|
556
|
-
"media-type": n.mediaType,
|
|
557
|
-
url: n.url,
|
|
558
|
-
filename: n.filename,
|
|
559
|
-
size: L(_)(n)?.bytesCount
|
|
560
|
-
}, null, 8, [
|
|
561
|
-
"media-type",
|
|
562
|
-
"url",
|
|
563
|
-
"filename",
|
|
564
|
-
"size"
|
|
565
|
-
]))]),
|
|
566
|
-
_: 2
|
|
567
|
-
}, 1024)) : L(fe)(n) && !L(de)(n) ? (P(), E(w, {
|
|
568
|
-
key: 2,
|
|
569
|
-
appear: "",
|
|
570
|
-
name: "pk-chatbot-part"
|
|
571
|
-
}, {
|
|
572
|
-
default: z(() => [(P(), E(qe, {
|
|
573
|
-
key: `approval-${i}`,
|
|
574
|
-
part: n,
|
|
575
|
-
actionable: e.interactive === !0 && (L(ne)(n) || Z(y)),
|
|
576
|
-
"call-verdict": e.confirmVerdictsOnCall?.get(n.toolCallId ?? ""),
|
|
577
|
-
onRespond: (e) => l(n, e)
|
|
578
|
-
}, null, 8, [
|
|
579
|
-
"part",
|
|
580
|
-
"actionable",
|
|
581
|
-
"call-verdict",
|
|
582
|
-
"onRespond"
|
|
583
|
-
]))]),
|
|
584
|
-
_: 2
|
|
585
|
-
}, 1024)) : Gt(n) ? (P(), E(w, {
|
|
586
|
-
key: 3,
|
|
587
|
-
appear: "",
|
|
588
|
-
name: "pk-chatbot-part"
|
|
589
|
-
}, {
|
|
590
|
-
default: z(() => [!L(c)[n.type] && L(We)[L(f)(n)] ? (P(), E(Ae(L(We)[L(f)(n)]), {
|
|
591
|
-
key: `component-${i}-${L(ce)(n)}`,
|
|
592
|
-
part: n
|
|
593
|
-
}, null, 8, ["part"])) : ke(t.$slots, n.type, we({ ref_for: !0 }, {
|
|
594
|
-
message: v,
|
|
595
|
-
part: n,
|
|
596
|
-
index: y,
|
|
597
|
-
isLoading: X.value
|
|
598
|
-
}), () => [e.showAllMessageParts ? (P(), O("div", st, [k("div", ct, [L(b)(n) ? (P(), E(r, {
|
|
599
|
-
key: 0,
|
|
600
|
-
name: L(b)(n),
|
|
601
|
-
class: "shrink-0"
|
|
602
|
-
}, null, 8, ["name"])) : D("", !0), k("code", lt, I(L(Ue)(n.type)), 1)])])) : D("", !0)], void 0, 1)]),
|
|
603
|
-
_: 2
|
|
604
|
-
}, 1024)) : D("", !0), A(w, { mode: "out-in" }, {
|
|
605
|
-
default: z(() => [i === At(v) && e.readonlyFeedback && K(v.id)?.comment ? (P(), E(he, {
|
|
606
|
-
key: 0,
|
|
607
|
-
feedback: K(v.id)
|
|
608
|
-
}, null, 8, ["feedback"])) : D("", !0)]),
|
|
609
|
-
_: 2
|
|
610
|
-
}, 1024)], 64))), 128)),
|
|
611
|
-
A(w, {
|
|
612
|
-
name: "fade-in",
|
|
613
|
-
mode: "out-in"
|
|
614
|
-
}, {
|
|
615
|
-
default: z(() => [X.value && Z(y) && !Ht(v) && Q(v) && (!Wt(v) || Kt(v)) ? (P(), O("div", {
|
|
616
|
-
key: `loading-info-${v.id}`,
|
|
617
|
-
class: "pk-chatbot-message__loading-info"
|
|
618
|
-
}, [k("div", ut, [
|
|
619
|
-
A(r, {
|
|
620
|
-
name: "loading-loop",
|
|
621
|
-
class: "shrink-0"
|
|
622
|
-
}),
|
|
623
|
-
A(w, { mode: "out-in" }, {
|
|
624
|
-
default: z(() => [Rt.value ? (P(), E(r, {
|
|
625
|
-
key: Rt.value,
|
|
626
|
-
class: "shrink-0",
|
|
627
|
-
name: Rt.value
|
|
628
|
-
}, null, 8, ["name"])) : D("", !0)]),
|
|
629
|
-
_: 1
|
|
630
|
-
}),
|
|
631
|
-
A(w, { mode: "out-in" }, {
|
|
632
|
-
default: z(() => [Lt.value ? (P(), O("span", {
|
|
633
|
-
key: Lt.value,
|
|
634
|
-
class: "text-12"
|
|
635
|
-
}, I(Lt.value), 1)) : D("", !0)]),
|
|
636
|
-
_: 1
|
|
637
|
-
})
|
|
638
|
-
]), A(w, {
|
|
639
|
-
name: "fade-in",
|
|
640
|
-
mode: "out-in"
|
|
641
|
-
}, {
|
|
642
|
-
default: z(() => [!Wt(v) && Y.value && "text" in Y.value && Y.value.text.trim() ? (P(), E(ge, {
|
|
643
|
-
key: 0,
|
|
644
|
-
markdown: Y.value.text,
|
|
645
|
-
"is-dark": e.isDark,
|
|
646
|
-
"tail-length": L(oe),
|
|
647
|
-
"inner-class": "wysiwyg",
|
|
648
|
-
class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
|
|
649
|
-
}, null, 8, [
|
|
650
|
-
"markdown",
|
|
651
|
-
"is-dark",
|
|
652
|
-
"tail-length"
|
|
653
|
-
])) : D("", !0)]),
|
|
654
|
-
_: 2
|
|
655
|
-
}, 1024)])) : D("", !0)]),
|
|
656
|
-
_: 2
|
|
657
|
-
}, 1024),
|
|
658
|
-
A(w, { mode: "out-in" }, {
|
|
659
|
-
default: z(() => [Qt(v, y) ? (P(), O("div", dt, [
|
|
660
|
-
A(g, {
|
|
661
|
-
modifiers: "compact",
|
|
662
|
-
class: "mr-auto shrink-0"
|
|
663
|
-
}, {
|
|
664
|
-
default: z(() => [
|
|
665
|
-
A(w, { mode: "out-in" }, {
|
|
666
|
-
default: z(() => [Bt(y) ? (P(), E(p, {
|
|
667
|
-
key: 0,
|
|
668
|
-
icon: "ri:reset-right-line",
|
|
669
|
-
modifiers: "action-quiet-small",
|
|
670
|
-
title: L(i)("action.regenerate"),
|
|
671
|
-
"aria-label": L(i)("action.regenerate"),
|
|
672
|
-
onClick: n[0] ||= B((e) => t.$emit("regenerate"), ["stop"])
|
|
673
|
-
}, null, 8, ["title", "aria-label"])) : D("", !0)]),
|
|
674
|
-
_: 2
|
|
675
|
-
}, 1024),
|
|
676
|
-
A(w, { mode: "out-in" }, {
|
|
677
|
-
default: z(() => [Vt("show-info", y) ? (P(), E(p, {
|
|
678
|
-
key: 0,
|
|
679
|
-
icon: "ri:information-line",
|
|
680
|
-
title: L(i)("action.getMoreInfo"),
|
|
681
|
-
"aria-label": L(i)("action.getMoreInfo"),
|
|
682
|
-
modifiers: "action-quiet-small",
|
|
683
|
-
onClick: B((e) => t.$emit("show-info", v), ["stop"])
|
|
684
|
-
}, null, 8, [
|
|
685
|
-
"title",
|
|
686
|
-
"aria-label",
|
|
687
|
-
"onClick"
|
|
688
|
-
])) : D("", !0)]),
|
|
689
|
-
_: 2
|
|
690
|
-
}, 1024),
|
|
691
|
-
A(w, { mode: "out-in" }, {
|
|
692
|
-
default: z(() => [Vt("revise", y) ? (P(), E(p, {
|
|
693
|
-
key: 0,
|
|
694
|
-
icon: G(v.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
|
|
695
|
-
title: G(v.id) ? L(i)("action.editRevise") : L(i)("action.createRevise"),
|
|
696
|
-
"aria-label": G(v.id) ? L(i)("action.editRevise") : L(i)("action.createRevise"),
|
|
697
|
-
modifiers: "action-quiet-small",
|
|
698
|
-
class: N({ "text-brand-graphic": G(v.id) }),
|
|
699
|
-
onClick: B((e) => t.$emit("revise", v), ["stop"])
|
|
700
|
-
}, null, 8, [
|
|
701
|
-
"icon",
|
|
702
|
-
"title",
|
|
703
|
-
"aria-label",
|
|
704
|
-
"class",
|
|
705
|
-
"onClick"
|
|
706
|
-
])) : D("", !0)]),
|
|
707
|
-
_: 2
|
|
708
|
-
}, 1024),
|
|
709
|
-
A(w, { mode: "out-in" }, {
|
|
710
|
-
default: z(() => [Ke("upvote", y) ? (P(), E(p, {
|
|
711
|
-
key: 0,
|
|
712
|
-
icon: K(v.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
|
|
713
|
-
title: L(i)("action.upvote"),
|
|
714
|
-
"aria-label": L(i)("action.upvote"),
|
|
715
|
-
modifiers: "action-quiet-small",
|
|
716
|
-
onClick: B((e) => t.$emit("upvote", v), ["stop"])
|
|
717
|
-
}, null, 8, [
|
|
718
|
-
"icon",
|
|
719
|
-
"title",
|
|
720
|
-
"aria-label",
|
|
721
|
-
"onClick"
|
|
722
|
-
])) : D("", !0)]),
|
|
723
|
-
_: 2
|
|
724
|
-
}, 1024),
|
|
725
|
-
A(w, { mode: "out-in" }, {
|
|
726
|
-
default: z(() => [Ke("downvote", y) ? (P(), E(p, {
|
|
727
|
-
key: 0,
|
|
728
|
-
icon: K(v.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
|
|
729
|
-
title: L(i)("action.downvote"),
|
|
730
|
-
"aria-label": L(i)("action.downvote"),
|
|
731
|
-
modifiers: "action-quiet-small",
|
|
732
|
-
onClick: B((e) => t.$emit("downvote", v), ["stop"])
|
|
733
|
-
}, null, 8, [
|
|
734
|
-
"icon",
|
|
735
|
-
"title",
|
|
736
|
-
"aria-label",
|
|
737
|
-
"onClick"
|
|
738
|
-
])) : D("", !0)]),
|
|
739
|
-
_: 2
|
|
740
|
-
}, 1024),
|
|
741
|
-
A(w, { mode: "out-in" }, {
|
|
742
|
-
default: z(() => [Ke("feedback", y) ? (P(), E(p, {
|
|
743
|
-
key: 0,
|
|
744
|
-
icon: K(v.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
|
|
745
|
-
title: L(i)("action.feedback"),
|
|
746
|
-
"aria-label": L(i)("action.feedback"),
|
|
747
|
-
modifiers: "action-quiet-small",
|
|
748
|
-
onClick: B((e) => t.$emit("feedback", v), ["stop"])
|
|
749
|
-
}, null, 8, [
|
|
750
|
-
"icon",
|
|
751
|
-
"title",
|
|
752
|
-
"aria-label",
|
|
753
|
-
"onClick"
|
|
754
|
-
])) : D("", !0)]),
|
|
755
|
-
_: 2
|
|
756
|
-
}, 1024)
|
|
757
|
-
]),
|
|
758
|
-
_: 2
|
|
759
|
-
}, 1024),
|
|
760
|
-
!e.showMessageDateTime && v.metadata?.createdAt && v.metadata?.completedAt ? (P(), O("div", ft, [k("time", {
|
|
761
|
-
datetime: new Date(v.metadata.createdAt).toISOString(),
|
|
762
|
-
title: L(o)(new Date(v.metadata.createdAt), "date-time"),
|
|
763
|
-
class: "flex items-center gap-4 min-w-0"
|
|
764
|
-
}, [A(r, {
|
|
765
|
-
name: "ri:time-line",
|
|
766
|
-
class: "shrink-0"
|
|
767
|
-
}), k("span", mt, I($t(v.metadata.createdAt)), 1)], 8, pt), en(v) ? (P(), O("span", ht, [A(r, {
|
|
768
|
-
name: "ri:hourglass-line",
|
|
769
|
-
class: "shrink-0"
|
|
770
|
-
}), k("span", gt, I(en(v)), 1)])) : D("", !0)])) : D("", !0),
|
|
771
|
-
e.showMessageNumber ? (P(), O("span", {
|
|
772
|
-
key: 1,
|
|
773
|
-
title: L(i)("label.messageNumber", { n: Zt.value[y] }),
|
|
774
|
-
class: "text-12 text-word-3 tabular-nums"
|
|
775
|
-
}, " #" + I(Zt.value[y]), 9, _t)) : D("", !0),
|
|
776
|
-
e.showMessageTokensCount && v.metadata?.totalTokens ? (P(), O("span", vt, [A(r, {
|
|
777
|
-
name: "ri:ai-generate-2-line",
|
|
778
|
-
class: "shrink-0"
|
|
779
|
-
}), k("span", yt, I(L(s)(v.metadata.totalTokens, "integer")) + " " + I(L(i)("label.tokens")), 1)])) : D("", !0),
|
|
780
|
-
e.showMessageDateTime && v.metadata?.createdAt ? (P(), O("time", {
|
|
781
|
-
key: 3,
|
|
782
|
-
datetime: new Date(v.metadata?.createdAt).toISOString(),
|
|
783
|
-
class: "flex items-center gap-4 text-12 text-word-3"
|
|
784
|
-
}, [A(r, {
|
|
785
|
-
name: "ri:time-line",
|
|
786
|
-
class: "shrink-0"
|
|
787
|
-
}), k("span", xt, I(L(o)(new Date(v.metadata?.createdAt), "date-time")), 1)], 8, bt)) : D("", !0),
|
|
788
|
-
e.showMessageDateTime && v?.metadata?.completedAt && v?.metadata?.createdAt ? (P(), O("div", St, [A(r, {
|
|
789
|
-
name: "ri:hourglass-line",
|
|
790
|
-
class: "shrink-0"
|
|
791
|
-
}), A(te, {
|
|
792
|
-
class: "truncate",
|
|
793
|
-
date: v.metadata?.createdAt,
|
|
794
|
-
"end-date": v.metadata?.completedAt
|
|
795
|
-
}, null, 8, ["date", "end-date"])])) : D("", !0)
|
|
796
|
-
])) : D("", !0)]),
|
|
797
|
-
_: 2
|
|
798
|
-
}, 1024),
|
|
799
|
-
A(w, { mode: "out-in" }, {
|
|
800
|
-
default: z(() => [v.id === e.feedbackMessageId ? (P(), E(me, {
|
|
801
|
-
key: 0,
|
|
802
|
-
ref_for: !0,
|
|
803
|
-
ref_key: "feedbackMessageEl",
|
|
804
|
-
ref: tn,
|
|
805
|
-
loading: e.feedbackLoading,
|
|
806
|
-
submitted: e.feedbackSubmitted,
|
|
807
|
-
error: e.feedbackError,
|
|
808
|
-
onSubmit: n[1] ||= (e) => t.$emit("feedback-submit", e),
|
|
809
|
-
onClose: n[2] ||= (e) => t.$emit("feedback-close")
|
|
810
|
-
}, null, 8, [
|
|
811
|
-
"loading",
|
|
812
|
-
"submitted",
|
|
813
|
-
"error"
|
|
814
|
-
])) : D("", !0)]),
|
|
815
|
-
_: 2
|
|
816
|
-
}, 1024)
|
|
817
|
-
], 6)) : D("", !0)
|
|
818
|
-
], 64))), 128)),
|
|
819
|
-
A(w, {
|
|
820
|
-
appear: "",
|
|
821
|
-
name: "pk-chatbot-part"
|
|
822
|
-
}, {
|
|
823
|
-
default: z(() => [Ft.value ? (P(), O("div", {
|
|
824
|
-
key: 0,
|
|
825
|
-
class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
|
|
826
|
-
style: Te({ minHeight: It.value ? `${U.value}px` : void 0 })
|
|
827
|
-
}, [k("div", Ct, [k("div", wt, [A(r, {
|
|
828
|
-
name: "loading-loop",
|
|
829
|
-
class: "shrink-0"
|
|
830
|
-
}), k("span", Tt, I(L(i)("label.answeringOnTheCall")), 1)])])], 4)) : D("", !0)]),
|
|
831
|
-
_: 1
|
|
832
|
-
}),
|
|
833
|
-
A(w, {
|
|
834
|
-
appear: "",
|
|
835
|
-
name: "pk-chatbot-part"
|
|
836
|
-
}, {
|
|
837
|
-
default: z(() => [Pt.value ? (P(), E(v, {
|
|
838
|
-
key: 0,
|
|
839
|
-
error: e.error,
|
|
840
|
-
onRetry: n[3] ||= (e) => t.$emit("auto-retry"),
|
|
841
|
-
onReset: n[4] ||= (e) => t.$emit("reset-chat")
|
|
842
|
-
}, null, 8, ["error"])) : D("", !0)]),
|
|
843
|
-
_: 1
|
|
844
|
-
}),
|
|
845
|
-
jt.value?.role === "user" && !It.value || Pt.value ? (P(), O("div", {
|
|
846
|
-
key: 0,
|
|
847
|
-
class: "pk-chatbot-messages__spacer",
|
|
848
|
-
style: Te({ minHeight: `${U.value}px` })
|
|
849
|
-
}, null, 4)) : D("", !0)
|
|
850
|
-
], 512),
|
|
851
|
-
A(w, { name: "pk-chatbot-messages-fab" }, {
|
|
852
|
-
default: z(() => [e.showScrollToBottom && (L(Fe) || !L(Ie)) ? (P(), O("button", {
|
|
853
|
-
key: 0,
|
|
854
|
-
type: "button",
|
|
855
|
-
class: "pk-chatbot-messages__scroll-to-bottom",
|
|
856
|
-
title: L(i)("action.scrollToBottom"),
|
|
857
|
-
"aria-label": L(i)("action.scrollToBottom"),
|
|
858
|
-
onClick: Le
|
|
859
|
-
}, [A(r, { name: "ri:arrow-down-line" })], 8, Et)) : D("", !0)]),
|
|
860
|
-
_: 1
|
|
861
|
-
})
|
|
862
|
-
], 46, Ze);
|
|
863
|
-
};
|
|
864
|
-
}
|
|
865
|
-
});
|
|
866
|
-
//#endregion
|
|
867
|
-
export { U as a, Ue as i, W as n, He as r, J as t };
|
|
868
|
-
|
|
869
|
-
//# sourceMappingURL=PkChatbotMessages-CnI3e9wF.js.map
|