diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index 9d9964d43d..89d817e4aa 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -127,13 +127,19 @@ interface ChatRowContentProps extends Omit {} const ChatRow = memo( (props: ChatRowProps) => { const { isLast, onHeightChange, message } = props + + // Some message types update state but should not be visible in the chat history. + // We still render a row for Virtuoso compatibility, but hide it so it takes up no space. + const shouldHideRow = message.type === "say" && message.say === "system_update_todos" // Store the previous height to compare with the current height // This allows us to detect changes without causing re-renders const prevHeightRef = useRef(0) const [chatrow, { height }] = useSize( -
- +
+ {shouldHideRow ? null : }
, ) @@ -1419,7 +1425,7 @@ export const ChatRowContent = ({ case "user_edit_todos": return {}} /> case "system_update_todos": - return {}} /> + return null case "tool" as any: // Handle say tool messages const sayTool = safeJsonParse(message.text)