@shenghuabi/workflow 1.1.5 → 1.1.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.
package/index.d.ts CHANGED
@@ -12,3 +12,4 @@ export * from './inline/inline.service';
12
12
  export * from './plugin/plugin.service';
13
13
  export * from './type/type';
14
14
  export * from './workflow-file.service';
15
+ export * from './util/serialize-text-template';
package/index.js CHANGED
@@ -67,7 +67,8 @@ __export(workflow_exports, {
67
67
  createLLMData: () => createLLMData,
68
68
  createResultData: () => createResultData,
69
69
  flatFilterHandleList: () => flatFilterHandleList,
70
- llmModelConfig: () => llmModelConfig
70
+ llmModelConfig: () => llmModelConfig,
71
+ serializeLexicalTextarea: () => serializeLexicalTextarea
71
72
  });
72
73
  module.exports = __toCommonJS(workflow_exports);
73
74
 
@@ -707,7 +708,7 @@ var import_static_injector5 = require("static-injector");
707
708
  // packages/workflow/util/serialize-text-template.ts
708
709
  var import_compat2 = require("es-toolkit/compat");
709
710
  var import_variable_serialization = require("@shenghuabi/lexical-textarea/variable-serialization");
710
- function serializeWithContext(input, options) {
711
+ function serializeLexicalTextarea(input, options) {
711
712
  const { context, environmentContext, onMetadata } = options;
712
713
  return (0, import_variable_serialization.serializeTemplate)(input, (item) => {
713
714
  if (item.type === "custom") {
@@ -741,13 +742,13 @@ function useChat() {
741
742
  const list2 = list.map((item) => {
742
743
  const contentList = item.content.map((contentChild) => {
743
744
  if (contentChild.type === "text") {
744
- const text = serializeWithContext(
745
+ const text = serializeLexicalTextarea(
745
746
  contentChild.text,
746
747
  serializeOptions
747
748
  );
748
749
  return { type: contentChild.type, text };
749
750
  } else if (contentChild.type === "image_url") {
750
- const url = serializeWithContext(
751
+ const url = serializeLexicalTextarea(
751
752
  contentChild.image_url.url,
752
753
  serializeOptions
753
754
  );
@@ -922,7 +923,7 @@ var TextareaRunner = class extends NodeRunnerBase {
922
923
  return async () => {
923
924
  let metadataList;
924
925
  const context = await this.context$$();
925
- const value = serializeWithContext(this.inputs.value, {
926
+ const value = serializeLexicalTextarea(this.inputs.value, {
926
927
  context,
927
928
  environmentContext: this.environmentContext,
928
929
  onMetadata(metadata) {
@@ -1885,6 +1886,7 @@ var WORKFLOW_MODULE = {
1885
1886
  createLLMData,
1886
1887
  createResultData,
1887
1888
  flatFilterHandleList,
1888
- llmModelConfig
1889
+ llmModelConfig,
1890
+ serializeLexicalTextarea
1889
1891
  });
1890
1892
  //# sourceMappingURL=index.js.map