51 lines
1.1 KiB
TypeScript
51 lines
1.1 KiB
TypeScript
// 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;
|
|
}
|