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.

fix(frontend): avoid displaying long description text for block (#8688)

Zamil Majdy402789d8cd30
diff --git a/autogpt_platform/frontend/src/components/edit/control/BlocksControl.tsx b/autogpt_platform/frontend/src/components/edit/control/BlocksControl.tsx
index a200af0e78..fcd21c316a 100644
--- a/autogpt_platform/frontend/src/components/edit/control/BlocksControl.tsx
+++ b/autogpt_platform/frontend/src/components/edit/control/BlocksControl.tsx
@@ -205,7 +205,10 @@ export const BlocksControl: React.FC<BlocksControlProps> = ({
{beautifyString(block.name).replace(/ Block$/, "")}
</span>
<span className="block break-words text-xs font-normal text-gray-500">
- {block.description}
+ {/* Cap description at 100 characters max */}
+ {block.description?.length > 100
+ ? block.description.slice(0, 100) + "..."
+ : block.description}
</span>
</div>
<div