dsh-activity-pane 0.3.0 → 0.6.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.
- package/.dsh-plugin/client.js +367 -104
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/package.json +1 -1
- package/scripts/acceptance.mjs +9 -4
- package/scripts/check.mjs +322 -60
- package/src/client.mjs +180 -68
- package/src/core.mjs +150 -36
- package/src/navigation.mjs +37 -0
package/README.md
CHANGED
|
@@ -52,8 +52,8 @@ The npm package ships prebuilt, so no local build step is needed. If the pane do
|
|
|
52
52
|
- [x] **Stronger waiting-for-action reminders**: blocked waits, completion reminders, and error reminders are marked with gold, green, and red cards respectively; questions are previewed directly as a question list, and completion reminders are explicitly acknowledged via the "Move to history" button on the card; the state is persisted on the host side and synced across all clients, so refreshing the page or opening another window never loses unacknowledged completion reminders or error reminders not yet overwritten by a new round.
|
|
53
53
|
- [x] **Sub/grandchild session hierarchy**: sub-agents are nested under their parent session with connector lines and compact cards; a parent whose own round has ended but that still has active descendants keeps rendering as running, and disappears from the active area once its sub-agents have ended and no active descendants remain; the history area keeps main sessions only.
|
|
54
54
|
- [x] **Workspace names displayed and factored into ordering**: session cards show a workspace badge with a stable color, and session ordering follows the workspace order in the left sidebar.
|
|
55
|
-
- [x] **Current work and run stats**: active cards show the latest instruction, thinking, and tool calls in a collapsed timeline of at most 4 rows; running cards also show round progress, output rate, cache hit rate, input/output tokens, and run duration, while completed, blocked, and error waits retain the previous round's duration.
|
|
56
|
-
- [x] **Session navigation**: clicking or keyboard-activating a session card jumps to that session's page,
|
|
55
|
+
- [x] **Current work and run stats**: active cards show the latest instruction, thinking, and tool calls in a collapsed timeline of at most 4 rows; running cards also show round progress, output rate, cache hit rate, input/output tokens, and run duration, while completed, blocked, and error waits retain the previous round's duration at the end of the token stats row alongside last-known output stats; recent history cards retain the latest completed round's available stats between the reply preview and activity time.
|
|
56
|
+
- [x] **Session navigation**: clicking or keyboard-activating a session card jumps to that session's page, the current session stays highlighted, and selecting a session from DSH's native sidebar brings its pane card fully into view without forced centering.
|
|
57
57
|
- [x] **Session metadata**: session cards show the current model name and reasoning level.
|
|
58
58
|
- [x] **Polished desktop & mobile interactions**: the desktop pane can collapse, be resized by dragging, and remember its width; mobile uses a fixed drawer that does not squeeze the main conversation layout; long lists get independent scrolling and a back-to-top button.
|
|
59
59
|
|
package/README.zh-CN.md
CHANGED
|
@@ -52,8 +52,8 @@ npm 包内置预构建产物,无需本地构建步骤。安装后如窗格未
|
|
|
52
52
|
- [x] **强化等待行动提醒**:阻塞等待、完成提醒与错误提醒分别以金色、绿色和红色卡片标识;提问直接预览问题列表,完成提醒经卡片上的「移入历史」按钮显式确认;状态由宿主侧持久化并在所有客户端间同步,刷新页面或另开窗口不会丢失未确认的完成提醒和尚未被新回合覆盖的错误提醒。
|
|
53
53
|
- [x] **显示子/孙会话层级**:子代理以连接线和紧凑卡片嵌套在母会话下;母会话自身回合结束但仍有活动后代时继续按运行中呈现,子代理结束且没有活动后代后从活动区消失;历史区只保留主会话。
|
|
54
54
|
- [x] **显示工作区名称并参与排序**:会话卡片显示带稳定色彩的工作区徽标,会话排序与左侧边栏中的工作区顺序保持一致。
|
|
55
|
-
- [x] **展示当前工作与运行统计**:活动卡以最多 4 行折叠时间线展示最近指令、思考与工具调用;运行中卡片还显示回合进度、输出速率、缓存命中率、输入/输出 token
|
|
56
|
-
- [x]
|
|
55
|
+
- [x] **展示当前工作与运行统计**:活动卡以最多 4 行折叠时间线展示最近指令、思考与工具调用;运行中卡片还显示回合进度、输出速率、缓存命中率、输入/输出 token 与运行时长,进入完成、阻塞或错误等待后在统计行末尾与 tok/s 等内容并列保留上一轮耗时及最后已知统计;迁入最近历史后,历史卡在助手预览与活动时间之间继续保留最后一轮的可用统计。
|
|
56
|
+
- [x] **加入会话导航跳转**:点击或键盘激活会话卡片可跳转到对应会话页面,当前会话保持高亮;从 DSH 原生左侧栏选择会话时,对应窗格卡片会滚动到完整可见,不强制居中。
|
|
57
57
|
- [x] **增加会话元信息**:会话卡片中显示当前使用的模型名称和推理级别。
|
|
58
58
|
- [x] **完善桌面与移动交互**:桌面窗格可折叠、拖拽调宽并记忆宽度;移动端使用不挤压主会话布局的固定抽屉;长列表提供独立滚动与回到顶部按钮。
|
|
59
59
|
|
package/package.json
CHANGED
package/scripts/acceptance.mjs
CHANGED
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
// - R-01-002/AC-05、AC-10、AC-11、AC-12 完成提醒路径 → e2e/specs/completion-sync.mjs
|
|
18
18
|
// - R-01-002/AC-05、AC-06、AC-09、AC-10、AC-12、AC-13 错误提醒路径 → e2e/specs/error-reminder.mjs
|
|
19
19
|
// T-084 起第二批:
|
|
20
|
-
// - R-01-005/AC-01 点击/Enter/Space、R-01-006/AC-01 → e2e/specs/navigation.mjs
|
|
20
|
+
// - R-01-005/AC-01 点击/Enter/Space、R-01-006/AC-01~AC-02 → e2e/specs/navigation.mjs、e2e/specs/long-list.mjs
|
|
21
21
|
// - R-01-015/AC-01、AC-02、AC-04、AC-03 桌面折叠态 → e2e/specs/resize.mjs;AC-03 移动端无手柄 → e2e/specs/mobile-drawer.mjs
|
|
22
22
|
// - R-01-018/AC-01、AC-03、AC-04、AC-05、AC-02 点击/键盘/reduced-motion → e2e/specs/back-to-top.mjs(AC-02 平滑观感残留人工)
|
|
23
23
|
// - R-01-003/AC-03、AC-08~AC-12 浏览器着色、R-01-012/AC-01、AC-05、R-01-013/AC-01、R-01-013/AC-03、R-01-013/AC-04、AC-07、AC-08、AC-10、AC-11 → e2e/specs/card-content.mjs(AC-02 结构断言已迁,多工作区感知区分与「标题随宿主更新」半句仍人工)
|
|
24
|
+
// - R-01-013/AC-12 → e2e/specs/session-lifecycle.mjs(最近卡统计行迁移与位置)
|
|
24
25
|
// T-089 起:
|
|
25
26
|
// - R-01-009/AC-02、AC-03 的 tool→等待→stream 实时更新 → e2e/specs/auto-update.mjs(AC-01 进行中 tool partial 仍由 unit/人工承接)。
|
|
26
27
|
// - R-01-014/AC-01、AC-03、AC-06 的列表 pending→ready、detail 渐进补齐与计数切换 → e2e/specs/loading-ready.mjs。
|
|
@@ -36,7 +37,9 @@ const steps = [
|
|
|
36
37
|
// R-01-003/AC-06、AC-07 工作区徽标图标与字号
|
|
37
38
|
"确认活动卡与最近卡上的工作区名称文字前都有文件夹图标,且与左边栏工作区条目的图标相同(一眼可辨为工作区归属);名称字号明显可读(不低于 10.5px),深浅主题下图标颜色与文字协调;把窗格拖窄使名称超长,确认仍以省略号截断而图标完整不被挤压。",
|
|
38
39
|
// R-01-003/AC-08、AC-09、AC-10、AC-11、AC-12 工作区徽标色彩区分与协调
|
|
39
|
-
|
|
40
|
+
// R-01-003/AC-10:深浅主题前景、底色与描边均可辨。
|
|
41
|
+
// R-01-003/AC-11:颜色槽位保持 OKLCH 同色相单色系。
|
|
42
|
+
"同时保持归属不同工作区的多个会话卡片可见,确认同一工作区的所有徽标(图标、文字、底色与描边)使用同一颜色槽位;当可见工作区达到 8~12 个时,主色相与明度/色相补充槽仍能一眼区分;当某个前景槽位发生复用时,3 档背景变体能拉开同前景色的底色/描边层次;颜色分布覆盖橙/黄绿/绿/青/蓝/紫/洋红等色区,且任何徽标都不是红色警戒色;重点确认 docsim、dsh-activity-pane、ops 与至少一个补充槽位工作区彼此可区分;每枚徽标的前景(图标+文字)与背景为 OKLCH 同色相单色系,文字鲜明不发灰、明度对比拉开;同一可见工作区集合下刷新页面后各工作区颜色槽位保持不变;切换深浅主题后徽标仍协调且文字可辨,胶囊尺寸与字号不变。",
|
|
40
43
|
// R-01-005/AC-01 活跃期连续点击(回归:渲染不得移动卡片 DOM 吃掉 click/焦点/悬停)
|
|
41
44
|
"在某会话持续流式运行期间,连续点击当前会话活动卡与各历史卡:每次 click 都应生效(当前卡获得并保持焦点、其它卡完成跳转),悬停高亮不丢失;运行结束后行为保持一致。",
|
|
42
45
|
// R-01-005/AC-01 移动端切换不弹软键盘(回归:抑制原生 composer 自动聚焦)
|
|
@@ -65,8 +68,8 @@ const steps = [
|
|
|
65
68
|
"让包含 todo_write/ask_user_question/cordis_define/失败工具调用/上下文注入的会话在选中与非选中态间切换,确认时间线中每个动作的标题与摘要两态完全一致(todo 显示 x/y 进度、ask 显示等待/已答/已取消、失败动作显示错误首行、上下文注入显示「上下文注入 · 来源标识」而非注入内容原文)。",
|
|
66
69
|
// R-01-009/AC-05 统计行布局与缓存命中率
|
|
67
70
|
"运行中会话流式输出时,确认进度条下方统计行左侧依次显示「tok/s 速率 · 缓存命中率 · 输入 · 输出」(与会话主窗口同序),字段间以小圆点区隔且速率无约等于符号、命中率为百分比;本回合时长固定在该行最右侧;数据缺失的字段隐藏,两段皆空时整行不残留。",
|
|
68
|
-
// R-01-009/AC-12
|
|
69
|
-
"
|
|
71
|
+
// R-01-009/AC-12、R-01-009/AC-13 等待状态保留上一轮耗时与统计
|
|
72
|
+
"让已有至少一个完整已结束回合的会话分别进入完成提醒、待确认/待审查/待回复阻塞等待与错误提醒,确认三类等待卡的时间线之后均继续显示上一轮最后已知的「tok/s · 缓存 · 输入 · 输出」可用统计,且耗时与上述统计处于同一行最右侧、等待类型胶囊同行不重复显示;等待数分钟后统计与耗时均不增长;没有可用统计或完整上一轮时不显示虚假字段。",
|
|
70
73
|
// R-01-009/AC-06 回合进度条(时间驱动、半衰期每帧按最新实测速率校准,C-014、C-025、C-044)
|
|
71
74
|
"确认运行卡标题后不再显示进度百分比;百分比改为与进度条同行并紧跟其右侧,在固定占位内向右对齐,其文字右缘与下一行最右侧的本回合耗时文字右缘对齐,并相对进度条中心略微上移 1px、视觉上不再偏下;9% 到 100% 的位数变化不改变其占位宽度或右缘,窄卡宽下进度条可收缩而百分比保持完整可见。观察进度条随本回合已耗时平滑爬升(不再出现 10% 级跳变):新会话起步期(无实测速率)按 20 tok/s 保守基准慢爬(约 2 分钟到 18%、6 分钟到 40%);速率实测后进度增速随统计行显示的累计平均速率动态调整——平均速率上升时增速加快(如 ≈45 tok/s 时 4 分钟到 50%),平均速率回落时进度可随之小幅回退(实时估计语义,不承诺单调);回合切换后归零重爬;中途才接入的会话进度从该回合已耗时对应值起算;回退时条纹动画不中断。",
|
|
72
75
|
// R-01-009/AC-07 工作项时间线状态与摘要(无行级耗时)
|
|
@@ -130,6 +133,8 @@ const steps = [
|
|
|
130
133
|
// R-01-010/AC-08、R-01-010/AC-09 历史区时间口径为最后活动时间
|
|
131
134
|
// R-01-013/AC-05 历史卡同时显示绝对日期时间与相对活动时间
|
|
132
135
|
"找一个发指令后 agent 运行了较久才结束的会话,待其落入最近历史区后,确认卡片第五行同时显示本地绝对日期时间(跨年份带年份)与相对活动时间,且绝对时间对应最后回复结束时刻(而非发指令时刻);历史区仍按该时刻从新到旧排序。刷新页面(冷会话)后确认时间先按宿主列表时间显示、数据到达后精化为回复结束时刻,相对时间会按分钟级推进。",
|
|
136
|
+
// R-01-013/AC-12 最近历史卡保留最近回合统计
|
|
137
|
+
"让一个已有完整回合的会话结束并经「移入历史」进入最近历史区,确认助手预览行之后、活动时间之前的倒数第二行仍显示最后回合的「tok/s · 缓存 · 输入 · 输出」可用统计,耗时固定在该行最右侧;缺失字段不造假且全部为空时不留空行。刷新页面后确认可从 native 列表投影与回合边界恢复。",
|
|
133
138
|
// R-01-013/AC-09 最近卡标题常规字重
|
|
134
139
|
"确认最近历史卡的会话标题为常规字重(不加粗),与活动卡的加粗标题形成明显区分。",
|
|
135
140
|
// R-01-013/AC-10 最近卡整体淡化
|