feat: 프로젝트 초기 설정 완료 - Vite + React + TypeScript, TailwindCSS + ShadCN UI, Zustand, 기본 타입 및 컴포넌트 구현
This commit is contained in:
50
src/types/ai.ts
Normal file
50
src/types/ai.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
// 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;
|
||||
}
|
||||
Reference in New Issue
Block a user