dsh-activity-pane 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -642,11 +642,11 @@ function buildFoldRow(run) {
642
642
  kind = "context";
643
643
  icon = "context";
644
644
  } else if (runningTool !== null) {
645
- label = "正在运行";
645
+ label = "运行";
646
646
  kind = "tool";
647
- icon = "bash";
647
+ icon = "bash";
648
648
  } else if (runningThink !== null) {
649
- label = "正在思考";
649
+ label = "思考";
650
650
  kind = "assistant";
651
651
  icon = "assistant";
652
652
  } else if (tools.length > 0) {
@@ -840,7 +840,7 @@ function foldedConversationTimeline(snapshot, limit = 4, cwd = "", descendantAct
840
840
  const max = Math.max(0, limit);
841
841
  if (max === 0) return [];
842
842
  // 非执行呈现(渲染层 idle 判定或快照 pending)且非委托周期:落定在分组之前——
843
- // 组标题/状态由已定案成员派生(避免 done 圆点配「正在思考」标题),尾部提升同时跳过。
843
+ // 组标题/状态由已定案成员派生(避免 done 圆点配「思考」标题),尾部提升同时跳过。
844
844
  const settle = (idle === true || snapshotIdle(snapshot)) && descendantActive !== true;
845
845
  for (const want of [max * 3, max * 8, Number.MAX_SAFE_INTEGER]) {
846
846
  const items = rawTailItems(snapshot, want, cwd, true);
@@ -1051,7 +1051,7 @@ function conversationTimelineFromHistory(history, limit = 4, cwd = "") {
1051
1051
  /** 冷 history 折叠分组时间线(R-01-017、R-01-012/AC-12~AC-15):页内全部事件映射折叠后
1052
1052
  * 套用与快照路径同一窗口/锚行选择(selectTimelineRows),最近用户消息滚动触顶后停留为
1053
1053
  * 首行锚行。settleIdle:阻塞等待呈现(pendingText 存在)下折叠前把残留 running 行落定,
1054
- * 组标题/状态由已定案成员派生(「运行了命令」而非「正在运行」蓝闪),与快照路径的
1054
+ * 组标题/状态由已定案成员派生(「运行了命令」而非「运行」蓝闪),与快照路径的
1055
1055
  * settleWhenIdle 前置语义一致。 */
1056
1056
  function foldedHistoryTimeline(history, limit = 4, cwd = "", settleIdle = false) {
1057
1057
  const max = Math.max(0, limit);
@@ -6322,7 +6322,7 @@ function apply(ctx) {
6322
6322
  const entryCwd = snapshot?.byId?.[entry.id]?.cwd ?? "";
6323
6323
  // log 派生 memo:history 引用 / idle / cwd 变化才重算。落定在折叠前生效
6324
6324
  // (foldedHistoryTimeline 的 settleIdle),组标题由已定案成员派生——阻塞等待卡
6325
- // 呈现「运行了命令」+「等待回答」摘要,而非「正在运行」蓝闪(R-01-009/AC-09)。
6325
+ // 呈现「运行了命令」+「等待回答」摘要,而非「运行」蓝闪(R-01-009/AC-09)。
6326
6326
  const historyRef = detail?.history ?? null;
6327
6327
  const logReady = Array.isArray(historyRef) && historyRef.length > 0;
6328
6328
  if (detail && logReady && (detail.memoLogTimelineOf !== historyRef || detail.memoLogTimelineIdle !== entryIdle || detail.memoLogTimelineCwd !== entryCwd)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-activity-pane",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "packageManager": "pnpm@11.5.0",
5
5
  "engines": {
6
6
  "node": ">=20"
@@ -207,7 +207,7 @@ const steps = [
207
207
  // R-01-011/AC-06 移动端标题行即收起抽屉
208
208
  "切到 <=767px 移动视口打开抽屉,确认点击抽屉内标题行与桌面为同一交互路径:抽屉收起、不出现折叠窄条;桌面宽度下点击标题行仍折叠为窄条,行为不回归。",
209
209
  // R-01-017/AC-01 折叠时间线呈现质量(「无 dsh-auto-collapse 不降级」已由 e2e/specs/auto-update.mjs 自动化覆盖)
210
- "运行一个多工具+思考回合的会话:确认活动卡时间线呈折叠分组(如「正在运行/运行了命令/编辑了文件/已思考」,组摘要为推理文本内容)。",
210
+ "运行一个多工具+思考回合的会话:确认活动卡时间线呈折叠分组(如「运行/运行了命令/编辑了文件/已思考」,组摘要为推理文本内容)。",
211
211
  // R-02-004/AC-01 订阅断开
212
212
  "在 DevTools 中观察:会话停止运行后,其轮内状态订阅被断开(无残留监听/继续更新);卸载插件后订阅归零、控制台干净。",
213
213
  // R-01-021/AC-01、R-01-021/AC-02、R-01-021/AC-03、R-01-021/AC-04、R-01-021/AC-05、R-01-021/AC-06、R-01-021/AC-07、R-01-021/AC-08 交互与刷新恢复 → e2e/specs/compact-density.mjs(AC-03 类别底色观感、AC-05 相对位置与图标辨识残留人工)
package/scripts/check.mjs CHANGED
@@ -626,8 +626,8 @@ assert.equal(askQuestionsPreview(undefined), null);
626
626
  const timelineQuestions = { items: [{ index: 1, text: "要合并回 main 吗?" }, { index: 2, text: "需要先跑测试吗?" }], omitted: false };
627
627
  assert.deepEqual(
628
628
  timelineQuestionPreview([
629
- { fold: true, label: "正在运行", question: null },
630
- { fold: true, label: "正在运行", question: timelineQuestions },
629
+ { fold: true, label: "运行", question: null },
630
+ { fold: true, label: "运行", question: timelineQuestions },
631
631
  ]),
632
632
  timelineQuestions,
633
633
  "结构化提问预览穿透折叠分组上浮组行",
@@ -1165,7 +1165,7 @@ const questionPreview = {
1165
1165
  omitted: false,
1166
1166
  };
1167
1167
  const questionEntries = buildEntries(questionSnap, [], {
1168
- sQ: { timeline: [{ fold: true, label: "正在运行", summary: "等待回答", question: questionPreview }] },
1168
+ sQ: { timeline: [{ fold: true, label: "运行", summary: "等待回答", question: questionPreview }] },
1169
1169
  });
1170
1170
  assert.equal(questionEntries[0].pendingText, "提问中");
1171
1171
  assert.equal(questionEntries[0].pendingKind, "question");
@@ -1788,7 +1788,7 @@ const runTool = foldedConversationTimeline({
1788
1788
  ["r2", { key: "r2", kind: "tool-call", data: { root: { kind: "tool-call", callId: "r2", call: { name: "grep", argsRaw: '{"pattern":"x"}' } } } }],
1789
1789
  ]).get(key) } },
1790
1790
  });
1791
- assert.equal(runTool[0].label, "正在运行", "运行中工具组标题为正在运行");
1791
+ assert.equal(runTool[0].label, "运行", "运行中工具组标题为运行(R-01-017/AC-03)");
1792
1792
  assert.equal(runTool[0].status, "running", "运行中状态聚合");
1793
1793
  assert.equal(runTool[0].icon, "bash", "运行中 tool 组行图标同为命令图标");
1794
1794
  // R-01-017/AC-03 双运行成员的优先序:running tool 标题/摘要优先于 running think(评审对齐 vendor updateChip)。
@@ -1798,12 +1798,12 @@ const bothRunning = foldedConversationTimeline({
1798
1798
  ["br2", { key: "br2", kind: "assistant-step", data: { status: "running", turn: 1, step: 0, blocks: [{ kind: "reasoning", text: "思考中\n最新想法" }] } }],
1799
1799
  ]).get(key) } },
1800
1800
  });
1801
- assert.equal(bothRunning[0].label, "正在运行", "tool 与 think 同时运行时标题取正在运行");
1801
+ assert.equal(bothRunning[0].label, "运行", "tool 与 think 同时运行时标题取运行");
1802
1802
  assert.equal(bothRunning[0].summary, "make", "同时运行时的组摘要取执行中工具摘要(AC-04 限定于无执行中工具的分组)");
1803
1803
  const runThink = foldedConversationTimeline({
1804
1804
  chat: { order: ["rt"], nodes: { get: () => ({ kind: "assistant-step", data: { status: "running", turn: 1, step: 0, blocks: [{ kind: "reasoning", text: "第一行\n最新行" }] } }) } },
1805
1805
  });
1806
- assert.equal(runThink[0].label, "正在思考", "运行中思考组标题为正在思考(R-01-017/AC-03)");
1806
+ assert.equal(runThink[0].label, "思考", "运行中思考组标题为思考(R-01-017/AC-03)");
1807
1807
  assert.equal(runThink[0].summary, "最新行", "流式思考摘要取最新行(R-01-017/AC-04)");
1808
1808
  // R-01-017/AC-03 编辑了文件 / 上下文注入 标题判定
1809
1809
  const editGroup = foldedConversationTimeline({
@@ -2075,10 +2075,10 @@ assert.ok(settledStream.every((row) => row.status !== "running"), "回合落定
2075
2075
  // 阻塞等待呈现(settleIdle):折叠前落定残留 running 行,组标题/状态由已定案成员派生
2076
2076
  // (快照路径 settleWhenIdle 前置语义对齐,R-01-009/AC-09「仅执行中行闪烁」)。
2077
2077
  const blockedAskRunning = foldedHistoryTimeline([hUser(1, "指令"), hToolCall(2, "ha")], 10);
2078
- assert.equal(blockedAskRunning.at(-1).label, "正在运行", "未落定呈现保留「正在运行」组标题");
2078
+ assert.equal(blockedAskRunning.at(-1).label, "运行", "未落定呈现保留「运行」组标题");
2079
2079
  const blockedAskSettled = foldedHistoryTimeline([hUser(1, "指令"), hToolCall(2, "ha")], 10, "", true);
2080
2080
  assert.equal(blockedAskSettled.at(-1).status, "done", "阻塞等待呈现下折叠前落定残留 running 行");
2081
- assert.equal(blockedAskSettled.at(-1).label, "运行了命令", "落定后组标题由已定案成员派生(非「正在运行」)");
2081
+ assert.equal(blockedAskSettled.at(-1).label, "运行了命令", "落定后组标题由已定案成员派生(非「运行」)");
2082
2082
  // historyInstructionAnchor:尾扫最近一条非空文本真实用户消息(R-01-012/AC-12 快照窗口外兜底)
2083
2083
  assert.equal(historyInstructionAnchor([hUser(1, "旧指令"), hAgent(2, "回复"), hUser(3, "新指令")])?.text, "新指令", "锚行取最近一条用户消息");
2084
2084
  assert.equal(historyInstructionAnchor([hUser(1, " "), hAgent(2, "回复")]), null, "空文本用户消息不作锚");
@@ -2498,8 +2498,8 @@ assert.equal(delegatingFold[0].status, "running", "委托周期中尾部已定
2498
2498
  // pending + 活动后代:快照级 idle 落定让位于委托语义(R-01-016 例外、R-01-009/AC-10)。
2499
2499
  const pendingDescendant = foldedConversationTimeline({ ...frozenSnap, pending: [{ kind: "approval" }] }, 4, "", true);
2500
2500
  assert.ok(pendingDescendant.some((row) => row.status === "running"), "pending 且后代活跃时快照 idle 落定不生效(保留在飞呈现)");
2501
- // 落定在分组之前:组标题由已定案成员派生,不出现 done 圆点配「正在思考」(R-01-017/AC-03)。
2502
- assert.equal(frozenIdle.at(-1)?.label, "已思考", "idle 落定后组标题随成员落定(不再显示「正在思考」)");
2501
+ // 落定在分组之前:组标题由已定案成员派生,不出现 done 圆点配「思考」(R-01-017/AC-03)。
2502
+ assert.equal(frozenIdle.at(-1)?.label, "已思考", "idle 落定后组标题随成员落定(不再显示「思考」)");
2503
2503
  const nonDelegatingFold = foldedConversationTimeline({ ...idleGapSnapshot, running: false }, 4);
2504
2504
  assert.equal(nonDelegatingFold[0].status, "done", "非运行且非委托周期尾部不提升");
2505
2505
  const errorTail = conversationWorkItems({
package/src/client.mjs CHANGED
@@ -3679,7 +3679,7 @@ function apply(ctx) {
3679
3679
  const entryCwd = snapshot?.byId?.[entry.id]?.cwd ?? "";
3680
3680
  // log 派生 memo:history 引用 / idle / cwd 变化才重算。落定在折叠前生效
3681
3681
  // (foldedHistoryTimeline 的 settleIdle),组标题由已定案成员派生——阻塞等待卡
3682
- // 呈现「运行了命令」+「等待回答」摘要,而非「正在运行」蓝闪(R-01-009/AC-09)。
3682
+ // 呈现「运行了命令」+「等待回答」摘要,而非「运行」蓝闪(R-01-009/AC-09)。
3683
3683
  const historyRef = detail?.history ?? null;
3684
3684
  const logReady = Array.isArray(historyRef) && historyRef.length > 0;
3685
3685
  if (detail && logReady && (detail.memoLogTimelineOf !== historyRef || detail.memoLogTimelineIdle !== entryIdle || detail.memoLogTimelineCwd !== entryCwd)) {
package/src/core.mjs CHANGED
@@ -636,11 +636,11 @@ function buildFoldRow(run) {
636
636
  kind = "context";
637
637
  icon = "context";
638
638
  } else if (runningTool !== null) {
639
- label = "正在运行";
639
+ label = "运行";
640
640
  kind = "tool";
641
- icon = "bash";
641
+ icon = "bash";
642
642
  } else if (runningThink !== null) {
643
- label = "正在思考";
643
+ label = "思考";
644
644
  kind = "assistant";
645
645
  icon = "assistant";
646
646
  } else if (tools.length > 0) {
@@ -834,7 +834,7 @@ export function foldedConversationTimeline(snapshot, limit = 4, cwd = "", descen
834
834
  const max = Math.max(0, limit);
835
835
  if (max === 0) return [];
836
836
  // 非执行呈现(渲染层 idle 判定或快照 pending)且非委托周期:落定在分组之前——
837
- // 组标题/状态由已定案成员派生(避免 done 圆点配「正在思考」标题),尾部提升同时跳过。
837
+ // 组标题/状态由已定案成员派生(避免 done 圆点配「思考」标题),尾部提升同时跳过。
838
838
  const settle = (idle === true || snapshotIdle(snapshot)) && descendantActive !== true;
839
839
  for (const want of [max * 3, max * 8, Number.MAX_SAFE_INTEGER]) {
840
840
  const items = rawTailItems(snapshot, want, cwd, true);
@@ -1045,7 +1045,7 @@ export function conversationTimelineFromHistory(history, limit = 4, cwd = "") {
1045
1045
  /** 冷 history 折叠分组时间线(R-01-017、R-01-012/AC-12~AC-15):页内全部事件映射折叠后
1046
1046
  * 套用与快照路径同一窗口/锚行选择(selectTimelineRows),最近用户消息滚动触顶后停留为
1047
1047
  * 首行锚行。settleIdle:阻塞等待呈现(pendingText 存在)下折叠前把残留 running 行落定,
1048
- * 组标题/状态由已定案成员派生(「运行了命令」而非「正在运行」蓝闪),与快照路径的
1048
+ * 组标题/状态由已定案成员派生(「运行了命令」而非「运行」蓝闪),与快照路径的
1049
1049
  * settleWhenIdle 前置语义一致。 */
1050
1050
  export function foldedHistoryTimeline(history, limit = 4, cwd = "", settleIdle = false) {
1051
1051
  const max = Math.max(0, limit);