/** * Paste-detection heuristics for the AIInput pasteAsFile feature. * Pure module — no React, no DOM, no I/O. */ export type PasteKind = 'json' | 'xml' | 'csv' | 'log' | 'code' | 'text'; export interface DetectionOpts { /** Char count above which plain text always converts. Default: 500 */ charThreshold?: number; /** Line count above which plain text always converts. Default: 10 */ lineThreshold?: number; /** Run structured-content heuristics. Default: true */ detectStructured?: boolean; } export interface PasteAnalysis { shouldConvert: boolean; kind: PasteKind; } export declare const KIND_TO_FILE: Readonly>; export declare function mapKindToFile(kind: PasteKind): { ext: string; mime: string; }; /** * Single-pass paste analysis: splits lines once, runs each detector at most once. * Used by the hook to avoid the duplicate work of calling shouldConvertPaste * and detectPasteKind separately. */ export declare function analyzePaste(text: string, opts?: DetectionOpts): PasteAnalysis; /** * Decide whether the pasted text should convert to a file attachment. * Thin wrapper over analyzePaste — kept for the public API and consumers * who only need the boolean. */ export declare function shouldConvertPaste(text: string, opts?: DetectionOpts): boolean; /** * Classify the paste kind. Returns 'text' when detection is disabled or the * text exceeds STRUCTURED_DETECTION_MAX (parse cost guard). */ export declare function detectPasteKind(text: string, opts?: DetectionOpts): PasteKind;