fix: 写作管线步骤条改用不涉及检索的文案

- 「拆解检索问题」→「梳理写作思路」(已梳理出 N 个论述角度)
- 「检索参考资料」→「整理对话资料」(已整理 1/2 个论述角度的
  资料 · 累计 N 条)
- 管线实际只汇总对话已收集的资料再成稿,原文案会让用户误以为
  管线在重新检索;测试补标签断言防止回退
This commit is contained in:
董宏凯 committed 2026-08-30 16:21:02 +08:00
1 parent 2ab3ab8444
commit ff80cc110d
2 files changed
+12 -8

No files matched your search

@@ -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" });
@@ -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",