import type { Role, Status, Identifiable, Timestamped, Versionable, WithMetadata } from "./core";
import type { ContentSegment, Mention } from "./content";
import type { Attachment } from "./attachment";
export interface MessageStats {
    [key: string]: unknown;
    executionTime?: number;
    model?: string;
    planSteps?: Array<{
        completed: boolean;
        description: string;
        id: string;
    }>;
    promptTokens?: number;
    referencedFiles?: string[];
    responseTokens?: number;
    steps?: Array<{
        completed: boolean;
        description: string;
        id: string;
    }>;
    toolsUsed?: string[];
}
export interface FeedbackMessage {
    additionalComments?: string;
    ratedAt: string;
    rating: "positive" | "negative";
    reason?: string;
}
export interface ErrorMessage {
    code?: string;
    message: string;
    retryable?: boolean;
    timestamp: string;
}
export interface RetryConfig {
    currentRetry: number;
    lastAttempt?: string;
    maxRetries: number;
}
export interface BaseMessage extends Identifiable, Timestamped {
    content: string;
    role: Role;
    status: Status;
}
export interface StreamableMessage {
    abortController?: AbortController;
    isStreaming: boolean;
}
export interface ChatMessage extends BaseMessage, Versionable, WithMetadata<MessageStats>, Partial<StreamableMessage> {
    attachments?: Attachment[];
    childMessageIds?: string[];
    contentSegments?: ContentSegment[];
    contentType?: string;
    error?: ErrorMessage;
    feedback?: FeedbackMessage;
    height?: number;
    lastUpdatedBy?: string;
    maxRetries?: number;
    mentions?: Mention[];
    parentMessageId?: string;
    ratedAt?: string;
    rating?: "positive" | "negative" | null;
    retry?: RetryConfig;
    retryCount?: number;
    segments?: ContentSegment[];
    timestamp?: string;
}
