mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-05-01 15:09:29 +00:00
feat: 选择会话的前端界面
This commit is contained in:
@@ -120,7 +120,8 @@ export const CONFIG_KEYS = {
|
||||
AI_FOOTPRINT_ENABLED: 'aiFootprintEnabled',
|
||||
AI_FOOTPRINT_SYSTEM_PROMPT: 'aiFootprintSystemPrompt',
|
||||
AI_INSIGHT_DEBUG_LOG_ENABLED: 'aiInsightDebugLogEnabled',
|
||||
AUTO_DOWNLOAD_HIGH_RES: 'autoDownloadHighRes'
|
||||
AUTO_DOWNLOAD_HIGH_RES: 'autoDownloadHighRes',
|
||||
AUTO_DOWNLOAD_WHITELIST: 'autoDownloadWhitelist'
|
||||
} as const
|
||||
|
||||
export interface WxidConfig {
|
||||
@@ -2157,3 +2158,13 @@ export async function setAutoDownloadHighRes(enabled: boolean): Promise<void> {
|
||||
await config.set(CONFIG_KEYS.AUTO_DOWNLOAD_HIGH_RES, enabled)
|
||||
}
|
||||
|
||||
export async function getAutoDownloadWhitelist(): Promise<string[]> {
|
||||
const value = await config.get(CONFIG_KEYS.AUTO_DOWNLOAD_WHITELIST)
|
||||
return Array.isArray(value) ? value : []
|
||||
}
|
||||
|
||||
export async function setAutoDownloadWhitelist(list: string[]): Promise<void> {
|
||||
const normalized = Array.from(new Set((list || []).map(item => String(item || '').trim()).filter(Boolean)))
|
||||
await config.set(CONFIG_KEYS.AUTO_DOWNLOAD_WHITELIST, normalized)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user