diff --git a/app/components/chat/Chat.client.tsx b/app/components/chat/Chat.client.tsx index c08dd6d8..8ac5d286 100644 --- a/app/components/chat/Chat.client.tsx +++ b/app/components/chat/Chat.client.tsx @@ -323,7 +323,16 @@ export const ChatImpl = memo( { id: `1-${new Date().getTime()}`, role: 'user', - content: messageContent, + content: [ + { + type: 'text', + text: `[Model: ${model}]\n\n[Provider: ${provider.name}]\n\n${messageContent}`, + }, + ...imageDataList.map((imageData) => ({ + type: 'image', + image: imageData, + })), + ] as any, }, { id: `2-${new Date().getTime()}`, @@ -338,6 +347,15 @@ export const ChatImpl = memo( }, ]); reload(); + setInput(''); + Cookies.remove(PROMPT_COOKIE_KEY); + + setUploadedFiles([]); + setImageDataList([]); + + resetEnhancer(); + + textareaRef.current?.blur(); setFakeLoading(false); return; @@ -364,6 +382,15 @@ export const ChatImpl = memo( ]); reload(); setFakeLoading(false); + setInput(''); + Cookies.remove(PROMPT_COOKIE_KEY); + + setUploadedFiles([]); + setImageDataList([]); + + resetEnhancer(); + + textareaRef.current?.blur(); return; }