Files
ai-app-skg/types.ts
2025-12-23 16:23:56 +08:00

57 lines
1.1 KiB
TypeScript

export enum AppLanguage {
EN = 'en',
ZH_CN = 'zh-CN',
ZH_TW = 'zh-TW',
JA = 'ja'
}
export enum ChatMode {
STANDARD = 'standard', // Flash + Search
DEEP = 'deep', // Pro + Thinking
FAST = 'fast' // Flash Lite
}
export enum ChatScenario {
GENERAL = 'general',
READING = 'reading',
CONCEPT = 'concept',
RESEARCH = 'research'
}
export interface Message {
id: string;
role: 'user' | 'model';
content: string;
timestamp: number;
attachments?: Attachment[];
isThinking?: boolean; // If true, show thinking UI
groundingMetadata?: GroundingMetadata;
}
export interface GroundingMetadata {
searchEntryPoint?: { renderedContent: string };
groundingChunks?: Array<{
web?: { uri: string; title: string };
}>;
}
export interface Attachment {
type: 'image' | 'audio' | 'video';
mimeType: string;
data: string; // Base64
name?: string;
}
export interface UserSettings {
language: AppLanguage;
theme: 'light' | 'dark';
}
export interface ChatSession {
id: string;
title: string;
messages: Message[];
mode: ChatMode;
scenario?: ChatScenario;
createdAt: number;
}