mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-03-09 13:41:00 +00:00
fix: attachment not getting sent on first message if starter template is turned on (#1472)
This commit is contained in:
parent
cd4a5e8380
commit
7ff48e1d45
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user