@agentscope-ai/flow 0.0.4 → 0.0.5
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.
|
@@ -74,27 +74,27 @@ var NodeResultPanel = function NodeResultPanel(props) {
|
|
|
74
74
|
_useState2 = _slicedToArray(_useState, 2),
|
|
75
75
|
expand = _useState2[0],
|
|
76
76
|
setExpand = _useState2[1];
|
|
77
|
-
var
|
|
77
|
+
var batch = props.data.batch && !!props.data.batches;
|
|
78
78
|
var _useState3 = useState(1),
|
|
79
79
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
80
80
|
batchIndex = _useState4[0],
|
|
81
81
|
setBatchIndex = _useState4[1];
|
|
82
82
|
var inputContent = useMemo(function () {
|
|
83
|
-
if (
|
|
83
|
+
if (batch) {
|
|
84
84
|
var _props$data$batches;
|
|
85
85
|
return (_props$data$batches = props.data.batches[batchIndex - 1]) === null || _props$data$batches === void 0 ? void 0 : _props$data$batches.input;
|
|
86
86
|
}
|
|
87
87
|
return props.data.input;
|
|
88
88
|
}, [props.data, batchIndex]);
|
|
89
89
|
var outputContent = useMemo(function () {
|
|
90
|
-
if (
|
|
90
|
+
if (batch) {
|
|
91
91
|
var _props$data$batches2;
|
|
92
92
|
return (_props$data$batches2 = props.data.batches[batchIndex - 1]) === null || _props$data$batches2 === void 0 ? void 0 : _props$data$batches2.output;
|
|
93
93
|
}
|
|
94
94
|
return props.data.output;
|
|
95
95
|
}, [props.data, batchIndex]);
|
|
96
96
|
var errorInfoContent = useMemo(function () {
|
|
97
|
-
if (
|
|
97
|
+
if (batch) {
|
|
98
98
|
var _props$data$batches3;
|
|
99
99
|
return (_props$data$batches3 = props.data.batches[batchIndex - 1]) === null || _props$data$batches3 === void 0 ? void 0 : _props$data$batches3.errorInfo;
|
|
100
100
|
}
|
|
@@ -123,7 +123,7 @@ var NodeResultPanel = function NodeResultPanel(props) {
|
|
|
123
123
|
className: "spark-flow-node-result-time"
|
|
124
124
|
}, props.data.nodeExecTime)), props.data.nodeStatus !== 'skip' && /*#__PURE__*/React.createElement(SparkUpLine, {
|
|
125
125
|
className: "text-base spark-flow-node-result-expand-icon"
|
|
126
|
-
})), expand &&
|
|
126
|
+
})), expand && batch && /*#__PURE__*/React.createElement(Pagination, {
|
|
127
127
|
current: batchIndex,
|
|
128
128
|
total: props.data.batches.length,
|
|
129
129
|
pageSize: 1,
|
|
@@ -120,7 +120,7 @@ export interface IWorkFlowTaskResultItem {
|
|
|
120
120
|
parentNodeId?: string;
|
|
121
121
|
}
|
|
122
122
|
export interface IWorkFlowNodeResultItem {
|
|
123
|
-
|
|
123
|
+
batch: boolean;
|
|
124
124
|
retry?: {
|
|
125
125
|
happened: boolean;
|
|
126
126
|
retryTimes: number;
|
|
@@ -133,7 +133,7 @@ export interface IWorkFlowNodeResultItem {
|
|
|
133
133
|
totalTokens: number;
|
|
134
134
|
}[];
|
|
135
135
|
batches: IWorkFlowNodeResultItem[];
|
|
136
|
-
|
|
136
|
+
multiBranch: boolean;
|
|
137
137
|
multiBranchResults?: {
|
|
138
138
|
conditionId: string;
|
|
139
139
|
targetIds: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentscope-ai/flow",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "A powerful and flexible flow canvas rendering engine designed for AI applications. Provides comprehensive workflow visualization and interaction capabilities for platforms like Bailian and AgentScope, enabling seamless creation and management of complex AI agent workflows with an intuitive drag-and-drop interface.",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|