mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-25 17:56:12 +00:00
22 lines
408 B
TypeScript
22 lines
408 B
TypeScript
// Client messages match the format used by the Nut protocol.
|
|
|
|
type MessageRole = 'user' | 'assistant';
|
|
|
|
interface MessageBase {
|
|
id: string;
|
|
role: MessageRole;
|
|
repositoryId?: string;
|
|
}
|
|
|
|
interface MessageText extends MessageBase {
|
|
type: 'text';
|
|
content: string;
|
|
}
|
|
|
|
interface MessageImage extends MessageBase {
|
|
type: 'image';
|
|
dataURL: string;
|
|
}
|
|
|
|
export type Message = MessageText | MessageImage;
|