mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-04-26 07:26:46 +00:00
feat(settings): add silent startup to tray
This commit is contained in:
@@ -15,6 +15,7 @@ export const CONFIG_KEYS = {
|
||||
WINDOW_BOUNDS: 'windowBounds',
|
||||
CACHE_PATH: 'cachePath',
|
||||
LAUNCH_AT_STARTUP: 'launchAtStartup',
|
||||
SILENT_STARTUP: 'silentStartup',
|
||||
|
||||
EXPORT_PATH: 'exportPath',
|
||||
AGREEMENT_ACCEPTED: 'agreementAccepted',
|
||||
@@ -321,6 +322,17 @@ export async function setLaunchAtStartup(enabled: boolean): Promise<void> {
|
||||
await config.set(CONFIG_KEYS.LAUNCH_AT_STARTUP, enabled)
|
||||
}
|
||||
|
||||
// 获取静默启动偏好
|
||||
export async function getSilentStartup(): Promise<boolean> {
|
||||
const value = await config.get(CONFIG_KEYS.SILENT_STARTUP)
|
||||
return value === true
|
||||
}
|
||||
|
||||
// 设置静默启动偏好
|
||||
export async function setSilentStartup(enabled: boolean): Promise<void> {
|
||||
await config.set(CONFIG_KEYS.SILENT_STARTUP, enabled)
|
||||
}
|
||||
|
||||
// 获取 LLM 模型路径
|
||||
export async function getLlmModelPath(): Promise<string | null> {
|
||||
const value = await config.get(CONFIG_KEYS.LLM_MODEL_PATH)
|
||||
|
||||
Reference in New Issue
Block a user