fix(canvas): Agent 面板 - 读清单与看画面分档、操作行折叠动效与时间线标识清理
(cherry picked from commit 6c0cadcf9d0dad48a065598ff57b4bde1e135fcd)
This commit is contained in:
1 parent
73ca5a5e9f
commit
27afacd5ac
10 files changed
+477
-81
No files matched your search
@@ -46,6 +46,14 @@ export function agentCanvasActions(toolName: string, detail: unknown, references
|
||||
}
|
||||
} else if (toolName === "canvas_get_state" && !failed && Array.isArray(result.nodes)) {
|
||||
for (const value of result.nodes) { const node = agentRecord(value); add(node.id, node.title, node.type, "read"); }
|
||||
} else if (toolName === "canvas_inspect_image" && !failed) {
|
||||
// 看图回执:reuseObservation 是复用账本里的观察(没有再附图)、repeat 是读循环护栏
|
||||
// (只回执文字)。两者都没有把画面送出去,所以不能报成"查看了…画面"。
|
||||
if (result.reuseObservation === true) add(result.nodeId, result.title, "image", "reused");
|
||||
else if (result.repeat !== true) {
|
||||
add(result.nodeId, result.title, "image", "viewed");
|
||||
if (Array.isArray(result.batchImages)) for (const value of result.batchImages) { const image = agentRecord(value); add(image.nodeId, image.title, "image", "viewed"); }
|
||||
}
|
||||
} else if (toolName === "canvas_apply_ops" && !failed && Array.isArray(args.ops)) {
|
||||
for (const value of args.ops) {
|
||||
const op = agentRecord(value);
|
||||
@@ -64,7 +72,8 @@ export function agentCanvasActionLabel(action: AgentCanvasAction) {
|
||||
const targetKind = ({ image: "图片", video: "视频", audio: "音频", text: "文本", markdown: "Markdown", script: "分镜" } as Record<string, string>)[action.targetNodeType || ""] || "";
|
||||
return `建立引用:${kind}节点《${action.title}》 → ${targetKind}节点《${action.targetTitle}》`;
|
||||
}
|
||||
const verb = ({ created: "创建了", updated: "更新了", referenced: "引用了", read: "读取了", generating: "已提交生成:", generated: "已生成", failed: "生成未完成:" } as Record<string, string>)[action.action] || "定位";
|
||||
// read 的动词必须是"存在式":canvas_get_state 只读到清单,说成"读取了图片节点"会被读成看过画面。
|
||||
const verb = ({ created: "创建了", updated: "更新了", referenced: "引用了", read: "画布上有", viewed: "查看了", reused: "复用观察:", generating: "已提交生成:", generated: "已生成", failed: "生成未完成:" } as Record<string, string>)[action.action] || "定位";
|
||||
const fieldText = action.fields?.length ? `(修改:${action.fields.join("、")})` : "";
|
||||
const titleText = action.resultTitle ? `,名称改为《${action.resultTitle}》` : "";
|
||||
return `${verb}${kind}节点《${action.title}》${fieldText}${titleText}`;
|
||||
|
||||
Reference in new issue
Block a user