Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion gui/src/components/ToggleDiv.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ interface ToggleProps {
title: React.ReactNode;
icon?: ComponentType<React.SVGProps<SVGSVGElement>>;
testId?: string;
defaultOpen?: boolean;
}

function ToggleDiv({
children,
title,
icon: Icon,
testId = "context-items-peek",
defaultOpen = false,
}: ToggleProps) {
const [open, setOpen] = useState(false);
const [open, setOpen] = useState(defaultOpen);
const [isHovered, setIsHovered] = useState(false);

return (
Expand Down
6 changes: 5 additions & 1 deletion gui/src/pages/gui/StreamError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ const StreamErrorDialog = ({ error }: StreamErrorProps) => {
{/* Expandable technical details using ToggleDiv */}
{message && (
<div className="mb-2">
<ToggleDiv title="View error output" testId="error-output-toggle">
<ToggleDiv
title="View error output"
testId="error-output-toggle"
defaultOpen
>
<div className="flex flex-col gap-0 rounded-sm">
<code className="text-editor-foreground block max-h-48 overflow-y-auto p-3 font-mono text-xs">
{parsedError}
Expand Down
Loading