fix(chat): make agent message bubbles fit content width (#1083)

This commit is contained in:
Cyrus Gray
2026-05-01 20:08:03 +05:30
committed by GitHub
parent aff08d0efb
commit e36e479fdf
+2 -3
View File
@@ -1039,8 +1039,7 @@ const Conversations = ({ variant = 'page' }: ConversationsProps = {}) => {
)}
<div
className={`group/msg flex ${msg.sender === 'user' ? 'justify-end' : 'justify-start'}`}>
<div
className={`relative ${msg.sender === 'user' ? 'w-fit max-w-[75%]' : 'w-full md:max-w-[75%]'}`}>
<div className="relative w-fit max-w-[75%]">
{msg.sender === 'agent' ? (
<div className="space-y-1">
{splitAgentMessageIntoBubbles(msg.content).map(
@@ -1224,7 +1223,7 @@ const Conversations = ({ variant = 'page' }: ConversationsProps = {}) => {
(selectedStreamingAssistant.content.length > 0 ||
selectedStreamingAssistant.thinking.length > 0) && (
<div className="flex justify-start">
<div className="relative w-full md:max-w-[75%]">
<div className="relative w-fit max-w-[75%]">
{selectedStreamingAssistant.thinking.length > 0 && (
<details className="mb-1.5 bg-stone-100 rounded-lg px-3 py-1.5 text-xs text-stone-600 open:bg-stone-100">
<summary className="cursor-pointer select-none flex items-center gap-1.5">