From 4b6687db6be14dfaaa78bad7d9ddda12568e2316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A4=B0=E5=AD=90=E7=B3=96?= <106207987+liqigang63@users.noreply.github.com> Date: Fri, 12 Sep 2025 01:46:04 +0800 Subject: [PATCH] Fix log time display bug (#25475) Co-authored-by: wxliqigang Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- web/app/components/base/agent-log-modal/tool-call.tsx | 2 +- web/app/components/workflow/run/node.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/components/base/agent-log-modal/tool-call.tsx b/web/app/components/base/agent-log-modal/tool-call.tsx index 499a70367c..433a20fd5d 100644 --- a/web/app/components/base/agent-log-modal/tool-call.tsx +++ b/web/app/components/base/agent-log-modal/tool-call.tsx @@ -33,7 +33,7 @@ const ToolCallItem: FC = ({ toolCall, isLLM = false, isFinal, tokens, obs if (time < 1) return `${(time * 1000).toFixed(3)} ms` if (time > 60) - return `${Number.parseInt(Math.round(time / 60).toString())} m ${(time % 60).toFixed(3)} s` + return `${Math.floor(time / 60)} m ${(time % 60).toFixed(3)} s` return `${time.toFixed(3)} s` } diff --git a/web/app/components/workflow/run/node.tsx b/web/app/components/workflow/run/node.tsx index a4df5f4c74..6a197df5bb 100644 --- a/web/app/components/workflow/run/node.tsx +++ b/web/app/components/workflow/run/node.tsx @@ -73,7 +73,7 @@ const NodePanel: FC = ({ if (time < 1) return `${(time * 1000).toFixed(3)} ms` if (time > 60) - return `${Number.parseInt(Math.round(time / 60).toString())} m ${(time % 60).toFixed(3)} s` + return `${Math.floor(time / 60)} m ${(time % 60).toFixed(3)} s` return `${time.toFixed(3)} s` }