@fieldwangai/agentflow 0.1.64 → 0.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/lib/ui-server.mjs
CHANGED
|
@@ -2122,7 +2122,9 @@ function workspaceExtractNamedOutputValue(content, slotName) {
|
|
|
2122
2122
|
}
|
|
2123
2123
|
|
|
2124
2124
|
function workspaceApplyAgentOutputSlots(instance, content) {
|
|
2125
|
-
const structured =
|
|
2125
|
+
const structured = content && typeof content === "object" && !Array.isArray(content)
|
|
2126
|
+
? content
|
|
2127
|
+
: workspaceStructuredAgentOutput(content);
|
|
2126
2128
|
const text = String(structured.result || "").trim();
|
|
2127
2129
|
let changed = false;
|
|
2128
2130
|
const next = {
|
|
@@ -3372,7 +3374,7 @@ async function runWorkspaceGraph(root, scopedRoot, payload, userCtx = {}, opts =
|
|
|
3372
3374
|
const normalizedAgentOutput = workspacePublishAgentOutputFiles(workspaceStructuredAgentOutput(content), runPackage);
|
|
3373
3375
|
const resultContent = normalizedAgentOutput.result || content;
|
|
3374
3376
|
outputs.set(nodeId, resultContent);
|
|
3375
|
-
const slotUpdate = workspaceApplyAgentOutputSlots(instance,
|
|
3377
|
+
const slotUpdate = workspaceApplyAgentOutputSlots(instance, normalizedAgentOutput);
|
|
3376
3378
|
if (slotUpdate.changed) graph.instances[nodeId] = slotUpdate.instance;
|
|
3377
3379
|
const updatedDisplays = workspaceUpdateDirectDisplays(graph, nodeId, resultContent, outputs);
|
|
3378
3380
|
if (slotUpdate.changed || updatedDisplays.length) emit({ type: "graph", nodeId, displayNodeIds: updatedDisplays, graph });
|