@meistrari/chat-nuxt 3.13.0-rc.1 → 3.13.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -9,6 +9,7 @@ import ChatMobileShell from "./mobile/chat-mobile-shell.vue";
|
|
|
9
9
|
import { normalizeConversationId } from "../../conversations/scope";
|
|
10
10
|
import { resolveChatFeatures } from "../feature-config";
|
|
11
11
|
import { resolveConversationCreator } from "../../conversations/creator";
|
|
12
|
+
import { buildConversationShareUrl } from "../conversation-share-url";
|
|
12
13
|
import {
|
|
13
14
|
resolveTelaAgentInputs,
|
|
14
15
|
useChat
|
|
@@ -59,6 +60,7 @@ function toggleSidebarCollapsed() {
|
|
|
59
60
|
isSidebarCollapsed.value = !isSidebarCollapsed.value;
|
|
60
61
|
}
|
|
61
62
|
const chatApi = useChatApi();
|
|
63
|
+
const route = useRoute();
|
|
62
64
|
const embedConfig = useEmbedConfig();
|
|
63
65
|
const chatAction = useChatAction();
|
|
64
66
|
const { user: authUser, activeOrganization, logout } = useChatAuth();
|
|
@@ -117,8 +119,9 @@ const {
|
|
|
117
119
|
closePreview
|
|
118
120
|
} = useFilePreviewPanel();
|
|
119
121
|
const { isOpen: isCitationPanelOpen } = useCitationPanel();
|
|
122
|
+
const sharedConversationId = typeof route.query.conversation === "string" ? route.query.conversation : null;
|
|
120
123
|
const activeConversationId = ref(
|
|
121
|
-
normalizeConversationId(props.conversationId) ?? normalizeConversationId(props.initialConversationId)
|
|
124
|
+
normalizeConversationId(props.conversationId) ?? normalizeConversationId(props.initialConversationId) ?? normalizeConversationId(sharedConversationId)
|
|
122
125
|
);
|
|
123
126
|
const loadingConversationId = ref(null);
|
|
124
127
|
const isReady = ref(false);
|
|
@@ -643,8 +646,14 @@ function cancelEditing() {
|
|
|
643
646
|
}
|
|
644
647
|
const copiedToClipboard = ref(false);
|
|
645
648
|
async function handleShare() {
|
|
649
|
+
if (!currentConversation.value)
|
|
650
|
+
return;
|
|
646
651
|
try {
|
|
647
|
-
|
|
652
|
+
const shareUrl = buildConversationShareUrl(
|
|
653
|
+
window.location.href,
|
|
654
|
+
currentConversation.value.id
|
|
655
|
+
);
|
|
656
|
+
await navigator.clipboard.writeText(shareUrl);
|
|
648
657
|
copiedToClipboard.value = true;
|
|
649
658
|
statusToast.update({ text: "Link copiado", icon: "i-ph-check" });
|
|
650
659
|
setTimeout(() => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function buildConversationShareUrl(currentHref: string, conversationId: string): string;
|