mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-03-09 21:50:36 +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()}`,
|
id: `1-${new Date().getTime()}`,
|
||||||
role: 'user',
|
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()}`,
|
id: `2-${new Date().getTime()}`,
|
||||||
@ -338,6 +347,15 @@ export const ChatImpl = memo(
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
reload();
|
reload();
|
||||||
|
setInput('');
|
||||||
|
Cookies.remove(PROMPT_COOKIE_KEY);
|
||||||
|
|
||||||
|
setUploadedFiles([]);
|
||||||
|
setImageDataList([]);
|
||||||
|
|
||||||
|
resetEnhancer();
|
||||||
|
|
||||||
|
textareaRef.current?.blur();
|
||||||
setFakeLoading(false);
|
setFakeLoading(false);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -364,6 +382,15 @@ export const ChatImpl = memo(
|
|||||||
]);
|
]);
|
||||||
reload();
|
reload();
|
||||||
setFakeLoading(false);
|
setFakeLoading(false);
|
||||||
|
setInput('');
|
||||||
|
Cookies.remove(PROMPT_COOKIE_KEY);
|
||||||
|
|
||||||
|
setUploadedFiles([]);
|
||||||
|
setImageDataList([]);
|
||||||
|
|
||||||
|
resetEnhancer();
|
||||||
|
|
||||||
|
textareaRef.current?.blur();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user