From 3829a3ef928947d90e6014abb2383c71c86f960b Mon Sep 17 00:00:00 2001 From: Peanut Date: Mon, 29 Jun 2026 23:36:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20createMessage=20=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=90=8D=E6=94=B9=E4=B8=BA=20senderType/contentType=20?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E5=90=8E=E7=AB=AF=20DTO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mini-program/src/pages/main/ScriptView.vue | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/mini-program/src/pages/main/ScriptView.vue b/mini-program/src/pages/main/ScriptView.vue index 198cf63..73c9cd0 100644 --- a/mini-program/src/pages/main/ScriptView.vue +++ b/mini-program/src/pages/main/ScriptView.vue @@ -709,8 +709,8 @@ const initializeFirstAIMessage = async () => { await createMessage({ conversationId: conversationId.value, content: theme, - sender: 'user', - type: 'chat' + senderType: 'user', + contentType: 'chat' }) } @@ -718,9 +718,8 @@ const initializeFirstAIMessage = async () => { await createMessage({ conversationId: conversationId.value, content, - sender: 'assistant', - type: 'script', - metadata: JSON.stringify(currentResult.value?.plotJson || {}), + senderType: 'assistant', + contentType: 'script', versionNumber: 1 }) } catch (error) { @@ -798,8 +797,8 @@ const sendChat = async () => { const userMessageRes = await createMessage({ conversationId: conversationId.value, content, - sender: 'user', - type: 'chat' + senderType: 'user', + contentType: 'chat' }) const userMessageId = userMessageRes.data?.id @@ -849,8 +848,8 @@ const sendRewrite = async (targetMessageId, content) => { const userMessageRes = await createMessage({ conversationId: conversationId.value, content, - sender: 'user', - type: 'chat' + senderType: 'user', + contentType: 'chat' }) const userMessageId = userMessageRes.data?.id