- T-008 태스크 완료: 히스토리 패널 UI 마크업 구현 (슬라이드 인) - 히스토리, UNDO, 전송하기 버튼을 세로로 균등 간격 배치 - Tailwind CSS v3/v4 버전 충돌 문제 해결 - v4 패키지 완전 제거 (@tailwindcss/postcss 등) - PostCSS 설정을 v3 방식으로 수정 - CSS 파일에서 수동 클래스 정의 제거 - Vite 캐시 완전 삭제로 설정 변경 반영 - 히스토리 패널 기능 개선 - 우측 슬라이드 인 애니메이션 - 파일 업로드 시에만 표시 - 상태별 아이콘과 시간순 로그 리스트 - 재적용 및 전체 삭제 기능 - 새로운 rule 파일 생성: tailwind-css-management.mdc
71 lines
1.5 KiB
TypeScript
71 lines
1.5 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;
|
|
}
|
|
|
|
// 히스토리 관련 타입 추가
|
|
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;
|
|
}
|