From ff80cc110dc8027be706bdd61e2e7f3fcc4fea8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=87=AF?= Date: Sun, 30 Aug 2026 16:21:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=86=99=E4=BD=9C=E7=AE=A1=E7=BA=BF?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4=E6=9D=A1=E6=94=B9=E7=94=A8=E4=B8=8D=E6=B6=89?= =?UTF-8?q?=E5=8F=8A=E6=A3=80=E7=B4=A2=E7=9A=84=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 「拆解检索问题」→「梳理写作思路」(已梳理出 N 个论述角度) - 「检索参考资料」→「整理对话资料」(已整理 1/2 个论述角度的 资料 · 累计 N 条) - 管线实际只汇总对话已收集的资料再成稿,原文案会让用户误以为 管线在重新检索;测试补标签断言防止回退 --- .../threads/use-research-report-stream.test.ts | 4 +++- .../core/threads/use-research-report-stream.ts | 16 +++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/frontend-web/src/core/threads/use-research-report-stream.test.ts b/frontend-web/src/core/threads/use-research-report-stream.test.ts index 0ad77669..b482f76d 100644 --- a/frontend-web/src/core/threads/use-research-report-stream.test.ts +++ b/frontend-web/src/core/threads/use-research-report-stream.test.ts @@ -140,9 +140,11 @@ test("progress tool calls reveal stages stepwise and mark interruption", () => { sourceCount: 3, }); const calls = buildResearchProgressToolCalls(active); - assert.equal(calls.length, 2); // 拆解已完成 + 检索进行中 + assert.equal(calls.length, 2); // 梳理思路已完成 + 整理资料进行中 assert.equal(calls[0].args.status, "complete"); + assert.equal(calls[0].args.label, "梳理写作思路"); assert.equal(calls[1].args.status, "active"); + assert.equal(calls[1].args.label, "整理对话资料"); assert.match(calls[1].args.detail, /1\/2/); const writing = streamOf({ jobId: "j7", phase: "writing", reportText: "# x" }); diff --git a/frontend-web/src/core/threads/use-research-report-stream.ts b/frontend-web/src/core/threads/use-research-report-stream.ts index 0e26f9c2..ea965bc2 100644 --- a/frontend-web/src/core/threads/use-research-report-stream.ts +++ b/frontend-web/src/core/threads/use-research-report-stream.ts @@ -289,21 +289,23 @@ export function buildResearchProgressToolCalls(state: ResearchReportStreamState) const stages = [ { id: "plan", - label: "拆解检索问题", + // 写作管线不检索:只按课题拆论述角度、汇总对话已收集的资料再成稿。 + // 措辞避免「拆解检索问题/检索参考资料」,用户会误会管线在重新检索。 + label: "梳理写作思路", boundary: phaseRank("collecting"), detail: state.queries.length > 0 - ? `已拆出 ${state.queries.length} 个检索子问题` - : "正在围绕课题拆解检索子问题", + ? `已梳理出 ${state.queries.length} 个论述角度` + : "正在围绕课题梳理写作思路", }, { id: "collect", - label: "检索参考资料", + label: "整理对话资料", boundary: phaseRank("compressing"), detail: state.queries.length > 0 - ? `已检索 ${Math.min(state.completedQueries, state.queries.length)}/${state.queries.length} 个子问题 · 累计 ${state.sourceCount} 条资料` + ? `已整理 ${Math.min(state.completedQueries, state.queries.length)}/${state.queries.length} 个论述角度的资料 · 累计 ${state.sourceCount} 条` : state.sourceCount > 0 - ? `已检索到 ${state.sourceCount} 条资料` - : "正在逐个子问题检索资料", + ? `已汇总 ${state.sourceCount} 条对话资料` + : "正在汇总对话中已收集的资料", }, { id: "write",