feat: 对话逻辑调整、历史对话接口联调

This commit is contained in:
rd
2025-08-22 18:28:09 +08:00
parent 0d5cb7ba38
commit 063ce3df5e
13 changed files with 221 additions and 71 deletions

View File

@ -4,11 +4,13 @@ import { BubbleList } from '@/components/xt-chat/xt-bubble';
import SenderInput from '../sender-input/index.vue';
import { Typography } from 'ant-design-vue';
import RightView from './rightView.vue';
import type { Ref } from 'vue';
import { useRoute } from 'vue-router';
import markdownit from 'markdown-it';
import { useClipboard } from '@vueuse/core';
import { genRandomId } from '@/utils/tools';
import { useChatStore } from '@/stores/modules/chat';
import type { BubbleListProps } from '@/components/xt-chat/xt-bubble/types';
const QUESTION_ROLE = 'question';
@ -16,6 +18,8 @@ const ANSWER_ROLE = 'text';
export default {
setup(props, { emit, expose }) {
const chatStore = useChatStore();
const route = useRoute();
const { copy } = useClipboard();
@ -187,6 +191,20 @@ export default {
},
};
const initSse = () => {
console.log('initSse', { agentInfo: chatStore.agentInfo, searchValue: chatStore.searchValue });
};
const closeSse = () => {
console.log('closeSse');
};
onMounted(() => {
initSse();
});
onUnmounted(() => {
closeSse();
});
return () => (
<div class="conversation-detail-wrap w-full h-full flex">
<section class="flex-1 flex flex-col pt-20px justify-center relative px-16px">
@ -203,7 +221,7 @@ export default {
v-model={searchValue.value}
onSubmit={handleSubmit}
onCancel={handleCancel}
data-ne='123'
data-ne="123"
/>
<p class="cts !color-#939499 text-12px !lh-20px my-4px">内容由AI生成仅供参考</p>
</div>