This repository was archived by the owner on Mar 7, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 528
Expand file tree
/
Copy pathstoreConfig.ts
More file actions
94 lines (84 loc) · 2.33 KB
/
Copy pathstoreConfig.ts
File metadata and controls
94 lines (84 loc) · 2.33 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import { AgentConfig, Chat } from '@/lib/llm/types'
import { SearchProps } from './types'
export type APIInterface = 'openai' | 'anthropic' | 'ollama'
export interface LLMAPIConfig {
name: string
apiInterface: APIInterface
apiURL?: string
apiKey?: string
}
export interface LLMConfig {
modelName: string
apiName: string
contextLength?: number
}
export type LLMGenerationParameters = {
maxTokens?: number
temperature?: number
}
export type EmbeddingModelConfig = EmbeddingModelWithRepo | EmbeddingModelWithLocalPath
export type TamaguiThemeTypes = 'light' | 'dark'
export interface EmbeddingModelWithRepo {
type: 'repo'
repoName: string
description?: string
readableName?: string
}
export interface EmbeddingModelWithLocalPath {
type: 'local'
localPath: string
description?: string
readableName?: string
}
export interface StoreSchema {
hasUserOpenedAppBefore: boolean
schemaVersion: number
user: {
vaultDirectories: string[]
directoryFromPreviousSession?: string
}
LLMs: LLMConfig[]
LLMAPIs: LLMAPIConfig[]
embeddingModels: {
[modelAlias: string]: EmbeddingModelConfig
}
defaultLLM: string
defaultEmbedFuncRepo: string
llmGenerationParameters: LLMGenerationParameters
chats: {
[vaultDir: string]: Chat[]
}
agentConfigs: AgentConfig[]
analytics?: boolean
chunkSize: number
spellCheck: string
EditorFlexCenter: boolean
showDocumentStats: boolean
showFileDatesInSidebar: boolean
autoContext: boolean
tamaguiTheme: TamaguiThemeTypes
searchParams: SearchProps
}
export enum StoreKeys {
hasUserOpenedAppBefore = 'hasUserOpenedAppBefore',
Analytics = 'analytics',
SchemaVersion = 'schemaVersion',
DirectoryFromPreviousSession = 'user.directoryFromPreviousSession',
LLMs = 'LLMs',
LLMAPIs = 'LLMAPIs',
EmbeddingModels = 'embeddingModels',
DefaultLLM = 'defaultLLM',
DefaultEmbeddingModelAlias = 'defaultEmbeddingModelAlias',
MaxRAGExamples = 'RAG.maxRAGExamples',
LLMGenerationParameters = 'llmGenerationParameters',
Chats = 'chats',
AgentConfigs = 'agentConfigs',
ChunkSize = 'chunkSize',
SpellCheck = 'spellCheck',
EditorFlexCenter = 'editorFlexCenter',
showDocumentStats = 'showDocumentStats',
ShowFileDatesInSidebar = 'showFileDatesInSidebar',
AutoContext = 'autoContext',
TamaguiTheme = 'tamaguiTheme',
SearchParams = 'searchParams',
}