From 685abb6aa9b3d94cb36614d15987694c0adb33fb Mon Sep 17 00:00:00 2001 From: fengxiangdebaozi <10845145+fengxiangdebaozi@user.noreply.gitee.com> Date: Mon, 1 Jun 2026 15:11:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=B1=E8=93=9D=E8=89=B2ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend-web/.env.example | 4 ++- frontend-web/.env.sit | 28 +++++++++++++++ frontend-web/package.json | 1 + .../components/RecommendAgentsDialog.tsx | 13 ++++++- .../styles/roundtable-planning.css | 36 +++++++++++++++++++ 5 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 frontend-web/.env.sit diff --git a/frontend-web/.env.example b/frontend-web/.env.example index adb14fb8..ae6121cf 100644 --- a/frontend-web/.env.example +++ b/frontend-web/.env.example @@ -5,13 +5,15 @@ # ├─────────────────┼──────────────────────────────────────────────────┤ # │ pnpm dev │ .env.development + .env.development.local │ # │ pnpm build │ .env.production + .env.production.local │ +# │ pnpm build:sit │ .env.sit + .env.sit.local │ # │ scripts/start-* │ 脚本注入的环境变量会覆盖上述文件(见下方说明) │ # └─────────────────┴──────────────────────────────────────────────────┘ # # 推荐: # - 日常本地开发:改 .env.development(已提交,团队默认 UAT 地址) # - 本机连 127.0.0.1:8001:复制 .env.development.local.example → .env.development.local -# - 内网打包部署:改 .env.production 后再执行 pnpm build +# - 内网 UAT 打包部署:改 .env.production 后再执行 pnpm build +# - SIT 环境打包:改 .env.sit 后再执行 pnpm build:sit(地址为 UAT 的 sit 版本) # # 若浏览器直连后端报 CORS,请在 Gateway 配置 CORS_ORIGINS,包含前端源站,例如: # CORS_ORIGINS=http://127.0.0.1:5173,http://localhost:5173,http://127.0.0.1:5174 diff --git a/frontend-web/.env.sit b/frontend-web/.env.sit new file mode 100644 index 00000000..5ae77457 --- /dev/null +++ b/frontend-web/.env.sit @@ -0,0 +1,28 @@ +# SIT 环境打包(pnpm build:sit / npm run build:sit)— 接口地址为 UAT 的 sit 版本 +# 打包后变量会写入 dist,运行时不可再改 + +# Gateway / DeerFlow API +VITE_BACKEND_BASE_URL=https://ch1.b.sit.4.cn/deerflow +VITE_LANGGRAPH_BASE_URL=https://ch1.b.sit.4.cn/deerflow/api + +# 轻应用「新建笔记」系列接口 +VITE_NOTE_API_BASE_URL=https://your-intranet-host/note-api +# 佳来模型对话接口 +VITE_AIPI_CHAT_URL=https://ch1.b.sit.4.cn/gpt +# 多轮检索接口 +VITE_AIPI_GENERATE_CHAT_URL=https://ch1.b.sit.4.cn/jialai_b1_chat +VITE_AIPI_TASK_CHAT_URL=https://ch1.b.sit.4.cn/qq_b1_chat +VITE_AIPI_KNOWLEDGE_URL=https://chlib.b.sit.4.cn/knowlibrary +VITE_AIPI_B1COH_URL=https://ch1.b.sit.4.cn/web +VITE_AIPI_B2ACTOR_URL=https://ty.b.sit.4.cn +VITE_AIPI_B2ACTOR_XWT_PATH=/fromB/toXWT?isFrame=1 +VITE_AIPI_KNOWLEDGE_IFRAME_API_URL=https://ch1.b.sit.4.cn/knowes/api/iframeKnowledgeUrl +VITE_AIPI_KNOWLEDGE_IFRAME_SKIN=red +VITE_AIPI_MOPECHAT_URL=https://ch1.b.sit.4.cn/likun_b1_mope +VITE_AIPI_BACKENP_URL=https://knowledgetoolserver.b.sit.4.cn +VITE_AIPI_CONSUMER_URL=https://ch1.b.sit.4.cn/consumer +VITE_AIPI_PGLINKTO_URL=https://pg.b.sit.4.cn +VITE_AIPI_XKLINKTO_URL=https://kz.b.sit.4.cn + +# 可选:Canvas 独立 LangGraph 地址 +# VITE_CANVAS_LANGGRAPH_BASE_URL= diff --git a/frontend-web/package.json b/frontend-web/package.json index 1613e744..3ecf6627 100644 --- a/frontend-web/package.json +++ b/frontend-web/package.json @@ -6,6 +6,7 @@ "scripts": { "dev": "vite", "build": "node --max-old-space-size=8192 ./node_modules/vite/bin/vite.js build", + "build:sit": "node --max-old-space-size=8192 ./node_modules/vite/bin/vite.js build --mode sit", "preview": "vite preview", "typecheck": "tsc --noEmit" }, diff --git a/frontend-web/src/roundtable-planning/components/RecommendAgentsDialog.tsx b/frontend-web/src/roundtable-planning/components/RecommendAgentsDialog.tsx index 6c8d09fb..3d4110ee 100644 --- a/frontend-web/src/roundtable-planning/components/RecommendAgentsDialog.tsx +++ b/frontend-web/src/roundtable-planning/components/RecommendAgentsDialog.tsx @@ -20,6 +20,7 @@ import { } from "@/components/ui/dialog"; import { Button } from "@/components/ui/button"; import { listAgents, type Agent } from "@/core/agents"; +import { useTheme } from "@/contexts/ThemeContext"; import { cn } from "@/lib/utils"; import { @@ -183,6 +184,11 @@ export function RecommendAgentsDialog({ onCancel, onConfirm, }: RecommendAgentsDialogProps) { + // 弹窗经 Radix portal 渲染到 .roundtable-planning 之外,页面的深蓝 scoped 样式 + // 够不着它。深色下手动挂上 .roundtable-planning--dark,让同一套深蓝 token + 兜底 + // 映射也作用于弹窗;浅色不挂,弹窗浅色外观不变。 + const { theme } = useTheme(); + const isDark = theme === "dark"; const [state, setState] = useState(INITIAL_STATE); const [selectedIds, setSelectedIds] = useState>(new Set()); @@ -516,7 +522,12 @@ export function RecommendAgentsDialog({ return ( - + diff --git a/frontend-web/src/roundtable-planning/styles/roundtable-planning.css b/frontend-web/src/roundtable-planning/styles/roundtable-planning.css index eacf15cb..444d04db 100644 --- a/frontend-web/src/roundtable-planning/styles/roundtable-planning.css +++ b/frontend-web/src/roundtable-planning/styles/roundtable-planning.css @@ -55,6 +55,15 @@ /* —— 功能语义色 —— */ --destructive: #f5222d; /* zs-001-06 错误 */ + /* —— brand-* 别名改深蓝(关键):globals.css 只在 :root 把 --brand-* 定为浅红/红, + * .dark 未覆盖,导致组件里 var(--brand-200/900/950) 在深色下泛粉/泛红、与深蓝冲突。 + * 这里改为渐蓝系 ZS-002,所有 bg-[var(--brand-200)] / text-[var(--brand-900)] 等 + * 一并由红转蓝。 —— */ + --workspace-brand: #1677ff; /* 与 primary 对齐 */ + --brand-200: #16335f; /* 浅红 chip 底 → 深蓝软底(chip / 头像底) */ + --brand-900: #4096ff; /* 红强调 / 按钮 hover → 蓝(zs-002-05) */ + --brand-950: #91caff; /* 深红文字 → 浅蓝(zs-002-03,深底上可读) */ + /* —— 圆桌局部别名(回落到上面已覆盖的 token) —— */ --rt-page-bg: var(--background); --rt-primary: var(--primary); @@ -295,6 +304,33 @@ background-color: color-mix(in oklch, #ec4899 18%, var(--card)) !important; } +/* ============================================================================= + * 残留红色清理 —— 内联 SVG 红填充 + 红色发光阴影 → 深蓝系。 + * (这些是写死在组件里的红:头像 fill 属性、按钮 rgba(245,34,45) 阴影, + * 不经 token,需在此单独改写;仅深色生效。) + * ========================================================================== */ + +/* 头像等内联 SVG 的红色 fill(CSS 可覆盖 SVG presentation 属性) */ +:is(.dark .roundtable-planning, .roundtable-planning--dark) [fill="#f5222d"] { + fill: #1677ff !important; +} +:is(.dark .roundtable-planning, .roundtable-planning--dark) [fill="#cf1322"] { + fill: #0958d9 !important; +} +:is(.dark .roundtable-planning, .roundtable-planning--dark) [fill="#a8071a"] { + fill: #003eb3 !important; +} + +/* 红色发光阴影 → 蓝色发光 */ +:is(.dark .roundtable-planning, .roundtable-planning--dark) + .shadow-\[0_2px_8px_rgba\(245\2c 34\2c 45\2c 0\.15\)\] { + box-shadow: 0 2px 8px rgba(22, 119, 255, 0.28) !important; +} +:is(.dark .roundtable-planning, .roundtable-planning--dark) + .shadow-\[0_8px_30px_rgba\(245\2c 34\2c 45\2c 0\.06\)\] { + box-shadow: 0 8px 30px rgba(22, 119, 255, 0.14) !important; +} + /* ============================================================================= * 结构件覆盖(顶栏 / 步骤条 / 次要按钮)—— 保留原有针对性规则。 * ========================================================================== */ From 0c5938a5a396996e3586a0def515e782c47f54f7 Mon Sep 17 00:00:00 2001 From: fengxiangdebaozi <10845145+fengxiangdebaozi@user.noreply.gitee.com> Date: Mon, 1 Jun 2026 19:54:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend-web/src/App.tsx | 2 + frontend-web/src/components/font-scale.tsx | 39 ++ .../settings/appearance-settings-page.tsx | 80 ++- frontend-web/src/core/settings/local.ts | 86 +-- .../backend/app/gateway/app.py | 16 + .../app/gateway/routers/_roundtable_seed.py | 623 ++---------------- .../roundtable-coordinator/SOUL.md | 42 ++ .../roundtable-coordinator/config.yaml | 5 + .../roundtable-intent/SOUL.md | 312 +++++++++ .../roundtable-intent/config.yaml | 3 + .../roundtable-recommender/SOUL.md | 191 ++++++ .../roundtable-recommender/config.yaml | 3 + 12 files changed, 784 insertions(+), 618 deletions(-) create mode 100644 frontend-web/src/components/font-scale.tsx create mode 100644 offline-backend-20260512/backend/app/gateway/routers/_roundtable_seed_assets/roundtable-coordinator/SOUL.md create mode 100644 offline-backend-20260512/backend/app/gateway/routers/_roundtable_seed_assets/roundtable-coordinator/config.yaml create mode 100644 offline-backend-20260512/backend/app/gateway/routers/_roundtable_seed_assets/roundtable-intent/SOUL.md create mode 100644 offline-backend-20260512/backend/app/gateway/routers/_roundtable_seed_assets/roundtable-intent/config.yaml create mode 100644 offline-backend-20260512/backend/app/gateway/routers/_roundtable_seed_assets/roundtable-recommender/SOUL.md create mode 100644 offline-backend-20260512/backend/app/gateway/routers/_roundtable_seed_assets/roundtable-recommender/config.yaml diff --git a/frontend-web/src/App.tsx b/frontend-web/src/App.tsx index ea03c986..5649c323 100644 --- a/frontend-web/src/App.tsx +++ b/frontend-web/src/App.tsx @@ -2,6 +2,7 @@ import { useMemo } from "react"; import { Navigate, Route, Routes } from "react-router-dom"; import { ThemeProvider as NextThemesProvider } from "next-themes"; +import { FontScaleApplier } from "@/components/font-scale"; import { QueryClientProvider } from "@/components/query-client-provider"; import { AuthSyncWatcher } from "@/core/auth/sync"; import { I18nProvider } from "@/core/i18n/context"; @@ -39,6 +40,7 @@ function AppProviders({ children }: { children: React.ReactNode }) { + {children} diff --git a/frontend-web/src/components/font-scale.tsx b/frontend-web/src/components/font-scale.tsx new file mode 100644 index 00000000..7c051700 --- /dev/null +++ b/frontend-web/src/components/font-scale.tsx @@ -0,0 +1,39 @@ +"use client"; + +import { useEffect } from "react"; + +import { useLocalSettings } from "@/core/settings"; + +/** + * 基准字号 = 16px,对应《深蓝色 UI 规范》§2.1.2 后台系统正文字号(16px Regular)。 + * 用户在「外观 → 字号」里选择的倍数作用于 根元素的 font-size;由于 Tailwind + * 的字号 / 间距基于 rem,整套界面会随之按比例放大 / 缩小。`fontScale === 1` 即默认 16px。 + */ +export const BASE_FONT_PX = 16; + +export const FONT_SCALE_OPTIONS: { value: number; label: string; px: number }[] = + [ + { value: 0.875, label: "小", px: 14 }, + { value: 1, label: "标准", px: 16 }, + { value: 1.125, label: "大", px: 18 }, + { value: 1.25, label: "特大", px: 20 }, + ]; + +/** + * 将用户选择的字号倍数应用到 根元素。挂在应用根部,保证刷新后即时生效、全局统一。 + * 不渲染任何 DOM。 + */ +export function FontScaleApplier() { + const [settings] = useLocalSettings(); + const { fontScale } = settings.display; + + useEffect(() => { + const scale = + typeof fontScale === "number" && Number.isFinite(fontScale) && fontScale > 0 + ? fontScale + : 1; + document.documentElement.style.fontSize = `${BASE_FONT_PX * scale}px`; + }, [fontScale]); + + return null; +} diff --git a/frontend-web/src/components/workspace/settings/appearance-settings-page.tsx b/frontend-web/src/components/workspace/settings/appearance-settings-page.tsx index 5970d17e..5720df7c 100644 --- a/frontend-web/src/components/workspace/settings/appearance-settings-page.tsx +++ b/frontend-web/src/components/workspace/settings/appearance-settings-page.tsx @@ -6,6 +6,7 @@ import { toast } from "sonner"; import { useTheme } from "@/contexts/ThemeContext"; +import { FONT_SCALE_OPTIONS } from "@/components/font-scale"; import { Button } from "@/components/ui/button"; import { Select, @@ -21,12 +22,12 @@ import { getStoredAuth } from "@/core/auth"; import { enUS, isLocale, zhCN, type Locale } from "@/core/i18n"; import { useI18n } from "@/core/i18n/hooks"; import { useLocalSettings } from "@/core/settings"; -import { - useAppearanceSettings, - useCitationDisplaySettings, - useUpdateAppearanceSettings, - useUpdateCitationDisplaySettings, -} from "@/core/system-settings/hooks"; +import { + useAppearanceSettings, + useCitationDisplaySettings, + useUpdateAppearanceSettings, + useUpdateCitationDisplaySettings, +} from "@/core/system-settings/hooks"; import { cn } from "@/lib/utils"; import { SettingsSection } from "./settings-section"; @@ -42,13 +43,13 @@ export function AppearanceSettingsPage() { const currentTheme = theme; const [settings, setSettings] = useLocalSettings(); const isAdmin = getStoredAuth()?.system_role === "admin"; - const { data: appearance } = useAppearanceSettings(); - const updateAppearance = useUpdateAppearanceSettings(); - const { data: citationDisplay } = useCitationDisplaySettings(); - const updateCitationDisplay = useUpdateCitationDisplaySettings(); - const globalDefault = appearance?.default_theme ?? "light"; - const cleanupWords = - citationDisplay?.cleanup_words ?? settings.display.citationCleanupWords ?? []; + const { data: appearance } = useAppearanceSettings(); + const updateAppearance = useUpdateAppearanceSettings(); + const { data: citationDisplay } = useCitationDisplaySettings(); + const updateCitationDisplay = useUpdateCitationDisplaySettings(); + const globalDefault = appearance?.default_theme ?? "light"; + const cleanupWords = + citationDisplay?.cleanup_words ?? settings.display.citationCleanupWords ?? []; const handleSetGlobalDefault = async (value: "light" | "dark") => { if (value === globalDefault) return; @@ -147,6 +148,39 @@ export function AppearanceSettingsPage() { + +
+ +
+ 预览:多智能体圆桌研讨 · The quick brown fox · 0123456789 +
+
+
+ + + -