Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
91a79af
feat(sop): review runs in node conversations
Nov 25, 2026
3b0eec2
test(web): load run routes in queue interaction fixture
Nov 25, 2026
4868421
fix(chatbot): let node discussions send when the server lacks the def…
Nov 25, 2026
71f2f1b
fix(chatbot): show one install entry when a node chat reply fails on …
Nov 25, 2026
26a7fda
fix(sop): narrow the default review artifact drawer
Nov 25, 2026
c67d4da
test(e2e): cover stale SOP node conversation requests
Nov 25, 2026
a6a9bc1
Merge main 058a530b into codex/sop-conversation-review
Nov 25, 2026
afa8604
test(engine): pass the execution-selection flag in Runner credential …
Nov 25, 2026
af4108f
Merge main 832e2bef into codex/sop-conversation-review
Nov 25, 2026
56f5904
Merge main c039a78a into codex/sop-conversation-review
Nov 26, 2026
56a1064
fix(assistant): say LOOP in the node-discussion prompt
Nov 26, 2026
3aa63e8
Keep run navigation, diagnostics and workspace in context
codex Nov 26, 2026
c343923
Target the run info disclosure in the UI test
codex Nov 26, 2026
1d5440c
fix(web): keep the all-node log export with 执行详情; cover tab ARIA
Nov 26, 2026
dd500f8
Merge main fe6c45f0 into codex/sop-conversation-review
Nov 26, 2026
7c5ce2d
fix(web): open the requested run tab from the evolution center
Nov 26, 2026
c7f0a19
Merge origin/main into codex/sop-conversation-review
Nov 27, 2026
8d02e97
test(chatbot): cover knowledge citations in extracted chat turns and …
Nov 27, 2026
79e507e
Merge origin/main (fd039e51) into codex/sop-conversation-review
Nov 27, 2026
6a67deb
Merge main into codex/sop-conversation-review
Nov 28, 2026
407a7f3
fix(chat): restore the main reply imports after merging main into #1332
Nov 28, 2026
2d562e3
fix(runs): keep the review observation scope control after merging main
Nov 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
339 changes: 71 additions & 268 deletions chatbot/src/App.jsx

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions chatbot/src/ArtifactFileRow.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import React from "react";
import HarnessIcon from "./HarnessIcon";
import { definitionTarget } from "./platform.js";

const icons = {
html: "globe",
slides: "monitor",
ppt: "monitor",
sop: "workflow",
"merge-request": "branch",
role: "user",
code: "stage-ide",
};

export default function ArtifactFileRow({
artifact,
projectId,
selected,
onSelect,
}) {
const icon = artifact.mimeType?.startsWith("image/")
? "image"
: icons[artifact.kind] || "doc";
const target = definitionTarget(artifact, projectId);
const href = target?.href || (artifact.external ? artifact.url : "");
const Row = href ? "a" : "button";
const title = target
? `${artifact.name} · ${target.label}`
: artifact.external
? `${artifact.name} · 在代码仓库打开`
: artifact.name;

return (
<Row
className={`artifact-row artifact-file-row ${selected ? "is-selected" : ""}`}
title={title}
aria-current={selected ? "true" : undefined}
{...(href
? { href, target: "_blank", rel: "noopener noreferrer" }
: { type: "button", onClick: () => onSelect(artifact) })}
>
<span className="artifact-file-icon">
<HarnessIcon name={icon} size={16} />
</span>
<span className="artifact-file-copy">
<strong>{artifact.name}</strong>
<small>
{target
? `${artifact.kind === "sop" ? "LOOP" : "角色"} · ${artifact.asset?.status === "published" ? "已发布" : "已保存"}`
: artifact.source}
{artifact.size
? ` · ${artifact.size < 1024 ? `${artifact.size} B` : `${Math.ceil(artifact.size / 1024)} KB`}`
: ""}
</small>
</span>
<HarnessIcon
name={href ? "preview-expand" : "chevron-right"}
className="artifact-row-action"
size={13}
/>
</Row>
);
}
198 changes: 80 additions & 118 deletions chatbot/src/ArtifactPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import React, { useEffect, useRef, useState } from "react";
import HarnessIcon from "./HarnessIcon";
import { api, messageOffset } from "./api";
import { ArtifactPreview, RichContent } from "./RichContent";
import ArtifactFileRow from "./ArtifactFileRow";
import { DraftCard } from "./SidePanel";
import SopRunPanel, { runStatus } from "./SopRunPanel";
import { openRunPage } from "./sop-review.js";
import ChangesPanel from "./ChangesPanel";
import AgentBrowser from "./AgentBrowser";
import WorkspaceIDE from "./WorkspaceIDE";
Expand All @@ -15,35 +17,14 @@ import { definitionTarget, actionName } from "./platform.js";
import { useArtifactPanelLayout } from "./useArtifactPanelLayout";
import "./artifact-panel.css";

const FileText = (props) => <HarnessIcon name="doc" {...props} />;
const FileImage = (props) => <HarnessIcon name="image" {...props} />;
const FileCode = (props) => <HarnessIcon name="stage-ide" {...props} />;
const Presentation = (props) => <HarnessIcon name="monitor" {...props} />;
const Globe = (props) => <HarnessIcon name="globe" {...props} />;
const GitBranch = (props) => <HarnessIcon name="workflow" {...props} />;
const MergeRequest = (props) => <HarnessIcon name="branch" {...props} />;
const UserRound = (props) => <HarnessIcon name="user" {...props} />;
const ChevronLeft = (props) => <HarnessIcon name="chevron-left" {...props} />;
const ChevronRight = (props) => <HarnessIcon name="chevron-right" {...props} />;
const X = (props) => <HarnessIcon name="close" {...props} />;
const ExternalLink = (props) => (
<HarnessIcon name="preview-expand" {...props} />
);

export function artifactIcon(a) {
if (a.mimeType?.startsWith("image/")) return FileImage;
return (
{
html: Globe,
slides: Presentation,
ppt: Presentation,
sop: GitBranch,
"merge-request": MergeRequest,
role: UserRound,
code: FileCode,
}[a.kind] || FileText
);
}
function DefinitionPreview({ artifact }) {
const [data, setData] = useState(null),
[error, setError] = useState("");
Expand Down Expand Up @@ -189,16 +170,19 @@ export default function ArtifactPanel({
onClose,
open = true,
view = "artifacts",
filesOnly = false,
layoutOptions,
onViewChange = () => {},
workspaceChanges = null,
workspaceRunId = "",
browserRequest = null,
onBrowserRequestHandled = () => {},
onAddElement = null,
onRunChanged,
}) {
const root = useRef(null);
const searchInput = useRef(null);
const [nodeId, setNodeId] = useState(selected?.nodeId || null);
const [nodeId, setNodeId] = useState(selected?.kind === "run" ? selected.nodeId || null : null);
const [search, setSearch] = useState("");
const browsing = view === "browser";
const coding = view === "ide";
Expand Down Expand Up @@ -258,10 +242,11 @@ export default function ArtifactPanel({
(browsing && workspaceRunId ? "agent-browser" : null) ||
(coding && workspaceRunId ? "workspace-ide" : null),
open,
layoutOptions,
);
useEffect(
() => setNodeId(selected?.nodeId || null),
[selected?.id, selected?.nodeId],
() => setNodeId(selected?.kind === "run" ? selected.nodeId || null : null),
[selected?.id, selected?.kind, selected?.nodeId],
);
useEffect(() => setSearch(""), [chat.session?.id]);
const selectedRun =
Expand Down Expand Up @@ -362,50 +347,15 @@ export default function ArtifactPanel({
visibleMergeRequests.length +
visibleRuns.length +
visibleSubagents.length;
const row = (artifact) => {
const Icon = artifactIcon(artifact);
const target = definitionTarget(artifact, projectId);
// External deliverables (a submitted pull request) live on the code host,
// so the row opens them in a new tab instead of opening a local preview.
const href = target?.href || (artifact.external ? artifact.url : "");
const Row = href ? "a" : "button";
const title = target
? `${artifact.name} · ${target.label}`
: artifact.external
? `${artifact.name} · 在代码仓库打开`
: artifact.name;
return (
<Row
className={`artifact-row artifact-file-row ${selected?.id === artifact.id ? "is-selected" : ""}`}
key={artifact.id}
title={title}
aria-current={selected?.id === artifact.id ? "true" : undefined}
{...(href
? { href, target: "_blank", rel: "noopener noreferrer" }
: { type: "button", onClick: () => setSelected(artifact) })}
>
<span className="artifact-file-icon">
<Icon size={16} />
</span>
<span className="artifact-file-copy">
<strong>{artifact.name}</strong>
<small>
{target
? `${artifact.kind === "sop" ? "LOOP" : "角色"} · ${artifact.asset?.status === "published" ? "已发布" : "已保存"}`
: artifact.source}
{artifact.size
? ` · ${artifact.size < 1024 ? `${artifact.size} B` : `${Math.ceil(artifact.size / 1024)} KB`}`
: ""}
</small>
</span>
{href ? (
<ExternalLink className="artifact-row-action" size={13} />
) : (
<ChevronRight className="artifact-row-action" size={13} />
)}
</Row>
);
};
const row = (artifact) => (
<ArtifactFileRow
key={artifact.id}
artifact={artifact}
projectId={projectId}
selected={selected?.id === artifact.id}
onSelect={setSelected}
/>
);
return (
<>
{!layout.compact ? (
Expand Down Expand Up @@ -454,55 +404,59 @@ export default function ArtifactPanel({
<span>产物</span>
<small>{count}</small>
</button>
<button
type="button"
role="tab"
aria-selected={view === "changes"}
className={view === "changes" ? "is-active" : ""}
onClick={() => onViewChange("changes")}
disabled={!workspaceRunId}
title={
workspaceRunId
? "查看本次会话写入工作区的改动"
: "本次会话还没有工作区"
}
>
<HarnessIcon name="edit" size={14} />
<span>改动</span>
<small>{workspaceChanges?.files?.length || 0}</small>
</button>
<button
type="button"
role="tab"
aria-selected={browsing}
className={browsing ? "is-active" : ""}
onClick={() => onViewChange("browser")}
disabled={!workspaceRunId}
title={
workspaceRunId
? "实时查看并操作 Agent 正在用的浏览器"
: "本次会话还没有工作区"
}
>
<HarnessIcon name="stage-browser" size={14} />
<span>浏览器</span>
</button>
<button
type="button"
role="tab"
aria-selected={coding}
className={coding ? "is-active" : ""}
onClick={() => onViewChange("ide")}
disabled={!workspaceRunId}
title={
workspaceRunId
? "在 VS Code 里浏览、编辑本次会话的工作区"
: "本次会话还没有工作区"
}
>
<HarnessIcon name="stage-ide" size={14} />
<span>IDE</span>
</button>
{!filesOnly ? (
<>
<button
type="button"
role="tab"
aria-selected={view === "changes"}
className={view === "changes" ? "is-active" : ""}
onClick={() => onViewChange("changes")}
disabled={!workspaceRunId}
title={
workspaceRunId
? "查看本次会话写入工作区的改动"
: "本次会话还没有工作区"
}
>
<HarnessIcon name="edit" size={14} />
<span>改动</span>
<small>{workspaceChanges?.files?.length || 0}</small>
</button>
<button
type="button"
role="tab"
aria-selected={browsing}
className={browsing ? "is-active" : ""}
onClick={() => onViewChange("browser")}
disabled={!workspaceRunId}
title={
workspaceRunId
? "实时查看并操作 Agent 正在用的浏览器"
: "本次会话还没有工作区"
}
>
<HarnessIcon name="stage-browser" size={14} />
<span>浏览器</span>
</button>
<button
type="button"
role="tab"
aria-selected={coding}
className={coding ? "is-active" : ""}
onClick={() => onViewChange("ide")}
disabled={!workspaceRunId}
title={
workspaceRunId
? "在 VS Code 里浏览、编辑本次会话的工作区"
: "本次会话还没有工作区"
}
>
<HarnessIcon name="stage-ide" size={14} />
<span>IDE</span>
</button>
</>
) : null}
</div>
<div className="artifact-panel-actions">
{layout.compact ? (
Expand Down Expand Up @@ -646,6 +600,7 @@ export default function ArtifactPanel({
embedded
selectedNodeId={nodeId}
onSelectNode={setNodeId}
onChanged={onRunChanged}
onClose={() => setSelected(null)}
/>
) : selectedAgent?.deferredActivity ? (
Expand Down Expand Up @@ -728,10 +683,10 @@ export default function ArtifactPanel({
<section className="artifact-section">
<h3>LOOP 运行</h3>
{visibleRuns.map((run) => (
<div className="sop-artifact-run" key={run.id}>
<button
type="button"
className="artifact-row artifact-run-row"
key={run.id}
onClick={() =>
setSelected({
kind: "run",
Expand Down Expand Up @@ -763,6 +718,13 @@ export default function ArtifactPanel({
</span>
<ChevronRight className="artifact-row-action" size={13} />
</button>
<IconButton className="sop-artifact-record"
label={`查看运行记录:${run.workflowSnapshot?.name || run.id}`}
onClick={() => openRunPage(run.id)}
>
<HarnessIcon name="runs" size={16} />
</IconButton>
</div>
))}
</section>
) : null}
Expand Down
Loading
Loading