-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
44 lines (35 loc) · 1.16 KB
/
types.ts
File metadata and controls
44 lines (35 loc) · 1.16 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
export interface CodeFile {
fileName: string; // This will now be a relative path
code: string;
}
export type ModalType = 'none' | 'confirm' | 'settings' | 'rename' | 'newFile' | 'newFolder' | 'confirmDelete' | 'confirmClose';
// Specific context types for each modal
export type NewNodeModalContext = { path?: string };
export type RenameModalContext = { path: string; isFolder: boolean; initialValue: string };
export type ConfirmDeleteModalContext = { paths: Set<string> };
export type GenericConfirmModalContext = { title: string; message: string; onConfirm: () => void; };
export type ModalContext =
| NewNodeModalContext
| RenameModalContext
| ConfirmDeleteModalContext
| GenericConfirmModalContext
| null; // for modals that don't need context
// --- File System Types ---
export interface FileNode {
type: 'file';
name: string;
path: string;
}
export interface FolderNode {
type: 'folder';
name: string;
path: string;
children: TreeNode[];
}
export type TreeNode = FileNode | FolderNode;
// --- AI Provider Types ---
export type AiProvider = 'gemini' | 'chatgpt' | 'ollama';
export interface OllamaConfig {
url: string;
model: string;
}