From 6dfce96bb3bb2d48dc0c9532e6ffb802965ffe9b Mon Sep 17 00:00:00 2001 From: fish Date: Mon, 6 Jul 2026 12:37:08 +0800 Subject: [PATCH] =?UTF-8?q?AI=20=E8=AE=BE=E7=BD=AE=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E4=B8=BA=E5=8D=95=E7=8B=AC=E9=A1=B5=E9=9D=A2=20/settings/ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- serve/frontend/src/components/Layout.tsx | 2 +- .../src/components/financials/AiAnalysisDialog.tsx | 2 +- .../components/screener/StrategyBuilderDialog.tsx | 2 +- .../stock-analysis/StockAnalysisDialog.tsx | 2 +- serve/frontend/src/pages/AiSettings.tsx | 13 +++++++++++++ serve/frontend/src/router.tsx | 3 ++- 6 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 serve/frontend/src/pages/AiSettings.tsx diff --git a/serve/frontend/src/components/Layout.tsx b/serve/frontend/src/components/Layout.tsx index 3b851ee..ce6a2d5 100644 --- a/serve/frontend/src/components/Layout.tsx +++ b/serve/frontend/src/components/Layout.tsx @@ -47,7 +47,7 @@ const nav = [ function AIConfigBadge({ configured, model }: { configured?: boolean; model?: string }) { return ( diff --git a/serve/frontend/src/components/financials/AiAnalysisDialog.tsx b/serve/frontend/src/components/financials/AiAnalysisDialog.tsx index 4e004c2..16af26e 100644 --- a/serve/frontend/src/components/financials/AiAnalysisDialog.tsx +++ b/serve/frontend/src/components/financials/AiAnalysisDialog.tsx @@ -177,7 +177,7 @@ export function AiAnalysisDialog({ task, mode, minimized }: Props) {
分析失败
{error}
{error.includes('AI') && ( - diff --git a/serve/frontend/src/components/screener/StrategyBuilderDialog.tsx b/serve/frontend/src/components/screener/StrategyBuilderDialog.tsx index 8f9bd9c..f05b800 100644 --- a/serve/frontend/src/components/screener/StrategyBuilderDialog.tsx +++ b/serve/frontend/src/components/screener/StrategyBuilderDialog.tsx @@ -310,7 +310,7 @@ export function StrategyBuilderDialog({ open, onClose, onSavedId, mode = 'create
AI API Key 未配置,无法生成策略。填写的内容会自动保存。
- diff --git a/serve/frontend/src/components/stock-analysis/StockAnalysisDialog.tsx b/serve/frontend/src/components/stock-analysis/StockAnalysisDialog.tsx index 73bdb35..6d8ad1c 100644 --- a/serve/frontend/src/components/stock-analysis/StockAnalysisDialog.tsx +++ b/serve/frontend/src/components/stock-analysis/StockAnalysisDialog.tsx @@ -170,7 +170,7 @@ export function StockAnalysisDialog({ task, mode, minimized }: Props) {
分析失败
{error}
{error.includes('AI') && ( - diff --git a/serve/frontend/src/pages/AiSettings.tsx b/serve/frontend/src/pages/AiSettings.tsx new file mode 100644 index 0000000..ece5117 --- /dev/null +++ b/serve/frontend/src/pages/AiSettings.tsx @@ -0,0 +1,13 @@ +import { PageHeader } from '@/components/PageHeader' +import { SettingsAIPanel } from './settings/AI' + +export function AiSettings() { + return ( + <> + +
+ +
+ + ) +} diff --git a/serve/frontend/src/router.tsx b/serve/frontend/src/router.tsx index fc383be..7e8c4c7 100644 --- a/serve/frontend/src/router.tsx +++ b/serve/frontend/src/router.tsx @@ -14,6 +14,7 @@ import { StockAnalysis } from './pages/StockAnalysis' import { Review } from './pages/Review' import { LimitUpLadder } from './pages/LimitUpLadder' import { Branding } from './pages/Branding' +import { AiSettings } from './pages/AiSettings' import { Settings } from './pages/Settings' import { Indices } from './pages/Indices' import { Dev } from './pages/Dev' @@ -79,7 +80,7 @@ export const router = createBrowserRouter([ { path: 'dev', element: }, // 旧路由兼容重定向 { path: 'settings/keys', element: }, - { path: 'settings/ai', element: }, + { path: 'settings/ai', element: }, { path: 'settings/queries', element: }, ], },