feat(theme): 浅蓝色主题适配 —— COH任务三子页 + 应用中心子页
- ThemeContext: 新增 data-theme="lightblue" 属性管理,支持红/蓝双浅色主题 - strategy-data.css: 新增 [data-theme="lightblue"] 变量覆盖块(与浅红默认共存) - SentimentAnalyzes / TaskAnalyzes / ActionAnalyzes / KanbanColumn / TaskCard / ActionColumn: isDark ? dark : isLightBlue ? blue : red 三路适配 - LightAppListPage: 应用列表页品牌色(标题点、徽章、搜索 focus、计数、进入按钮)浅蓝适配 - LightAppNoteQAPage: 问答发送按钮浅蓝适配 - light-app-management.css: 新增 [data-theme="lightblue"] CSS 覆盖块(主按钮、保存、开关、输入 focus 等) - light-app-pages.css: 浅蓝模式页面底色轻染 #F9FCFF Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
1ad8da5ef2
commit
b1b2540dc0
16 files changed
+292
-64
No files matched your search
@@ -475,9 +475,12 @@ export async function streamMultiAgent(
|
||||
let frameSeq = 0;
|
||||
|
||||
const debugLabel = `[stream:${req.agentType}:${req.agentName}]`;
|
||||
// Stream 帧日志(frame# / delta)仅 opt-in 开启。默认关闭,避免 Step 2 流式期间
|
||||
// 刷屏(含 wujie 嵌入时子应用 devtools);需要排查 SSE 时在控制台执行:
|
||||
// `window.__MULTI_AGENT_DEBUG__ = true`
|
||||
const debugEnabled =
|
||||
typeof window !== "undefined" &&
|
||||
(window as unknown as { __MULTI_AGENT_DEBUG__?: boolean }).__MULTI_AGENT_DEBUG__ !== false;
|
||||
(window as unknown as { __MULTI_AGENT_DEBUG__?: boolean }).__MULTI_AGENT_DEBUG__ === true;
|
||||
|
||||
const result: StreamMultiAgentResult = {
|
||||
dispatched: [],
|
||||
|
||||
@@ -194,6 +194,14 @@ export default function RoundtablePlanningPage() {
|
||||
const prefillClearedRef = useRef(false);
|
||||
// 共识达成后只向父页面(无界)回传一次交付结果。
|
||||
const consensusEmittedRef = useRef(false);
|
||||
/** 上一帧 hasConsensus,用于识别 false→true 的 live 过渡(回显不算)。 */
|
||||
const prevHasConsensusRef = useRef(false);
|
||||
const markRestoredConsensusAsEmitted = useCallback((hasConsensus: boolean) => {
|
||||
prevHasConsensusRef.current = hasConsensus;
|
||||
if (hasConsensus && inWujieEmbed) {
|
||||
consensusEmittedRef.current = true;
|
||||
}
|
||||
}, [inWujieEmbed]);
|
||||
// 带 taskId 时,先按任务回显最新草稿再决定是否 autoStart。用 state 而非 ref:
|
||||
// 解析完成需触发重渲染让 C2 effect 重跑(否则 intentThreadId 先就绪会错过 autoStart)。
|
||||
// 无 taskId 时初始即「已解析」,autoStart 照常。
|
||||
@@ -510,8 +518,9 @@ export default function RoundtablePlanningPage() {
|
||||
setDagExecMode(run.dagExecMode ?? "fast");
|
||||
setStep3Report(run.step3 ?? null);
|
||||
step2.hydrateFromDraft(run as unknown as Step2Snapshot);
|
||||
markRestoredConsensusAsEmitted(Boolean(run.hasConsensus));
|
||||
},
|
||||
[step2],
|
||||
[markRestoredConsensusAsEmitted, step2],
|
||||
);
|
||||
|
||||
const handleSelectStep2Run = useCallback(
|
||||
@@ -571,6 +580,7 @@ export default function RoundtablePlanningPage() {
|
||||
setOrchestrationPlan(snapshot.orchestrationPlan ?? null);
|
||||
setDagExecMode(snapshot.dagExecMode ?? "fast");
|
||||
step2.hydrateFromDraft(snapshot as unknown as Step2Snapshot);
|
||||
markRestoredConsensusAsEmitted(Boolean(snapshot.hasConsensus));
|
||||
},
|
||||
cancelAllStreams: () => {
|
||||
step2.abortAllInFlight();
|
||||
@@ -736,6 +746,7 @@ export default function RoundtablePlanningPage() {
|
||||
drafts.loadedFromDraftRef.current = false;
|
||||
// 新一轮研讨 → 允许共识达成后再次向父页面回传。
|
||||
consensusEmittedRef.current = false;
|
||||
prevHasConsensusRef.current = false;
|
||||
// result.mode 决定 Step 2 编排:recommend = 总控自由派活;chain = 按链条顺序派活;
|
||||
// dag = 分层并行(来源链条带 stages,携带 result.plan)。
|
||||
setOrchestrationMode(result.mode);
|
||||
@@ -888,11 +899,17 @@ export default function RoundtablePlanningPage() {
|
||||
triggerToast("⚙️ 系统管理面板拉取中(暂不开放外部审计)");
|
||||
}, [buildWujieConsensusPayload, emitConsensusToParent, inWujieEmbed, triggerToast]);
|
||||
|
||||
// C4(无界回传):第二步达成共识后,把总控结论 + 各智能体交付一次性广播给父页面。
|
||||
// 用 ref 防重(共识态会多次触发渲染);非无界环境静默跳过。
|
||||
// C4(无界回传):第二步**本次 live 研讨** newly 达成共识时,把总控结论 + 各智能体交付广播给父页面。
|
||||
// 草稿/任务回显(抽屉重开)已在 hydrate 时 markRestoredConsensusAsEmitted,不再重复 emit。
|
||||
useEffect(() => {
|
||||
if (!step2.hasConsensus || consensusEmittedRef.current) return;
|
||||
const prev = prevHasConsensusRef.current;
|
||||
const now = step2.hasConsensus;
|
||||
prevHasConsensusRef.current = now;
|
||||
|
||||
if (!now || prev) return;
|
||||
if (consensusEmittedRef.current) return;
|
||||
if (!inWujieEmbed) return;
|
||||
|
||||
consensusEmittedRef.current = true;
|
||||
emitConsensusToParent();
|
||||
}, [step2.hasConsensus, inWujieEmbed, emitConsensusToParent]);
|
||||
@@ -1095,6 +1112,7 @@ export default function RoundtablePlanningPage() {
|
||||
drafts.setCurrentDraftId(null);
|
||||
// 重置后新一轮共识仍需回传父页面。
|
||||
consensusEmittedRef.current = false;
|
||||
prevHasConsensusRef.current = false;
|
||||
setCurrentStep(1);
|
||||
// 同步触发 Step 1 init,而不是依赖 useEffect —— 已经在 Step 1 时
|
||||
// currentStep 不变,useEffect 不会 re-fire。
|
||||
@@ -1329,7 +1347,7 @@ export default function RoundtablePlanningPage() {
|
||||
)}
|
||||
|
||||
{/* HEADER */}
|
||||
<header className="flex shrink-0 items-center justify-between gap-4 border-b border-slate-100 bg-white px-6 py-3 shadow-[0_1px_3px_rgba(0,0,0,0.02)] dark:border-border dark:bg-card dark:shadow-none">
|
||||
<header className="relative z-[2000] flex shrink-0 items-center justify-between gap-4 border-b border-slate-100 bg-white px-6 py-3 shadow-[0_1px_3px_rgba(0,0,0,0.02)] dark:border-border dark:bg-card dark:shadow-none">
|
||||
<StepNavigation
|
||||
currentStep={currentStep}
|
||||
intentReady={step1.intentReady}
|
||||
@@ -1385,6 +1403,7 @@ export default function RoundtablePlanningPage() {
|
||||
|
||||
<HistoryDropdown
|
||||
innerRef={drafts.historyDropdownRef}
|
||||
isDark={isDark}
|
||||
isOpen={drafts.isHistoryOpen}
|
||||
setIsOpen={drafts.setIsHistoryOpen}
|
||||
drafts={drafts.drafts}
|
||||
@@ -1423,7 +1442,7 @@ export default function RoundtablePlanningPage() {
|
||||
sidebarExpanded={step2SidebarExpanded}
|
||||
setSidebarExpanded={setStep2SidebarExpanded}
|
||||
/>
|
||||
<main className="flex-1 overflow-hidden p-4 flex gap-4 min-h-0">
|
||||
<main className="relative z-0 flex-1 overflow-hidden p-4 flex gap-4 min-h-0">
|
||||
{/* LEFT SIDEBAR */}
|
||||
<LeftSidebar
|
||||
currentStep={currentStep}
|
||||
@@ -1709,6 +1728,7 @@ function StepButton({
|
||||
|
||||
interface HistoryDropdownProps {
|
||||
innerRef: React.MutableRefObject<HTMLDivElement | null>;
|
||||
isDark: boolean;
|
||||
isOpen: boolean;
|
||||
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
drafts: ReturnType<typeof useDraftPersistence>["drafts"];
|
||||
@@ -1730,6 +1750,7 @@ interface HistoryDropdownProps {
|
||||
function HistoryDropdown(props: HistoryDropdownProps) {
|
||||
const {
|
||||
innerRef,
|
||||
isDark,
|
||||
isOpen,
|
||||
setIsOpen,
|
||||
drafts,
|
||||
@@ -1745,6 +1766,8 @@ function HistoryDropdown(props: HistoryDropdownProps) {
|
||||
onCommitRename,
|
||||
onCancelRename,
|
||||
} = props;
|
||||
const panelBg = isDark ? "#122347" : "#ffffff";
|
||||
const currentBg = isDark ? "#1a2f5a" : "#ecfdf5";
|
||||
|
||||
return (
|
||||
<div className="relative" ref={innerRef}>
|
||||
@@ -1768,8 +1791,28 @@ function HistoryDropdown(props: HistoryDropdownProps) {
|
||||
</button>
|
||||
|
||||
{isOpen && (
|
||||
<div className="absolute right-0 top-full mt-2 w-[360px] max-h-[60vh] overflow-y-auto bg-white border border-slate-200 rounded-2xl shadow-xl z-50 dark:bg-[#0d1d3b] dark:border-border">
|
||||
<div className="px-4 py-3 border-b border-slate-100 flex items-center justify-between sticky top-0 bg-white z-10 dark:bg-[#0d1d3b] dark:border-border">
|
||||
<div
|
||||
className="rt-history-dropdown-panel absolute right-0 top-full mt-2 w-[360px] max-h-[60vh] overflow-y-auto border border-slate-200 rounded-2xl shadow-xl z-[1000] dark:border-border"
|
||||
style={{
|
||||
background: panelBg,
|
||||
backgroundColor: panelBg,
|
||||
backgroundImage: "none",
|
||||
opacity: 1,
|
||||
backdropFilter: "none",
|
||||
WebkitBackdropFilter: "none",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
className="rt-history-dropdown-header px-4 py-3 border-b border-slate-100 flex items-center justify-between sticky top-0 z-10 dark:border-border"
|
||||
style={{
|
||||
background: panelBg,
|
||||
backgroundColor: panelBg,
|
||||
backgroundImage: "none",
|
||||
opacity: 1,
|
||||
backdropFilter: "none",
|
||||
WebkitBackdropFilter: "none",
|
||||
}}
|
||||
>
|
||||
<span className="text-xs font-black text-slate-800 tracking-wide dark:text-foreground">历史草稿</span>
|
||||
<span className="text-[10px] font-mono text-slate-400">{drafts.length} 条</span>
|
||||
</div>
|
||||
@@ -1788,7 +1831,11 @@ function HistoryDropdown(props: HistoryDropdownProps) {
|
||||
const openOrLoad = () =>
|
||||
isActiveJob && d.jobId ? onOpenJob(d.jobId) : onLoad(d.id);
|
||||
return (
|
||||
<li key={d.id} className={`px-3 py-2.5 ${isCurrent ? "bg-emerald-50/40" : ""}`}>
|
||||
<li
|
||||
key={d.id}
|
||||
className="px-3 py-2.5"
|
||||
style={isCurrent ? { backgroundColor: currentBg } : undefined}
|
||||
>
|
||||
<div className="flex items-start gap-2">
|
||||
<div className="flex-1 min-w-0">
|
||||
{isRenaming ? (
|
||||
|
||||
@@ -110,10 +110,13 @@
|
||||
--rt-primary-hover: var(--primary);
|
||||
--rt-primary-soft: var(--accent);
|
||||
color: var(--foreground);
|
||||
/* 整页背景换深蓝主题底图(仅深色;浅色保持红白主题不受影响)。
|
||||
* background-image 叠在 background-color 上 —— 底色作为图加载前/未覆盖区域的回落;
|
||||
* cover 铺满、fixed 固定不随内容滚动(大屏背板观感,与应用渲染大屏一致)。
|
||||
* url() 里的 SVG 由 Vite 当独立资源输出(非内联),浏览器缓存。 */
|
||||
}
|
||||
|
||||
/* 整页背景换深蓝主题底图(仅页面根 .roundtable-planning;浅色不受影响)。
|
||||
* background-image 叠在 background-color 上 —— 底色作为图加载前/未覆盖区域的回落;
|
||||
* cover 铺满、fixed 固定不随内容滚动(大屏背板观感,与应用渲染大屏一致)。
|
||||
* url() 里的 SVG 由 Vite 当独立资源输出(非内联),浏览器缓存。 */
|
||||
.dark .roundtable-planning {
|
||||
background-color: var(--background);
|
||||
background-image: url("../../assets/img/layout-bg-theme-dark-blue.svg");
|
||||
background-size: cover;
|
||||
@@ -122,6 +125,19 @@
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
/* Portal 弹窗(RecommendAgentsDialog 等挂 .roundtable-planning--dark 但不在页面根内):
|
||||
* 不透明实底、无底图 —— 对齐 §21 Modal 容器色 ZS-004-08。 */
|
||||
.roundtable-planning--dark:not(.roundtable-planning) {
|
||||
--background: #122347;
|
||||
--card: #0c1836;
|
||||
--popover: #122347;
|
||||
--muted: #0f1c3d;
|
||||
--secondary: #1a2f5a;
|
||||
--accent: #1a2f5a;
|
||||
background-color: var(--background);
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.dark .roundtable-planning ::-webkit-scrollbar-thumb,
|
||||
.roundtable-planning--dark ::-webkit-scrollbar-thumb {
|
||||
background: color-mix(in oklch, var(--primary) 45%, var(--border));
|
||||
@@ -388,7 +404,7 @@
|
||||
/* 顶栏 */
|
||||
.dark .roundtable-planning > header,
|
||||
.roundtable-planning--dark > header {
|
||||
background-color: var(--card) !important;
|
||||
background-color: #122347 !important;
|
||||
border-color: var(--border) !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
@@ -407,6 +423,16 @@
|
||||
color: var(--foreground) !important;
|
||||
}
|
||||
|
||||
/* 历史记录下拉面板:深色下改为不透明实底(避免 token 半透明透出底图)。 */
|
||||
:is(.dark .roundtable-planning, .roundtable-planning--dark) .rt-history-dropdown-panel {
|
||||
background-color: #122347 !important;
|
||||
background-image: none !important;
|
||||
}
|
||||
|
||||
:is(.dark .roundtable-planning, .roundtable-planning--dark) .rt-history-dropdown-header {
|
||||
background-color: #122347 !important;
|
||||
}
|
||||
|
||||
/* =============================================================================
|
||||
* 派活链路流程图连接线(DispatchChainModal)。
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user