File size: 546 Bytes
3c9f03f
a8e1cb0
3ba9c0c
 
3c9f03f
 
 
 
 
 
 
3ba9c0c
 
 
3c9f03f
 
 
 
 
 
 
 
 
 
 
a8e1cb0
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { type Message } from 'ai';
import { CreateMessage } from 'ai/react/dist';

export interface Chat extends Record<string, any> {
	id: string;
	title: string;
	createdAt: Date;
	userId: string;
	path: string;
	messages: Message[];
	sharePath?: string;
}

export type ServerActionResult<Result> = Promise<
	| Result
	| {
			error: string;
	  }
>;

export type DatasetImageEntity = {
	url: string;
	selected: boolean;
	name: string;
};

export type MessageWithSelectedDataset = (Message | CreateMessage) & {
	dataset: DatasetImageEntity[];
};