diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 0000000..e5a3967 --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,57 @@ +// 模型类型 +export interface Model { + id: string; + name: string; + tag: string; +} + +// 工具类型 +export interface Tool { + id: string; + name: string; + icon: string; + enabled: boolean; +} + +// 聊天记录类型 +export interface ChatHistory { + id: string; + title: string; + createdAt: Date; + updatedAt: Date; +} + +// 消息类型 +export interface Message { + id: string; + role: 'user' | 'assistant'; + content: string; + timestamp: Date; +} + +// 用户类型 +export interface User { + id: string; + email: string; + name: string; + plan: 'free' | 'pro' | 'enterprise'; + avatar?: string; +} + +// 设置类型 +export interface Settings { + defaultModel: string; + theme: 'light' | 'dark' | 'system'; + language: string; + webSearchEnabled: boolean; + codeExecutionEnabled: boolean; + chatHistoryEnabled: boolean; +} + +// 快捷操作类型 +export interface QuickAction { + id: string; + label: string; + icon: string; + prompt?: string; +}