@deepseek-ai/dsh-client-ui-subagent 0.1.6-alpha.1 → 0.1.7-alpha.1
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/README.i18n.yaml +2 -2
- package/README.md +14 -6
- package/README.zh.md +14 -6
- package/lib/client.js +370 -266
- package/lib/types/client/SubagentHeaderLineage.d.ts +15 -4
- package/lib/types/client/SubagentReadOnlyComposer.d.ts +1 -1
- package/lib/types/client/index.d.ts +2 -2
- package/lib/types/client/locales.d.ts +5 -4
- package/lib/types/client/sidebar-chat/index.d.ts +62 -0
- package/package.json +25 -17
- package/lib/types/client/subagent-lineage.d.ts +0 -21
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/client/ui-subagent/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: b3dfb4a3aa56dbf240f4b76db410d45cc6ae5651
|
|
6
|
+
README.zh.md: a6ebd6da3c3caba2a3bd015da450b5a33ab79d67
|
package/README.md
CHANGED
|
@@ -25,11 +25,13 @@ Use this package to browse every subagent conversation beneath a parent session,
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## Use this package
|
|
27
27
|
|
|
28
|
-
The session header keeps the current session title as the lineage breadcrumb
|
|
28
|
+
The session header keeps the current session title as the lineage breadcrumb; when the session's direct catalog has entries or a read has failed, the descendant-count trigger renders in the header actions band after the task list, with no breadcrumb separator. An absent catalog, an empty loading catalog, or a successfully loaded empty catalog hides the count trigger. The trigger opens that direct catalog, reports its total and running counts, and loads nested catalogs only when their rows expand. Select any depth to open that child's conversation with its exact `{parentSessionId, childSessionId, mode}` address, or use the row's trailing arrow to open the same address in the right Sidebar, preferring a separate pane when room permits.
|
|
29
|
+
|
|
30
|
+
This package registers the `dsh-resource://subagentchat/session/<child>?parent=<parent>&mode=<mode>` resource and builtin Sidebar tab type. The resource retains the child `SessionReference` directly from its address without refreshing the parent catalog, and releases the reference when the tab record closes. The tab renders the shared `conversation.content` Factory through `sidebar.chat.conversation`, fixes the local View to Chat, and omits the main Conversation header and width controls.
|
|
29
31
|
|
|
30
32
|
### Browsing the tree
|
|
31
33
|
|
|
32
|
-
Rows display mode plus
|
|
34
|
+
Rows display mode plus activity and an optional log-backed title; running uses the shared ongoing loader, an inactive child whose latest closed turn completed normally uses the shared success dot, and other inactive children use the shared idle dot. Every row reserves the same 14px status column, centering smaller dots so titles align with the loader state. The compact header trigger vertically centers its activity glyph and count with a 4px gap. The trailing column stacks total durable provider usage above active-turn duration. Keyboard navigation works with ArrowRight/ArrowLeft to expand and collapse branches and ArrowUp/ArrowDown, Home, End, and Escape to navigate or close the tree. An unlabeled one-shot row falls back to its session id. A row is a known leaf only after its own catalog loads empty.
|
|
33
35
|
|
|
34
36
|
### Continuing a conversation
|
|
35
37
|
|
|
@@ -51,16 +53,22 @@ The catalog and composer behavior are specified by the [Web subagent conversatio
|
|
|
51
53
|
|
|
52
54
|
### Catalog derivation
|
|
53
55
|
|
|
54
|
-
The header lineage renderer reads `
|
|
56
|
+
The header lineage renderer reads `projectionsBySession` through the standard `useSessions` hook. The renderer selects `subagentCatalog` from each Session’s shared values for membership, disclosure, and counts; Activity prefers the unified UI status and falls back to Session summaries; summaries supply titles and usage. Expanding a row loads its initial catalog when needed. Live projection frames update every loaded level without menu subscriptions or repeated membership queries. A row remains expandable while its catalog is absent, loading, or failed, and becomes a known leaf after a ready empty catalog.
|
|
57
|
+
|
|
58
|
+
Opening a catalog dropdown does not request its root catalog. Child-catalog expansion and failed-read retries call `refreshProjection`; shared projection-value changes update the display automatically.
|
|
55
59
|
|
|
56
|
-
|
|
60
|
+
Breadcrumb addresses derive from the Provider-bound Session address and loaded parent catalogs, including never-selected ancestors.
|
|
57
61
|
|
|
58
|
-
|
|
62
|
+
### Duration, completion, and tokens
|
|
63
|
+
|
|
64
|
+
Each visible catalog level advances its own clock while it contains a running child; collapsing the level or closing the menu releases that clock. Token totals sum the four disjoint `tokenUsage` buckets. The `subagentTiming` projection sums completed-turn duration and records whether the latest closed turn ended with `completed`; opening another turn clears that completion until its own `turn/end`. Duration advances once per second only for an open turn on a running child and freezes after the child becomes inactive; an interrupted open turn is bounded by its same-cut `active.through`, never by newer session metadata.
|
|
59
65
|
|
|
60
66
|
### Composer election
|
|
61
67
|
|
|
62
68
|
One-shot children always elect a read-only composer. A continuable child elects one only when its exact parent is unavailable and the child is not running; otherwise the ordinary composer's Session routes prompts through `subagents/prompt`. This package never receives host context or calls a model-facing tool.
|
|
63
69
|
|
|
70
|
+
Unknown-mode catalog rows remain visible and clickable, using the child id when no label is available. Their composer is read-only until child history establishes a supported mode; a read failure is reported in the child conversation.
|
|
71
|
+
|
|
64
72
|
</details>
|
|
65
73
|
|
|
66
74
|
-----
|
|
@@ -102,7 +110,7 @@ Append-only. This package never edits earlier request tokens.
|
|
|
102
110
|
|
|
103
111
|
These limits define what the catalog can show and what `@` references mean; they are current package constraints.
|
|
104
112
|
|
|
105
|
-
- **
|
|
113
|
+
- **Non-completed inactive outcomes remain grouped** — the catalog distinguishes a latest normal completion from other inactive states, but does not distinguish failure, cancellation, refusal, token exhaustion, or a child with no closed turn; the UI exposes no Activation identity, and stopping is limited to the composer's current-turn Stop for a running continuable child.
|
|
106
114
|
- **`@` references remain display-title text** — duplicate or renamed labels are ambiguous, so they intentionally do not acquire continuation semantics.
|
|
107
115
|
|
|
108
116
|
<a id="dev-note"></a>
|
package/README.zh.md
CHANGED
|
@@ -25,11 +25,13 @@ kind: "package-reference"
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## 使用本包
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
会话页头把当前会话标题作为谱系面包屑;当会话的直接目录有子项或读取失败时,后代数量触发器渲染在页头操作区、任务列表之后,不带任何面包屑分隔符。目录缺席、空目录加载中或成功加载为空时,均隐藏数量触发器。触发器打开该直接目录,报告总数与运行数,并且只在行展开时加载嵌套目录。选择任意深度,即可用该子会话的确切 `{parentSessionId, childSessionId, mode}` 地址打开其对话;也可以使用行尾箭头在右侧 Sidebar 打开同一地址,并在空间允许时优先使用独立分栏。
|
|
29
|
+
|
|
30
|
+
本包注册 `dsh-resource://subagentchat/session/<child>?parent=<parent>&mode=<mode>` 资源与 builtin Sidebar tab 类型。资源直接根据地址保留 child 的 `SessionReference`,不刷新 parent 目录,并在 tab 记录关闭时释放 reference。tab 通过 `sidebar.chat.conversation` 渲染共享 `conversation.content` Factory,把局部 View 固定为 Chat,并省略主 Conversation 的 Header 与宽度控制。
|
|
29
31
|
|
|
30
32
|
### 浏览目录
|
|
31
33
|
|
|
32
|
-
行显示 mode
|
|
34
|
+
行显示 mode、活动状态与由日志支撑的可选 title;running 使用共享 ongoing loading,最近一个已结束轮次正常完成的 inactive child 使用共享 success 绿点,其他 inactive child 使用共享 idle 灰点。每行都为状态图标预留相同的 14px 列宽,并将较小的圆点居中,使 title 与 loading 状态对齐。紧凑的页头触发器会垂直居中活动图标与数量,并保留 4px 水平间距。尾随列在上行显示提供方的持久化 token 用量总计,在下行显示活跃轮次耗时。键盘导航:ArrowRight/ArrowLeft 展开和折叠分支;ArrowUp/ArrowDown、Home、End 与 Escape 用于导航或关闭树。没有 label 的 one-shot 行回退到其会话 id。只有一行自身的目录加载为空后,它才是已知叶子。
|
|
33
35
|
|
|
34
36
|
### 续接对话
|
|
35
37
|
|
|
@@ -51,16 +53,22 @@ kind: "package-reference"
|
|
|
51
53
|
|
|
52
54
|
### 目录派生
|
|
53
55
|
|
|
54
|
-
页头谱系 renderer 通过标准 `useSessions` 钩子读取 `
|
|
56
|
+
页头谱系 renderer 通过标准 `useSessions` 钩子读取 `projectionsBySession`。renderer 从每个 Session 的共享值中选择 `subagentCatalog`,用于成员关系、展开控件与数量;活动状态优先使用统一 UI status,缺少时使用 Session 摘要;摘要提供标题与用量。展开行会按需加载初始目录。实时 projection 帧更新所有已加载层级,无需菜单订阅或重复成员查询。行在目录缺席、加载中或失败时保持可展开,并在目录就绪且为空后成为已知叶子。
|
|
57
|
+
|
|
58
|
+
打开目录下拉菜单不会请求其根目录。展开子节点目录或重试失败读取时调用 `refreshProjection`;共享投影值的变化会自动更新显示。
|
|
55
59
|
|
|
56
|
-
|
|
60
|
+
面包屑地址从 Provider 所绑定的 Session 地址和已加载的 parent 目录推导,也包括从未选中过的祖先。
|
|
57
61
|
|
|
58
|
-
|
|
62
|
+
### 耗时、完成状态与 token
|
|
63
|
+
|
|
64
|
+
每个可见目录层在包含运行中 child 时独立推进时钟;折叠该层或关闭菜单会释放时钟。token 用量总计为四个互不重叠的 `tokenUsage` 桶之和。`subagentTiming` 投影会累加已结束轮次的耗时,并记录最近一个已结束轮次是否以 `completed` 结束;新轮次开始时会清除该完成状态,直到自身的 `turn/end` 到达。耗时仅在运行中 child 存在未结束轮次时每秒递增一次,并在 child 变为 inactive 后冻结;被中断的未结束轮次以其同一切面的 `active.through` 为上界,绝不使用更新的会话元数据。
|
|
59
65
|
|
|
60
66
|
### 编辑器选举
|
|
61
67
|
|
|
62
68
|
one-shot child 始终选用只读编辑器。可继续 child 仅在其确切 parent 不可用且 child 未在运行时选用只读编辑器;否则普通编辑器的会话会经 `subagents/prompt` 路由提示词。本包绝不接收宿主上下文,也不调用面向模型的工具。
|
|
63
69
|
|
|
70
|
+
模式未知的目录项仍可见、可点击,没有标签时显示子会话 id。读取子历史并确认受支持模式前,输入区保持只读;读取失败在该子会话中报告。
|
|
71
|
+
|
|
64
72
|
</details>
|
|
65
73
|
|
|
66
74
|
-----
|
|
@@ -102,7 +110,7 @@ one-shot child 始终选用只读编辑器。可继续 child 仅在其确切 par
|
|
|
102
110
|
|
|
103
111
|
这些限制定义目录能显示什么、`@` 引用意味着什么;它们是当前包约束。
|
|
104
112
|
|
|
105
|
-
-
|
|
113
|
+
- **非完成的 inactive 结果仍合并显示**:目录能区分最近一次正常完成与其他 inactive 状态,但不区分失败、取消、拒绝、token 耗尽或尚无已结束轮次的 child;UI 不公开 Activation 身份,停止能力仅限编辑器上针对运行中可继续 child 的当前轮次 Stop。
|
|
106
114
|
- **`@` 引用仍是显示标题文本**:重复或改名后的 label 会有歧义,因此它们刻意不获得继续执行语义。
|
|
107
115
|
|
|
108
116
|
<a id="dev-note"></a>
|