From 1eba594418876c40f387a01793c491a34f229e17 Mon Sep 17 00:00:00 2001 From: simos Date: Wed, 17 Sep 2025 08:04:43 +0000 Subject: [PATCH] Feat: Improve the chat interface by grouping messages from AI --- src/components/ChatInterface.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/ChatInterface.jsx b/src/components/ChatInterface.jsx index f7a15ba..d4661aa 100644 --- a/src/components/ChatInterface.jsx +++ b/src/components/ChatInterface.jsx @@ -157,9 +157,11 @@ const safeLocalStorage = { // Memoized message component to prevent unnecessary re-renders const MessageComponent = memo(({ message, index, prevMessage, createDiff, onFileOpen, onShowSettings, autoExpandTools, showRawParameters }) => { - const isGrouped = prevMessage && prevMessage.type === message.type && - prevMessage.type === 'assistant' && - !prevMessage.isToolUse && !message.isToolUse; + const isGrouped = prevMessage && prevMessage.type === message.type && + ((prevMessage.type === 'assistant') || + (prevMessage.type === 'user') || + (prevMessage.type === 'tool') || + (prevMessage.type === 'error')); const messageRef = React.useRef(null); const [isExpanded, setIsExpanded] = React.useState(false); React.useEffect(() => {