diff --git a/rnd/autogpt_builder/src/components/CustomNode.tsx b/rnd/autogpt_builder/src/components/CustomNode.tsx index 801f3d2cf..42da5aea3 100644 --- a/rnd/autogpt_builder/src/components/CustomNode.tsx +++ b/rnd/autogpt_builder/src/components/CustomNode.tsx @@ -3,6 +3,9 @@ import { Handle, Position, NodeProps } from 'reactflow'; import 'reactflow/dist/style.css'; import './customnode.css'; import ModalComponent from './ModalComponent'; +import { Button } from './ui/button'; +import { Input } from './ui/input'; +import { Textarea } from './ui/textarea'; type Schema = { type: string; @@ -184,16 +187,16 @@ const CustomNode: FC> = ({ data, id }) => {
handleInputClick(`${fullKey}.${propKey}`)}> {propKey}: {typeof propValue === 'object' ? JSON.stringify(propValue, null, 2) : propValue}
- + ))} {key === 'expected_format' && (
{keyValuePairs.map((pair, index) => (
- > = ({ data, id }) => { handleInputChange('expected_format', expectedFormat); }} /> - > = ({ data, id }) => {
))}
- setNewKey(e.target.value)} /> - setNewValue(e.target.value)} />
- +
)} {error && {error}} @@ -344,14 +347,14 @@ const CustomNode: FC> = ({ data, id }) => { onChange={(e) => handleInputChange(`${fullKey}.${index}`, e.target.value)} className="array-item-input" /> - + ))} - + {error && {error}} ); @@ -398,12 +401,12 @@ const CustomNode: FC> = ({ data, id }) => { }; return ( -
+
{data.blockType || data.title}
- +
@@ -442,7 +445,7 @@ const CustomNode: FC> = ({ data, id }) => {

)} - + setIsModalOpen(false)} diff --git a/rnd/autogpt_builder/src/components/Flow.tsx b/rnd/autogpt_builder/src/components/Flow.tsx index b79384fe8..f8c9b427a 100644 --- a/rnd/autogpt_builder/src/components/Flow.tsx +++ b/rnd/autogpt_builder/src/components/Flow.tsx @@ -17,6 +17,8 @@ import CustomNode from './CustomNode'; import './flow.css'; import AutoGPTServerAPI, { Block, Flow } from '@/lib/autogpt_server_api'; import { ObjectSchema } from '@/lib/types'; +import { Button } from './ui/button'; +import { Input } from './ui/input'; type CustomNodeData = { blockType: string; @@ -43,18 +45,18 @@ const Sidebar: React.FC<{isOpen: boolean, availableNodes: Block[], addNode: (id: ); return ( -
+

Nodes

- setSearchQuery(e.target.value)} /> {filteredNodes.map((node) => ( -
+
{node.name} - +
))}
@@ -352,18 +354,18 @@ const updateNodesWithExecutionData = (executionData: any[]) => { return (
- + { nodeTypes={nodeTypes} >
- +
diff --git a/rnd/autogpt_builder/src/components/ModalComponent.tsx b/rnd/autogpt_builder/src/components/ModalComponent.tsx index 3c2ac13f2..981b3a59a 100644 --- a/rnd/autogpt_builder/src/components/ModalComponent.tsx +++ b/rnd/autogpt_builder/src/components/ModalComponent.tsx @@ -1,5 +1,7 @@ import React, { FC } from 'react'; import './modal.css'; +import { Button } from './ui/button'; +import { Textarea } from './ui/textarea'; interface ModalProps { isOpen: boolean; @@ -22,15 +24,16 @@ const ModalComponent: FC = ({ isOpen, onClose, onSave, value }) => { return (
-
-