Skip to content

Commit bfcd127

Browse files
committed
feat: add python custom node utils
1 parent 67b201d commit bfcd127

3 files changed

Lines changed: 23 additions & 1 deletion

File tree

‎apps/client/src/features/flow/AddCustomNode.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,10 @@ export function AddCustomNode() {
165165

166166
{view === "list" && (
167167
<div className='flex-grow overflow-y-auto pr-2'>
168-
<div className='flex justify-end mb-4'>
168+
<div className='flex justify-end mb-4 gap-2'>
169+
<Button size='sm' variant={"outline"}>
170+
<PlusCircle className='mr-2 h-4 w-4' /> Select dir
171+
</Button>
169172
<Button size='sm' onClick={handleAddNew}>
170173
<PlusCircle className='mr-2 h-4 w-4' /> Add New Node
171174
</Button>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def main(inputs):
2+
a = inputs.get("a", 0)
3+
b = inputs.get("b", 0)
4+
5+
6+
outputs = {
7+
"number": a+b
8+
}
9+
10+
return outputs
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import random
2+
3+
def main(inputs):
4+
result = random.random()
5+
outputs = {
6+
"number": result
7+
}
8+
9+
return outputs

0 commit comments

Comments
 (0)