From 57369772c7c5c79f32430139f0c9338fcf9cdefe Mon Sep 17 00:00:00 2001 From: Huarch Date: Thu, 4 Jun 2026 18:02:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(chat):=20=E6=9B=B4=E6=96=B0=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E8=BF=9B=E5=BA=A6=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/chat/AgentProgressTimeline.test.tsx | 8 ++++---- src/components/chat/AgentProgressTimeline.tsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/chat/AgentProgressTimeline.test.tsx b/src/components/chat/AgentProgressTimeline.test.tsx index b1e7b54..5c6a736 100644 --- a/src/components/chat/AgentProgressTimeline.test.tsx +++ b/src/components/chat/AgentProgressTimeline.test.tsx @@ -30,8 +30,8 @@ describe("AgentProgressTimeline", () => { id: "tool", phase: "tool", status: "running", - title: "正在调用 dynamic_http_call", - detail: "GET /api/v1/network/bottlenecks", + title: "正在调用 tjwater_cli", + detail: "analysis bottlenecks", startedAt: now - 1200, elapsedMs: 1200, elapsedSnapshotAt: now, @@ -43,7 +43,7 @@ describe("AgentProgressTimeline", () => { expect(screen.getByText(/Agent 过程:/)).toBeInTheDocument(); expect(screen.getByText(/耗时 5.0s/)).toBeInTheDocument(); expect(screen.getByText("查询后端数据")).toBeInTheDocument(); - expect(screen.getByText("GET /api/v1/network/bottlenecks")).toBeInTheDocument(); + expect(screen.getByText("analysis bottlenecks")).toBeInTheDocument(); expect(screen.getByText("1.2s")).toBeInTheDocument(); }); @@ -86,7 +86,7 @@ describe("AgentProgressTimeline", () => { id: "tool", phase: "tool", status: "completed", - title: "正在调用 dynamic_http_call", + title: "正在调用 tjwater_cli", startedAt: Date.now() - 4000, endedAt: Date.now(), }, diff --git a/src/components/chat/AgentProgressTimeline.tsx b/src/components/chat/AgentProgressTimeline.tsx index 83c99e6..15bba4d 100644 --- a/src/components/chat/AgentProgressTimeline.tsx +++ b/src/components/chat/AgentProgressTimeline.tsx @@ -76,7 +76,7 @@ const phaseIcon = (phase: string, status: ChatProgress["status"]) => { const formatToolTitle = (item: ChatProgress) => { const text = `${item.title} ${item.detail ?? ""}`; - if (text.includes("dynamic_http_call")) return "查询后端数据"; + if (text.includes("tjwater_cli")) return "查询后端数据"; if (text.includes("show_chart")) return "生成图表"; if (text.includes("locate_features")) return "地图定位"; if (text.includes("view_history")) return "打开历史曲线";