From 67dde4b53754779562453cea418d96331736ca43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A8=9C?= Date: Thu, 6 Mar 2025 16:33:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E5=90=8E=E9=BB=98=E8=AE=A4=E6=9F=A5=E8=AF=A2tokens?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/dialoguePanel/DialoguePanel.vue | 1 + src/store/conversation.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/dialoguePanel/DialoguePanel.vue b/src/components/dialoguePanel/DialoguePanel.vue index 02c7492d..a1b25744 100644 --- a/src/components/dialoguePanel/DialoguePanel.vue +++ b/src/components/dialoguePanel/DialoguePanel.vue @@ -1007,6 +1007,7 @@ const handleSendMessage = async (question, user_selected_flow, user_selected_app &-arror { margin: 0; + cursor: pointer; } .pagenation-cur { diff --git a/src/store/conversation.ts b/src/store/conversation.ts index 3d675f34..db978553 100644 --- a/src/store/conversation.ts +++ b/src/store/conversation.ts @@ -571,6 +571,7 @@ export const useSessionStore = defineStore('conversation', () => { regenerateInd ?? undefined, ); } + await getConversation(currentSelectedSession); }; /** * 暂停流式返回 -- Gitee From f5ac1600110993e219689dfe7871182940a649da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A8=9C?= Date: Mon, 10 Mar 2025 15:03:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?iframe=E8=B7=AF=E5=BE=84=E8=B5=8B=E5=80=BC?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E9=81=BF=E5=85=8D=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3=E9=87=8D=E5=A4=8D=E8=AF=B7?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dialogue/dialogueView.vue | 43 ++++++++++++++++------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/src/views/dialogue/dialogueView.vue b/src/views/dialogue/dialogueView.vue index 396c8a7b..aaf6fe7d 100644 --- a/src/views/dialogue/dialogueView.vue +++ b/src/views/dialogue/dialogueView.vue @@ -47,14 +47,16 @@ const isSubmitDisabled = ref(true); const ruleFormRef = ref(); const router = useRouter(); const type = import.meta.env.VITE_USER_TYPE; -let routerList: ComputedRef> = computed(() => { +let routerList: ComputedRef< + Array<{ + name: string; + path: string; + src: string; + selectedSrc: string; + routerName: string; + anotherName?: string | undefined; // 路由别名,辅助匹配选中的路由图标 + }> +> = computed(() => { return [ { name: i18n.global.t('menu.dialogue'), @@ -206,9 +208,9 @@ const handleConfirmCreateModel = async (formData: any | undefined) => { const changeLanguagefun = (lang: 'CN' | 'EN') => { changeLanguage(lang); // 同步语言到iframe - const iframe = document.querySelector('#my-iframe') + const iframe = document.querySelector('#my-iframe'); if (iframe?.contentWindow) { - const data = {lang:localStorage.getItem('localeLang')}; + const data = { lang: localStorage.getItem('localeLang') }; let target = `${window.location.origin}/witchaind`; iframe.contentWindow.postMessage(data, target); } @@ -226,12 +228,7 @@ onMounted(() => { ruleForm.kb_id = localStorage.getItem('kb_id'); } console.log('onMounted', window.location.host); - const iframe = document.getElementById('my-iframe'); - console.log('iframe', `${window.location.origin}/witchaind`); initCopilot(); - iframe.src = `${window.location.origin}/witchaind`; - - }); watch( @@ -289,6 +286,14 @@ watch( name: String(currRoute.value.query.name), }; } + + // 监听路由变化给iframe.src赋值 + if (currRoute.value.path === '/witchainD') { + const iframe = document.getElementById('my-iframe') as HTMLIFrameElement; + if(iframe){ + iframe.src = `${window.location.origin}/witchaind`; + } + } }, { deep: true, immediate: true }, ); @@ -352,8 +357,8 @@ watch(