Skip to content

Commit 962da2e

Browse files
committed
fetch and push-array colors
1 parent 14441e7 commit 962da2e

File tree

3 files changed

+47
-43
lines changed

3 files changed

+47
-43
lines changed

examples-test-flows/openai-fetch-completion-as-stream-with-toolcall.json

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"nodes": [
99
{
1010
"id": "8f4ac174-5c8e-45da-8ad4-a81a40f4f666",
11-
"x": 4016.3786652476138,
12-
"y": 1006.6878283076694,
11+
"x": 4016.378454577611,
12+
"y": 1006.6877384308684,
1313
"width": 270.4013005316974,
1414
"height": 221.78921192887083,
1515
"nodeType": "Shape",
@@ -26,8 +26,8 @@
2626
},
2727
{
2828
"id": "3cf44538-9913-4aa2-aade-a7c619910f45",
29-
"x": 2885.9517347248407,
30-
"y": 1081.5204664122566,
29+
"x": 2885.951639601829,
30+
"y": 1081.5205098352317,
3131
"width": 178.5078125,
3232
"height": 80,
3333
"nodeType": "Shape",
@@ -46,8 +46,8 @@
4646
"id": "d186a002-218b-47dc-aae8-07522a3da6ed",
4747
"x": 4483.009756940378,
4848
"y": 1009.3019209291535,
49-
"width": 120.00010572251284,
50-
"height": 272.0000685119665,
49+
"width": 119.99989379874336,
50+
"height": 56.00006000701117,
5151
"nodeType": "Shape",
5252
"nodeInfo": {
5353
"type": "show-input",
@@ -63,8 +63,8 @@
6363
"id": "383eb9cf-3b45-489e-8281-720b702b9159",
6464
"x": 3302.6184447265578,
6565
"y": 528.2644630083273,
66-
"width": 136.67187890215888,
67-
"height": 299.99996231970107,
66+
"width": 120.31252667724412,
67+
"height": 107.99995920266782,
6868
"nodeType": "Shape",
6969
"nodeInfo": {
7070
"type": "scope-variable",
@@ -129,8 +129,8 @@
129129
},
130130
{
131131
"id": "604d00b5-69c4-4beb-8aca-394674de0d61",
132-
"x": 3778.1804795215508,
133-
"y": 1568.647033466835,
132+
"x": 3126.1096030109047,
133+
"y": 1891.6069900265875,
134134
"width": 260.03125,
135135
"height": 136,
136136
"nodeType": "Shape",
@@ -187,8 +187,8 @@
187187
"id": "b936e1cd-134c-4476-b412-342c7d89c762",
188188
"x": 5386.760673284272,
189189
"y": 1453.0422559463495,
190-
"width": 120.00018320925575,
191-
"height": 272.0000056234996,
190+
"width": 119.99989379874336,
191+
"height": 55.99999913612361,
192192
"nodeType": "Shape",
193193
"nodeInfo": {
194194
"type": "show-input",
@@ -241,8 +241,8 @@
241241
"id": "6e164a19-962b-412d-ad81-8505dcc24783",
242242
"x": 3731.953338189688,
243243
"y": 523.6128115645795,
244-
"width": 136.67199692316956,
245-
"height": 419.99997361319976,
244+
"width": 120.31252667724412,
245+
"height": 108.00005050899917,
246246
"nodeType": "Shape",
247247
"nodeInfo": {
248248
"type": "scope-variable",
@@ -414,8 +414,8 @@
414414
},
415415
{
416416
"id": "ff2152e5-a94a-4350-b595-e619d5ccaa61",
417-
"x": 3775.267801313806,
418-
"y": 2208.327329659086,
417+
"x": 3797.3179871039515,
418+
"y": 2081.2355712571834,
419419
"width": 234.0546875,
420420
"height": 136,
421421
"nodeType": "Shape",
@@ -471,8 +471,8 @@
471471
"id": "597efff5-91e1-40f2-bd4d-993567abb93a",
472472
"x": 4136.59680841861,
473473
"y": 526.2205686983754,
474-
"width": 120.31279525376466,
475-
"height": 107.99996919003073,
474+
"width": 120.31252667724412,
475+
"height": 107.9999896381116,
476476
"nodeType": "Shape",
477477
"nodeInfo": {
478478
"type": "scope-variable",
@@ -508,9 +508,9 @@
508508
},
509509
{
510510
"id": "00ba66f5-4918-4ec8-a5f9-1aaa4a61ae6e",
511-
"x": 3778.0856483764765,
512-
"y": 2420.70688837682,
513-
"width": 417.039306640625,
511+
"x": 3800.4633684846776,
512+
"y": 2667.7990936317315,
513+
"width": 417.0390625,
514514
"height": 136,
515515
"nodeType": "Shape",
516516
"nodeInfo": {
@@ -545,8 +545,8 @@
545545
},
546546
{
547547
"id": "8e10a4f8-45d2-40b5-a8d6-53b5fa3ff2fb",
548-
"x": 3772.3323070972165,
549-
"y": 2608.5293338191573,
548+
"x": 3801.58606850741,
549+
"y": 2857.6367580904416,
550550
"width": 360.577880859375,
551551
"height": 136,
552552
"nodeType": "Shape",
@@ -599,8 +599,8 @@
599599
},
600600
{
601601
"id": "a1b1b5b0-c32b-4ba0-92f6-f0fc62570e5f",
602-
"x": 4137.771115228871,
603-
"y": 1882.7879968671864,
602+
"x": 4445.33877211286,
603+
"y": 1885.4997916877717,
604604
"width": 553.2890625,
605605
"height": 136,
606606
"nodeType": "Shape",
@@ -709,8 +709,8 @@
709709
"id": "f02b98f8-d7be-40ec-82da-0fcaddda5663",
710710
"x": 6021.817071637092,
711711
"y": 2275.116037678438,
712-
"width": 119.99999246091423,
713-
"height": 272.0000469775178,
712+
"width": 119.99989379874336,
713+
"height": 55.99999913612361,
714714
"nodeType": "Shape",
715715
"nodeInfo": {
716716
"type": "show-input",
@@ -741,8 +741,8 @@
741741
},
742742
{
743743
"id": "a16c5c54-c867-41af-a922-9a014786c513",
744-
"x": 4286.779965779311,
745-
"y": 1036.6878283076694,
744+
"x": 4286.779755109308,
745+
"y": 1036.6877384308684,
746746
"endX": 4483.009756940378,
747747
"endY": 1039.3019209291535,
748748
"startNodeId": "8f4ac174-5c8e-45da-8ad4-a81a40f4f666",
@@ -756,7 +756,7 @@
756756
},
757757
{
758758
"id": "9c9efadf-8473-439f-849b-1fa8cbc09ad5",
759-
"x": 4603.009862662891,
759+
"x": 4603.009650739121,
760760
"y": 1039.3019209291535,
761761
"endX": 4808.82988279589,
762762
"endY": 1032.15973144007,
@@ -773,8 +773,8 @@
773773
"id": "b58697e4-82bf-4d83-917a-03be6daedc12",
774774
"x": 3887.1033641109398,
775775
"y": 1119.1708983882722,
776-
"endX": 4016.3786652476138,
777-
"endY": 1117.5824342721048,
776+
"endX": 4016.378454577611,
777+
"endY": 1117.5823443953038,
778778
"startNodeId": "2a227359-4016-4fa7-9788-948030bc0e90",
779779
"endNodeId": "8f4ac174-5c8e-45da-8ad4-a81a40f4f666",
780780
"startThumbName": "output",
@@ -786,8 +786,8 @@
786786
},
787787
{
788788
"id": "0dd730cc-1691-454f-868c-cb19da250699",
789-
"x": 4286.779965779311,
790-
"y": 1186.6878283076694,
789+
"x": 4286.779755109308,
790+
"y": 1186.6877384308684,
791791
"endX": 4613.562367206762,
792792
"endY": 1478.0828093084283,
793793
"startNodeId": "8f4ac174-5c8e-45da-8ad4-a81a40f4f666",
@@ -833,8 +833,8 @@
833833
"id": "3601f5bf-09f9-401d-b7de-28d1be639fb5",
834834
"x": 2614.082792208238,
835835
"y": 1123.719813219306,
836-
"endX": 2885.9517347248407,
837-
"endY": 1121.5204664122566,
836+
"endX": 2885.951639601829,
837+
"endY": 1121.5205098352317,
838838
"startNodeId": "6631fbab-1a06-4f8e-9abc-ee8ac2c3f923",
839839
"endNodeId": "3cf44538-9913-4aa2-aade-a7c619910f45",
840840
"startThumbName": "output",
@@ -846,8 +846,8 @@
846846
},
847847
{
848848
"id": "993273ac-60cc-4c0b-9f50-31b62d6ec3f0",
849-
"x": 3064.4595472248407,
850-
"y": 1121.5204664122566,
849+
"x": 3064.459452101829,
850+
"y": 1121.5205098352317,
851851
"endX": 3286.817011462188,
852852
"endY": 1119.1708983882722,
853853
"startNodeId": "3cf44538-9913-4aa2-aade-a7c619910f45",
@@ -861,7 +861,7 @@
861861
},
862862
{
863863
"id": "7619188f-269f-46a1-b144-d641b411a547",
864-
"x": 5506.760856493528,
864+
"x": 5506.760567083015,
865865
"y": 1483.0422559463495,
866866
"endX": 5725.337982593981,
867867
"endY": 1685.1782664011737,
@@ -1161,7 +1161,7 @@
11611161
},
11621162
{
11631163
"id": "aa63fd0c-c4ee-46b8-abd4-d6d2d6c142c2",
1164-
"x": 6141.817064098007,
1164+
"x": 6141.816965435835,
11651165
"y": 2305.116037678438,
11661166
"endX": 6433.095442334594,
11671167
"endY": 2308.017958860211,

libs/web-flow-executor/src/nodes/fetch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,13 @@ export const getFetch: NodeTaskFactory<NodeInfo> = (
338338
text = `\n${label}`;
339339
}
340340

341-
const thumbPortColor = 'black';
341+
const thumbPortColor = 'white';
342342
const thumbLabelPortCssClass = 'text-black';
343343
const jsxComponentWrapper = createElement(
344344
'div',
345345
{
346346
class: `inner-node rounded p-4
347-
bg-amber-400 text-black
347+
bg-green-500 text-black
348348
font-bold
349349
flex flex-col justify-center items-center justify-start`,
350350
},

libs/web-flow-executor/src/nodes/push-array-value.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
ThumbType,
1010
visualNodeFactory,
1111
IComputeResult,
12+
Theme,
1213
} from '@devhelpr/visual-programming-system';
1314
import { NodeInfo } from '../types/node-info';
1415
import { getNodeByVariableName } from '../graph/get-node-by-variable-name';
@@ -17,7 +18,8 @@ const fieldName = 'variableName';
1718
export const pushValueToArrayVariableNodeName = 'push-value-to-array-variable';
1819

1920
export const pushArrayVariable: NodeTaskFactory<NodeInfo> = (
20-
updated: () => void
21+
updated: () => void,
22+
theme?: Theme
2123
): NodeTask<NodeInfo> => {
2224
let node: IRectNodeComponent<NodeInfo>;
2325
let contextInstance: IFlowCanvasBase<NodeInfo> | undefined = undefined;
@@ -155,6 +157,8 @@ export const pushArrayVariable: NodeTaskFactory<NodeInfo> = (
155157
hasFormInPopup: true,
156158
additionalClassNames: 'text-center',
157159
category: 'variables-array',
160+
backgroundColorClassName:
161+
theme?.referenceVariableBackgroundColorClassName,
158162
},
159163
undefined,
160164
true

0 commit comments

Comments
 (0)