mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 07:16:51 +00:00
测试版本,添加了模拟好友并优化了本地缓存
This commit is contained in:
@@ -15,6 +15,7 @@ export const CONFIG_KEYS = {
|
||||
AGREEMENT_ACCEPTED: 'agreementAccepted',
|
||||
LOG_ENABLED: 'logEnabled',
|
||||
ONBOARDING_DONE: 'onboardingDone',
|
||||
LLM_MODEL_PATH: 'llmModelPath',
|
||||
IMAGE_XOR_KEY: 'imageXorKey',
|
||||
IMAGE_AES_KEY: 'imageAesKey'
|
||||
} as const
|
||||
@@ -132,6 +133,17 @@ export async function setLogEnabled(enabled: boolean): Promise<void> {
|
||||
await config.set(CONFIG_KEYS.LOG_ENABLED, enabled)
|
||||
}
|
||||
|
||||
// 获取 LLM 模型路径
|
||||
export async function getLlmModelPath(): Promise<string | null> {
|
||||
const value = await config.get(CONFIG_KEYS.LLM_MODEL_PATH)
|
||||
return (value as string) || null
|
||||
}
|
||||
|
||||
// 设置 LLM 模型路径
|
||||
export async function setLlmModelPath(path: string): Promise<void> {
|
||||
await config.set(CONFIG_KEYS.LLM_MODEL_PATH, path)
|
||||
}
|
||||
|
||||
// 清除所有配置
|
||||
export async function clearConfig(): Promise<void> {
|
||||
await config.clear()
|
||||
|
||||
Reference in New Issue
Block a user