From c96820d72c06acab513c20d02d9fac49f14df366 Mon Sep 17 00:00:00 2001 From: cc500 <2014434568@qq.com> Date: Tue, 11 Feb 2025 15:43:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dialogue/dialogueView.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/dialogue/dialogueView.vue b/src/views/dialogue/dialogueView.vue index 2e7a4f8..558e50e 100644 --- a/src/views/dialogue/dialogueView.vue +++ b/src/views/dialogue/dialogueView.vue @@ -21,6 +21,8 @@ import WitchainDIcon from '@/assets/images/witchainD.png'; import WitchainDIconSelected from '@/assets/svgs/WitchainDSelected.svg'; import { useRouter } from 'vue-router'; import { reactive } from 'vue'; +const { createNewSession } = useHistorySessionStore(); + // 挂载全局事件 window.onHtmlEventDispatch = onHtmlEventDispatch as any; const { logout } = useAccountStore(); @@ -177,6 +179,13 @@ onMounted(() => { } }); +const addNewSession = async(routerName: string) => { + console.log(router.currentRoute.value.name, routerName) + if(router.currentRoute.value.name === routerName){ + await createNewSession(); + } +} + watch( ruleForm, () => { @@ -238,7 +247,7 @@ watch(
- + -- Gitee From 95eea6efa49fe5b6714fd30680874454614f081f Mon Sep 17 00:00:00 2001 From: cc500 <2014434568@qq.com> Date: Tue, 11 Feb 2025 16:41:09 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chat=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/conversation.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/store/conversation.ts b/src/store/conversation.ts index 1825f86..8847cae 100644 --- a/src/store/conversation.ts +++ b/src/store/conversation.ts @@ -126,12 +126,12 @@ export const useSessionStore = defineStore('conversation', () => { conversationId: params.conversationId, groupId: params.groupId, // record_id: params.qaRecordId, - app:[{ + app:{ appId:params.user_selected_app[0], flowId: params.user_selected_flow, params: pp, auth:{}, - }], + }, features:features, }), }); @@ -149,12 +149,12 @@ export const useSessionStore = defineStore('conversation', () => { language, groupId: params.groupId, // record_id: params.qaRecordId, - app:[{ + app:{ appId:params.user_selected_app[0], flowId: "", params: pp, auth:{}, - }], + }, features:features, }), }); @@ -173,12 +173,12 @@ export const useSessionStore = defineStore('conversation', () => { language, groupId: params.groupId, // record_id: params.qaRecordId, - app:[{ + app:{ appId:"", flowId: "", params: {}, auth:{}, - }], + }, features:features, }), }); -- Gitee