Your team of AI agents, on your Mac, Windows or Linux. Agents that talk in channels, write code, review each other and use your tools, on the Claude Code, Codex, OpenCode or Pi you already have. Anything that touches the real world waits for your yes.
TypeScript agent-teamagentic-aiai-agentsai-assistantclaude-codecodexcursorelectrongrokgrok-bot-alternativelinuxlocal-firstmacosmcpmulti-agentopenclaw-alternativeopencodewindows
Redraw only the message that changed while an agent replies (#132)
LuanSP4e998f1e8d43
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex df9b3f6..130462d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,6 +4,13 @@ What changed in each version of Tucano. The format follows [Keep a Changelog](ht## [Unreleased]+> **Em português:**+> - **Conversas longas não pesam mais enquanto um agente responde.** Cada palavra recebida redesenhava todas as mensagens; agora só a que mudou.++### Fixed++- **Long conversations stay light while an agent replies.** Each streamed word redrew and re-parsed every message in the list, keeping the window busy on long conversations. Now only the message that changed is drawn again.+## [0.2.11] - 2026-11-05> **Em português:**diff --git a/src/renderer/src/components/Conversation.tsx b/src/renderer/src/components/Conversation.tsxindex 474fdd8..c0b811a 100644--- a/src/renderer/src/components/Conversation.tsx+++ b/src/renderer/src/components/Conversation.tsx@@ -1,5 +1,5 @@import { L, lang, locale } from '../../../shared/lang'-import { useEffect, useLayoutEffect, useMemo, useRef, useState, type ComponentProps, type ReactNode } from 'react'+import { memo, useEffect, useLayoutEffect, useMemo, useRef, useState, type ComponentProps, type ReactNode } from 'react'import Markdown, { defaultUrlTransform, type ExtraProps } from 'react-markdown'import { LOCAL_LINK, remarkLocalPaths } from '../../../shared/path-text'import { remarkMentions, splitMentions } from '../../../shared/mention-text'@@ -316,8 +316,12 @@ const AGENT_PLUGINS = [remarkGfm, remarkMentions, remarkLocalPaths]const PLAIN_PLUGINS = [remarkGfm, remarkMentions]const keepLocalLinks = (url: string): string => (url.startsWith(LOCAL_LINK) ? url : defaultUrlTransform(url))+// Parsing is by far the most expensive part of drawing a message, so it only runs when the text changes.+const MessageMarkdown = memo(Markdown)+// `replies`: in a timeline with threads, the replies to this message (none yet: empty).-function MessageRow({ message, grouped, replies }: { message: Message; grouped: boolean; replies?: Message[] }): ReactNode {+// Memoized because each word an agent streams redraws the list: only the row that changed should pay for it.+const MessageRow = memo(function MessageRow({ message, grouped, replies }: { message: Message; grouped: boolean; replies?: Message[] }): ReactNode {const me = useStore((s) => s.me)// In the timeline (not as the thread's own heading), lit while its thread is open on the side.const threadOpen = useStore((s) => !!replies && s.panel?.kind === 'thread' && s.panel.id === message.id)@@ -375,9 +379,9 @@ function MessageRow({ message, grouped, replies }: { message: Message; grouped:{message.text ? (<div className="md">{agent && message.run?.status !== 'working' ? (- <Markdown remarkPlugins={AGENT_PLUGINS} urlTransform={keepLocalLinks} components={agentMarkdown}>{wikiLinks(message.text)}</Markdown>+ <MessageMarkdown remarkPlugins={AGENT_PLUGINS} urlTransform={keepLocalLinks} components={agentMarkdown}>{wikiLinks(message.text)}</MessageMarkdown>) : (- <Markdown remarkPlugins={PLAIN_PLUGINS} components={plainMarkdown}>{wikiLinks(message.text)}</Markdown>+ <MessageMarkdown remarkPlugins={PLAIN_PLUGINS} components={plainMarkdown}>{wikiLinks(message.text)}</MessageMarkdown>)}</div>) : null}@@ -442,7 +446,7 @@ function MessageRow({ message, grouped, replies }: { message: Message; grouped:</div></article>)-}+})// What a routine asked, posted at its time; the agent's reply comes next.function RoutineMessage({ message, replies }: { message: Message; replies?: Message[] }): ReactNode {@@ -474,7 +478,7 @@ function RoutineMessage({ message, replies }: { message: Message; replies?: Mess</div>)}<div className="md">- <Markdown remarkPlugins={PLAIN_PLUGINS} components={plainMarkdown}>{wikiLinks(message.text)}</Markdown>+ <MessageMarkdown remarkPlugins={PLAIN_PLUGINS} components={plainMarkdown}>{wikiLinks(message.text)}</MessageMarkdown></div>{replies && <ThreadLink message={message} replies={replies} />}</div>