修复 无法清除消息的问题
Some checks failed
Build / build (push) Failing after 6s

This commit is contained in:
Twilight 2024-09-01 01:07:27 +08:00
parent 31c964a469
commit 674d929c0b
2 changed files with 2 additions and 0 deletions

View File

@ -241,6 +241,7 @@ function streamChat(streamId: String) {
const getMessages = () => {
api.ChatMessage.apiV1ChatsIdMessagesGet(chatId).then((res) => {
messages.value.data = [];
res.data.data?.forEach((message: any) => {
if (message.role === "assistant" || message.role === "user") {
messages.value.data?.push(message);

View File

@ -270,6 +270,7 @@ const getMessages = () => {
publicChatInfo.value.assistant_token,
publicChatInfo.value.guest_id,
).then((res) => {
messages.value.data = [];
res.data.data?.forEach((message: any) => {
if (message.role === "assistant" || message.role === "user") {
messages.value.data?.push(message);