diff --git a/src/model/ChatModel.js b/src/model/ChatModel.js index 902aede..a16f162 100644 --- a/src/model/ChatModel.js +++ b/src/model/ChatModel.js @@ -7,13 +7,6 @@ export const MessageRole = { OTHER: "OTHER", }; -export const MessageType = { - // 文本消息 - TEXT: "TEXT", - // 图片消息 - IMAGE: "IMAGE", -}; - /// 组件的名称 export const CompName = { // 快速预定卡片 diff --git a/src/pages/index/components/chat/ChatMainList/index.vue b/src/pages/index/components/chat/ChatMainList/index.vue index f15a943..c39476e 100644 --- a/src/pages/index/components/chat/ChatMainList/index.vue +++ b/src/pages/index/components/chat/ChatMainList/index.vue @@ -82,7 +82,7 @@ import { NOTICE_EVENT_LOGOUT, NOTICE_EVENT_LOGIN_SUCCESS, } from "@/constant/constant"; -import { MessageRole, MessageType, CompName } from "@/model/ChatModel"; +import { MessageRole, CompName } from "@/model/ChatModel"; import ChatTopWelcome from "../ChatTopWelcome/index.vue"; import ChatTopNavBar from "../ChatTopNavBar/index.vue"; import ChatCardAI from "../ChatCardAi/index.vue"; @@ -608,10 +608,6 @@ const sendMessage = async (message, isInstruct = false) => { msgId: `msg_${chatMsgList.value.length}`, msgType: MessageRole.ME, msg: message, - msgContent: { - type: MessageType.TEXT, - text: message, - }, }; chatMsgList.value.push(newMsg); inputMessage.value = ""; @@ -744,10 +740,6 @@ const sendChat = async (message, isInstruct = false) => { msgType: MessageRole.AI, msg: "加载中", isLoading: true, - msgContent: { - type: MessageType.TEXT, - url: "", - }, messageId: currentSessionMessageId, }; chatMsgList.value.push(aiMsg);