// AI 관련 타입 정의 export interface CellStyle { backgroundColor?: string; fontWeight?: "bold" | "normal"; color?: string; fontSize?: number; textAlign?: "left" | "center" | "right"; border?: string; } export type AIAction = | { type: "formula"; range: string; formula: string } | { type: "style"; range: string; style: CellStyle } | { type: "chart"; range: string; chartType: "bar" | "line" | "pie"; title: string; } | { type: "value"; range: string; value: string | number } | { type: "sort"; range: string; column: string; order: "asc" | "desc" } | { type: "filter"; range: string; condition: string }; export interface AiRequest { prompt: string; range: string; sheetName: string; preview?: string[][]; context?: { selectedCells?: string; sheetData?: any; }; } export interface AiResponse { actions: AIAction[]; explanation?: string; success: boolean; error?: string; } export interface AIHistory { id: string; timestamp: Date; prompt: string; actions: AIAction[]; success: boolean; error?: string; } // 히스토리 관련 타입 추가 export interface HistoryEntry { id: string; timestamp: Date; prompt: string; range: string; sheetName: string; actions: AIAction[]; status: "success" | "error" | "pending"; error?: string; } export interface HistoryPanelProps { isOpen: boolean; onClose: () => void; history: HistoryEntry[]; onReapply?: (entry: HistoryEntry) => void; onClear?: () => void; }