From 37a9cca82de46b3398bc3e23a92831a1956ea7dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=87=AF?= Date: Wed, 27 May 2026 19:43:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Step2Panel.tsx | 40 ++++++---- .../hooks/useStep2Orchestration.ts | 74 +++++++++---------- .../pages/RoundtablePlanningPage.tsx | 9 ++- 3 files changed, 67 insertions(+), 56 deletions(-) diff --git a/frontend-web/src/roundtable-planning/components/Step2Panel.tsx b/frontend-web/src/roundtable-planning/components/Step2Panel.tsx index 557643c5..4dc9f170 100644 --- a/frontend-web/src/roundtable-planning/components/Step2Panel.tsx +++ b/frontend-web/src/roundtable-planning/components/Step2Panel.tsx @@ -15,7 +15,7 @@ * * 状态全部来自 `useStep2Orchestration` —— 本组件不调任何后端、不持久化。 */ -import { useRef } from "react"; +import { useCallback, useRef, useState } from "react"; import { Cpu, FileIcon, @@ -80,7 +80,6 @@ export interface Step2PanelProps { /** 主聊天里 `present_files` 会在气泡下方渲染卡片;Step 2 沿用同一交互。 */ openArtifactPreview: (threadId: string, path: string) => void; // ─── Setters ────────────────────────────────────────────────── - setIsRoundTableRunning: React.Dispatch>; setClarificationDraft: React.Dispatch>; setCustomAgentInput: React.Dispatch>; setAgentConfigs: React.Dispatch< @@ -88,6 +87,8 @@ export interface Step2PanelProps { >; setSelectedAgentId: React.Dispatch>; // ─── Handlers ───────────────────────────────────────────────── + onPauseRoundtable: () => void; + onResumeRoundtable: () => void; onSubmitClarification: (answer: string) => void; onInjectToRoundtable: () => void; onSavePersona: (id: number) => void; @@ -116,11 +117,12 @@ export function Step2Panel(props: Step2PanelProps) { seatStubMessages, openArtifactFromStep, openArtifactPreview, - setIsRoundTableRunning, setClarificationDraft, setCustomAgentInput, setAgentConfigs, setSelectedAgentId, + onPauseRoundtable, + onResumeRoundtable, onSubmitClarification, onInjectToRoundtable, onSavePersona, @@ -132,6 +134,15 @@ export function Step2Panel(props: Step2PanelProps) { const { atBottom: step2AtBottom, scrollToBottom: scrollStep2ToBottom } = useAutoScroll(step2ScrollRef, [step2RoundtableDialogues]); + // 干预研审 → 暂停会商联动反馈:点击「干预研审」瞬间让右上角按钮高亮闪烁, + // 让用户清楚看到状态已切换到「恢复会商」。 + const [pauseFlash, setPauseFlash] = useState(false); + const handleInject = useCallback(() => { + onInjectToRoundtable(); + setPauseFlash(true); + window.setTimeout(() => setPauseFlash(false), 1600); + }, [onInjectToRoundtable]); + const isSandboxStreaming = isOrchestrating || step2RoundtableDialogues.some((dialogue) => dialogue.streaming === true); @@ -177,10 +188,8 @@ export function Step2Panel(props: Step2PanelProps) { {isRoundTableRunning ? ( ) : (