fix: migrate PlanDisplay raw params from native details to Collapsible primitive

This commit is contained in:
simosmik
2026-04-20 15:36:02 +00:00
parent ec0ff974cb
commit fc3504eaed

View File

@@ -90,10 +90,10 @@ export const PlanDisplay: React.FC<PlanDisplayProps> = ({
) : null} ) : null}
{showRawParameters && rawContent && ( {showRawParameters && rawContent && (
<details className="group/raw relative mt-3"> <Collapsible className="mt-3">
<summary className="flex cursor-pointer items-center gap-1.5 py-0.5 text-[11px] text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300"> <CollapsibleTrigger className="flex items-center gap-1.5 py-0.5 text-[11px] text-muted-foreground hover:text-foreground">
<svg <svg
className="h-2.5 w-2.5 transition-transform duration-150 group-open/raw:rotate-90" className="h-2.5 w-2.5 flex-shrink-0 transition-transform duration-150 data-[state=open]:rotate-90"
fill="none" fill="none"
stroke="currentColor" stroke="currentColor"
viewBox="0 0 24 24" viewBox="0 0 24 24"
@@ -101,11 +101,13 @@ export const PlanDisplay: React.FC<PlanDisplayProps> = ({
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" /> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
</svg> </svg>
raw params raw params
</summary> </CollapsibleTrigger>
<pre className="mt-1 overflow-hidden whitespace-pre-wrap break-words rounded border border-gray-200/40 bg-gray-50 p-2 font-mono text-[11px] text-gray-600 dark:border-gray-700/40 dark:bg-gray-900/50 dark:text-gray-400"> <CollapsibleContent>
{rawContent} <pre className="mt-1 overflow-hidden whitespace-pre-wrap break-words rounded border border-border/40 bg-muted p-2 font-mono text-[11px] text-muted-foreground">
</pre> {rawContent}
</details> </pre>
</CollapsibleContent>
</Collapsible>
)} )}
</CardContent> </CardContent>
</CollapsibleContent> </CollapsibleContent>