spb/chat-spboucher-ai
Public
1import type { Part } from "@/lib/ai/types";2export type { AIModel, Part } from "@/lib/ai/types";3export type { RoutingMode } from "@/lib/ai/router";45export interface ConversationDTO {6 id: string; project_id: string | null; title: string; model_id: string | null; settings: Record<string, unknown>; pinned: boolean; archived_at: string | null;7 parent_id: string | null; mode: string; message_count: number; total_cost_usd: number; last_message_at: string | null; created_at: string; updated_at: string; project_name?: string | null;8}9export interface MessageDTO {10 id: string; conversation_id: string; parent_id: string | null; role: "user" | "assistant" | "system" | "tool"; parts: Part[]; text: string; model_id: string | null; provider: string | null;11 settings: Record<string, unknown> | null; routing: { mode?: string; selected?: string; reason?: string; servedBy?: string } | null; usage: { input: number; output: number; cached?: number; reasoning?: number } | null;12 cost_usd: number | null; latency_ms: number | null; ttft_ms: number | null; status: string; error: string | null; active: boolean; created_at: string;13}14export interface ProjectDTO { id: string; name: string; description: string | null; instructions: string | null; default_model: string | null; color: string | null; icon: string | null; notes: string | null; tool_permissions: Record<string, unknown>; conversation_count?: number; file_count?: number; created_at: string; archived_at: string | null }15export interface AttachmentDTO { id: string; filename: string; mime: string; size_bytes?: number; size?: number; kind?: string; page_count?: number | null; pages?: number | null; message_id?: string | null }16export interface ArtifactDTO { id: string; root_id: string; version: number; type: string; language: string | null; title: string; saved: boolean; message_id: string | null; content?: string; created_at: string }17export interface MemoryDTO { id: string; category: string; content: string; source: string; status: "candidate" | "active" | "disabled"; project_id: string | null; source_conversation_id: string | null; source_title?: string | null; use_count: number; created_at: string; updated_at: string }1819export interface ChatSendOptions { modelId?: string; routingMode?: RoutingModeT; settings?: { effort?: "low" | "medium" | "high" | "xhigh" | "max"; maxOutputTokens?: number; temperature?: number; reasoningSummary?: boolean }; toolsEnabled?: boolean; toolNames?: string[]; attachmentIds?: string[]; projectId?: string | null }20type RoutingModeT = "manual" | "fast" | "quality" | "economy" | "auto";21