feat(workbench): redesign investigation reports and diagrams

This commit is contained in:
2026-10-10 16:02:47 +08:00
parent 85a9a3ab45
commit ba78a24384
27 changed files with 2380 additions and 187 deletions
@@ -1283,6 +1283,10 @@ function BackendMessageList({
)}
>
<div className="space-y-3">
{message.role === "assistant" && message.taskContext ? <p className="text-xs leading-5 text-[var(--ink-muted)]">
依据:{message.taskContext.execution_generation == null ? "历史资料 · 轮次未记录" : `第 ${message.taskContext.execution_generation} 轮`}
{message.taskContext.report_revision == null ? " · 尚无报告" : ` · 报告第 ${message.taskContext.report_revision} 版`}
</p> : null}
{message.role === "assistant" && !qaOnly ? (
<AgentMessageProgress
progress={message.progress}
+1
View File
@@ -1,4 +1,5 @@
export { AgentCollapsedRail } from "./components/agent-collapsed-rail";
export { agentTaskDiscussionContextSchema, agentTaskContextReferenceSchema, type AgentTaskDiscussionContext, type AgentTaskContextReference } from "./task-context";
export { readExecutionReport, updateExecutionReportProgress, appendExecutionReportText, type AgentExecutionReport } from "./execution-report";
export { parseExecutionPlan, readExecutionPlanHistory, executionPlanStages, executionStatusLabels, type AgentExecutionPlan } from "./execution-plan";
export { AgentCommandPanel } from "./components/agent-command-panel";
+21
View File
@@ -0,0 +1,21 @@
import { z } from "zod";
export const agentTaskDiscussionContextSchema = z
.object({
report_revision: z.number().int().positive().optional(),
evidence_id: z.string().min(1).max(128).optional(),
gap_id: z.string().min(1).max(128).optional()
})
.strict();
export type AgentTaskDiscussionContext = z.infer<typeof agentTaskDiscussionContextSchema>;
export const agentTaskContextReferenceSchema = z
.object({
task_id: z.string().uuid(),
execution_generation: z.number().int().positive().nullable(),
report_revision: z.number().int().positive().nullable()
})
.strict();
export type AgentTaskContextReference = z.infer<typeof agentTaskContextReferenceSchema>;
+1
View File
@@ -6,6 +6,7 @@ export type AgentChatMessage = {
permissions?: AgentPermissionRequest[];
questions?: AgentQuestionRequest[];
todos?: AgentTodoUpdate;
taskContext?: import("./task-context").AgentTaskContextReference;
};
export type AgentStreamRenderMessageState = {