Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(frontend): add special rendering for NOTE UI type in FieldTemplate (#11771)

Abhimanyu Yadavaa5a039c5e5f
diff --git a/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/OutputHandler.tsx b/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/OutputHandler.tsx
index 417fb9d9c1..665a5bb7be 100644
--- a/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/OutputHandler.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/OutputHandler.tsx
@@ -31,8 +31,6 @@ export const OutputHandler = ({
const [isOutputVisible, setIsOutputVisible] = useState(true);
const brokenOutputs = useBrokenOutputs(nodeId);
- console.log("brokenOutputs", brokenOutputs);
-
const showHandles = uiType !== BlockUIType.OUTPUT;
const renderOutputHandles = (
diff --git a/autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/FieldTemplate.tsx b/autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/FieldTemplate.tsx
index 56dfcefa71..705afbcaaa 100644
--- a/autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/FieldTemplate.tsx
+++ b/autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/FieldTemplate.tsx
@@ -17,6 +17,7 @@ import {
import { useNodeStore } from "@/app/(platform)/build/stores/nodeStore";
import { useEdgeStore } from "@/app/(platform)/build/stores/edgeStore";
import { FieldError } from "./FieldError";
+import { BlockUIType } from "@/app/(platform)/build/components/types";
export default function FieldTemplate(props: FieldTemplateProps) {
const {
@@ -39,7 +40,7 @@ export default function FieldTemplate(props: FieldTemplateProps) {
onRemoveProperty,
readonly,
} = props;
- const { nodeId } = registry.formContext;
+ const { nodeId, uiType } = registry.formContext;
const { isInputConnected } = useEdgeStore();
const showAdvanced = useNodeStore(
@@ -50,6 +51,10 @@ export default function FieldTemplate(props: FieldTemplateProps) {
return <div className="hidden">{children}</div>;
}
+ if (uiType === BlockUIType.NOTE) {
+ return children;
+ }
+
const uiOptions = getUiOptions(uiSchema);
const TitleFieldTemplate = getTemplate(
"TitleFieldTemplate",