From 4892e7afada1a6ad466cef32db512ab08ce2e6d9 Mon Sep 17 00:00:00 2001 From: wuyang <5700876+banisherwy@user.noreply.gitee.com> Date: Wed, 8 Jul 2026 14:11:13 +0800 Subject: [PATCH] Simplify search agent activity state --- web/static/app.js | 40 ++++++++------- web/static/index.html | 4 +- web/static/styles.css | 112 ++++++++++++++++++++++++++++-------------- 3 files changed, 97 insertions(+), 59 deletions(-) diff --git a/web/static/app.js b/web/static/app.js index c0cda82..66b9181 100644 --- a/web/static/app.js +++ b/web/static/app.js @@ -521,22 +521,26 @@ function routeButtons(routes) { `; } -function searchSteps(steps = []) { +function searchActivity(steps = []) { + const current = + steps.find((step) => step.status === "running") || + [...steps].reverse().find((step) => step.status === "done") || + steps[0] || + {}; + const doneCount = steps.filter((step) => step.status === "done").length; + const currentIndex = Math.min(doneCount + (current.status === "running" ? 1 : 0), steps.length || 1); + const statusLabel = current.status === "running" ? "working" : current.status || "pending"; return ` -
Search Agent 正在理解问题、扩展关键词并检索本地论文库。
-