-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
64 lines (56 loc) · 1.5 KB
/
types.ts
File metadata and controls
64 lines (56 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
export interface ABCResult {
abc: string;
thoughtSignature?: string;
thoughts?: string;
}
export interface UploadFileState {
id: string;
file: File;
preview: string;
status: 'idle' | 'uploading' | 'processing' | 'done' | 'error';
}
export interface LogEntry {
timestamp: string;
message: string;
type: 'info' | 'success' | 'warning' | 'thinking';
}
export interface GenerationState {
isLoading: boolean;
error: string | null;
result: ABCResult | null;
logs: LogEntry[];
}
export interface ValidationResult {
isValid: boolean;
errors: string[];
}
export interface UserSettings {
apiKey: string;
enabledModels: string[]; // List of model IDs that are visible
customModels: { id: string; name: string }[]; // User defined models
theme: 'light' | 'dark'; // Added theme preference
shortcuts: Record<string, string>; // Action ID -> Shortcut string (e.g., 'Ctrl+S')
}
export interface HistoryEntry {
content: string;
timestamp: number;
label: string;
}
export interface Session {
id: string;
title: string;
lastModified: number;
isOpen?: boolean; // Tracks if the session is currently open in a tab
customColor?: string; // Custom tab color (hex)
customIcon?: string; // Custom tab icon name
data: {
files: UploadFileState[];
prompt: string;
abc: string;
history: HistoryEntry[]; // History stack for Undo/Redo
historyIndex: number; // Current position in history stack
model: string;
generation: GenerationState;
thumbnail?: string;
};
}