@agentscope-ai/flow 0.0.4 → 0.0.6

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.
@@ -2,7 +2,7 @@ import { IConditionItem } from "../../types/work-flow";
2
2
  import React from 'react';
3
3
  import { IVarTreeItem } from '../variable-tree-select';
4
4
  import './index.less';
5
- export declare const operatorLabelRender: (val: string) => "=" | "" | ">" | "" | "<" | "≤" | "∋" | "∌" | undefined;
5
+ export declare const operatorLabelRender: (val: string) => "<" | ">" | "=" | "" | "" | "≤" | "∋" | "∌" | undefined;
6
6
  export interface IConditionItemProps {
7
7
  value: IConditionItem;
8
8
  onChange: (value: Partial<IConditionItem>) => void;
@@ -16,6 +16,7 @@ export interface ICustomInputsControlProps {
16
16
  defaultType?: IValueType;
17
17
  hideAdd?: boolean;
18
18
  hideDelete?: boolean;
19
+ noValidate?: boolean;
19
20
  }
20
21
  export interface IVariableFormCompProps {
21
22
  data: Omit<INodeDataInputParamItem, 'key'>;
@@ -358,7 +358,7 @@ export default /*#__PURE__*/memo(function CustomInputsControl(props) {
358
358
  flexShrink: 0
359
359
  },
360
360
  validateTrigger: ['onChange', 'onBlur'],
361
- rules: createVariableNameRules(value, index)
361
+ rules: props.noValidate ? [] : createVariableNameRules(value, index)
362
362
  }, /*#__PURE__*/React.createElement(Input, {
363
363
  placeholder: $i18n.get({
364
364
  id: 'spark-flow.components.CustomInputsControl.index.enterVariableName',
@@ -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 isBatch = props.data.isBatch && !!props.data.batches;
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 (isBatch) {
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 (isBatch) {
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 (isBatch) {
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 && isBatch && /*#__PURE__*/React.createElement(Pagination, {
126
+ })), expand && batch && /*#__PURE__*/React.createElement(Pagination, {
127
127
  current: batchIndex,
128
128
  total: props.data.batches.length,
129
129
  pageSize: 1,
@@ -3,10 +3,6 @@
3
3
  display: flex;
4
4
  align-items: stretch;
5
5
 
6
- .@{ant-prefix}-cascader {
7
- height: auto;
8
- }
9
-
10
6
  .variable-type-select .@{ant-prefix}-select-selector {
11
7
  background-color: e('var(--@{ant-prefix}-color-bg-layout)');
12
8
  }
@@ -120,7 +120,7 @@ export interface IWorkFlowTaskResultItem {
120
120
  parentNodeId?: string;
121
121
  }
122
122
  export interface IWorkFlowNodeResultItem {
123
- isBatch: boolean;
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
- isMultiBranch: boolean;
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.4",
3
+ "version": "0.0.6",
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",