feat: 会话详情
This commit is contained in:
@ -6,10 +6,10 @@ import RightView from './components/right-view/index.vue';
|
||||
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useChatStore } from '@/stores/modules/chat';
|
||||
import { getConversationList } from '@/api/all/chat';
|
||||
import querySSE from '@/utils/querySSE';
|
||||
|
||||
import useChatHandler from './useChatHandler';
|
||||
import { QUESTION_ROLE, LOADING_ROLE } from './constants';
|
||||
import { QUESTION_ROLE, LOADING_ROLE, REMOTE_ROLE } from './constants';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@ -47,7 +47,7 @@ export default {
|
||||
|
||||
const handleCancel = () => {
|
||||
// 中止当前正在输出的回答
|
||||
console.log('handleCancel', currentTaskId.value)
|
||||
console.log('handleCancel', currentTaskId.value);
|
||||
if (generateLoading.value) {
|
||||
bubbleListRef.value?.abortTypingByKey(currentTaskId.value);
|
||||
sseController.value?.abort?.();
|
||||
@ -115,6 +115,18 @@ export default {
|
||||
{ deep: true },
|
||||
);
|
||||
|
||||
onMounted(async () => {
|
||||
if (conversationId.value) {
|
||||
const { data, code } = await getConversationList({
|
||||
session_id: conversationId.value,
|
||||
agent_id: chatStore.agentInfo.agent_id,
|
||||
});
|
||||
if (code === 200) {
|
||||
conversationList.value = data.list?.flat(1) ?? []
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return () => (
|
||||
<div class="chat-view-wrap w-full h-full flex">
|
||||
<section class="flex-1 flex flex-col pt-20px justify-center relative px-16px">
|
||||
|
||||
Reference in New Issue
Block a user