@8wave/ai-elements 0.119.0-beta.48 → 0.119.0-beta.49
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/{PkStreamingMarkdown-xnhBbPf5.js → PkStreamingMarkdown-pEgm7m-B.js} +4 -4
- package/dist/_chunks/PkStreamingMarkdown-pEgm7m-B.js.map +1 -0
- package/dist/_chunks/{PkToolShowArtifact-DPt1qDUk.js → PkToolShowArtifact-D6ZTw5vh.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-DPt1qDUk.js.map → PkToolShowArtifact-D6ZTw5vh.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-OdC7bsXd.js → PkToolShowContactForm-CW7gKQ7h.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-OdC7bsXd.js.map → PkToolShowContactForm-CW7gKQ7h.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-uFmaQoI1.js → PkToolShowForm-D_2FmDwq.js} +2 -2
- package/dist/_chunks/{PkToolShowForm-uFmaQoI1.js.map → PkToolShowForm-D_2FmDwq.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-BlpCKc4N.js → PkToolShowSources-DyzheirE.js} +2 -2
- package/dist/_chunks/{PkToolShowSources-BlpCKc4N.js.map → PkToolShowSources-DyzheirE.js.map} +1 -1
- package/dist/ai-elements.es.js +1172 -1170
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.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/_chunks/{PkChatbot-DXwMfwN4.js → PkChatbot-viqlDa9r.js} +5 -5
- package/dist-vue/_chunks/{PkChatbot-DXwMfwN4.js.map → PkChatbot-viqlDa9r.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-Dve5Ci2Y.js → PkChatbotEmptyState-B-2GZ2ZU.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-Dve5Ci2Y.js.map → PkChatbotEmptyState-B-2GZ2ZU.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-DiCxEime.js → PkChatbotInput-D4bT_1be.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-DiCxEime.js.map → PkChatbotInput-D4bT_1be.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-CTp0NkY2.js → PkChatbotMessages-BgcGen7D.js} +14 -14
- package/dist-vue/_chunks/{PkChatbotMessages-CTp0NkY2.js.map → PkChatbotMessages-BgcGen7D.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-B1o2DbQz.js → PkChatbotStepPayload-CzCHmvUG.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-B1o2DbQz.js.map → PkChatbotStepPayload-CzCHmvUG.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DpYV0KLn.js → PkChatbotStepToolDetail-qSHrVOGO.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DpYV0KLn.js.map → PkChatbotStepToolDetail-qSHrVOGO.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-BPon4zjv.js → PkChatbotSteps-dgj6C2hA.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-BPon4zjv.js.map → PkChatbotSteps-dgj6C2hA.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-dJE2iHPN.js → PkChatbotViewChat-BtbE6V2u.js} +173 -173
- package/dist-vue/_chunks/PkChatbotViewChat-BtbE6V2u.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-DcEcJgwV.js → PkChatbotViewConversations-Cw9fL47_.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-DcEcJgwV.js.map → PkChatbotViewConversations-Cw9fL47_.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-CqT_orLj.js → PkStreamingMarkdown-DXoUbGsP.js} +2 -2
- package/dist-vue/_chunks/{PkStreamingMarkdown-CqT_orLj.js.map → PkStreamingMarkdown-DXoUbGsP.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-Qfkz64NY.js → PkToolShowArtifact-BRtz1x7K.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-Qfkz64NY.js.map → PkToolShowArtifact-BRtz1x7K.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-CRLEkYSE.js → PkToolShowContactForm-D0CR80e2.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-CRLEkYSE.js.map → PkToolShowContactForm-D0CR80e2.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-j4FJ34Ta.js → PkToolShowDiagram-CYpqqWLo.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-j4FJ34Ta.js.map → PkToolShowDiagram-CYpqqWLo.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-DdFBwLMf.js → PkToolShowForm-BIsu4XhQ.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowForm-DdFBwLMf.js.map → PkToolShowForm-BIsu4XhQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-CxlOwuTJ.js → PkToolShowImageGallery-DkEv-6Nu.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-CxlOwuTJ.js.map → PkToolShowImageGallery-DkEv-6Nu.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-dfd3vmhl.js → PkToolShowProductList-Dr2mQqsb.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-dfd3vmhl.js.map → PkToolShowProductList-Dr2mQqsb.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-B8Euk3rp.js → PkToolShowSources-CxUDh6cC.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSources-B8Euk3rp.js.map → PkToolShowSources-CxUDh6cC.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-C84UrvZ7.js → PkToolShowVideo-Bh1oagOm.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-C84UrvZ7.js.map → PkToolShowVideo-Bh1oagOm.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-CzzuVQqL.js → PkToolShowWebPages-ilQ1qTEC.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-CzzuVQqL.js.map → PkToolShowWebPages-ilQ1qTEC.js.map} +1 -1
- package/dist-vue/_chunks/{utils-7oPvmwwu.js → utils-Bopp5IPf.js} +4 -4
- package/dist-vue/_chunks/utils-Bopp5IPf.js.map +1 -0
- package/dist-vue/composables.js +3 -1
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +20 -20
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +2 -0
- package/package.json +1 -1
- package/dist/_chunks/PkStreamingMarkdown-xnhBbPf5.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-dJE2iHPN.js.map +0 -1
- package/dist-vue/_chunks/utils-7oPvmwwu.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PkChatbotViewConversations-DcEcJgwV.js","names":["__unplugin_components_0","__unplugin_components_1","__unplugin_components_2","__unplugin_components_3","__unplugin_components_4","__unplugin_components_5","_openBlock","_createElementBlock","_unref","_createElementVNode","_Fragment","_renderList","_normalizeClass","_createVNode","_toDisplayString","_isRef","_withCtx","PkRelativeTime","_mergeProps","_createTextVNode","_withModifiers","_createBlock","_createCommentVNode","_sfc_main","VvButtonLocalized","useChatbotStore","stripMarkdown","localizeSummaryLabels","useDialogConfirm","PkRelativeTime_default","ChatbotProfileContextKey","getConversationPreview","conversation","getTextPart","message","useConversationActions","editingId","ref","editingTitle","startEdit","fallbackTitle","confirmEdit","trimmed","actions","id","cancelEdit","onRenameKeydown","event","openDialogConfirm","_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","_hoisted_19","_hoisted_20","PkChatbotViewConversations_default","defineComponent","props","__props","$t","useI18n","store","storeToRefs","startEditConversation","handleDelete","openConversation","navigate","isCurrentConversation","localChatId","getLastMessage","messages","m","role","profile","inject","canEraseConversations","computed","isErasingConversations","handleEraseAll","eraseConversations","startNewChat","_component_VvIcon","VvIcon","_component_VvButton","_component_VvInputText","VvInputText","_component_VvButtonGroup","VvButtonGroup","_component_VvDropdownAction","VvDropdownAction","_component_VvDropdown","VvDropdown","openBlock","createElementBlock","unref","isLoadingConversations","conversations","createElementVNode","Fragment","renderList","i","normalizeClass","_cache","createVNode","toDisplayString","isRef","$event","withCtx","mergeProps","createTextVNode","withModifiers","createBlock","createCommentVNode"],"sources":["../../../../packages/composable/src/chatbot/useConversationActions.ts","../../../../packages/components/src/chat/PkChatbotViewConversations.vue","../../../../packages/components/src/chat/PkChatbotViewConversations.vue"],"sourcesContent":["import { ref } from 'vue'\nimport type { Chat as Conversation } from 'models'\nimport { getTextPart, stripMarkdown } from 'utils'\nimport { useDialogConfirm } from '../useDialogConfirm'\n\n/**\n * Single-line preview for a conversation: explicit title, otherwise the\n * first user message. Used as list label and as search haystack.\n */\nexport function getConversationPreview(conversation: Conversation): string {\n return (\n stripMarkdown(conversation.title) ||\n stripMarkdown(\n getTextPart(\n // The list endpoint isn't Zod-parsed: don't trust the\n // declared types at runtime\n conversation.messages?.find(\n (message) => message.role === 'user',\n ),\n ),\n ) ||\n ''\n )\n}\n\n/**\n * Inline-rename and delete-with-confirm state shared by the conversation\n * lists (PkChatbotViewConversations, PkChatSidebar). Renames are optimistic:\n * on failure the next conversations load reconciles with the server state.\n */\nexport function useConversationActions(actions: {\n renameChatTitle: (chatId: string, title: string) => Promise<unknown>\n deleteChat: (chatId: string) => Promise<unknown>\n}) {\n const editingId = ref<string | null>(null)\n const editingTitle = ref('')\n\n const startEdit = (conversation: Conversation, fallbackTitle = '') => {\n editingId.value = conversation.id\n editingTitle.value = stripMarkdown(conversation.title) || fallbackTitle\n }\n\n const confirmEdit = async (id: string) => {\n const trimmed = editingTitle.value.trim()\n editingId.value = null\n if (trimmed && trimmed.length <= 255) {\n try {\n await actions.renameChatTitle(id, trimmed)\n } catch {\n // Revert optimistically: reload will pick up server state\n }\n }\n }\n\n const cancelEdit = () => {\n editingId.value = null\n }\n\n const onRenameKeydown = (event: KeyboardEvent, id: string) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n confirmEdit(id)\n } else if (event.key === 'Escape') {\n event.preventDefault()\n cancelEdit()\n }\n }\n\n const { openDialogConfirm } = useDialogConfirm()\n const requestDelete = async (id: string) => {\n try {\n const proceed = await openDialogConfirm()\n if (!proceed) {\n return\n }\n await actions.deleteChat(id)\n } catch {\n // Silently fail: next load will reconcile\n }\n }\n\n return {\n editingId,\n editingTitle,\n startEdit,\n confirmEdit,\n cancelEdit,\n onRenameKeydown,\n requestDelete,\n }\n}\n","<script setup lang=\"ts\">\n import { computed, inject, ref } from 'vue'\n import { storeToRefs } from 'pinia'\n import { useI18n } from 'vue-i18n'\n import type { Chat as Conversation, UIChatMessage } from 'models'\n import { stripMarkdown, getTextPart } from 'utils'\n import {\n useChatbotStore,\n useConversationActions,\n useDialogConfirm,\n } from 'composables'\n import PkRelativeTime from '../PkRelativeTime.vue'\n import { localizeSummaryLabels } from './utils'\n import { ChatbotProfileContextKey } from './chatbotProfileContext'\n\n const props = defineProps<{ agentId: string }>()\n\n const { t: $t } = useI18n({ useScope: 'global' })\n\n const store = useChatbotStore(props.agentId)\n const { conversations, isLoadingConversations, localChatId } =\n storeToRefs(store)\n const { navigate, startNewChat, renameChatTitle, deleteChat } = store\n\n const {\n editingId,\n editingTitle,\n startEdit: startEditConversation,\n confirmEdit,\n cancelEdit,\n onRenameKeydown,\n requestDelete: handleDelete,\n } = useConversationActions({ renameChatTitle, deleteChat })\n\n const openConversation = (id: string) => {\n if (editingId.value) {\n return\n }\n localChatId.value = id\n navigate('chat')\n }\n\n const isCurrentConversation = (conversation: Conversation) => {\n return localChatId.value === conversation.id\n }\n\n const getLastMessage = (\n messages: UIChatMessage[],\n role: 'user' | 'assistant',\n ) => {\n return stripMarkdown(\n getTextPart(messages.filter((m) => m.role === role).slice(-1)[0]) ||\n '',\n )\n }\n\n const startEdit = (conversation: Conversation) => {\n startEditConversation(\n conversation,\n getLastMessage(conversation.messages, 'assistant'),\n )\n }\n\n const { openDialogConfirm } = useDialogConfirm()\n\n // GDPR B.3 — bulk \"delete my conversations\", available to anonymous\n // sessions too (the host wires the endpoint through the profile context).\n // Hidden when the host application owns the session (external token or\n // host-session mode): the endpoint erases ALL conversations of the\n // session's user platform-wide, an account-scoped action that belongs to\n // the host, not to an embedded widget. Same gating as sign-out and\n // manage-profile in PkChatbotViewProfile.\n const profile = inject(ChatbotProfileContextKey, undefined)\n const canEraseConversations = computed(\n () =>\n !!profile?.eraseConversations &&\n !(profile.isExternalAuth?.value ?? false),\n )\n const isErasingConversations = ref(false)\n const handleEraseAll = async () => {\n const eraseConversations = profile?.eraseConversations\n if (!eraseConversations || !canEraseConversations.value) {\n return\n }\n const proceed = await openDialogConfirm({\n title: $t('confirmTitle.deleteMyConversations'),\n questionLabel: $t('message.deleteMyConversationsConfirm'),\n })\n if (!proceed) {\n return\n }\n isErasingConversations.value = true\n try {\n await eraseConversations()\n conversations.value = []\n startNewChat()\n } catch {\n // Same policy as single delete: fail silently and reconcile\n // with the server state\n store.loadConversations(props.agentId)\n } finally {\n isErasingConversations.value = false\n }\n }\n</script>\n\n<template>\n <div class=\"flex flex-col flex-1 min-h-0 relative\">\n <!-- Loading skeleton -->\n <div\n v-if=\"isLoadingConversations && conversations.length === 0\"\n class=\"vv-item-group vv-item-group--fill\">\n <div class=\"vv-item-group__list\">\n <div\n v-for=\"i in 5\"\n :key=\"i\"\n class=\"vv-item vv-item--roomy vv-item--plain\">\n <div class=\"vv-item__entry\">\n <div class=\"flex flex-col gap-6 flex-1 min-w-0\">\n <div\n class=\"vv-skeleton h-16 rounded\"\n :class=\"i % 2 ? 'w-192' : 'w-128'\">\n <div class=\"vv-skeleton__item\" />\n </div>\n <div class=\"vv-skeleton h-12 rounded\">\n <div class=\"vv-skeleton__item\" />\n </div>\n <div class=\"vv-skeleton h-12 rounded w-160\">\n <div class=\"vv-skeleton__item\" />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Empty state -->\n <div\n v-else-if=\"conversations.length === 0\"\n class=\"flex flex-col flex-1 items-center justify-center gap-12 p-24 text-center\">\n <div\n class=\"w-64 h-64 rounded-full bg-surface-1 border border-surface-3 flex items-center justify-center\">\n <VvIcon name=\"ri:chat-3-line\" class=\"w-28 h-28 text-word-4\" />\n </div>\n <div class=\"flex flex-col gap-4\">\n <strong class=\"text-16 font-semibold text-word-1\">\n {{ $t('message.noConversations') }}\n </strong>\n <span class=\"text-14 text-word-3 leading-relaxed\">\n {{ $t('message.noConversationsHint') }}\n </span>\n </div>\n <VvButton\n modifiers=\"primary rounded\"\n icon=\"ri:add-line\"\n class=\"mt-8\"\n :label=\"$t('action.startNewChat')\"\n @click=\"startNewChat()\" />\n </div>\n\n <!-- Conversation list. The row is a container, not a button: the menu\n and the rename field are siblings of the entry, because a button\n cannot legally contain other controls (Firefox and Safari drop\n them from the accessibility tree). -->\n <div v-else class=\"vv-item-group vv-item-group--fill\">\n <ul\n class=\"vv-item-group__list overflow-y-auto pb-64 light-scrollbar\">\n <li\n v-for=\"conversation in conversations\"\n :key=\"conversation.id\"\n class=\"vv-item vv-item--roomy\"\n :class=\"{\n 'vv-item--current': isCurrentConversation(conversation),\n }\">\n <div\n v-if=\"editingId === conversation.id\"\n class=\"flex flex-1 items-center gap-8 min-w-0 px-md py-12\">\n <VvInputText\n v-model=\"editingTitle\"\n class=\"flex-1 mb-0\"\n modifiers=\"compact\"\n autofocus\n select-on-focus\n :maxlength=\"255\"\n :aria-label=\"$t('placeholder.insert')\"\n :placeholder=\"$t('placeholder.insert')\"\n @keydown=\"\n onRenameKeydown($event, conversation.id)\n \" />\n <VvButtonGroup modifiers=\"compact\">\n <VvButton\n icon=\"ri:save-line\"\n :title=\"$t('action.save')\"\n modifiers=\"action-quiet-small\"\n @click=\"confirmEdit(conversation.id)\" />\n <VvButton\n icon=\"ri:close-line\"\n :title=\"$t('action.cancel')\"\n modifiers=\"action-quiet-small\"\n @click=\"cancelEdit()\" />\n </VvButtonGroup>\n </div>\n <template v-else>\n <button\n type=\"button\"\n class=\"vv-item__entry\"\n :aria-current=\"\n isCurrentConversation(conversation)\n ? 'true'\n : undefined\n \"\n @click=\"openConversation(conversation.id)\">\n <div class=\"min-w-0 flex-1\">\n <div class=\"flex items-center gap-8\">\n <strong\n class=\"vv-item__title font-medium flex-1\">\n {{\n stripMarkdown(conversation.title) ||\n getLastMessage(\n conversation.messages,\n 'assistant',\n )\n }}\n </strong>\n <PkRelativeTime\n class=\"text-word-4 text-smaller shrink-0\"\n :date=\"conversation.lastMessageAt\" />\n </div>\n <span class=\"text-12 text-word-4 line-clamp-2\">\n {{\n stripMarkdown(\n localizeSummaryLabels(\n conversation.summary,\n $t,\n ),\n ) ||\n getLastMessage(\n conversation.messages,\n 'user',\n )\n }}\n </span>\n </div>\n </button>\n <div class=\"vv-item__actions\">\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:more-2-fill\"\n :title=\"$t('action.moreActions')\"\n modifiers=\"action-quiet-small\" />\n <template #items>\n <VvDropdownAction\n @click=\"startEdit(conversation)\">\n <VvIcon name=\"ri:pencil-line\" />\n {{ $t('action.renameChat') }}\n </VvDropdownAction>\n <VvDropdownAction\n @click=\"handleDelete(conversation.id)\">\n <VvIcon name=\"ri:delete-bin-line\" />\n {{ $t('action.delete') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </div>\n </template>\n </li>\n </ul>\n </div>\n\n <!-- Sticky \"new chat\" CTA (hidden on empty state, which has its own CTA) -->\n <div\n v-if=\"conversations.length > 0\"\n class=\"absolute bottom-0 left-0 right-0 flex flex-col items-center gap-4 px-16 pb-16 pt-32 pointer-events-none\"\n :style=\"{\n background:\n 'linear-gradient(to top, var(--color-surface) 55%, transparent)',\n }\">\n <VvButton\n class=\"text-14 pointer-events-auto\"\n modifiers=\"primary rounded\"\n icon=\"ri:add-line\"\n :label=\"$t('action.startNewChat')\"\n @click.stop=\"startNewChat()\" />\n <VvButton\n v-if=\"canEraseConversations\"\n class=\"text-12 pointer-events-auto\"\n modifiers=\"action-quiet-danger\"\n icon=\"ri:delete-bin-line\"\n :loading=\"isErasingConversations\"\n :disabled=\"isErasingConversations\"\n :label=\"$t('action.deleteMyConversations')\"\n @click.stop=\"handleEraseAll()\" />\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, inject, ref } from 'vue'\n import { storeToRefs } from 'pinia'\n import { useI18n } from 'vue-i18n'\n import type { Chat as Conversation, UIChatMessage } from 'models'\n import { stripMarkdown, getTextPart } from 'utils'\n import {\n useChatbotStore,\n useConversationActions,\n useDialogConfirm,\n } from 'composables'\n import PkRelativeTime from '../PkRelativeTime.vue'\n import { localizeSummaryLabels } from './utils'\n import { ChatbotProfileContextKey } from './chatbotProfileContext'\n\n const props = defineProps<{ agentId: string }>()\n\n const { t: $t } = useI18n({ useScope: 'global' })\n\n const store = useChatbotStore(props.agentId)\n const { conversations, isLoadingConversations, localChatId } =\n storeToRefs(store)\n const { navigate, startNewChat, renameChatTitle, deleteChat } = store\n\n const {\n editingId,\n editingTitle,\n startEdit: startEditConversation,\n confirmEdit,\n cancelEdit,\n onRenameKeydown,\n requestDelete: handleDelete,\n } = useConversationActions({ renameChatTitle, deleteChat })\n\n const openConversation = (id: string) => {\n if (editingId.value) {\n return\n }\n localChatId.value = id\n navigate('chat')\n }\n\n const isCurrentConversation = (conversation: Conversation) => {\n return localChatId.value === conversation.id\n }\n\n const getLastMessage = (\n messages: UIChatMessage[],\n role: 'user' | 'assistant',\n ) => {\n return stripMarkdown(\n getTextPart(messages.filter((m) => m.role === role).slice(-1)[0]) ||\n '',\n )\n }\n\n const startEdit = (conversation: Conversation) => {\n startEditConversation(\n conversation,\n getLastMessage(conversation.messages, 'assistant'),\n )\n }\n\n const { openDialogConfirm } = useDialogConfirm()\n\n // GDPR B.3 — bulk \"delete my conversations\", available to anonymous\n // sessions too (the host wires the endpoint through the profile context).\n // Hidden when the host application owns the session (external token or\n // host-session mode): the endpoint erases ALL conversations of the\n // session's user platform-wide, an account-scoped action that belongs to\n // the host, not to an embedded widget. Same gating as sign-out and\n // manage-profile in PkChatbotViewProfile.\n const profile = inject(ChatbotProfileContextKey, undefined)\n const canEraseConversations = computed(\n () =>\n !!profile?.eraseConversations &&\n !(profile.isExternalAuth?.value ?? false),\n )\n const isErasingConversations = ref(false)\n const handleEraseAll = async () => {\n const eraseConversations = profile?.eraseConversations\n if (!eraseConversations || !canEraseConversations.value) {\n return\n }\n const proceed = await openDialogConfirm({\n title: $t('confirmTitle.deleteMyConversations'),\n questionLabel: $t('message.deleteMyConversationsConfirm'),\n })\n if (!proceed) {\n return\n }\n isErasingConversations.value = true\n try {\n await eraseConversations()\n conversations.value = []\n startNewChat()\n } catch {\n // Same policy as single delete: fail silently and reconcile\n // with the server state\n store.loadConversations(props.agentId)\n } finally {\n isErasingConversations.value = false\n }\n }\n</script>\n\n<template>\n <div class=\"flex flex-col flex-1 min-h-0 relative\">\n <!-- Loading skeleton -->\n <div\n v-if=\"isLoadingConversations && conversations.length === 0\"\n class=\"vv-item-group vv-item-group--fill\">\n <div class=\"vv-item-group__list\">\n <div\n v-for=\"i in 5\"\n :key=\"i\"\n class=\"vv-item vv-item--roomy vv-item--plain\">\n <div class=\"vv-item__entry\">\n <div class=\"flex flex-col gap-6 flex-1 min-w-0\">\n <div\n class=\"vv-skeleton h-16 rounded\"\n :class=\"i % 2 ? 'w-192' : 'w-128'\">\n <div class=\"vv-skeleton__item\" />\n </div>\n <div class=\"vv-skeleton h-12 rounded\">\n <div class=\"vv-skeleton__item\" />\n </div>\n <div class=\"vv-skeleton h-12 rounded w-160\">\n <div class=\"vv-skeleton__item\" />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Empty state -->\n <div\n v-else-if=\"conversations.length === 0\"\n class=\"flex flex-col flex-1 items-center justify-center gap-12 p-24 text-center\">\n <div\n class=\"w-64 h-64 rounded-full bg-surface-1 border border-surface-3 flex items-center justify-center\">\n <VvIcon name=\"ri:chat-3-line\" class=\"w-28 h-28 text-word-4\" />\n </div>\n <div class=\"flex flex-col gap-4\">\n <strong class=\"text-16 font-semibold text-word-1\">\n {{ $t('message.noConversations') }}\n </strong>\n <span class=\"text-14 text-word-3 leading-relaxed\">\n {{ $t('message.noConversationsHint') }}\n </span>\n </div>\n <VvButton\n modifiers=\"primary rounded\"\n icon=\"ri:add-line\"\n class=\"mt-8\"\n :label=\"$t('action.startNewChat')\"\n @click=\"startNewChat()\" />\n </div>\n\n <!-- Conversation list. The row is a container, not a button: the menu\n and the rename field are siblings of the entry, because a button\n cannot legally contain other controls (Firefox and Safari drop\n them from the accessibility tree). -->\n <div v-else class=\"vv-item-group vv-item-group--fill\">\n <ul\n class=\"vv-item-group__list overflow-y-auto pb-64 light-scrollbar\">\n <li\n v-for=\"conversation in conversations\"\n :key=\"conversation.id\"\n class=\"vv-item vv-item--roomy\"\n :class=\"{\n 'vv-item--current': isCurrentConversation(conversation),\n }\">\n <div\n v-if=\"editingId === conversation.id\"\n class=\"flex flex-1 items-center gap-8 min-w-0 px-md py-12\">\n <VvInputText\n v-model=\"editingTitle\"\n class=\"flex-1 mb-0\"\n modifiers=\"compact\"\n autofocus\n select-on-focus\n :maxlength=\"255\"\n :aria-label=\"$t('placeholder.insert')\"\n :placeholder=\"$t('placeholder.insert')\"\n @keydown=\"\n onRenameKeydown($event, conversation.id)\n \" />\n <VvButtonGroup modifiers=\"compact\">\n <VvButton\n icon=\"ri:save-line\"\n :title=\"$t('action.save')\"\n modifiers=\"action-quiet-small\"\n @click=\"confirmEdit(conversation.id)\" />\n <VvButton\n icon=\"ri:close-line\"\n :title=\"$t('action.cancel')\"\n modifiers=\"action-quiet-small\"\n @click=\"cancelEdit()\" />\n </VvButtonGroup>\n </div>\n <template v-else>\n <button\n type=\"button\"\n class=\"vv-item__entry\"\n :aria-current=\"\n isCurrentConversation(conversation)\n ? 'true'\n : undefined\n \"\n @click=\"openConversation(conversation.id)\">\n <div class=\"min-w-0 flex-1\">\n <div class=\"flex items-center gap-8\">\n <strong\n class=\"vv-item__title font-medium flex-1\">\n {{\n stripMarkdown(conversation.title) ||\n getLastMessage(\n conversation.messages,\n 'assistant',\n )\n }}\n </strong>\n <PkRelativeTime\n class=\"text-word-4 text-smaller shrink-0\"\n :date=\"conversation.lastMessageAt\" />\n </div>\n <span class=\"text-12 text-word-4 line-clamp-2\">\n {{\n stripMarkdown(\n localizeSummaryLabels(\n conversation.summary,\n $t,\n ),\n ) ||\n getLastMessage(\n conversation.messages,\n 'user',\n )\n }}\n </span>\n </div>\n </button>\n <div class=\"vv-item__actions\">\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:more-2-fill\"\n :title=\"$t('action.moreActions')\"\n modifiers=\"action-quiet-small\" />\n <template #items>\n <VvDropdownAction\n @click=\"startEdit(conversation)\">\n <VvIcon name=\"ri:pencil-line\" />\n {{ $t('action.renameChat') }}\n </VvDropdownAction>\n <VvDropdownAction\n @click=\"handleDelete(conversation.id)\">\n <VvIcon name=\"ri:delete-bin-line\" />\n {{ $t('action.delete') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </div>\n </template>\n </li>\n </ul>\n </div>\n\n <!-- Sticky \"new chat\" CTA (hidden on empty state, which has its own CTA) -->\n <div\n v-if=\"conversations.length > 0\"\n class=\"absolute bottom-0 left-0 right-0 flex flex-col items-center gap-4 px-16 pb-16 pt-32 pointer-events-none\"\n :style=\"{\n background:\n 'linear-gradient(to top, var(--color-surface) 55%, transparent)',\n }\">\n <VvButton\n class=\"text-14 pointer-events-auto\"\n modifiers=\"primary rounded\"\n icon=\"ri:add-line\"\n :label=\"$t('action.startNewChat')\"\n @click.stop=\"startNewChat()\" />\n <VvButton\n v-if=\"canEraseConversations\"\n class=\"text-12 pointer-events-auto\"\n modifiers=\"action-quiet-danger\"\n icon=\"ri:delete-bin-line\"\n :loading=\"isErasingConversations\"\n :disabled=\"isErasingConversations\"\n :label=\"$t('action.deleteMyConversations')\"\n @click.stop=\"handleEraseAll()\" />\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;AASA,SAAgB+B,EAAuB,GAAoC;CACvE,OACIL,EAAcM,EAAa,KAAK,KAChCN,EACIO,EAGID,EAAa,UAAU,MAClB,MAAYE,EAAQ,SAAS,MAClC,CACJ,CACJ,KACA;AAER;AAOA,SAAgBC,EAAuB,GAGpC;CACC,IAAMC,IAAYC,EAAmB,IAAI,GACnCC,IAAeD,EAAI,EAAE,GAErBE,KAAa,GAA4B,IAAgB,OAAO;EAElE,AADA,EAAU,QAAQP,EAAa,IAC/B,EAAa,QAAQN,EAAcM,EAAa,KAAK,KAAKQ;CAC9D,GAEMC,IAAc,OAAO,MAAe;EACtC,IAAMC,IAAUJ,EAAa,MAAM,KAAK;EAExC,IADA,EAAU,QAAQ,MACdI,KAAWA,EAAQ,UAAU,KAC7B,IAAI;GACA,MAAMC,EAAQ,gBAAgBC,GAAIF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AAK;IACJ,OAAOzF,EAAAiE,CAAA,CAAE,CAAA,qBAAA;IACT,SAAK,AAAA2C,EAAA,OAAAhG,GAAA,MAAOZ,EAAAsF,CAAA,CAAY,CAAA,GAAA,CAAA,MAAA,CAAA;GAEnB,GAAA,MAAA,GAAA,CAAA,OAAA,CAAA,GAAAL,EAAA,SADVnF,EAAA,GAAAe,GAQqC4E,GAAA;;IANjC,OAAM;IACN,WAAU;IACV,MAAK;IACJ,SAASN,EAAA;IACT,UAAUA,EAAA;IACV,OAAOnF,EAAAiE,CAAA,CAAE,CAAA,8BAAA;IACT,SAAK,AAAA2C,EAAA,OAAAhG,GAAA,MAAOwE,GAAc,GAAA,CAAA,MAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"PkChatbotViewConversations-Cw9fL47_.js","names":["__unplugin_components_0","__unplugin_components_1","__unplugin_components_2","__unplugin_components_3","__unplugin_components_4","__unplugin_components_5","_openBlock","_createElementBlock","_unref","_createElementVNode","_Fragment","_renderList","_normalizeClass","_createVNode","_toDisplayString","_isRef","_withCtx","PkRelativeTime","_mergeProps","_createTextVNode","_withModifiers","_createBlock","_createCommentVNode","_sfc_main","VvButtonLocalized","useChatbotStore","stripMarkdown","localizeSummaryLabels","useDialogConfirm","PkRelativeTime_default","ChatbotProfileContextKey","getConversationPreview","conversation","getTextPart","message","useConversationActions","editingId","ref","editingTitle","startEdit","fallbackTitle","confirmEdit","trimmed","actions","id","cancelEdit","onRenameKeydown","event","openDialogConfirm","_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","_hoisted_19","_hoisted_20","PkChatbotViewConversations_default","defineComponent","props","__props","$t","useI18n","store","storeToRefs","startEditConversation","handleDelete","openConversation","navigate","isCurrentConversation","localChatId","getLastMessage","messages","m","role","profile","inject","canEraseConversations","computed","isErasingConversations","handleEraseAll","eraseConversations","startNewChat","_component_VvIcon","VvIcon","_component_VvButton","_component_VvInputText","VvInputText","_component_VvButtonGroup","VvButtonGroup","_component_VvDropdownAction","VvDropdownAction","_component_VvDropdown","VvDropdown","openBlock","createElementBlock","unref","isLoadingConversations","conversations","createElementVNode","Fragment","renderList","i","normalizeClass","_cache","createVNode","toDisplayString","isRef","$event","withCtx","mergeProps","createTextVNode","withModifiers","createBlock","createCommentVNode"],"sources":["../../../../packages/composable/src/chatbot/useConversationActions.ts","../../../../packages/components/src/chat/PkChatbotViewConversations.vue","../../../../packages/components/src/chat/PkChatbotViewConversations.vue"],"sourcesContent":["import { ref } from 'vue'\nimport type { Chat as Conversation } from 'models'\nimport { getTextPart, stripMarkdown } from 'utils'\nimport { useDialogConfirm } from '../useDialogConfirm'\n\n/**\n * Single-line preview for a conversation: explicit title, otherwise the\n * first user message. Used as list label and as search haystack.\n */\nexport function getConversationPreview(conversation: Conversation): string {\n return (\n stripMarkdown(conversation.title) ||\n stripMarkdown(\n getTextPart(\n // The list endpoint isn't Zod-parsed: don't trust the\n // declared types at runtime\n conversation.messages?.find(\n (message) => message.role === 'user',\n ),\n ),\n ) ||\n ''\n )\n}\n\n/**\n * Inline-rename and delete-with-confirm state shared by the conversation\n * lists (PkChatbotViewConversations, PkChatSidebar). Renames are optimistic:\n * on failure the next conversations load reconciles with the server state.\n */\nexport function useConversationActions(actions: {\n renameChatTitle: (chatId: string, title: string) => Promise<unknown>\n deleteChat: (chatId: string) => Promise<unknown>\n}) {\n const editingId = ref<string | null>(null)\n const editingTitle = ref('')\n\n const startEdit = (conversation: Conversation, fallbackTitle = '') => {\n editingId.value = conversation.id\n editingTitle.value = stripMarkdown(conversation.title) || fallbackTitle\n }\n\n const confirmEdit = async (id: string) => {\n const trimmed = editingTitle.value.trim()\n editingId.value = null\n if (trimmed && trimmed.length <= 255) {\n try {\n await actions.renameChatTitle(id, trimmed)\n } catch {\n // Revert optimistically: reload will pick up server state\n }\n }\n }\n\n const cancelEdit = () => {\n editingId.value = null\n }\n\n const onRenameKeydown = (event: KeyboardEvent, id: string) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n confirmEdit(id)\n } else if (event.key === 'Escape') {\n event.preventDefault()\n cancelEdit()\n }\n }\n\n const { openDialogConfirm } = useDialogConfirm()\n const requestDelete = async (id: string) => {\n try {\n const proceed = await openDialogConfirm()\n if (!proceed) {\n return\n }\n await actions.deleteChat(id)\n } catch {\n // Silently fail: next load will reconcile\n }\n }\n\n return {\n editingId,\n editingTitle,\n startEdit,\n confirmEdit,\n cancelEdit,\n onRenameKeydown,\n requestDelete,\n }\n}\n","<script setup lang=\"ts\">\n import { computed, inject, ref } from 'vue'\n import { storeToRefs } from 'pinia'\n import { useI18n } from 'vue-i18n'\n import type { Chat as Conversation, UIChatMessage } from 'models'\n import { stripMarkdown, getTextPart } from 'utils'\n import {\n useChatbotStore,\n useConversationActions,\n useDialogConfirm,\n } from 'composables'\n import PkRelativeTime from '../PkRelativeTime.vue'\n import { localizeSummaryLabels } from './utils'\n import { ChatbotProfileContextKey } from './chatbotProfileContext'\n\n const props = defineProps<{ agentId: string }>()\n\n const { t: $t } = useI18n({ useScope: 'global' })\n\n const store = useChatbotStore(props.agentId)\n const { conversations, isLoadingConversations, localChatId } =\n storeToRefs(store)\n const { navigate, startNewChat, renameChatTitle, deleteChat } = store\n\n const {\n editingId,\n editingTitle,\n startEdit: startEditConversation,\n confirmEdit,\n cancelEdit,\n onRenameKeydown,\n requestDelete: handleDelete,\n } = useConversationActions({ renameChatTitle, deleteChat })\n\n const openConversation = (id: string) => {\n if (editingId.value) {\n return\n }\n localChatId.value = id\n navigate('chat')\n }\n\n const isCurrentConversation = (conversation: Conversation) => {\n return localChatId.value === conversation.id\n }\n\n const getLastMessage = (\n messages: UIChatMessage[],\n role: 'user' | 'assistant',\n ) => {\n return stripMarkdown(\n getTextPart(messages.filter((m) => m.role === role).slice(-1)[0]) ||\n '',\n )\n }\n\n const startEdit = (conversation: Conversation) => {\n startEditConversation(\n conversation,\n getLastMessage(conversation.messages, 'assistant'),\n )\n }\n\n const { openDialogConfirm } = useDialogConfirm()\n\n // GDPR B.3 — bulk \"delete my conversations\", available to anonymous\n // sessions too (the host wires the endpoint through the profile context).\n // Hidden when the host application owns the session (external token or\n // host-session mode): the endpoint erases ALL conversations of the\n // session's user platform-wide, an account-scoped action that belongs to\n // the host, not to an embedded widget. Same gating as sign-out and\n // manage-profile in PkChatbotViewProfile.\n const profile = inject(ChatbotProfileContextKey, undefined)\n const canEraseConversations = computed(\n () =>\n !!profile?.eraseConversations &&\n !(profile.isExternalAuth?.value ?? false),\n )\n const isErasingConversations = ref(false)\n const handleEraseAll = async () => {\n const eraseConversations = profile?.eraseConversations\n if (!eraseConversations || !canEraseConversations.value) {\n return\n }\n const proceed = await openDialogConfirm({\n title: $t('confirmTitle.deleteMyConversations'),\n questionLabel: $t('message.deleteMyConversationsConfirm'),\n })\n if (!proceed) {\n return\n }\n isErasingConversations.value = true\n try {\n await eraseConversations()\n conversations.value = []\n startNewChat()\n } catch {\n // Same policy as single delete: fail silently and reconcile\n // with the server state\n store.loadConversations(props.agentId)\n } finally {\n isErasingConversations.value = false\n }\n }\n</script>\n\n<template>\n <div class=\"flex flex-col flex-1 min-h-0 relative\">\n <!-- Loading skeleton -->\n <div\n v-if=\"isLoadingConversations && conversations.length === 0\"\n class=\"vv-item-group vv-item-group--fill\">\n <div class=\"vv-item-group__list\">\n <div\n v-for=\"i in 5\"\n :key=\"i\"\n class=\"vv-item vv-item--roomy vv-item--plain\">\n <div class=\"vv-item__entry\">\n <div class=\"flex flex-col gap-6 flex-1 min-w-0\">\n <div\n class=\"vv-skeleton h-16 rounded\"\n :class=\"i % 2 ? 'w-192' : 'w-128'\">\n <div class=\"vv-skeleton__item\" />\n </div>\n <div class=\"vv-skeleton h-12 rounded\">\n <div class=\"vv-skeleton__item\" />\n </div>\n <div class=\"vv-skeleton h-12 rounded w-160\">\n <div class=\"vv-skeleton__item\" />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Empty state -->\n <div\n v-else-if=\"conversations.length === 0\"\n class=\"flex flex-col flex-1 items-center justify-center gap-12 p-24 text-center\">\n <div\n class=\"w-64 h-64 rounded-full bg-surface-1 border border-surface-3 flex items-center justify-center\">\n <VvIcon name=\"ri:chat-3-line\" class=\"w-28 h-28 text-word-4\" />\n </div>\n <div class=\"flex flex-col gap-4\">\n <strong class=\"text-16 font-semibold text-word-1\">\n {{ $t('message.noConversations') }}\n </strong>\n <span class=\"text-14 text-word-3 leading-relaxed\">\n {{ $t('message.noConversationsHint') }}\n </span>\n </div>\n <VvButton\n modifiers=\"primary rounded\"\n icon=\"ri:add-line\"\n class=\"mt-8\"\n :label=\"$t('action.startNewChat')\"\n @click=\"startNewChat()\" />\n </div>\n\n <!-- Conversation list. The row is a container, not a button: the menu\n and the rename field are siblings of the entry, because a button\n cannot legally contain other controls (Firefox and Safari drop\n them from the accessibility tree). -->\n <div v-else class=\"vv-item-group vv-item-group--fill\">\n <ul\n class=\"vv-item-group__list overflow-y-auto pb-64 light-scrollbar\">\n <li\n v-for=\"conversation in conversations\"\n :key=\"conversation.id\"\n class=\"vv-item vv-item--roomy\"\n :class=\"{\n 'vv-item--current': isCurrentConversation(conversation),\n }\">\n <div\n v-if=\"editingId === conversation.id\"\n class=\"flex flex-1 items-center gap-8 min-w-0 px-md py-12\">\n <VvInputText\n v-model=\"editingTitle\"\n class=\"flex-1 mb-0\"\n modifiers=\"compact\"\n autofocus\n select-on-focus\n :maxlength=\"255\"\n :aria-label=\"$t('placeholder.insert')\"\n :placeholder=\"$t('placeholder.insert')\"\n @keydown=\"\n onRenameKeydown($event, conversation.id)\n \" />\n <VvButtonGroup modifiers=\"compact\">\n <VvButton\n icon=\"ri:save-line\"\n :title=\"$t('action.save')\"\n modifiers=\"action-quiet-small\"\n @click=\"confirmEdit(conversation.id)\" />\n <VvButton\n icon=\"ri:close-line\"\n :title=\"$t('action.cancel')\"\n modifiers=\"action-quiet-small\"\n @click=\"cancelEdit()\" />\n </VvButtonGroup>\n </div>\n <template v-else>\n <button\n type=\"button\"\n class=\"vv-item__entry\"\n :aria-current=\"\n isCurrentConversation(conversation)\n ? 'true'\n : undefined\n \"\n @click=\"openConversation(conversation.id)\">\n <div class=\"min-w-0 flex-1\">\n <div class=\"flex items-center gap-8\">\n <strong\n class=\"vv-item__title font-medium flex-1\">\n {{\n stripMarkdown(conversation.title) ||\n getLastMessage(\n conversation.messages,\n 'assistant',\n )\n }}\n </strong>\n <PkRelativeTime\n class=\"text-word-4 text-smaller shrink-0\"\n :date=\"conversation.lastMessageAt\" />\n </div>\n <span class=\"text-12 text-word-4 line-clamp-2\">\n {{\n stripMarkdown(\n localizeSummaryLabels(\n conversation.summary,\n $t,\n ),\n ) ||\n getLastMessage(\n conversation.messages,\n 'user',\n )\n }}\n </span>\n </div>\n </button>\n <div class=\"vv-item__actions\">\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:more-2-fill\"\n :title=\"$t('action.moreActions')\"\n modifiers=\"action-quiet-small\" />\n <template #items>\n <VvDropdownAction\n @click=\"startEdit(conversation)\">\n <VvIcon name=\"ri:pencil-line\" />\n {{ $t('action.renameChat') }}\n </VvDropdownAction>\n <VvDropdownAction\n @click=\"handleDelete(conversation.id)\">\n <VvIcon name=\"ri:delete-bin-line\" />\n {{ $t('action.delete') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </div>\n </template>\n </li>\n </ul>\n </div>\n\n <!-- Sticky \"new chat\" CTA (hidden on empty state, which has its own CTA) -->\n <div\n v-if=\"conversations.length > 0\"\n class=\"absolute bottom-0 left-0 right-0 flex flex-col items-center gap-4 px-16 pb-16 pt-32 pointer-events-none\"\n :style=\"{\n background:\n 'linear-gradient(to top, var(--color-surface) 55%, transparent)',\n }\">\n <VvButton\n class=\"text-14 pointer-events-auto\"\n modifiers=\"primary rounded\"\n icon=\"ri:add-line\"\n :label=\"$t('action.startNewChat')\"\n @click.stop=\"startNewChat()\" />\n <VvButton\n v-if=\"canEraseConversations\"\n class=\"text-12 pointer-events-auto\"\n modifiers=\"action-quiet-danger\"\n icon=\"ri:delete-bin-line\"\n :loading=\"isErasingConversations\"\n :disabled=\"isErasingConversations\"\n :label=\"$t('action.deleteMyConversations')\"\n @click.stop=\"handleEraseAll()\" />\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, inject, ref } from 'vue'\n import { storeToRefs } from 'pinia'\n import { useI18n } from 'vue-i18n'\n import type { Chat as Conversation, UIChatMessage } from 'models'\n import { stripMarkdown, getTextPart } from 'utils'\n import {\n useChatbotStore,\n useConversationActions,\n useDialogConfirm,\n } from 'composables'\n import PkRelativeTime from '../PkRelativeTime.vue'\n import { localizeSummaryLabels } from './utils'\n import { ChatbotProfileContextKey } from './chatbotProfileContext'\n\n const props = defineProps<{ agentId: string }>()\n\n const { t: $t } = useI18n({ useScope: 'global' })\n\n const store = useChatbotStore(props.agentId)\n const { conversations, isLoadingConversations, localChatId } =\n storeToRefs(store)\n const { navigate, startNewChat, renameChatTitle, deleteChat } = store\n\n const {\n editingId,\n editingTitle,\n startEdit: startEditConversation,\n confirmEdit,\n cancelEdit,\n onRenameKeydown,\n requestDelete: handleDelete,\n } = useConversationActions({ renameChatTitle, deleteChat })\n\n const openConversation = (id: string) => {\n if (editingId.value) {\n return\n }\n localChatId.value = id\n navigate('chat')\n }\n\n const isCurrentConversation = (conversation: Conversation) => {\n return localChatId.value === conversation.id\n }\n\n const getLastMessage = (\n messages: UIChatMessage[],\n role: 'user' | 'assistant',\n ) => {\n return stripMarkdown(\n getTextPart(messages.filter((m) => m.role === role).slice(-1)[0]) ||\n '',\n )\n }\n\n const startEdit = (conversation: Conversation) => {\n startEditConversation(\n conversation,\n getLastMessage(conversation.messages, 'assistant'),\n )\n }\n\n const { openDialogConfirm } = useDialogConfirm()\n\n // GDPR B.3 — bulk \"delete my conversations\", available to anonymous\n // sessions too (the host wires the endpoint through the profile context).\n // Hidden when the host application owns the session (external token or\n // host-session mode): the endpoint erases ALL conversations of the\n // session's user platform-wide, an account-scoped action that belongs to\n // the host, not to an embedded widget. Same gating as sign-out and\n // manage-profile in PkChatbotViewProfile.\n const profile = inject(ChatbotProfileContextKey, undefined)\n const canEraseConversations = computed(\n () =>\n !!profile?.eraseConversations &&\n !(profile.isExternalAuth?.value ?? false),\n )\n const isErasingConversations = ref(false)\n const handleEraseAll = async () => {\n const eraseConversations = profile?.eraseConversations\n if (!eraseConversations || !canEraseConversations.value) {\n return\n }\n const proceed = await openDialogConfirm({\n title: $t('confirmTitle.deleteMyConversations'),\n questionLabel: $t('message.deleteMyConversationsConfirm'),\n })\n if (!proceed) {\n return\n }\n isErasingConversations.value = true\n try {\n await eraseConversations()\n conversations.value = []\n startNewChat()\n } catch {\n // Same policy as single delete: fail silently and reconcile\n // with the server state\n store.loadConversations(props.agentId)\n } finally {\n isErasingConversations.value = false\n }\n }\n</script>\n\n<template>\n <div class=\"flex flex-col flex-1 min-h-0 relative\">\n <!-- Loading skeleton -->\n <div\n v-if=\"isLoadingConversations && conversations.length === 0\"\n class=\"vv-item-group vv-item-group--fill\">\n <div class=\"vv-item-group__list\">\n <div\n v-for=\"i in 5\"\n :key=\"i\"\n class=\"vv-item vv-item--roomy vv-item--plain\">\n <div class=\"vv-item__entry\">\n <div class=\"flex flex-col gap-6 flex-1 min-w-0\">\n <div\n class=\"vv-skeleton h-16 rounded\"\n :class=\"i % 2 ? 'w-192' : 'w-128'\">\n <div class=\"vv-skeleton__item\" />\n </div>\n <div class=\"vv-skeleton h-12 rounded\">\n <div class=\"vv-skeleton__item\" />\n </div>\n <div class=\"vv-skeleton h-12 rounded w-160\">\n <div class=\"vv-skeleton__item\" />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Empty state -->\n <div\n v-else-if=\"conversations.length === 0\"\n class=\"flex flex-col flex-1 items-center justify-center gap-12 p-24 text-center\">\n <div\n class=\"w-64 h-64 rounded-full bg-surface-1 border border-surface-3 flex items-center justify-center\">\n <VvIcon name=\"ri:chat-3-line\" class=\"w-28 h-28 text-word-4\" />\n </div>\n <div class=\"flex flex-col gap-4\">\n <strong class=\"text-16 font-semibold text-word-1\">\n {{ $t('message.noConversations') }}\n </strong>\n <span class=\"text-14 text-word-3 leading-relaxed\">\n {{ $t('message.noConversationsHint') }}\n </span>\n </div>\n <VvButton\n modifiers=\"primary rounded\"\n icon=\"ri:add-line\"\n class=\"mt-8\"\n :label=\"$t('action.startNewChat')\"\n @click=\"startNewChat()\" />\n </div>\n\n <!-- Conversation list. The row is a container, not a button: the menu\n and the rename field are siblings of the entry, because a button\n cannot legally contain other controls (Firefox and Safari drop\n them from the accessibility tree). -->\n <div v-else class=\"vv-item-group vv-item-group--fill\">\n <ul\n class=\"vv-item-group__list overflow-y-auto pb-64 light-scrollbar\">\n <li\n v-for=\"conversation in conversations\"\n :key=\"conversation.id\"\n class=\"vv-item vv-item--roomy\"\n :class=\"{\n 'vv-item--current': isCurrentConversation(conversation),\n }\">\n <div\n v-if=\"editingId === conversation.id\"\n class=\"flex flex-1 items-center gap-8 min-w-0 px-md py-12\">\n <VvInputText\n v-model=\"editingTitle\"\n class=\"flex-1 mb-0\"\n modifiers=\"compact\"\n autofocus\n select-on-focus\n :maxlength=\"255\"\n :aria-label=\"$t('placeholder.insert')\"\n :placeholder=\"$t('placeholder.insert')\"\n @keydown=\"\n onRenameKeydown($event, conversation.id)\n \" />\n <VvButtonGroup modifiers=\"compact\">\n <VvButton\n icon=\"ri:save-line\"\n :title=\"$t('action.save')\"\n modifiers=\"action-quiet-small\"\n @click=\"confirmEdit(conversation.id)\" />\n <VvButton\n icon=\"ri:close-line\"\n :title=\"$t('action.cancel')\"\n modifiers=\"action-quiet-small\"\n @click=\"cancelEdit()\" />\n </VvButtonGroup>\n </div>\n <template v-else>\n <button\n type=\"button\"\n class=\"vv-item__entry\"\n :aria-current=\"\n isCurrentConversation(conversation)\n ? 'true'\n : undefined\n \"\n @click=\"openConversation(conversation.id)\">\n <div class=\"min-w-0 flex-1\">\n <div class=\"flex items-center gap-8\">\n <strong\n class=\"vv-item__title font-medium flex-1\">\n {{\n stripMarkdown(conversation.title) ||\n getLastMessage(\n conversation.messages,\n 'assistant',\n )\n }}\n </strong>\n <PkRelativeTime\n class=\"text-word-4 text-smaller shrink-0\"\n :date=\"conversation.lastMessageAt\" />\n </div>\n <span class=\"text-12 text-word-4 line-clamp-2\">\n {{\n stripMarkdown(\n localizeSummaryLabels(\n conversation.summary,\n $t,\n ),\n ) ||\n getLastMessage(\n conversation.messages,\n 'user',\n )\n }}\n </span>\n </div>\n </button>\n <div class=\"vv-item__actions\">\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:more-2-fill\"\n :title=\"$t('action.moreActions')\"\n modifiers=\"action-quiet-small\" />\n <template #items>\n <VvDropdownAction\n @click=\"startEdit(conversation)\">\n <VvIcon name=\"ri:pencil-line\" />\n {{ $t('action.renameChat') }}\n </VvDropdownAction>\n <VvDropdownAction\n @click=\"handleDelete(conversation.id)\">\n <VvIcon name=\"ri:delete-bin-line\" />\n {{ $t('action.delete') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </div>\n </template>\n </li>\n </ul>\n </div>\n\n <!-- Sticky \"new chat\" CTA (hidden on empty state, which has its own CTA) -->\n <div\n v-if=\"conversations.length > 0\"\n class=\"absolute bottom-0 left-0 right-0 flex flex-col items-center gap-4 px-16 pb-16 pt-32 pointer-events-none\"\n :style=\"{\n background:\n 'linear-gradient(to top, var(--color-surface) 55%, transparent)',\n }\">\n <VvButton\n class=\"text-14 pointer-events-auto\"\n modifiers=\"primary rounded\"\n icon=\"ri:add-line\"\n :label=\"$t('action.startNewChat')\"\n @click.stop=\"startNewChat()\" />\n <VvButton\n v-if=\"canEraseConversations\"\n class=\"text-12 pointer-events-auto\"\n modifiers=\"action-quiet-danger\"\n icon=\"ri:delete-bin-line\"\n :loading=\"isErasingConversations\"\n :disabled=\"isErasingConversations\"\n :label=\"$t('action.deleteMyConversations')\"\n @click.stop=\"handleEraseAll()\" />\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;AASA,SAAgB+B,EAAuB,GAAoC;CACvE,OACIL,EAAcM,EAAa,KAAK,KAChCN,EACIO,EAGID,EAAa,UAAU,MAClB,MAAYE,EAAQ,SAAS,MAClC,CACJ,CACJ,KACA;AAER;AAOA,SAAgBC,EAAuB,GAGpC;CACC,IAAMC,IAAYC,EAAmB,IAAI,GACnCC,IAAeD,EAAI,EAAE,GAErBE,KAAa,GAA4B,IAAgB,OAAO;EAElE,AADA,EAAU,QAAQP,EAAa,IAC/B,EAAa,QAAQN,EAAcM,EAAa,KAAK,KAAKQ;CAC9D,GAEMC,IAAc,OAAO,MAAe;EACtC,IAAMC,IAAUJ,EAAa,MAAM,KAAK;EAExC,IADA,EAAU,QAAQ,MACdI,KAAWA,EAAQ,UAAU,KAC7B,IAAI;GACA,MAAMC,EAAQ,gBAAgBC,GAAIF,CAAO;EAC7C,QAAQ,CAER;CAER,GAEMG,UAAmB;EACrB,EAAU,QAAQ;CACtB,GAEMC,KAAmB,GAAsB,MAAe;EAC1D,AAAIC,EAAM,QAAQ,WACdA,EAAM,eAAe,GACrBN,EAAYG,CAAE,KACPG,EAAM,QAAQ,aACrBA,EAAM,eAAe,GACrBF,EAAW;CAEnB,GAEM,EAAE,yBAAsBjB,EAAiB;CAa/C,OAAO;EACH;EACA;EACA;EACA;EACA;EACA;EACA,sBAnByB,MAAe;GACxC,IAAI;IAEA,IAAI,CAAC,MADiBoB,EAAkB,GAEpC;IAEJ,MAAML,EAAQ,WAAWC,CAAE;GAC/B,QAAQ,CAER;EACJ;CAUA;AACJ;;;;;;;;;;;;;;;;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unks/{PkStreamingMarkdown-CqT_orLj.js → PkStreamingMarkdown-DXoUbGsP.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { F as e } from "./Agent-DDm9cCaN.js";
|
|
2
2
|
import { n as t, t as n } from "./cdn-css-JUUNhyQ6.js";
|
|
3
3
|
import "./src-BZRiAJsH.js";
|
|
4
|
-
import { d as r } from "./utils-
|
|
4
|
+
import { d as r } from "./utils-Bopp5IPf.js";
|
|
5
5
|
import { i, n as a } from "./url-validation-9DstIfq2.js";
|
|
6
6
|
import { n as o } from "./useShortUrlResolver-DI8ycJiO.js";
|
|
7
7
|
import { computed as s, createElementBlock as c, defineComponent as l, inject as u, nextTick as d, onBeforeUnmount as f, onMounted as p, openBlock as ee, provide as m, ref as h, toRef as te, useTemplateRef as ne, watch as g } from "vue";
|
|
@@ -3401,4 +3401,4 @@ var ka = ["innerHTML"], Aa = 100, ja = /* @__PURE__ */ l({
|
|
|
3401
3401
|
//#endregion
|
|
3402
3402
|
export { wa as n, Oa as r, ja as t };
|
|
3403
3403
|
|
|
3404
|
-
//# sourceMappingURL=PkStreamingMarkdown-
|
|
3404
|
+
//# sourceMappingURL=PkStreamingMarkdown-DXoUbGsP.js.map
|