File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -7,15 +7,17 @@ interface ToggleProps {
77 title : React . ReactNode ;
88 icon ?: ComponentType < React . SVGProps < SVGSVGElement > > ;
99 testId ?: string ;
10+ defaultOpen ?: boolean ;
1011}
1112
1213function ToggleDiv ( {
1314 children,
1415 title,
1516 icon : Icon ,
1617 testId = "context-items-peek" ,
18+ defaultOpen = false ,
1719} : ToggleProps ) {
18- const [ open , setOpen ] = useState ( false ) ;
20+ const [ open , setOpen ] = useState ( defaultOpen ) ;
1921 const [ isHovered , setIsHovered ] = useState ( false ) ;
2022
2123 return (
Original file line number Diff line number Diff line change @@ -250,7 +250,11 @@ const StreamErrorDialog = ({ error }: StreamErrorProps) => {
250250 { /* Expandable technical details using ToggleDiv */ }
251251 { message && (
252252 < div className = "mb-2" >
253- < ToggleDiv title = "View error output" testId = "error-output-toggle" >
253+ < ToggleDiv
254+ title = "View error output"
255+ testId = "error-output-toggle"
256+ defaultOpen
257+ >
254258 < div className = "flex flex-col gap-0 rounded-sm" >
255259 < code className = "text-editor-foreground block max-h-48 overflow-y-auto p-3 font-mono text-xs" >
256260 { parsedError }
You can’t perform that action at this time.
0 commit comments