Skip to content

Open-source status page, incident response and uptime monitoring

fix: default open tool (#2155)

Maximilian Kaskeef7691ad1897
diff --git a/apps/dashboard/src/components/chat/chat-tool-part.tsx b/apps/dashboard/src/components/chat/chat-tool-part.tsx
index caa18c914..db8b5b756 100644
--- a/apps/dashboard/src/components/chat/chat-tool-part.tsx
+++ b/apps/dashboard/src/components/chat/chat-tool-part.tsx
@@ -139,19 +139,7 @@ function ToolDisclosure({
const summary =
summarizeToolOutput(toolName, part.output) ??
(state === "output-denied" ? "Cancelled" : undefined);
- // Open by default when a rich renderer has data. During streaming the tool
- // mounts with `output === undefined` (so `rich` is undefined) — auto-open
- // on the first transition to defined, but only once, so a user-driven close
- // afterwards isn't reverted by subsequent output chunks.
- const richDefined = rich !== undefined;
- const [open, setOpen] = useState(richDefined);
- const hasAutoOpened = useRef(richDefined);
- useEffect(() => {
- if (!hasAutoOpened.current && richDefined) {
- hasAutoOpened.current = true;
- setOpen(true);
- }
- }, [richDefined]);
+ const [open, setOpen] = useState(false);
// Gate the height animation behind a post-mount flag so a tool that mounts
// already-open doesn't play the open animation on first paint.
const [mounted, setMounted] = useState(false);