fix(chat): close references drawer on session switch

This commit is contained in:
wizardchen
2026-07-08 00:37:06 +08:00
committed by lyingbug
parent 15b81d1581
commit d01526b758
+3 -1
View File
@@ -136,7 +136,8 @@ import { clearCitationChunkCache } from '@/utils/citationChunkCache';
import ChatReferencesDrawer from '@/components/ChatReferencesDrawer.vue';
import { provideChatReferencesDrawer } from '@/composables/useChatReferencesDrawer';
const { visible: referencesDrawerVisible } = provideChatReferencesDrawer();
const referencesDrawer = provideChatReferencesDrawer();
const { visible: referencesDrawerVisible } = referencesDrawer;
const props = defineProps({
session_id: { type: String, default: '' },
@@ -835,6 +836,7 @@ onMounted(async () => {
})
const clearData = () => {
stopStream();
referencesDrawer.close();
isReplying.value = false;
fullContent.value = '';
// Stop any IM-reply recovery poll for the session we're leaving/switching.