feat(agent): 审美分析 - 接入费用确认与阶段任务恢复
This commit is contained in:
@@ -9,7 +9,7 @@ const manifest: PluginManifest = {
|
||||
id: ART_CRITIQUE_PLUGIN_ID,
|
||||
name: "AI 审美批改",
|
||||
version: "0.1.0",
|
||||
description: "分析图片的构图、色彩、光线和比例问题,输出结构化批改报告与可视化标注。",
|
||||
description: "分析图片的构图、色彩、光线和比例问题,输出结构化批改报告与可视化标注。prepare-input 准备节点;canvas_start_art_critique 打开分析并准备真实报价,用户确认费用后执行;canvas_read_plugin_node 读取结果。",
|
||||
author: "内置工具",
|
||||
surfaces: ["node", "fullscreen"],
|
||||
permissions: ["canvas.read", "canvas.write", "media.read", "ai.text"],
|
||||
@@ -38,7 +38,7 @@ export const artCritiquePlugin: RegisteredPlugin = {
|
||||
const state = node.metadata?.artCritique;
|
||||
const sources = snapshot.nodes.filter((item) => item.type === "image" && snapshot.connections.some((edge) => edge.fromNodeId === item.id && edge.toNodeId === node.id));
|
||||
const currentReport = state?.report && sources.length === 1 && state.report.sourceFingerprint === artCritiqueSourceFingerprint(sources[0]) ? state.report : undefined;
|
||||
return { status: state?.report && !currentReport ? "stale" : state?.status || "idle", stage: state?.analysisStage, stageTaskIds: state?.stageTaskIds, sourceNodeId: state?.sourceNodeId, summary: currentReport?.summary, strengths: currentReport?.strengths, issues: currentReport?.issues, options: currentReport?.options, error: state?.errorMessage, execution: "已有报告仅在输入指纹一致时返回;新分析请使用节点的分析入口,当前 Agent 动作仅准备输入。" };
|
||||
return { status: state?.report && !currentReport ? "stale" : state?.status || "idle", stage: state?.analysisStage, stageTaskIds: state?.stageTaskIds, sourceNodeId: state?.sourceNodeId, summary: currentReport?.summary, strengths: currentReport?.strengths, issues: currentReport?.issues, options: currentReport?.options, error: state?.errorMessage, execution: "已有报告仅在输入指纹一致时返回;canvas_start_art_critique 准备分析报价,用户确认后执行。" };
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user