fix(desktop): 隐藏 researcher hand 原始JSON输出 — 搜索结果已通过LLM回复展示
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
问题:搜索时 chat 中出现 hand_researcher 原始 JSON 结果, 包含 action/query/results 等技术细节,对用户无意义。 修复:MessageBubble 对 role='hand' && handName='researcher' 的消息直接返回 null(与 role='tool' 同理静默处理)。 搜索结果已由 LLM 整合在回复中呈现,无需重复显示。
This commit is contained in:
@@ -641,6 +641,10 @@ function MessageBubble({ message, onRetry }: { message: Message; setInput?: (tex
|
||||
if (message.role === 'tool') {
|
||||
return null;
|
||||
}
|
||||
// Researcher hand results are internal — search results are already in the LLM reply
|
||||
if (message.role === 'hand' && message.handName === 'researcher') {
|
||||
return null;
|
||||
}
|
||||
|
||||
const isUser = message.role === 'user';
|
||||
const isThinking = message.streaming && !message.content;
|
||||
@@ -733,7 +737,7 @@ function MessageBubble({ message, onRetry }: { message: Message; setInput?: (tex
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{!isUser && message.role === 'hand' && message.handResult && typeof message.handResult === 'object' && message.handResult !== null && !message.workflowResult && (
|
||||
{!isUser && message.role === 'hand' && message.handResult && typeof message.handResult === 'object' && message.handResult !== null && !message.workflowResult && message.handName !== 'researcher' && (
|
||||
<div className="mt-3">
|
||||
<PresentationContainer data={message.handResult} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user