import { Chat, Message } from '@prisma/client'; import { type Message as MessageAI } from 'ai'; export type ChatWithMessages = Chat & { messages: Message[] }; export type MessageUserInput = Pick; export type MessageAssistantResponse = { result?: PrismaJson.FinalCodeBody; response: string; responseBody: PrismaJson.AgentResponseBodies; }; export type MessageUI = Pick; export interface SignedPayload { id: string; publicUrl: string; signedUrl: string; fields: Record; } export interface ErrorPayload { name: string; value: string; traceback_raw: string[]; } export type ResultPayload = { logs: { stderr: string[]; stdout: string[]; }; results: Array<{ png?: string; mp4?: string; text: string; is_main_result: boolean; }>; error?: ErrorPayload; };