@shenghuabi/workflow 1.1.0 → 1.1.2

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/index.js CHANGED
@@ -498,37 +498,42 @@ var CHAT_NODE_DEFINE = v7.looseObject({
498
498
  ),
499
499
  value: v7.pipe(
500
500
  v7.custom(Boolean),
501
- (0, import_view_angular_core5.setComponent)("prompt-list"),
502
- (0, import_view_angular_core5.valueChange)((fn) => {
503
- fn({ list: [void 0] }).subscribe(({ list: [value], field }) => {
504
- if (!Array.isArray(value)) {
505
- return;
506
- }
507
- const inputValue = value ?? [];
508
- field.context.parseTemplate(
509
- inputValue.flatMap(
510
- (item) => item.content.map(
511
- (item2) => item2.type === "text" ? item2.text : ""
512
- )
513
- )
514
- ).then((value2) => {
515
- if (!value2) {
516
- return;
517
- }
518
- field.context.changeHandleData(field, "input", 1, value2);
519
- });
520
- const list = inputValue.flatMap(
521
- (item) => item.content.map(
522
- (item2) => item2.type === "image_url" ? item2.image_url.url : void 0
523
- )
524
- ).filter(Boolean).map((item) => ({
525
- value: `${item}`,
526
- label: `${item}`,
527
- inputType: `image`
528
- }));
529
- field.context.changeHandleData(field, "input", 3, list ?? []);
530
- });
531
- })
501
+ (0, import_view_angular_core5.setComponent)("prompt-list")
502
+ // valueChange((fn) => {
503
+ // fn({ list: [undefined] }).subscribe(({ list: [value], field }) => {
504
+ // if (!Array.isArray(value)) {
505
+ // return;
506
+ // }
507
+ // const inputValue: ChatMessageListInputType = value ?? [];
508
+ // // field.context
509
+ // // .parseTemplate(
510
+ // // inputValue.flatMap((item) =>
511
+ // // item.content.map((item) =>
512
+ // // item.type === 'text' ? item.text : '',
513
+ // // ),
514
+ // // ),
515
+ // // )
516
+ // // .then((value: any) => {
517
+ // // if (!value) {
518
+ // // return;
519
+ // // }
520
+ // // field.context.changeHandleData(field, 'input', 1, value);
521
+ // // });
522
+ // // const list = inputValue
523
+ // // .flatMap((item) =>
524
+ // // item.content.map((item) =>
525
+ // // item.type === 'image_url' ? item.image_url.url : undefined,
526
+ // // ),
527
+ // // )
528
+ // // .filter(Boolean)
529
+ // // .map((item) => ({
530
+ // // value: `${item}`,
531
+ // // label: `${item}`,
532
+ // // inputType: `image` as const,
533
+ // // }));
534
+ // // field.context.changeHandleData(field, 'input', 3, list ?? []);
535
+ // });
536
+ // }),
532
537
  )
533
538
  })
534
539
  });