From 671e708bb5936130ebb6d7ee7675abf00bdca1c6 Mon Sep 17 00:00:00 2001 From: gongzhiyong Date: Wed, 15 Apr 2026 01:05:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20P0=20=E5=88=87=E6=8D=A2=E7=A9=BA?= =?UTF-8?q?=E7=BA=BF=E7=A8=8B=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=A8=AA=E5=B9=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit thread.error 在 useStream 切换 threadId 时不会自动清除, 导致切换到空新对话时残留旧线程的 error 触发红色错误横幅。 修复:activeMessages.length === 0 时抑制错误横幅, 空线程不可能有工具执行异常,无需展示该提示。 Co-Authored-By: Claude Sonnet 4.6 --- langgraph/src/components/ChatMessages.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langgraph/src/components/ChatMessages.tsx b/langgraph/src/components/ChatMessages.tsx index 3956b64..72686d4 100644 --- a/langgraph/src/components/ChatMessages.tsx +++ b/langgraph/src/components/ChatMessages.tsx @@ -435,8 +435,8 @@ export function ChatMessages({ )); })()} - {/* Thread error banner */} - {!!thread.error && !thread.isLoading && ( + {/* Thread error banner — only show when there are messages (suppress stale error on empty thread switch) */} + {!!thread.error && !thread.isLoading && activeMessages.length > 0 && (