23 lines
447 B
TypeScript

export type MessageRole = "user" | "assistant";
export type Message = Readonly<{
id: string;
role: MessageRole;
content: string;
createdAt: string;
}>;
export type Conversation = Readonly<{
id: string;
projectId: null;
title: string;
messages: readonly Message[];
createdAt: string;
updatedAt: string;
}>;
export type ConversationSummary = Pick<
Conversation,
"id" | "projectId" | "title" | "createdAt" | "updatedAt"
>;