JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
fix(web): 发送新 query 时清掉未回答的内联提问卡片 (#2091)
stevenchenhanwen2006b5e87c9464ae
diff --git a/jiuwenswarm/channels/web/frontend/src/hooks/useWebSocket.ts b/jiuwenswarm/channels/web/frontend/src/hooks/useWebSocket.tsindex d092d9728b..ad2d63ee29 100644--- a/jiuwenswarm/channels/web/frontend/src/hooks/useWebSocket.ts+++ b/jiuwenswarm/channels/web/frontend/src/hooks/useWebSocket.ts@@ -992,6 +992,12 @@ export function useWebSocket(options: UseWebSocketOptions): UseWebSocketReturn {userInputVersionRef.current += 1;stopAllTts();+ // 用户忽略未回答的提问器、直接发新 query:清掉残留的内联提问卡片。+ // 否则该卡片作为时间线最后一个元素会一直钉在最底部(issue #2091)。+ if (useChatStore.getState().pendingQuestion) {+ useChatStore.getState().setPendingQuestion(null);+ }+// 添加用户消息addMessage({id: `user-${Date.now()}`,