【解决todo】AI chat 头部修改模型,不更新问题

This commit is contained in:
cherishsince 2024-05-21 11:46:30 +08:00
parent 939e3790ee
commit e896e5bb27

View File

@ -94,7 +94,6 @@ import {ChatMessageApi, ChatMessageVO} from '@/api/ai/chat/message'
import {ChatConversationApi, ChatConversationVO} from '@/api/ai/chat/conversation' import {ChatConversationApi, ChatConversationVO} from '@/api/ai/chat/conversation'
import {useClipboard} from '@vueuse/core' import {useClipboard} from '@vueuse/core'
import ChatConversationUpdateForm from "@/views/ai/chat/components/ChatConversationUpdateForm.vue"; import ChatConversationUpdateForm from "@/views/ai/chat/components/ChatConversationUpdateForm.vue";
import {send} from "vite";
const route = useRoute() // const route = useRoute() //
const message = useMessage() // const message = useMessage() //
@ -381,6 +380,7 @@ const openChatConversationUpdateForm = async () => {
*/ */
const handlerTitleSuccess = async () => { const handlerTitleSuccess = async () => {
// TODO // TODO
await getConversation(activeConversationId.value)
} }
/** /**
@ -418,9 +418,13 @@ const handlerConversationDelete = async (delConversation: ChatConversationVO) =>
/** /**
* 对话 - 获取 * 对话 - 获取
*/ */
const getConversation = async (id: string) => { const getConversation = async (id: string | null) => {
if (!id) {
return
}
const conversation: ChatConversationVO = await ChatConversationApi.getChatConversationMy(id) const conversation: ChatConversationVO = await ChatConversationApi.getChatConversationMy(id)
return conversation activeConversation.value = conversation
activeConversationId.value = conversation.id
} }
// ============ message =========== // ============ message ===========
@ -435,8 +439,7 @@ onMounted(async () => {
// TODO conversationId // TODO conversationId
if (route.query.conversationId) { if (route.query.conversationId) {
const id = route.query.conversationId as string const id = route.query.conversationId as string
activeConversationId.value = id await getConversation(id)
activeConversation.value = await getConversation(id) as ChatConversationVO
} }
// //
await getMessageList() await getMessageList()