Skip to content

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: Cancel truncation of frontend display tool call results

wncbdjf21a17d3cd7d
diff --git a/jiuwenclaw/agentserver/deep_agent/rails/stream_event_rail.py b/jiuwenclaw/agentserver/deep_agent/rails/stream_event_rail.py
index 3970d76a1f..83aa99c3a0 100644
--- a/jiuwenclaw/agentserver/deep_agent/rails/stream_event_rail.py
+++ b/jiuwenclaw/agentserver/deep_agent/rails/stream_event_rail.py
@@ -173,7 +173,7 @@ class JiuClawStreamEventRail(DeepAgentRail):
tool_result_payload = {
"tool_name": getattr(tool_call, "name", "") if tool_call else "",
"tool_call_id": getattr(tool_call, "id", "") if tool_call else "",
- "result": str(result)[:1000] if result is not None else "",
+ "result": str(result)[:60000] if result is not None else "",
}
if raw_output is not None:
tool_result_payload["raw_output"] = raw_output
diff --git a/jiuwenclaw/web/src/utils/formatters.ts b/jiuwenclaw/web/src/utils/formatters.ts
index d7869050cd..e8776dee33 100644
--- a/jiuwenclaw/web/src/utils/formatters.ts
+++ b/jiuwenclaw/web/src/utils/formatters.ts
@@ -68,7 +68,7 @@ export function formatToolArguments(args: Record<string, unknown>): string {
/**
* 格式化工具结果(截断长结果)
*/
-export function formatToolResult(result: string, maxLength = 10000): string {
+export function formatToolResult(result: string, maxLength = 60000): string {
if (result.length <= maxLength) return result;
return result.slice(0, maxLength) + `\n... (${i18n.t('chatUi.toolResult.truncated')})`;
}