From 707612cfd76b9332f31d0eb915e889220f13fa5d Mon Sep 17 00:00:00 2001 From: wsp Date: Thu, 30 Jul 2026 10:19:30 +0800 Subject: [PATCH] chore: remove Flow Chat diagnostics setting entry - Remove the Flow Chat viewport diagnostics toggle from basic logging settings - Remove unused logging preference state and localized copy - Preserve internal diagnostics configuration support --- .../config/components/BasicsConfig.tsx | 39 +------------------ .../src/locales/en-US/settings/basics.json | 5 --- .../src/locales/zh-CN/settings/basics.json | 5 --- .../src/locales/zh-TW/settings/basics.json | 5 --- 4 files changed, 1 insertion(+), 53 deletions(-) diff --git a/src/web-ui/src/infrastructure/config/components/BasicsConfig.tsx b/src/web-ui/src/infrastructure/config/components/BasicsConfig.tsx index ba47a214af..6b76af59a2 100644 --- a/src/web-ui/src/infrastructure/config/components/BasicsConfig.tsx +++ b/src/web-ui/src/infrastructure/config/components/BasicsConfig.tsx @@ -338,7 +338,6 @@ function BasicsLoggingSection() { const { t } = useTranslation('settings/basics'); const [configLevel, setConfigLevel] = useState('info'); const [includeSensitiveDiagnostics, setIncludeSensitiveDiagnostics] = useState(true); - const [flowChatDiagnostics, setFlowChatDiagnostics] = useState(false); const [runtimeInfo, setRuntimeInfo] = useState(null); const [loading, setLoading] = useState(true); const [saving, setSaving] = useState(false); @@ -367,16 +366,14 @@ function BasicsLoggingSection() { try { setLoading(true); - const [savedLevel, savedIncludeSensitiveDiagnostics, savedFlowChatDiagnostics, info] = await Promise.all([ + const [savedLevel, savedIncludeSensitiveDiagnostics, info] = await Promise.all([ configManager.getConfig('app.logging.level'), configManager.getConfig('app.logging.include_sensitive_diagnostics'), - configManager.getConfig('app.logging.flow_chat_diagnostics'), configAPI.getRuntimeLoggingInfo(), ]); setConfigLevel(savedLevel || info.effectiveLevel || 'info'); setIncludeSensitiveDiagnostics(savedIncludeSensitiveDiagnostics ?? true); - setFlowChatDiagnostics(savedFlowChatDiagnostics ?? false); setRuntimeInfo(info); } catch (error) { log.error('Failed to load logging config', error); @@ -436,27 +433,6 @@ function BasicsLoggingSection() { [includeSensitiveDiagnostics, showMessage, t] ); - const handleFlowChatDiagnosticsChange = useCallback( - async (checked: boolean) => { - const previousValue = flowChatDiagnostics; - setFlowChatDiagnostics(checked); - setSaving(true); - - try { - await configManager.setConfig('app.logging.flow_chat_diagnostics', checked); - configManager.clearCache(); - showMessage('success', t('logging.messages.flowChatDiagnosticsUpdated')); - } catch (error) { - setFlowChatDiagnostics(previousValue); - log.error('Failed to update Flow Chat diagnostics preference', { checked, error }); - showMessage('error', t('logging.messages.saveFailed')); - } finally { - setSaving(false); - } - }, - [flowChatDiagnostics, showMessage, t] - ); - const handleOpenFolder = useCallback(async () => { const folder = runtimeInfo?.sessionLogDir; if (!folder) { @@ -545,19 +521,6 @@ function BasicsLoggingSection() { disabled={saving} /> - - { - void handleFlowChatDiagnosticsChange(e.target.checked); - }} - disabled={saving} - /> -