增强文档改写配图与深度研究流式稳定性,并完善 8BF/会商工作区。
全文改写支持可选配图与思考过程展示,深度研究接入 DashScope 原生出图并剥离内联 think 标签;8BF 会商补齐第一步工作区与任务卡回退,同时限制热重载扫描范围。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
819e537aa3
commit
15a46b903a
48 files changed
+3724
-616
No files matched your search
@@ -94,7 +94,7 @@ import { flowNodeMeta, type FlowNodeType } from "@/roundtable-planning/lib/flow-
|
||||
import { RecommendAgentsDialog } from "@/roundtable-planning/components/RecommendAgentsDialog";
|
||||
import { BusinessChainListDialog } from "@/roundtable-planning/components/BusinessChainListDialog";
|
||||
import { DispatchChainJobModal } from "@/roundtable-planning/components/DispatchChainJobModal";
|
||||
import { Step1Panel } from "@/roundtable-planning/components/Step1Panel";
|
||||
import { Step1Panel, type Step1PanelProps } from "@/roundtable-planning/components/Step1Panel";
|
||||
import { readActionDetail, readCopTaskDetail } from "@/core/auth/task-deeplink";
|
||||
import { Step2Panel } from "@/roundtable-planning/components/Step2Panel";
|
||||
import { Step3Panel } from "@/roundtable-planning/components/Step3Panel";
|
||||
@@ -306,6 +306,24 @@ export default function RoundtablePlanningPage({
|
||||
entryRailTaskId,
|
||||
/** 独立业务页的根节点样式类,避免修改原会商样式。 */
|
||||
rootClassName,
|
||||
/** 独立业务页替换第一步消息工作区的纯展示组件;状态和行为仍由本页统一拥有。 */
|
||||
renderStep1,
|
||||
/** 独立业务页替换第一步左侧入口栏。 */
|
||||
renderStep1LeftSidebar,
|
||||
/** 独立业务页在第二步左栏顶部复用自己的任务/意图展示。 */
|
||||
renderStep2LeftSidebarHeader,
|
||||
/** 第一阶段使用内嵌右栏时,隐藏通用的模型/摘要/澄清记录栏。 */
|
||||
hideDefaultStep1RightSidebar = false,
|
||||
/** 独立业务页的工作区品牌区,取代通用步骤导航。 */
|
||||
headerLeftSlot,
|
||||
/** 放在历史记录后面的独立业务操作或状态。 */
|
||||
headerActionAfterHistory,
|
||||
/** 独立业务页可隐藏通用的“保存草稿”按钮。 */
|
||||
hideHeaderSaveDraft = false,
|
||||
/** 独立业务页可调整新建动作的展示文案,行为不变。 */
|
||||
newTaskLabel,
|
||||
/** 独立业务页可隐藏通用的设置入口。 */
|
||||
hideHeaderSettings = false,
|
||||
}: {
|
||||
compactChrome?: boolean;
|
||||
lockedChainId?: string | null;
|
||||
@@ -317,6 +335,22 @@ export default function RoundtablePlanningPage({
|
||||
taskContext?: Record<string, unknown> | null;
|
||||
entryRailTaskId?: string | null;
|
||||
rootClassName?: string;
|
||||
renderStep1?: (props: Step1PanelProps & {
|
||||
selectedModel: string;
|
||||
modelOptions: Array<{ label: string; value: string }>;
|
||||
onSelectedModelChange: (model: string) => void;
|
||||
}) => ReactNode;
|
||||
renderStep1LeftSidebar?: (context: { intentReady: object | null }) => ReactNode;
|
||||
renderStep2LeftSidebarHeader?: (context: {
|
||||
intentReady: object | null;
|
||||
onCollapse: () => void;
|
||||
}) => ReactNode;
|
||||
hideDefaultStep1RightSidebar?: boolean;
|
||||
headerLeftSlot?: ReactNode;
|
||||
headerActionAfterHistory?: ReactNode;
|
||||
hideHeaderSaveDraft?: boolean;
|
||||
newTaskLabel?: string;
|
||||
hideHeaderSettings?: boolean;
|
||||
}) {
|
||||
const { theme } = useTheme();
|
||||
// 全工作区跨页的后台作业完成通知器(Provider 挂在 PageLayout 常驻层)。
|
||||
@@ -344,6 +378,13 @@ export default function RoundtablePlanningPage({
|
||||
const draftStorageTaskId = storageTaskId ?? recordTaskIdOf(prefillRef.current);
|
||||
// 由 prefill.businessCode 解析出的「自动选用业务链」结果;有值时「进入研讨」跳过选链弹窗直接进 Step 2。
|
||||
const [autoChainResult, setAutoChainResult] = useState<SeatSelectionResult | null>(null);
|
||||
// 固定业务链(8BF 等独立页面)的解析状态。不能只以 autoChainResult 是否为空判断:
|
||||
// 它为空既可能是「还在拉取」,也可能是「业务链已配置但可用席位不足」。
|
||||
// 若混为一谈,用户刚保存配置后立刻点击进入研讨时会被错误提示为「未配置业务链」。
|
||||
const [lockedChainResolution, setLockedChainResolution] = useState<
|
||||
"idle" | "loading" | "ready" | "unavailable"
|
||||
>("idle");
|
||||
const [lockedChainUnavailableReason, setLockedChainUnavailableReason] = useState<string | null>(null);
|
||||
/** 无界直传 chainId 时,链条解析完成前禁止弹选链窗(避免 modal 布局抖动)。 */
|
||||
const [autoChainLoading, setAutoChainLoading] = useState(
|
||||
() =>
|
||||
@@ -355,21 +396,57 @@ export default function RoundtablePlanningPage({
|
||||
useEffect(() => {
|
||||
if (!lockedChainId) {
|
||||
setAutoChainResult(null);
|
||||
setLockedChainResolution("idle");
|
||||
setLockedChainUnavailableReason(null);
|
||||
return;
|
||||
}
|
||||
let cancelled = false;
|
||||
// 映射切换时先清掉旧链结果,避免异步请求尚未返回时误用上一条业务链进入研讨。
|
||||
setAutoChainResult(null);
|
||||
setLockedChainResolution("loading");
|
||||
setLockedChainUnavailableReason(null);
|
||||
setAutoChainLoading(true);
|
||||
void Promise.all([getChain(lockedChainId), listAgents().catch(() => [])])
|
||||
void Promise.all([getChain(lockedChainId), listAgents()])
|
||||
.then(([chain, agents]) => {
|
||||
if (cancelled || !chain) return;
|
||||
const result = buildChainSeatSelection(chain, filterRecommendCandidates(agents));
|
||||
if (!cancelled) setAutoChainResult(result);
|
||||
if (cancelled) return;
|
||||
if (!chain) {
|
||||
setAutoChainResult(null);
|
||||
setLockedChainResolution("unavailable");
|
||||
setLockedChainUnavailableReason("已配置的业务链不存在或未发布,请重新选择一条已发布的业务链");
|
||||
return;
|
||||
}
|
||||
const candidates = filterRecommendCandidates(agents);
|
||||
const result = buildChainSeatSelection(chain, candidates);
|
||||
if (!cancelled) {
|
||||
setAutoChainResult(result);
|
||||
setLockedChainResolution(result ? "ready" : "unavailable");
|
||||
if (!result) {
|
||||
const availableAgentIds = new Set(candidates.map((agent) => agent.agent_id));
|
||||
const unavailableSeats = chain.seats
|
||||
.filter((seat) => !availableAgentIds.has(seat.agent_id))
|
||||
.map((seat) => seat.name || seat.agent_id);
|
||||
setLockedChainUnavailableReason(
|
||||
unavailableSeats.length > 0
|
||||
? `业务链中的智能体「${unavailableSeats.join("、")}」尚未发布、已删除或当前账号无访问权限;请先将它们发布,并保证至少有 2 个可用智能体`
|
||||
: "业务链至少需要 2 个可用智能体,请检查业务链席位配置",
|
||||
);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
if (!cancelled) setAutoChainResult(null);
|
||||
if (!cancelled) {
|
||||
setAutoChainResult(null);
|
||||
setLockedChainResolution("unavailable");
|
||||
setLockedChainUnavailableReason("读取已配置业务链或智能体失败,请刷新后重试");
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
if (!cancelled) setAutoChainLoading(false);
|
||||
if (!cancelled) {
|
||||
setAutoChainLoading(false);
|
||||
// getChain 返回 null 时不会进入 then 内的 result 分支,同样标记为不可用。
|
||||
setLockedChainResolution((current) => current === "loading" ? "unavailable" : current);
|
||||
setLockedChainUnavailableReason((current) => current ?? "已配置的业务链暂不可用,请重新选择后重试");
|
||||
}
|
||||
});
|
||||
return () => {
|
||||
cancelled = true;
|
||||
@@ -1963,9 +2040,66 @@ export default function RoundtablePlanningPage({
|
||||
triggerToast("追问生成就绪!");
|
||||
}, [step1, triggerToast]);
|
||||
|
||||
// 独立业务页可只替换 Step 1 的外观;这里将通用状态/动作收敛为一份受控 props,
|
||||
// 避免它们复制或分叉意图识别、附件上传、澄清和进入研讨的业务逻辑。
|
||||
const step1PanelProps: Step1PanelProps = {
|
||||
interactiveMessages: step1.interactiveMessages,
|
||||
intentThreadId: step1.intentThreadId,
|
||||
intentReady: step1.intentReady,
|
||||
isIntentSending: step1.isIntentSending,
|
||||
pendingIntentClarificationMsgId: step1.pendingIntentClarificationMsgId,
|
||||
intentClarificationSelections: step1.intentClarificationSelections,
|
||||
setIntentClarificationSelections: step1.setIntentClarificationSelections,
|
||||
onSendMessage: (text, files) => void step1.sendIntentMessage(text, files),
|
||||
onStopIntent: step1.stopIntentStream,
|
||||
onSkipQuestion: handleSkipQuestion,
|
||||
onFollowUp: handleAgentFollowUp,
|
||||
onEnterRoundtable: () => {
|
||||
if (!step1.intentReady) {
|
||||
triggerToast("请先与任务理解智能体完成澄清,生成任务摘要后再进入");
|
||||
return;
|
||||
}
|
||||
// 会商自动化串联(模块 C):若任务页带来的业务链已解析成功,跳过选链弹窗,
|
||||
// 直接据该业务链进入 Step 2 研讨(用户无需再手选)。
|
||||
if (autoChainResult) {
|
||||
const result = autoChainResult;
|
||||
void drafts.ensureDraft(1).finally(() => handleConfirmAgents(result));
|
||||
return;
|
||||
}
|
||||
if (lockBusinessChain) {
|
||||
triggerToast(
|
||||
autoChainLoading || lockedChainResolution === "loading"
|
||||
? "正在加载管理员配置的业务链,请稍候…"
|
||||
: lockedChainResolution === "unavailable"
|
||||
? lockedChainUnavailableReason ?? "已配置的业务链暂不可用,请确认至少保留 2 个可用智能体后重试"
|
||||
: "管理员尚未配置可用的业务链,请联系管理员处理",
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (
|
||||
inWujieEmbed &&
|
||||
autoChainLoading &&
|
||||
(prefillRef.current?.chainId || prefillRef.current?.businessCode)
|
||||
) {
|
||||
triggerToast("正在加载业务链条,请稍候…");
|
||||
return;
|
||||
}
|
||||
// 先把草稿落地拿到 draft_id,推荐历史才有归属;失败也照常打开弹窗
|
||||
// (弹窗在无 draftId 时退化为「直接推荐、不存历史」)。
|
||||
void drafts.ensureDraft(1).finally(() => setIsRecommendDialogOpen(true));
|
||||
},
|
||||
onManualSave: drafts.handleManualSave,
|
||||
onTriggerToast: triggerToast,
|
||||
submitIntentClarifications: step1.submitIntentClarifications,
|
||||
};
|
||||
// 定制 chrome 仅服务第一阶段;第二、三阶段继续保留原有步骤导航与操作,
|
||||
// 避免独立业务页为了复刻第一步视觉而收窄后续流程的可达性。
|
||||
const useCustomStep1Chrome = currentStep === 1 && Boolean(headerLeftSlot);
|
||||
|
||||
// ─── Render ──────────────────────────────────────────────
|
||||
return (
|
||||
<div
|
||||
data-roundtable-step={currentStep}
|
||||
className={cn(
|
||||
"roundtable-planning theme-transition relative flex h-full min-h-0 flex-col bg-[#fef6f6] font-sans text-slate-800 selection:bg-red-200",
|
||||
isDark && "roundtable-planning--dark",
|
||||
@@ -2068,13 +2202,15 @@ export default function RoundtablePlanningPage({
|
||||
|
||||
{/* HEADER */}
|
||||
<header ref={headerDzRef} className="relative z-[40] 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}
|
||||
hasConsensus={step2.hasConsensus}
|
||||
onStepClick={(s) => setCurrentStep(s)}
|
||||
triggerToast={triggerToast}
|
||||
/>
|
||||
{useCustomStep1Chrome ? headerLeftSlot : (
|
||||
<StepNavigation
|
||||
currentStep={currentStep}
|
||||
intentReady={step1.intentReady}
|
||||
hasConsensus={step2.hasConsensus}
|
||||
onStepClick={(s) => setCurrentStep(s)}
|
||||
triggerToast={triggerToast}
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
{toolbarSlot}
|
||||
@@ -2123,18 +2259,20 @@ export default function RoundtablePlanningPage({
|
||||
className="bg-emerald-600 text-white hover:bg-emerald-700 text-xs font-bold px-3 py-2 rounded-xl flex items-center gap-1.5 transition-all shadow-sm shadow-emerald-500/10 active:scale-95"
|
||||
>
|
||||
<Sparkles className="w-3.5 h-3.5" />
|
||||
新建任务
|
||||
{useCustomStep1Chrome ? (newTaskLabel ?? "新建任务") : "新建任务"}
|
||||
</button>
|
||||
)}
|
||||
|
||||
<button
|
||||
id="save-draft-header-btn"
|
||||
onClick={drafts.handleManualSave}
|
||||
className="bg-white hover:bg-slate-50 border border-[#e2e8f0] text-[#334155] text-xs font-bold px-3 py-2 rounded-xl flex items-center gap-1.5 transition dark:border-border dark:bg-secondary dark:text-foreground dark:hover:bg-accent"
|
||||
>
|
||||
<Save className="w-3.5 h-3.5 text-slate-500" />
|
||||
保存草稿
|
||||
</button>
|
||||
{(!hideHeaderSaveDraft || !useCustomStep1Chrome) && (
|
||||
<button
|
||||
id="save-draft-header-btn"
|
||||
onClick={drafts.handleManualSave}
|
||||
className="bg-white hover:bg-slate-50 border border-[#e2e8f0] text-[#334155] text-xs font-bold px-3 py-2 rounded-xl flex items-center gap-1.5 transition dark:border-border dark:bg-secondary dark:text-foreground dark:hover:bg-accent"
|
||||
>
|
||||
<Save className="w-3.5 h-3.5 text-slate-500" />
|
||||
保存草稿
|
||||
</button>
|
||||
)}
|
||||
|
||||
{/* 「导入会商」按钮先隐藏(保留代码 + 弹窗逻辑,便于以后恢复)。 */}
|
||||
{false && (
|
||||
@@ -2172,22 +2310,26 @@ export default function RoundtablePlanningPage({
|
||||
onCancelRename={drafts.handleCancelRename}
|
||||
/>
|
||||
|
||||
<div className="h-6 w-[1px] bg-slate-200 mx-1" />
|
||||
{useCustomStep1Chrome && headerActionAfterHistory}
|
||||
|
||||
<button
|
||||
id="settings-btn"
|
||||
onClick={handleSettingsClick}
|
||||
title={
|
||||
inWujieEmbed
|
||||
? "回传各智能体交付结果给宿主"
|
||||
: getStoredAuth()?.system_role === "admin"
|
||||
? "会商诊断日志"
|
||||
: "系统设置"
|
||||
}
|
||||
className="p-1.5 text-slate-400 hover:text-slate-600 rounded-lg hover:bg-slate-100 transition-colors dark:text-muted-foreground dark:hover:bg-accent dark:hover:text-foreground"
|
||||
>
|
||||
<Settings className="w-4 h-4" />
|
||||
</button>
|
||||
{(!hideHeaderSettings || !useCustomStep1Chrome) && <div className="h-6 w-[1px] bg-slate-200 mx-1" />}
|
||||
|
||||
{(!hideHeaderSettings || !useCustomStep1Chrome) && (
|
||||
<button
|
||||
id="settings-btn"
|
||||
onClick={handleSettingsClick}
|
||||
title={
|
||||
inWujieEmbed
|
||||
? "回传各智能体交付结果给宿主"
|
||||
: getStoredAuth()?.system_role === "admin"
|
||||
? "会商诊断日志"
|
||||
: "系统设置"
|
||||
}
|
||||
className="p-1.5 text-slate-400 hover:text-slate-600 rounded-lg hover:bg-slate-100 transition-colors dark:text-muted-foreground dark:hover:bg-accent dark:hover:text-foreground"
|
||||
>
|
||||
<Settings className="w-4 h-4" />
|
||||
</button>
|
||||
)}
|
||||
{compactChrome && (
|
||||
<>
|
||||
<ThemeSwitcher tone="content" />
|
||||
@@ -2203,7 +2345,10 @@ export default function RoundtablePlanningPage({
|
||||
sidebarExpanded={step2SidebarExpanded}
|
||||
setSidebarExpanded={setStep2SidebarExpanded}
|
||||
/>
|
||||
<main className="relative z-0 flex-1 overflow-hidden p-4 flex gap-4 min-h-0">
|
||||
<main
|
||||
data-step2-sidebar-expanded={currentStep === 2 ? String(step2SidebarExpanded) : undefined}
|
||||
className="relative z-0 flex-1 overflow-hidden p-4 flex gap-4 min-h-0"
|
||||
>
|
||||
{/* LEFT SIDEBAR */}
|
||||
<LeftSidebar
|
||||
currentStep={currentStep}
|
||||
@@ -2229,6 +2374,8 @@ export default function RoundtablePlanningPage({
|
||||
lockBusinessChain={lockBusinessChain}
|
||||
entryRailBusinessChainSlot={entryRailBusinessChainSlot}
|
||||
entryRailTaskCardSlot={entryRailTaskCardSlot}
|
||||
renderStep1LeftSidebar={renderStep1LeftSidebar}
|
||||
renderStep2LeftSidebarHeader={renderStep2LeftSidebarHeader}
|
||||
/>
|
||||
|
||||
{/* MIDDLE VIEWPORT */}
|
||||
@@ -2237,7 +2384,13 @@ export default function RoundtablePlanningPage({
|
||||
className="flex-1 flex flex-col min-w-0 bg-white border border-slate-200/50 rounded-2xl shadow-[0_4px_16px_rgba(0,0,0,0.015)] overflow-hidden"
|
||||
>
|
||||
{currentStep === 1 && (
|
||||
<Step1Panel
|
||||
renderStep1 ? renderStep1({
|
||||
...step1PanelProps,
|
||||
selectedModel,
|
||||
modelOptions: availableModels.map((model) => ({ label: model.name, value: model.name })),
|
||||
onSelectedModelChange: setSelectedModel,
|
||||
}) : <Step1Panel
|
||||
{...step1PanelProps}
|
||||
headerLeftSlot={
|
||||
// 「原任务已有结果」(目的树预览)只在 rwfx-A(6BF)模式显示;xdfx/3qfx 不显示。
|
||||
prefillRef.current?.taskId &&
|
||||
@@ -2250,57 +2403,12 @@ export default function RoundtablePlanningPage({
|
||||
/>
|
||||
) : undefined
|
||||
}
|
||||
interactiveMessages={step1.interactiveMessages}
|
||||
intentThreadId={step1.intentThreadId}
|
||||
intentReady={step1.intentReady}
|
||||
isIntentSending={step1.isIntentSending}
|
||||
pendingIntentClarificationMsgId={step1.pendingIntentClarificationMsgId}
|
||||
intentClarificationSelections={step1.intentClarificationSelections}
|
||||
setIntentClarificationSelections={step1.setIntentClarificationSelections}
|
||||
onSendMessage={(text, files) => void step1.sendIntentMessage(text, files)}
|
||||
onStopIntent={step1.stopIntentStream}
|
||||
onSkipQuestion={handleSkipQuestion}
|
||||
onFollowUp={handleAgentFollowUp}
|
||||
onEnterRoundtable={() => {
|
||||
if (!step1.intentReady) {
|
||||
triggerToast("请先与任务理解智能体完成澄清,生成任务摘要后再进入");
|
||||
return;
|
||||
}
|
||||
// 会商自动化串联(模块 C):若任务页带来的业务链已解析成功,跳过选链弹窗,
|
||||
// 直接据该业务链进入 Step 2 研讨(用户无需再手选)。
|
||||
if (autoChainResult) {
|
||||
const result = autoChainResult;
|
||||
void drafts.ensureDraft(1).finally(() => handleConfirmAgents(result));
|
||||
return;
|
||||
}
|
||||
if (lockBusinessChain) {
|
||||
triggerToast(
|
||||
autoChainLoading
|
||||
? "正在加载管理员配置的业务链,请稍候…"
|
||||
: "管理员尚未配置可用的业务链,请联系管理员处理",
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (
|
||||
inWujieEmbed &&
|
||||
autoChainLoading &&
|
||||
(prefillRef.current?.chainId || prefillRef.current?.businessCode)
|
||||
) {
|
||||
triggerToast("正在加载业务链条,请稍候…");
|
||||
return;
|
||||
}
|
||||
// 先把草稿落地拿到 draft_id,推荐历史才有归属;失败也照常打开弹窗
|
||||
// (弹窗在无 draftId 时退化为「直接推荐、不存历史」)。
|
||||
void drafts.ensureDraft(1).finally(() => setIsRecommendDialogOpen(true));
|
||||
}}
|
||||
onManualSave={drafts.handleManualSave}
|
||||
onTriggerToast={triggerToast}
|
||||
submitIntentClarifications={step1.submitIntentClarifications}
|
||||
/>
|
||||
)}
|
||||
|
||||
{currentStep === 2 && (
|
||||
<Step2Panel
|
||||
useStep1InputAppearance={rootClassName?.includes("eightbf-roundtable") ?? false}
|
||||
step2RoundtableDialogues={step2.step2RoundtableDialogues}
|
||||
isInitializing={step2.isInitializing}
|
||||
isRoundTableRunning={step2.isRoundTableRunning}
|
||||
@@ -2386,7 +2494,7 @@ export default function RoundtablePlanningPage({
|
||||
</section>
|
||||
|
||||
{/* RIGHT SIDEBAR */}
|
||||
<RightSidebar
|
||||
{!hideDefaultStep1RightSidebar && <RightSidebar
|
||||
currentStep={currentStep}
|
||||
selectedModel={selectedModel}
|
||||
setSelectedModel={setSelectedModel}
|
||||
@@ -2396,7 +2504,7 @@ export default function RoundtablePlanningPage({
|
||||
timelineEntries={step1.timelineEntries}
|
||||
triggerToast={triggerToast}
|
||||
onSaveIntent={handleSaveIntent}
|
||||
/>
|
||||
/>}
|
||||
</main>
|
||||
|
||||
{/* 深链 taskId 模式:底部「快捷跳转」栏(与单智能体问答共用,按业务取按钮管理配置)。 */}
|
||||
@@ -2792,6 +2900,13 @@ interface LeftSidebarProps {
|
||||
entryRailBusinessChainSlot?: ReactNode;
|
||||
/** 第一阶段由独立业务页提供的自定义任务卡片。 */
|
||||
entryRailTaskCardSlot?: ReactNode;
|
||||
/** 独立业务页替换第一步左侧工作区;仅提供已解析的意图状态。 */
|
||||
renderStep1LeftSidebar?: (context: { intentReady: object | null }) => ReactNode;
|
||||
/** 独立业务页在第二步左栏顶部复用任务与意图区。 */
|
||||
renderStep2LeftSidebarHeader?: (context: {
|
||||
intentReady: object | null;
|
||||
onCollapse: () => void;
|
||||
}) => ReactNode;
|
||||
}
|
||||
|
||||
function Step2SandboxSidebarSync({
|
||||
@@ -2844,6 +2959,8 @@ function LeftSidebar({
|
||||
lockedChainId,
|
||||
entryRailBusinessChainSlot,
|
||||
entryRailTaskCardSlot,
|
||||
renderStep1LeftSidebar,
|
||||
renderStep2LeftSidebarHeader,
|
||||
}: LeftSidebarProps) {
|
||||
// 整片脱敏:左侧面板(任务概览/参与角色/人工参与等)的所有文本——标题、动态内容、
|
||||
// 嵌套子组件文本一并脱敏。消息列表与沙箱是另外的容器,不挂此 Hook,保持原文。
|
||||
@@ -2861,6 +2978,7 @@ function LeftSidebar({
|
||||
<section
|
||||
ref={dzRef}
|
||||
id="left-sidebar"
|
||||
data-sidebar-expanded={isStep2 ? String(sidebarExpanded) : undefined}
|
||||
className={cn(
|
||||
"min-h-0 shrink-0 flex flex-col gap-3 pr-1 transition-[width] duration-200 ease-out",
|
||||
isStep2 ? "overflow-y-auto" : "overflow-hidden",
|
||||
@@ -2882,15 +3000,20 @@ function LeftSidebar({
|
||||
{currentStep === 2 ? (
|
||||
sidebarExpanded ? (
|
||||
<>
|
||||
<IntentSummaryCard
|
||||
intentReady={intentReady}
|
||||
title="意图理解"
|
||||
collapsible
|
||||
sidebarToggle={{
|
||||
expanded: sidebarExpanded,
|
||||
onToggle: () => setSidebarExpanded((v) => !v),
|
||||
}}
|
||||
/>
|
||||
{renderStep2LeftSidebarHeader?.({
|
||||
intentReady,
|
||||
onCollapse: () => setSidebarExpanded(false),
|
||||
}) ?? (
|
||||
<IntentSummaryCard
|
||||
intentReady={intentReady}
|
||||
title="意图理解"
|
||||
collapsible
|
||||
sidebarToggle={{
|
||||
expanded: sidebarExpanded,
|
||||
onToggle: () => setSidebarExpanded((v) => !v),
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className="bg-white border border-slate-200/50 rounded-2xl p-4 shadow-[0_2px_8px_rgba(0,0,0,0.01)] flex-1 flex flex-col min-h-[240px]">
|
||||
<div className="flex items-center gap-2 border-b border-slate-100 pb-2.5 mb-3">
|
||||
@@ -2976,19 +3099,21 @@ function LeftSidebar({
|
||||
)
|
||||
) : (
|
||||
// Step 1(落地,未开始研讨):左栏改为业务链 + 分析记录入口(需求 0616 #2)。
|
||||
<RoundtableEntryRail
|
||||
selectedChainId={selectedChainId}
|
||||
onSelectChain={onSelectChain}
|
||||
onOpenDraft={onOpenDraft}
|
||||
activeDraftId={activeDraftId}
|
||||
taskId={entryRailTaskId ?? null}
|
||||
historyTaskId={historyTaskId ?? null}
|
||||
businessCode={entryRailBusinessCode ?? null}
|
||||
lockBusinessChain={lockBusinessChain}
|
||||
lockedChainId={lockedChainId ?? null}
|
||||
businessChainSlot={entryRailBusinessChainSlot}
|
||||
taskCardSlot={entryRailTaskCardSlot}
|
||||
/>
|
||||
renderStep1LeftSidebar?.({ intentReady }) ?? (
|
||||
<RoundtableEntryRail
|
||||
selectedChainId={selectedChainId}
|
||||
onSelectChain={onSelectChain}
|
||||
onOpenDraft={onOpenDraft}
|
||||
activeDraftId={activeDraftId}
|
||||
taskId={entryRailTaskId ?? null}
|
||||
historyTaskId={historyTaskId ?? null}
|
||||
businessCode={entryRailBusinessCode ?? null}
|
||||
lockBusinessChain={lockBusinessChain}
|
||||
lockedChainId={lockedChainId ?? null}
|
||||
businessChainSlot={entryRailBusinessChainSlot}
|
||||
taskCardSlot={entryRailTaskCardSlot}
|
||||
/>
|
||||
)
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user