feat: 选择会话的前端界面

This commit is contained in:
H3CoF6
2026-04-29 08:07:16 +08:00
parent 32feac7d5e
commit b1807b21e7
6 changed files with 209 additions and 96 deletions

View File

@@ -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)
}