+
{gatewayHeader ? (
gatewayHeader
) : isBuiltinTool ? (
@@ -391,31 +389,33 @@ const ToolHeader = memo(function ToolHeader({
)}
-
- {!isReadOnly && onDuplicate && (
-
- }
- type="text"
- onClick={onDuplicate}
- size="small"
- />
-
- )}
- {!isReadOnly && onDelete && (
-
- }
- type="text"
- onClick={onDelete}
- size="small"
- />
-
- )}
+
+
+ {!isReadOnly && onDuplicate && (
+
+ }
+ type="text"
+ onClick={onDuplicate}
+ size="small"
+ />
+
+ )}
+ {!isReadOnly && onDelete && (
+
+ }
+ type="text"
+ onClick={onDelete}
+ size="small"
+ />
+
+ )}
+
@@ -467,16 +467,8 @@ export const ToolItemControl = memo(function ToolItemControl({
const effectiveRenderProviderIcon = renderProviderIcon ?? defaultRenderProviderIcon
const isReadOnly = disabled
- const [minimized, setMinimized] = useState(() => {
- if (value && typeof value === "object" && !Array.isArray(value)) {
- const obj = value as Record
- if (obj.agenta_metadata && typeof obj.agenta_metadata === "object") {
- const meta = obj.agenta_metadata as Record
- return meta.source === "gateway" || meta.source === "builtin"
- }
- }
- return false
- })
+ // Default collapsed: tool cards open to just their title + description.
+ const [minimized, setMinimized] = useState(true)
const containerRef = useRef(null)
// Strip agenta_metadata if present (re-attach on change)
@@ -652,7 +644,6 @@ export const ToolItemControl = memo(function ToolItemControl({
builtinToolLabel={toolLabel}
builtinIcon={providerIcon}
gatewayHeader={gatewayHeader}
- containerRef={containerRef}
/>
{!minimized && (