balibabu commited on
Commit
591888d
·
1 Parent(s): b134064

feat: customize edge arrow #918 (#1338)

Browse files

### What problem does this PR solve?

feat: customize edge arrow #918

### Type of change


- [x] New Feature (non-breaking change which adds functionality)

web/src/pages/flow/canvas/index.tsx CHANGED
@@ -3,7 +3,6 @@ import ReactFlow, {
3
  Background,
4
  ConnectionMode,
5
  Controls,
6
- MarkerType,
7
  NodeMouseHandler,
8
  } from 'reactflow';
9
  import 'reactflow/dist/style.css';
@@ -67,6 +66,26 @@ function FlowCanvas({ chatDrawerVisible, hideChatDrawer }: IProps) {
67
 
68
  return (
69
  <div className={styles.canvasWrapper}>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  <ReactFlow
71
  connectionMode={ConnectionMode.Loose}
72
  nodes={nodes}
@@ -90,8 +109,17 @@ function FlowCanvas({ chatDrawerVisible, hideChatDrawer }: IProps) {
90
  }}
91
  defaultEdgeOptions={{
92
  type: 'buttonEdge',
93
- markerEnd: {
94
- type: MarkerType.ArrowClosed,
 
 
 
 
 
 
 
 
 
95
  },
96
  }}
97
  >
 
3
  Background,
4
  ConnectionMode,
5
  Controls,
 
6
  NodeMouseHandler,
7
  } from 'reactflow';
8
  import 'reactflow/dist/style.css';
 
66
 
67
  return (
68
  <div className={styles.canvasWrapper}>
69
+ <svg
70
+ xmlns="http://www.w3.org/2000/svg"
71
+ style={{ position: 'absolute', top: 10, left: 0 }}
72
+ >
73
+ <defs>
74
+ <marker
75
+ fill="rgb(157 149 225)"
76
+ id="logo"
77
+ viewBox="0 0 40 40"
78
+ refX="8"
79
+ refY="5"
80
+ markerUnits="strokeWidth"
81
+ markerWidth="20"
82
+ markerHeight="20"
83
+ orient="auto-start-reverse"
84
+ >
85
+ <path d="M 0 0 L 10 5 L 0 10 z" />
86
+ </marker>
87
+ </defs>
88
+ </svg>
89
  <ReactFlow
90
  connectionMode={ConnectionMode.Loose}
91
  nodes={nodes}
 
109
  }}
110
  defaultEdgeOptions={{
111
  type: 'buttonEdge',
112
+ markerEnd: 'logo',
113
+ // markerEnd: {
114
+ // type: MarkerType.ArrowClosed,
115
+ // color: 'rgb(157 149 225)',
116
+ // width: 20,
117
+ // height: 20,
118
+ // },
119
+ style: {
120
+ // edge style
121
+ strokeWidth: 2,
122
+ stroke: 'rgb(202 197 245)',
123
  },
124
  }}
125
  >
web/src/pages/flow/canvas/node/index.less CHANGED
@@ -16,7 +16,8 @@
16
  // justify-self: center;
17
  justify-content: center;
18
  .nodeName {
19
- font-size: 8px;
 
20
  }
21
  label {
22
  display: block;
@@ -31,7 +32,7 @@
31
  }
32
  .bottomBox {
33
  position: absolute;
34
- bottom: -26px;
35
  background: white;
36
  padding: 2px 5px;
37
  border-radius: 5px;
 
16
  // justify-self: center;
17
  justify-content: center;
18
  .nodeName {
19
+ font-size: 10px;
20
+ color: black;
21
  }
22
  label {
23
  display: block;
 
32
  }
33
  .bottomBox {
34
  position: absolute;
35
+ bottom: -34px;
36
  background: white;
37
  padding: 2px 5px;
38
  border-radius: 5px;
web/src/pages/flow/flow-drawer/index.tsx CHANGED
@@ -28,13 +28,15 @@ const FormMap = {
28
  [Operator.RewriteQuestion]: RewriteQuestionForm,
29
  };
30
 
 
 
31
  const FlowDrawer = ({
32
  visible,
33
  hideModal,
34
  node,
35
  }: IModalProps<any> & IProps) => {
36
  const operatorName: Operator = node?.data.label;
37
- const OperatorForm = FormMap[operatorName];
38
  const [form] = Form.useForm();
39
  const { name, handleNameBlur, handleNameChange } =
40
  useHandleNodeNameChange(node);
 
28
  [Operator.RewriteQuestion]: RewriteQuestionForm,
29
  };
30
 
31
+ const EmptyContent = () => <div>empty</div>;
32
+
33
  const FlowDrawer = ({
34
  visible,
35
  hideModal,
36
  node,
37
  }: IModalProps<any> & IProps) => {
38
  const operatorName: Operator = node?.data.label;
39
+ const OperatorForm = FormMap[operatorName] ?? EmptyContent;
40
  const [form] = Form.useForm();
41
  const { name, handleNameBlur, handleNameChange } =
42
  useHandleNodeNameChange(node);
web/src/pages/flow/headhunter_zh.json CHANGED
@@ -1,183 +1,126 @@
1
  {
2
  "edges": [
3
  {
4
- "id": "01dc9019-5c4c-4410-9759-f09ad8075a23",
5
  "label": "",
6
  "source": "begin",
7
- "target": "answer:0",
8
- "markerEnd": {
9
- "type": "arrow"
10
- }
11
  },
12
  {
13
- "id": "f0216178-c3ab-48c1-8020-c5c7d8aa3853",
14
  "label": "",
15
  "source": "message:reject",
16
- "target": "answer:0",
17
- "markerEnd": {
18
- "type": "arrow"
19
- }
20
  },
21
  {
22
- "id": "fd98adb0-9461-45ba-9f6e-5633b8ea57ac",
23
  "label": "",
24
  "source": "answer:0",
25
- "target": "categorize:0",
26
- "markerEnd": {
27
- "type": "arrow"
28
- }
29
  },
30
  {
31
- "id": "c4ea0be6-d98c-464c-89c4-84b4199e6128",
32
  "label": "",
33
  "source": "categorize:0",
34
  "target": "message:introduction",
35
- "markerEnd": {
36
- "type": "arrow"
37
- },
38
  "sourceHandle": "interested"
39
  },
40
  {
41
- "id": "145f4531-c5e4-4e01-9378-128b84db6029",
42
  "label": "",
43
  "source": "categorize:0",
44
  "target": "generate:casual",
45
- "markerEnd": {
46
- "type": "arrow"
47
- },
48
  "sourceHandle": "casual"
49
  },
50
  {
51
- "id": "1b8f7b90-4ee8-471a-aea0-4ae1fba7092b",
52
  "label": "",
53
  "source": "categorize:0",
54
  "target": "message:reject",
55
- "markerEnd": {
56
- "type": "arrow"
57
- },
58
  "sourceHandle": "answer"
59
  },
60
  {
61
- "id": "1e9c2335-a293-492f-a3c9-6f9bd02b7f91",
62
  "label": "",
63
  "source": "categorize:0",
64
  "target": "retrieval:0",
65
- "markerEnd": {
66
- "type": "arrow"
67
- },
68
  "sourceHandle": "about_job"
69
  },
70
  {
71
- "id": "c2b63dca-974f-4d48-8685-269230ff41ad",
72
  "label": "",
73
  "source": "message:introduction",
74
- "target": "answer:1",
75
- "markerEnd": {
76
- "type": "arrow"
77
- }
78
  },
79
  {
80
- "id": "1e7a0f1f-3377-4762-a15d-975d8ac3b67a",
81
  "label": "",
82
  "source": "generate:aboutJob",
83
- "target": "answer:1",
84
- "markerEnd": {
85
- "type": "arrow"
86
- }
87
  },
88
  {
89
- "id": "0d860594-9339-4283-9cc0-228f6f3e15a1",
90
  "label": "",
91
  "source": "generate:casual",
92
- "target": "answer:1",
93
- "markerEnd": {
94
- "type": "arrow"
95
- }
96
  },
97
  {
98
- "id": "0707e61d-95ed-4c30-95ce-83ae930f3079",
99
  "label": "",
100
  "source": "generate:get_wechat",
101
- "target": "answer:1",
102
- "markerEnd": {
103
- "type": "arrow"
104
- }
105
  },
106
  {
107
- "id": "a0e1cb13-8667-47ba-8b8a-11974f68b628",
108
  "label": "",
109
  "source": "generate:nowechat",
110
- "target": "answer:1",
111
- "markerEnd": {
112
- "type": "arrow"
113
- }
114
  },
115
  {
116
- "id": "071f6b90-154a-421d-a3a1-24d68120517b",
117
  "label": "",
118
  "source": "answer:1",
119
- "target": "categorize:1",
120
- "markerEnd": {
121
- "type": "arrow"
122
- }
123
  },
124
  {
125
- "id": "d0daf286-afe3-4257-ad23-62280de6a3c9",
126
  "label": "",
127
  "source": "categorize:1",
128
  "target": "retrieval:0",
129
- "markerEnd": {
130
- "type": "arrow"
131
- },
132
  "sourceHandle": "about_job"
133
  },
134
  {
135
- "id": "eed037f7-7a2c-4863-8daa-95299c0d7ed0",
136
  "label": "",
137
  "source": "categorize:1",
138
  "target": "generate:casual",
139
- "markerEnd": {
140
- "type": "arrow"
141
- },
142
  "sourceHandle": "casual"
143
  },
144
  {
145
- "id": "e2ce8e2c-5383-4328-8c7f-6a1ea5fbe392",
146
  "label": "",
147
  "source": "categorize:1",
148
  "target": "generate:get_wechat",
149
- "markerEnd": {
150
- "type": "arrow"
151
- },
152
  "sourceHandle": "wechat"
153
  },
154
  {
155
- "id": "b4e00364-bf13-4a5c-ba15-c10080a01faa",
156
  "label": "",
157
  "source": "categorize:1",
158
  "target": "generate:nowechat",
159
- "markerEnd": {
160
- "type": "arrow"
161
- },
162
  "sourceHandle": "giveup"
163
  },
164
  {
165
- "id": "d562f6f1-e9e3-4bf4-bcf1-171e3bdd8bca",
166
  "label": "",
167
  "source": "retrieval:0",
168
- "target": "generate:aboutJob",
169
- "markerEnd": {
170
- "type": "arrow"
171
- }
172
  },
173
  {
174
- "id": "063838ab-7813-4981-b633-34f6d485305b",
175
  "label": "",
176
  "source": "relevant:0",
177
- "target": "generate:aboutJob",
178
- "markerEnd": {
179
- "type": "arrow"
180
- }
181
  }
182
  ],
183
  "nodes": [
@@ -190,7 +133,7 @@
190
  },
191
  "data": {
192
  "label": "Begin",
193
- "name": "CleanDeerRoll",
194
  "form": {
195
  "prologue": "您好!我是AGI方向的猎头,了解到您是这方面的大佬,然后冒昧的就联系到您。这边有个机会想和您分享,RAGFlow正在招聘您这个岗位的资深的工程师不知道您那边是不是感兴趣?"
196
  }
@@ -207,7 +150,7 @@
207
  },
208
  "data": {
209
  "label": "Answer",
210
- "name": "TwentyTimesDrive",
211
  "form": {}
212
  },
213
  "sourcePosition": "left",
@@ -222,7 +165,7 @@
222
  },
223
  "data": {
224
  "label": "Categorize",
225
- "name": "StupidFoxesNail",
226
  "form": {
227
  "llm_id": "deepseek-chat",
228
  "category_description": {
@@ -261,7 +204,7 @@
261
  },
262
  "data": {
263
  "label": "Message",
264
- "name": "FluffyLightsCry",
265
  "form": {
266
  "messages": [
267
  "我简单介绍以下:\nRAGFlow 是一款基于深度文档理解构建的开源 RAG(Retrieval-Augmented Generation)引擎。RAGFlow 可以为各种规模的企业及个人提供一套精简的 RAG 工作流程,结合大语言模型(LLM)针对用户各类不同的复杂格式数据提供可靠的问答以及有理有据的引用。https://github.com/infiniflow/ragflow\n您那边还有什么要了解的?"
@@ -280,7 +223,7 @@
280
  },
281
  "data": {
282
  "label": "Answer",
283
- "name": "BreezyJarsNotice",
284
  "form": {}
285
  },
286
  "sourcePosition": "left",
@@ -295,7 +238,7 @@
295
  },
296
  "data": {
297
  "label": "Categorize",
298
- "name": "ItchyJobsLike",
299
  "form": {
300
  "llm_id": "deepseek-chat",
301
  "category_description": {
@@ -335,7 +278,7 @@
335
  },
336
  "data": {
337
  "label": "Generate",
338
- "name": "SocialLlamasDraw",
339
  "form": {
340
  "llm_id": "deepseek-chat",
341
  "prompt": "你是AGI方向的猎头,现在候选人的聊了和职位无关的话题,请耐心的回应候选人,并将话题往该AGI的职位上带,最好能要到候选人微信号以便后面保持联系。",
@@ -356,7 +299,7 @@
356
  },
357
  "data": {
358
  "label": "Retrieval",
359
- "name": "ThinCamerasPunch",
360
  "form": {
361
  "similarity_threshold": 0.2,
362
  "keywords_similarity_weight": 0.3,
@@ -378,7 +321,7 @@
378
  },
379
  "data": {
380
  "label": "Generate",
381
- "name": "FiveAnimalsWorry",
382
  "form": {
383
  "llm_id": "deepseek-chat",
384
  "prompt": "你是AGI方向的猎头,候选人问了有关职位或公司的问题,你根据以下职位信息回答。如果职位信息中不包含候选人的问题就回答不清楚、不知道、有待确认等。回答完后引导候选人加微信号,如:\n - 方便加一下微信吗,我把JD发您看看?\n - 微信号多少,我把详细职位JD发您?\n 职位信息如下:\n {input}\n 职位信息如上。",
@@ -397,7 +340,7 @@
397
  },
398
  "data": {
399
  "label": "Generate",
400
- "name": "TastyTermsCarry",
401
  "form": {
402
  "llm_id": "deepseek-chat",
403
  "prompt": "你是AGI方向的猎头,候选人表示不反感加微信,如果对方已经报了微信号,表示感谢和信任并表示马上会加上;如果没有,则问对方微信号多少。你的微信号是weixin_kevin,E-mail是[email protected]。说话不要重复。不要总是您好。",
@@ -418,7 +361,7 @@
418
  },
419
  "data": {
420
  "label": "Generate",
421
- "name": "SharpYaksShout",
422
  "form": {
423
  "llm_id": "deepseek-chat",
424
  "prompt": "你是AGI方向的猎头,当你提出加微信时对方表示拒绝。你需要耐心礼貌的回应候选人,表示对于保护隐私信息给予理解,也可以询问他对该职位的看法和顾虑。并在恰当的时机再次询问微信联系方式。也可以鼓励候选人主动与你取得联系。你的微信号是weixin_kevin,E-mail是[email protected]。说话不要重复。不要总是您好。",
@@ -439,7 +382,7 @@
439
  },
440
  "data": {
441
  "label": "Message",
442
- "name": "ShaggyKeysStare",
443
  "form": {
444
  "messages": [
445
  "好的,祝您生活愉快,工作顺利。",
 
1
  {
2
  "edges": [
3
  {
4
+ "id": "85fcec8f-7663-4221-99fa-1d41a6358cc5",
5
  "label": "",
6
  "source": "begin",
7
+ "target": "answer:0"
 
 
 
8
  },
9
  {
10
+ "id": "36bf941f-b8df-46e7-87d3-5ce51b5378fb",
11
  "label": "",
12
  "source": "message:reject",
13
+ "target": "answer:0"
 
 
 
14
  },
15
  {
16
+ "id": "e5cca6d3-ffd2-4824-9471-3fe83891dd73",
17
  "label": "",
18
  "source": "answer:0",
19
+ "target": "categorize:0"
 
 
 
20
  },
21
  {
22
+ "id": "8a39ca91-5b04-4970-ad64-968797eb62a2",
23
  "label": "",
24
  "source": "categorize:0",
25
  "target": "message:introduction",
 
 
 
26
  "sourceHandle": "interested"
27
  },
28
  {
29
+ "id": "675752ca-6c81-432b-a6b1-eaca4a6c3a96",
30
  "label": "",
31
  "source": "categorize:0",
32
  "target": "generate:casual",
 
 
 
33
  "sourceHandle": "casual"
34
  },
35
  {
36
+ "id": "cc1628b4-b1c3-4941-ab19-3777993e094a",
37
  "label": "",
38
  "source": "categorize:0",
39
  "target": "message:reject",
 
 
 
40
  "sourceHandle": "answer"
41
  },
42
  {
43
+ "id": "8a11d81f-820a-41df-a47b-daec65c5fb61",
44
  "label": "",
45
  "source": "categorize:0",
46
  "target": "retrieval:0",
 
 
 
47
  "sourceHandle": "about_job"
48
  },
49
  {
50
+ "id": "3afa4bbd-1151-4452-8f58-9cc03496c2e7",
51
  "label": "",
52
  "source": "message:introduction",
53
+ "target": "answer:1"
 
 
 
54
  },
55
  {
56
+ "id": "6e705ec1-d7c2-4278-8ddd-03ed05ec2973",
57
  "label": "",
58
  "source": "generate:aboutJob",
59
+ "target": "answer:1"
 
 
 
60
  },
61
  {
62
+ "id": "9c6b9bfc-e8ff-4903-8479-67f89f159b55",
63
  "label": "",
64
  "source": "generate:casual",
65
+ "target": "answer:1"
 
 
 
66
  },
67
  {
68
+ "id": "ddefbff1-2cca-4251-bc34-2f3cea7a5593",
69
  "label": "",
70
  "source": "generate:get_wechat",
71
+ "target": "answer:1"
 
 
 
72
  },
73
  {
74
+ "id": "13e14da1-3865-4539-af77-4e9627e67273",
75
  "label": "",
76
  "source": "generate:nowechat",
77
+ "target": "answer:1"
 
 
 
78
  },
79
  {
80
+ "id": "de6b8407-8af3-4450-9f74-6f4e6b99da9f",
81
  "label": "",
82
  "source": "answer:1",
83
+ "target": "categorize:1"
 
 
 
84
  },
85
  {
86
+ "id": "36f0f440-129b-4073-8d1b-55eaf452ebd2",
87
  "label": "",
88
  "source": "categorize:1",
89
  "target": "retrieval:0",
 
 
 
90
  "sourceHandle": "about_job"
91
  },
92
  {
93
+ "id": "72d63756-f054-488f-adfd-b3a376047fa2",
94
  "label": "",
95
  "source": "categorize:1",
96
  "target": "generate:casual",
 
 
 
97
  "sourceHandle": "casual"
98
  },
99
  {
100
+ "id": "5ee58522-246c-427a-806b-e82fccdd7dc6",
101
  "label": "",
102
  "source": "categorize:1",
103
  "target": "generate:get_wechat",
 
 
 
104
  "sourceHandle": "wechat"
105
  },
106
  {
107
+ "id": "994cbb21-9dad-40af-aee3-9d4b8199a843",
108
  "label": "",
109
  "source": "categorize:1",
110
  "target": "generate:nowechat",
 
 
 
111
  "sourceHandle": "giveup"
112
  },
113
  {
114
+ "id": "5b864e95-f44e-428b-8a2e-323c3bed0701",
115
  "label": "",
116
  "source": "retrieval:0",
117
+ "target": "generate:aboutJob"
 
 
 
118
  },
119
  {
120
+ "id": "e882800b-077e-445a-a544-e147f7a9911c",
121
  "label": "",
122
  "source": "relevant:0",
123
+ "target": "generate:aboutJob"
 
 
 
124
  }
125
  ],
126
  "nodes": [
 
133
  },
134
  "data": {
135
  "label": "Begin",
136
+ "name": "TrueBagsAllow",
137
  "form": {
138
  "prologue": "您好!我是AGI方向的猎头,了解到您是这方面的大佬,然后冒昧的就联系到您。这边有个机会想和您分享,RAGFlow正在招聘您这个岗位的资深的工程师不知道您那边是不是感兴趣?"
139
  }
 
150
  },
151
  "data": {
152
  "label": "Answer",
153
+ "name": "YoungWeeksArgue",
154
  "form": {}
155
  },
156
  "sourcePosition": "left",
 
165
  },
166
  "data": {
167
  "label": "Categorize",
168
+ "name": "FancyBooksLose",
169
  "form": {
170
  "llm_id": "deepseek-chat",
171
  "category_description": {
 
204
  },
205
  "data": {
206
  "label": "Message",
207
+ "name": "CyanMangosStudy",
208
  "form": {
209
  "messages": [
210
  "我简单介绍以下:\nRAGFlow 是一款基于深度文档理解构建的开源 RAG(Retrieval-Augmented Generation)引擎。RAGFlow 可以为各种规模的企业及个人提供一套精简的 RAG 工作流程,结合大语言模型(LLM)针对用户各类不同的复杂格式数据提供可靠的问答以及有理有据的引用。https://github.com/infiniflow/ragflow\n您那边还有什么要了解的?"
 
223
  },
224
  "data": {
225
  "label": "Answer",
226
+ "name": "SwiftEyesReply",
227
  "form": {}
228
  },
229
  "sourcePosition": "left",
 
238
  },
239
  "data": {
240
  "label": "Categorize",
241
+ "name": "KhakiEmusGive",
242
  "form": {
243
  "llm_id": "deepseek-chat",
244
  "category_description": {
 
278
  },
279
  "data": {
280
  "label": "Generate",
281
+ "name": "BigToesSee",
282
  "form": {
283
  "llm_id": "deepseek-chat",
284
  "prompt": "你是AGI方向的猎头,现在候选人的聊了和职位无关的话题,请耐心的回应候选人,并将话题往该AGI的职位上带,最好能要到候选人微信号以便后面保持联系。",
 
299
  },
300
  "data": {
301
  "label": "Retrieval",
302
+ "name": "SilentWormsOpen",
303
  "form": {
304
  "similarity_threshold": 0.2,
305
  "keywords_similarity_weight": 0.3,
 
321
  },
322
  "data": {
323
  "label": "Generate",
324
+ "name": "ItchySuitsWait",
325
  "form": {
326
  "llm_id": "deepseek-chat",
327
  "prompt": "你是AGI方向的猎头,候选人问了有关职位或公司的问题,你根据以下职位信息回答。如果职位信息中不包含候选人的问题就回答不清楚、不知道、有待确认等。回答完后引导候选人加微信号,如:\n - 方便加一下微信吗,我把JD发您看看?\n - 微信号多少,我把详细职位JD发您?\n 职位信息如下:\n {input}\n 职位信息如上。",
 
340
  },
341
  "data": {
342
  "label": "Generate",
343
+ "name": "PlentyCasesPoke",
344
  "form": {
345
  "llm_id": "deepseek-chat",
346
  "prompt": "你是AGI方向的猎头,候选人表示不反感加微信,如果对方已经报了微信号,表示感谢和信任并表示马上会加上;如果没有,则问对方微信号多少。你的微信号是weixin_kevin,E-mail是[email protected]。说话不要重复。不要总是您好。",
 
361
  },
362
  "data": {
363
  "label": "Generate",
364
+ "name": "SharpEggsLove",
365
  "form": {
366
  "llm_id": "deepseek-chat",
367
  "prompt": "你是AGI方向的猎头,当你提出加微信时对方表示拒绝。你需要耐心礼貌的回应候选人,表示对于保护隐私信息给予理解,也可以询问他对该职位的看法和顾虑。并在恰当的时机再次询问微信联系方式。也可以鼓励候选人主动与你取得联系。你的微信号是weixin_kevin,E-mail是[email protected]。说话不要重复。不要总是您好。",
 
382
  },
383
  "data": {
384
  "label": "Message",
385
+ "name": "MetalWolvesBeam",
386
  "form": {
387
  "messages": [
388
  "好的,祝您生活愉快,工作顺利。",
web/src/pages/flow/utils.ts CHANGED
@@ -4,7 +4,7 @@ import dagre from 'dagre';
4
  import { humanId } from 'human-id';
5
  import { curry, isEmpty } from 'lodash';
6
  import pipe from 'lodash/fp/pipe';
7
- import { Edge, MarkerType, Node, Position } from 'reactflow';
8
  import { v4 as uuidv4 } from 'uuid';
9
  import { NodeMap, Operator, initialFormValuesMap } from './constant';
10
  import { ICategorizeItemResult, NodeData } from './interface';
@@ -27,9 +27,12 @@ const buildEdges = (
27
  // type: 'step',
28
  source: source,
29
  target: target,
30
- markerEnd: {
31
- type: MarkerType.Arrow,
32
- },
 
 
 
33
  };
34
  if (componentName === Operator.Categorize && !isUpstream) {
35
  const categoryDescription =
 
4
  import { humanId } from 'human-id';
5
  import { curry, isEmpty } from 'lodash';
6
  import pipe from 'lodash/fp/pipe';
7
+ import { Edge, Node, Position } from 'reactflow';
8
  import { v4 as uuidv4 } from 'uuid';
9
  import { NodeMap, Operator, initialFormValuesMap } from './constant';
10
  import { ICategorizeItemResult, NodeData } from './interface';
 
27
  // type: 'step',
28
  source: source,
29
  target: target,
30
+ // markerEnd: {
31
+ // type: MarkerType.ArrowClosed,
32
+ // color: 'rgb(157 149 225)',
33
+ // width: 20,
34
+ // height: 20,
35
+ // },
36
  };
37
  if (componentName === Operator.Categorize && !isUpstream) {
38
  const categoryDescription =