From 250dd53c975ae376b4953dafeaa2a9f125cb5a84 Mon Sep 17 00:00:00 2001 From: icarus Date: Fri, 22 Aug 2025 14:01:28 +0800 Subject: [PATCH] =?UTF-8?q?refactor(settings):=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E9=A2=84=E5=A4=84=E7=90=86=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将PreprocessSettings重命名为DocProcessSettings并调整文件结构 更新相关路由和组件引用以保持功能一致性 --- .../PreprocessProviderSettings.tsx} | 0 .../PreprocessSettings.tsx} | 8 ++++---- .../pages/settings/DocProcessSettings/index.tsx | 16 ++++++++++++++++ src/renderer/src/pages/settings/SettingsPage.tsx | 8 ++++---- 4 files changed, 24 insertions(+), 8 deletions(-) rename src/renderer/src/pages/settings/{PreprocessSettings/PreprocessSettings.tsx => DocProcessSettings/PreprocessProviderSettings.tsx} (100%) rename src/renderer/src/pages/settings/{PreprocessSettings/index.tsx => DocProcessSettings/PreprocessSettings.tsx} (90%) create mode 100644 src/renderer/src/pages/settings/DocProcessSettings/index.tsx diff --git a/src/renderer/src/pages/settings/PreprocessSettings/PreprocessSettings.tsx b/src/renderer/src/pages/settings/DocProcessSettings/PreprocessProviderSettings.tsx similarity index 100% rename from src/renderer/src/pages/settings/PreprocessSettings/PreprocessSettings.tsx rename to src/renderer/src/pages/settings/DocProcessSettings/PreprocessProviderSettings.tsx diff --git a/src/renderer/src/pages/settings/PreprocessSettings/index.tsx b/src/renderer/src/pages/settings/DocProcessSettings/PreprocessSettings.tsx similarity index 90% rename from src/renderer/src/pages/settings/PreprocessSettings/index.tsx rename to src/renderer/src/pages/settings/DocProcessSettings/PreprocessSettings.tsx index f80c0cd679..a09265a637 100644 --- a/src/renderer/src/pages/settings/PreprocessSettings/index.tsx +++ b/src/renderer/src/pages/settings/DocProcessSettings/PreprocessSettings.tsx @@ -5,8 +5,8 @@ import { Select } from 'antd' import { FC, useState } from 'react' import { useTranslation } from 'react-i18next' -import { SettingContainer, SettingDivider, SettingGroup, SettingRow, SettingRowTitle, SettingTitle } from '..' -import PreprocessProviderSettings from './PreprocessSettings' +import { SettingDivider, SettingGroup, SettingRow, SettingRowTitle, SettingTitle } from '..' +import PreprocessProviderSettings from './PreprocessProviderSettings' const PreprocessSettings: FC = () => { const { preprocessProviders } = usePreprocessProviders() @@ -25,7 +25,7 @@ const PreprocessSettings: FC = () => { } return ( - + <> {t('settings.tool.preprocess.title')} @@ -52,7 +52,7 @@ const PreprocessSettings: FC = () => { )} - + ) } export default PreprocessSettings diff --git a/src/renderer/src/pages/settings/DocProcessSettings/index.tsx b/src/renderer/src/pages/settings/DocProcessSettings/index.tsx new file mode 100644 index 0000000000..f8384ae97a --- /dev/null +++ b/src/renderer/src/pages/settings/DocProcessSettings/index.tsx @@ -0,0 +1,16 @@ +import { useTheme } from '@renderer/context/ThemeProvider' +import { FC } from 'react' + +import { SettingContainer } from '..' +import PreprocessSettings from './PreprocessSettings' + +const DocProcessSettings: FC = () => { + const { theme: themeMode } = useTheme() + + return ( + + + + ) +} +export default DocProcessSettings diff --git a/src/renderer/src/pages/settings/SettingsPage.tsx b/src/renderer/src/pages/settings/SettingsPage.tsx index 3a72865d63..b8666a8f7d 100644 --- a/src/renderer/src/pages/settings/SettingsPage.tsx +++ b/src/renderer/src/pages/settings/SettingsPage.tsx @@ -26,10 +26,10 @@ import styled from 'styled-components' import AboutSettings from './AboutSettings' import DataSettings from './DataSettings/DataSettings' import DisplaySettings from './DisplaySettings/DisplaySettings' +import DocProcessSettings from './DocProcessSettings' import GeneralSettings from './GeneralSettings' import MCPSettings from './MCPSettings' import MemorySettings from './MemorySettings' -import PreprocessSettings from './PreprocessSettings' import ProvidersList from './ProviderSettings' import QuickAssistantSettings from './QuickAssistantSettings' import QuickPhraseSettings from './QuickPhraseSettings' @@ -100,8 +100,8 @@ const SettingsPage: FC = () => { {t('memory.title')} - - + + {t('settings.tool.preprocess.title')} @@ -144,7 +144,7 @@ const SettingsPage: FC = () => { } /> } /> } /> - } /> + } /> } /> } /> } />