新增: 设置页 UX 重构(master-detail 左导航 + 搜索 + 即时反馈 + 导入导出)

- SettingsNav 左导航 7 类 + 顶部搜索(索引匹配 label/desc 高亮定位)
- GeneralPanel 拆分 Appearance/Performance/Advanced Section
- SettingRow 统一行 + 即时反馈(已保存)+ 下轮生效 badge
- 统一组件库 settings.css(scoped 重复 class 抽全局)
- 导入导出(默认排除 keyring 密钥)
- activeCategory 持久化 + 窄屏折叠 tab
This commit is contained in:
2026-06-21 20:50:44 +08:00
parent 4b5da38e28
commit 330bb7f505
17 changed files with 1539 additions and 606 deletions

View File

@@ -3,6 +3,25 @@ export default {
// ===== Page title =====
title: '⚙️ Settings',
// ===== Left nav categories (phase 3 master-detail) =====
navAppearance: 'Appearance',
navAiModel: 'AI Models',
navKnowledge: 'Knowledge',
navPerformance: 'Performance',
navSecurity: 'Security',
navAdvanced: 'Advanced',
// ===== Settings search (phase 4) =====
searchPlaceholder: 'Search settings…',
searchNoResult: 'No results',
// ===== Instant feedback (phase 5 SettingRow) =====
savedHint: '✓ Saved',
nextRoundBadge: 'Next message',
// ===== Connection mgmt (phase 7: experimental badge, not wired to AI yet) =====
experimentalBadge: 'Experimental · not wired to AI tools',
// ===== AI Provider panel =====
panelAiProvider: '🤖 AI Model Config',
addProvider: '+ Add Provider',
@@ -73,6 +92,10 @@ export default {
// ===== General settings panel =====
panelGeneral: '🎨 General',
// 阶段2 UX 重构:GeneralPanel 拆 3 Section 后各 Section 标题
sectionAppearance: '🎨 Appearance',
sectionPerformance: '⚡ Performance',
sectionAdvanced: '⚙️ Advanced',
labelTheme: 'Theme',
descTheme: 'Dark / light',
themeDark: '🌙 Dark',
@@ -97,6 +120,9 @@ export default {
labelShowTokenUsage: 'Show token usage',
descShowTokenUsage: 'Show token consumption of each reply in conversations',
labelStreamingMd: 'Streaming Markdown rendering',
descStreamingMd: 'Render code blocks/lists/headings during streaming (unclosed code blocks degrade to plain text to avoid flicker); when off, only plain text is shown during streaming and full formatting applies after generation completes',
labelGlobalConcurrency: 'Global max concurrency',
descGlobalConcurrency: 'Shared cap on simultaneous LLM requests across all conversations',
@@ -104,7 +130,8 @@ export default {
descPerConvConcurrency: 'Concurrent LLM calls within one conversation (main loop / title / distill shared)',
labelAgentMaxIterations: 'Agent max iterations',
descAgentMaxIterations: 'Max rounds of the agentic loop (stream → tool → feedback) (1-50, default 10); changes take effect on the next message',
descAgentMaxIterations: 'Max rounds of the agentic loop (stream → tool → feedback) (0=unlimited, 1-50, default 10); changes take effect on the next message',
labelUnlimited: 'Unlimited',
labelAgentMaxRetries: 'Stream failure retries',
descAgentMaxRetries: 'Auto-retry count on stream failure (0-10, default 3); only retries pre-stream failures (no token output yet); mid-stream failures are abandoned',
@@ -131,12 +158,9 @@ export default {
labelTriggerMode: 'Distill trigger',
descTriggerMode: 'When auto-distillation is triggered',
triggerOnComplete: 'On conversation complete',
triggerOnIdle: 'On conversation idle',
triggerManualOnly: 'Manual only',
labelMinMessages: 'Min message count',
descMinMessages: 'Distillation triggers only after this many messages (filters out small talk noise)',
labelIdleTimeout: 'Idle timeout (s)',
descIdleTimeout: 'Seconds to wait in idle-trigger mode',
labelAutoInject: 'Auto-inject related knowledge',
descAutoInject: 'Retrieve related knowledge and inject it into the conversation context during chat',
labelVectorEnabled: 'Semantic retrieval (vector)',
@@ -159,6 +183,18 @@ export default {
toastSetDefaultFail: 'Failed to set default: {msg}',
toastConnIncomplete: 'Please fill in Name and Host',
// ===== Import / Export (phase 6) =====
export: 'Export',
import: 'Import',
exportHint: 'Export all preferences (appSettings + knowledge config) as a JSON file',
importHint: 'Import from a JSON file and overwrite current preferences',
importConfirm: 'Importing will overwrite all current preferences (appearance / performance / knowledge, etc.). Continue?',
importSuccess: 'Imported successfully (some items like concurrency / iterations take effect after restart or next message)',
importFail: 'Import failed: {msg}',
exportFail: 'Export failed: {msg}',
importInvalidJson: 'The file is not a valid DevFlow settings backup (wrong format)',
importScopeNote: 'Scope: appSettings + knowledge config (no provider keys)',
// ===== Confirm dialogs =====
confirmDeleteProvider: 'Delete provider "{name}"? This cannot be undone.',
confirmDeleteConn: 'Delete connection "{name}"?',

View File

@@ -3,6 +3,25 @@ export default {
// ===== 页面标题 =====
title: '⚙️ 设置',
// ===== 左导航分类(阶段3 master-detail) =====
navAppearance: '外观',
navAiModel: 'AI 模型',
navKnowledge: '知识库',
navPerformance: '性能',
navSecurity: '安全',
navAdvanced: '高级',
// ===== 设置搜索(阶段4) =====
searchPlaceholder: '搜索设置项…',
searchNoResult: '无结果',
// ===== 即时生效反馈(阶段5 SettingRow) =====
savedHint: '✓ 已保存',
nextRoundBadge: '下次对话生效',
// ===== 连接管理(阶段7:实验功能 badge 明示暂未接入 AI) =====
experimentalBadge: '实验功能·暂未接入 AI 工具',
// ===== AI 模型配置面板 =====
panelAiProvider: '🤖 AI 模型配置',
addProvider: '+ 添加 Provider',
@@ -73,6 +92,10 @@ export default {
// ===== 通用设置面板 =====
panelGeneral: '🎨 通用设置',
// 阶段2 UX 重构:GeneralPanel 拆 3 Section 后各 Section 标题
sectionAppearance: '🎨 外观',
sectionPerformance: '⚡ 性能',
sectionAdvanced: '⚙️ 高级',
labelTheme: '主题',
descTheme: '深色 / 浅色模式',
themeDark: '🌙 深色模式',
@@ -97,6 +120,9 @@ export default {
labelShowTokenUsage: '显示 Token 用量',
descShowTokenUsage: '在对话中展示每次回复的 token 消耗',
labelStreamingMd: '流式 Markdown 渲染',
descStreamingMd: '流式生成过程中渲染代码块/列表/标题格式(未闭合代码块降级纯文本防闪烁);关闭后流式期间仅显纯文本,生成完成后才渲染完整格式',
labelGlobalConcurrency: '全局最大并发',
descGlobalConcurrency: '所有对话共享的 LLM 同时请求数上限',
@@ -104,7 +130,8 @@ export default {
descPerConvConcurrency: '单个对话内同时进行的 LLM 调用数(主循环 / 标题 / 提炼共享)',
labelAgentMaxIterations: 'Agent 最大轮次',
descAgentMaxIterations: 'Agentic 循环流式→工具→回传的最大轮次1-50默认 10热改下次发消息生效',
descAgentMaxIterations: 'Agentic 循环(流式→工具→回传)的最大轮次(0=不限,1-50默认 10热改下次发消息生效',
labelUnlimited: '不限',
labelAgentMaxRetries: '流式失败重试次数',
descAgentMaxRetries: '流式对话失败时自动重试次数0-10默认 3只重试未输出任何 token 的流前失败,已输出文本的失败直接放弃',
@@ -131,12 +158,9 @@ export default {
labelTriggerMode: '提炼触发方式',
descTriggerMode: '自动提炼的触发时机',
triggerOnComplete: '对话完成后',
triggerOnIdle: '对话闲置后',
triggerManualOnly: '仅手动',
labelMinMessages: '最少消息数',
descMinMessages: '对话达到此消息数才触发提炼(防闲聊噪音)',
labelIdleTimeout: '闲置超时(秒)',
descIdleTimeout: '闲置触发模式下等待的秒数',
labelAutoInject: '自动注入相关知识',
descAutoInject: '聊天时自动检索相关知识注入对话上下文',
labelVectorEnabled: '语义检索(向量)',
@@ -159,6 +183,18 @@ export default {
toastSetDefaultFail: '设置默认失败:{msg}',
toastConnIncomplete: '请填写名称和 Host',
// ===== 导入 / 导出(阶段6) =====
export: '导出',
import: '导入',
exportHint: '导出全部偏好(appSettings + 知识库配置)为 JSON 文件',
importHint: '从 JSON 文件导入并覆盖当前偏好',
importConfirm: '导入将覆盖当前的全部偏好设置(外观 / 性能 / 知识库等),确定继续?',
importSuccess: '导入成功(部分项如并发 / 轮次需重启或下次对话生效)',
importFail: '导入失败:{msg}',
exportFail: '导出失败:{msg}',
importInvalidJson: '文件不是有效的 DevFlow 设置备份(格式不符)',
importScopeNote: '范围:appSettings + 知识库配置(不含 Provider 密钥)',
// ===== 确认弹层 =====
confirmDeleteProvider: '确定删除提供商「{name}」?该操作不可恢复。',
confirmDeleteConn: '确定删除连接「{name}」?',