圆桌第三步流程图模式 + 后台 DAG 任务编排
- 方案总结报告:用户要求结构化输出/流程图时跳过 md 直出 flow-json 流程图, 报告用文字展示;报告与流程图均可多轮修改、互相切换(detectFlowIntent 识别意图) - 流程图画布放右侧沙箱位(sidePanel 插槽)不覆盖消息列表,可与 md 预览切换; 节点随容器宽度自适应缩放并 fitView 居中 - 后台挂起支持真 DAG 编排(分层并行/阶段目标/总控提示词),新增 orchestration_plan 持久化列 + 迁移;大弹窗流程图按 DAG 分层渲染 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b33426416b
commit
086c280e5d
25 files changed
+880
-149
No files matched your search
@@ -43,6 +43,11 @@ interface Step2SandboxLayoutProps {
|
||||
* 对齐主聊天 chats/:threadId 的实时预览体验。
|
||||
*/
|
||||
seatMessages?: unknown[];
|
||||
/**
|
||||
* 右侧面板的替代内容(如 Step3 流程图画布)——非空时强制展开右栏并替换沙箱预览,
|
||||
* 左侧消息列表保持可见;置空即恢复沙箱(文件预览/列表)。
|
||||
*/
|
||||
sidePanel?: React.ReactNode;
|
||||
}
|
||||
|
||||
export function Step2SandboxLayout({
|
||||
@@ -52,6 +57,7 @@ export function Step2SandboxLayout({
|
||||
seatMessages,
|
||||
artifactsFill = false,
|
||||
onArtifactsClose,
|
||||
sidePanel,
|
||||
}: Step2SandboxLayoutProps) {
|
||||
const layoutRef = useRef<GroupImperativeHandle>(null);
|
||||
const {
|
||||
@@ -64,11 +70,13 @@ export function Step2SandboxLayout({
|
||||
const artifacts = rawArtifacts ?? [];
|
||||
|
||||
const artifactPanelOpen = artifactsOpen;
|
||||
// sidePanel(流程图等)非空时即使沙箱没开也要把右栏撑开。
|
||||
const panelOpen = artifactPanelOpen || !!sidePanel;
|
||||
|
||||
useEffect(() => {
|
||||
if (artifactsFill || !layoutRef.current) return;
|
||||
layoutRef.current.setLayout(artifactPanelOpen ? OPEN_MODE : CLOSE_MODE);
|
||||
}, [artifactPanelOpen, artifactsFill]);
|
||||
layoutRef.current.setLayout(panelOpen ? OPEN_MODE : CLOSE_MODE);
|
||||
}, [panelOpen, artifactsFill]);
|
||||
|
||||
const handleArtifactsClose = () => {
|
||||
deselect();
|
||||
@@ -151,7 +159,7 @@ export function Step2SandboxLayout({
|
||||
if (artifactsFill) {
|
||||
return (
|
||||
<ThreadContext.Provider value={{ thread: threadStub, isMock: false }}>
|
||||
<div className="h-full min-h-0 flex-1 bg-[#fffdfa]">{artifactPanelBody}</div>
|
||||
<div className="h-full min-h-0 flex-1 bg-[#fffdfa]">{sidePanel ?? artifactPanelBody}</div>
|
||||
</ThreadContext.Provider>
|
||||
);
|
||||
}
|
||||
@@ -172,17 +180,17 @@ export function Step2SandboxLayout({
|
||||
id="roundtable-step2-separator"
|
||||
className={cn(
|
||||
"opacity-33 hover:opacity-100",
|
||||
!artifactPanelOpen && "pointer-events-none opacity-0",
|
||||
!panelOpen && "pointer-events-none opacity-0",
|
||||
)}
|
||||
/>
|
||||
<ResizablePanel
|
||||
className={cn(
|
||||
"bg-[#fffdfa] transition-all duration-300 ease-in-out",
|
||||
!artifactsOpen && "opacity-0",
|
||||
!panelOpen && "opacity-0",
|
||||
)}
|
||||
id="artifacts"
|
||||
>
|
||||
{artifactPanelBody}
|
||||
{sidePanel ?? artifactPanelBody}
|
||||
</ResizablePanel>
|
||||
</ResizablePanelGroup>
|
||||
</ThreadContext.Provider>
|
||||
|
||||
Reference in new issue
Block a user