@agentscope-ai/flow 0.0.16 → 0.0.17

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.
@@ -29,5 +29,5 @@ export declare const VariableTreeNodeItem: React.MemoExoticComponent<(props: IVa
29
29
  value?: string | undefined;
30
30
  onChange?: ((value: Pick<IVarItem, 'type' | 'value'>) => void) | undefined;
31
31
  }) => React.JSX.Element>;
32
- declare const VariableTreeSelect: React.MemoExoticComponent<(props: IVariableTreeSelectProps) => string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined>;
32
+ declare const VariableTreeSelect: React.MemoExoticComponent<(props: IVariableTreeSelectProps) => string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined>;
33
33
  export default VariableTreeSelect;
@@ -208,8 +208,11 @@ export var getParentInputParams = function getParentInputParams(node) {
208
208
  var inputParams = node.data.inputParams;
209
209
  var list = [];
210
210
  inputParams.forEach(function (item) {
211
- var _item$type;
212
- if ((_item$type = item.type) !== null && _item$type !== void 0 && _item$type.includes('Array') && !!item.value) {
211
+ var _item$value, _item$type;
212
+ // 检查是不是数组里的子变量,例如${DocumentParse_AKQK.layout.[markdownContent]
213
+ var matches = (_item$value = item.value) === null || _item$value === void 0 ? void 0 : _item$value.match(/\[[^\[\]]+\]/g);
214
+ var isSubPropertyInArray = matches === null || matches === void 0 ? void 0 : matches.length;
215
+ if (((_item$type = item.type) !== null && _item$type !== void 0 && _item$type.includes('Array') || isSubPropertyInArray) && !!item.value) {
213
216
  var arrayType = item.type.replace(/^Array<(.+)>$/, '$1');
214
217
  list.push({
215
218
  label: "item (in ".concat(item.key, ")"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentscope-ai/flow",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
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",