mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
refactor: modify markdown append message content structure to use array format
Change the message content from a plain string to an array of objects with type and text fields to support future extensibility of message formats
This commit is contained in:
parent
0017d29154
commit
f79bf06e38
@ -110,7 +110,12 @@ export const Markdown = memo(
|
||||
} else if (type === 'message' && append) {
|
||||
append({
|
||||
id: `quick-action-message-${Date.now()}`,
|
||||
content: `[Model: ${model}]\n\n[Provider: ${provider?.name}]\n\n${message}`,
|
||||
content: [
|
||||
{
|
||||
type: 'text',
|
||||
text: `[Model: ${model}]\n\n[Provider: ${provider?.name}]\n\n${message}`,
|
||||
},
|
||||
] as any,
|
||||
role: 'user',
|
||||
});
|
||||
console.log('Message appended:', message);
|
||||
@ -118,7 +123,12 @@ export const Markdown = memo(
|
||||
setChatMode('build');
|
||||
append({
|
||||
id: `quick-action-implement-${Date.now()}`,
|
||||
content: `[Model: ${model}]\n\n[Provider: ${provider?.name}]\n\n${message}`,
|
||||
content: [
|
||||
{
|
||||
type: 'text',
|
||||
text: `[Model: ${model}]\n\n[Provider: ${provider?.name}]\n\n${message}`,
|
||||
},
|
||||
] as any,
|
||||
role: 'user',
|
||||
});
|
||||
} else if (type === 'link' && typeof href === 'string') {
|
||||
|
Loading…
Reference in New Issue
Block a user