feat(agent): optimize Agent's streaming response by removing word-by-word animation queue and adjusting message placeholder behavior

This commit is contained in:
HouYunFei
2026-07-31 11:33:25 +08:00
parent 29e52fecd6
commit ed2b0dabad
3 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ import { AgentApprovalCard, AgentChatMessage, AgentPendingToolCard, AgentToolCar
import { agentMessageToChatMessage, currentPlanMessage, isPlanMessage, latestPlanMessage, toolCallDetail, toolName, workingActivity } from "./agent-event-formatters";
const SCROLL_BOTTOM_THRESHOLD = 48;
const historyMessageStyle = { contentVisibility: "auto", containIntrinsicSize: "0 80px" } as const;
export function AgentChatTimeline({
theme,
@@ -101,7 +102,7 @@ export function AgentTaskProgress({ theme, busy }: { theme: (typeof canvasThemes
const AgentChatMessageRow = memo(function AgentChatMessageRow({ item, theme }: { item: AgentChatItem; theme: (typeof canvasThemes)[keyof typeof canvasThemes] }) {
return (
<div style={{ contentVisibility: "auto", containIntrinsicSize: "0 80px" }}>
<div style={item.streamId ? undefined : historyMessageStyle}>
<AgentChatMessage item={agentMessageToChatMessage(item)} theme={theme} />
</div>
);