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:工具调用失败时不显示“完成”,显示“❌”
openJiuwen-bot184260d626ca
diff --git a/jiuwenclaw/web/src/components/ChatPanel/ToolGroupDisplay.tsx b/jiuwenclaw/web/src/components/ChatPanel/ToolGroupDisplay.tsxindex 0de64a182c..e960236b2b 100644--- a/jiuwenclaw/web/src/components/ChatPanel/ToolGroupDisplay.tsx+++ b/jiuwenclaw/web/src/components/ChatPanel/ToolGroupDisplay.tsx@@ -288,9 +288,9 @@ export function ToolExecutionItem({ execution }: { execution: ToolExecution }) {const hasResult = !!result;const isTimeout = status === 'timeout';const isError = status === 'error';- const isSuccess = status === 'completed';+ const isSuccess = status === 'completed' && !(result && result.result && result.result.includes('success=False'));const resultSummary = result- ? (result.summary || `${result.success ? t('chatUi.toolResult.success') : t('chatUi.toolResult.failed')}`)+ ? (result.summary || (isSuccess ? t('chatUi.toolResult.success') : '❌')): '';return (diff --git a/jiuwenclaw/web/src/features/tool-events/toolEventNormalizer.ts b/jiuwenclaw/web/src/features/tool-events/toolEventNormalizer.tsindex cbfd3fdee2..e7546113cc 100644--- a/jiuwenclaw/web/src/features/tool-events/toolEventNormalizer.ts+++ b/jiuwenclaw/web/src/features/tool-events/toolEventNormalizer.ts@@ -110,7 +110,7 @@ export function normalizeToolResultPayload(payload: UnknownPayload): NormalizedTconst summary =typeof toolResultPayload.summary === 'string'? toolResultPayload.summary- : undefined;+ : success ? undefined : '❌';return {toolName,