Skip to content

Commit

Permalink
fix: show title when disable debug panel
Browse files Browse the repository at this point in the history
  • Loading branch information
634750802 committed Jun 26, 2024
1 parent 01e2a2f commit 07611c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/chat/conversation-message-groups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ function ConversationMessageGroup ({ group }: { group: ConversationMessageGroupP
const [debugInfoOpen, setDebugInfoOpen] = useState(false);
return (
<section className="space-y-6 p-4 pt-12 border-b pb-10 last-of-type:border-b-0 last-of-type:border-pb-4">
{enableDebug && <Collapsible open={debugInfoOpen} onOpenChange={setDebugInfoOpen}>
<Collapsible open={debugInfoOpen} onOpenChange={setDebugInfoOpen}>
<div className="relative pr-12">
<h2 className="text-2xl font-normal">{group.userMessage.content}</h2>
<CollapsibleTrigger asChild>
{enableDebug && <CollapsibleTrigger asChild>
<Button className="absolute right-0 top-0 z-0 rounded-full" variant="ghost" size="sm">
<InfoCircledIcon className="h-4 w-4" />
<span className="sr-only">Toggle</span>
</Button>
</CollapsibleTrigger>
</CollapsibleTrigger>}
</div>
<CollapsibleContent>
<DebugInfo group={group} />
</CollapsibleContent>
</Collapsible>}
</Collapsible>

<MessageContextSources group={group} />
<section className="space-y-2">
Expand Down

0 comments on commit 07611c7

Please sign in to comment.