handleToggleMouseUp(event, toggleOpen)}
+ >
{args && !isRead && !isGateway && (
-
+
{(() => {
if (isEdit) {
try {
@@ -230,14 +301,17 @@ export function ToolCallPill({ name, args, status, result, resultError, toolCall
)}
{result && !isEdit && (
-
+
Result
-
8 ? "max-h-[10rem] overflow-y-auto scrollbar-hide" : "overflow-hidden"}`}>{result}
+
{result}
)}
)}
+ {hasContent && open && (
+
+ )}
);
}
@@ -294,6 +368,8 @@ function SpawnPill({
}, [toolCallId, childSessionKey, subagentStore]);
const hasFeed = !!subagentStore;
+ const canToggle = !isPinned;
+ const visibleOpen = open && canToggle;
// Animate open on mount for streaming case only (not history)
useEffect(() => {
@@ -311,11 +387,12 @@ function SpawnPill({
}, [isPinned, onPin, onUnpin, toolCallId, childSessionKey, task, model]),
{ disabled: !hasFeed }
);
+ const toggleOpen = () => setOpen((v) => !v);
return (
{/* Swipe action indicator (behind content) */}
@@ -335,23 +412,27 @@ function SpawnPill({
transition: animating ? "transform 200ms ease-out" : "none",
}}
>
-