diff --git a/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/PromptSchemaControl.tsx b/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/PromptSchemaControl.tsx index e93a523e70..130f580648 100644 --- a/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/PromptSchemaControl.tsx +++ b/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/PromptSchemaControl.tsx @@ -494,7 +494,7 @@ export const PromptSchemaControl = memo(function PromptSchemaControl({ } return ( -
+
{/* Messages list */} {toolControl} diff --git a/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ToolItemControl.tsx b/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ToolItemControl.tsx index 205bb21c85..2b57e8eec1 100644 --- a/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ToolItemControl.tsx +++ b/web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ToolItemControl.tsx @@ -19,7 +19,7 @@ import {memo, useCallback, useEffect, useMemo, useRef, useState} from "react" import {safeStringify} from "@agenta/shared/utils" -import {CollapseToggleButton, getCollapseStyle} from "@agenta/ui/components/presentational" +import {CollapseToggleButton} from "@agenta/ui/components/presentational" import {useDrillInUI} from "@agenta/ui/drill-in" import {getProviderIcon} from "@agenta/ui/select-llm-provider" import {CopySimple, MinusCircle} from "@phosphor-icons/react" @@ -256,7 +256,6 @@ interface ToolHeaderProps { builtinToolLabel?: string builtinIcon?: React.ReactNode gatewayHeader?: React.ReactNode - containerRef?: React.RefObject } function GatewayToolHeaderIdentity({ @@ -344,11 +343,10 @@ const ToolHeader = memo(function ToolHeader({ builtinToolLabel, builtinIcon, gatewayHeader, - containerRef, }: ToolHeaderProps) { return (
-
+
{gatewayHeader ? ( gatewayHeader ) : isBuiltinTool ? ( @@ -391,31 +389,33 @@ const ToolHeader = memo(function ToolHeader({ )}
-
- {!isReadOnly && onDuplicate && ( - -
@@ -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 && (