@deepseek-ai/dsh-client-ui-reference 0.1.6-alpha.1 → 0.1.6-alpha.2

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 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-reference/README.md
5
- README.md: 1a79a22425fff1c7323a3bcb55afd324decbe5e8
6
- README.zh.md: 7cde5e46e69f008e9fcfffeb3920184d90bddb60
5
+ README.md: 6b5046f1c6300f5ec02d3737617019874762d47a
6
+ README.zh.md: 99ba6fda18a73f5686f5e02403e48d5e556f9c3c
package/README.md CHANGED
@@ -51,7 +51,7 @@ The source keeps candidate encoding internal to the registration effect: the `/c
51
51
 
52
52
  ### Candidate flow
53
53
 
54
- For an unquoted token, the browser starts the `fileReferences/list` and `sessionReferenceResolver/candidates` Remote calls together, then deterministically orders files before sessions with locale-registered folder/file/session labels. Rows render under non-selectable file and session section headings without a redundant raw `reference` source title. A session row is dated from the Host session list's `updatedAt` through the same relative-time bucket that list uses, so one session reads the same age on both surfaces; a session the list does not carry falls back to the candidate's creation time. A drilled query publishes a breadcrumb from the workspace root to the directory being listed; each crumb carries the drill payload a folder row would, so returning to a step and descending into one are one outcome.
54
+ For an unquoted token, the browser starts the `fileReferences/list` and `sessionReferenceResolver/candidates` Remote calls together, then deterministically orders files, direct subagents of the current Session, and other Sessions. Rows use the resolver's display title, which prefers a subagent's creation label while ordinary Sessions retain their projected title, and render under locale-owned group headings without a redundant raw `reference` source title. A session row is dated from the Host session list's `updatedAt` through the same relative-time bucket that list uses, so one session reads the same age on both surfaces; a session the list does not carry falls back to the candidate's creation time. A drilled query publishes a breadcrumb from the workspace root to the current directory; each crumb carries the drill payload a folder row would, so returning to a step and descending into one are one outcome.
55
55
 
56
56
  ### Serialization
57
57
 
package/README.zh.md CHANGED
@@ -51,7 +51,7 @@ Web 用户需要从同一个 `@` 补全菜单提及文件、文件夹或会话
51
51
 
52
52
  ### 候选流程
53
53
 
54
- 对于未加引号的 token,浏览器会同时启动 `fileReferences/list` 与 `sessionReferenceResolver/candidates` Remote 调用,再以确定性顺序把文件排在会话之前,并使用注册在 locale 字典中的文件夹、文件与会话标签。各行分别渲染在不可选择的文件与会话分组标题下,不显示重复的原始 `reference` source 标题。会话行用宿主会话列表的 `updatedAt` 经该列表相同的相对时间分档标注时间,因此同一个会话在两处读到的时长一致;列表中没有的会话回落到候选自带的创建时间。下钻后的查询会发布一条从工作区根目录到当前所列目录的面包屑;每一节携带的下钻载荷与文件夹行相同,因此「回到某一步」与「进入某一层」是同一个结果。
54
+ 对于未加引号的 token,浏览器会同时启动 `fileReferences/list` 与 `sessionReferenceResolver/candidates` Remote 调用,再按文件、当前 Session 的直接 subagent、其他 Session 的确定性顺序排列。各行使用 resolver 的显示标题;subagent 优先使用创建标签,普通 Session 保持投影标题,并渲染在 locale 管理的分组标题下,不显示重复的原始 `reference` source 标题。会话行用宿主会话列表的 `updatedAt` 经该列表相同的相对时间分档标注时间,因此同一个会话在两处读到的时长一致;列表中没有的会话回落到候选自带的创建时间。下钻后的查询会发布一条从工作区根目录到当前目录的面包屑;每一节携带的下钻载荷与文件夹行相同,因此「回到某一步」与「进入某一层」是同一个结果。
55
55
 
56
56
  ### 序列化
57
57
 
package/lib/client.js CHANGED
@@ -108,6 +108,7 @@ window.__ModuleLoader__.load({
108
108
  */
109
109
  const zh = {
110
110
  "section.files": "文件与文件夹",
111
+ "section.subagents": "子智能体",
111
112
  "section.sessions": "对话",
112
113
  "candidate.noCwd": "(无工作目录)",
113
114
  "crumb.root": "工作区",
@@ -121,6 +122,7 @@ window.__ModuleLoader__.load({
121
122
  /** English dictionary, checked complete against the zh key set. */
122
123
  const en = {
123
124
  "section.files": "Files & folders",
125
+ "section.subagents": "Subagents",
124
126
  "section.sessions": "Sessions",
125
127
  "candidate.noCwd": "(no cwd)",
126
128
  "crumb.root": "Workspace",
@@ -167,7 +169,19 @@ window.__ModuleLoader__.load({
167
169
  const now = Date.now();
168
170
  const home = ctx.remote.$host.home;
169
171
  const listed = sessions.list.getSnapshot().byId;
170
- return [...fileItems.flatMap((candidate) => fileCandidate(candidate, quoted === true, withLocation, t)), ...sessionItems.map((candidate) => sessionCandidate(candidate, listed[candidate.sessionId]?.updatedAt ?? candidate.createdAt, now, home, t))];
172
+ const sessionRows = sessionItems.map((candidate) => {
173
+ const summary = listed[candidate.sessionId];
174
+ const child = summary?.origin === "subagent" && summary.parentId === session.sessionId;
175
+ return {
176
+ child,
177
+ row: sessionCandidate(candidate, candidate.displayTitle ?? candidate.label, summary?.updatedAt ?? candidate.createdAt, now, home, t(child ? "section.subagents" : "section.sessions"), t)
178
+ };
179
+ });
180
+ return [
181
+ ...fileItems.flatMap((candidate) => fileCandidate(candidate, quoted === true, withLocation, t)),
182
+ ...sessionRows.filter((item) => item.child).map((item) => item.row),
183
+ ...sessionRows.filter((item) => !item.child).map((item) => item.row)
184
+ ];
171
185
  },
172
186
  header(_session, req) {
173
187
  return crumbsFor(req.query, req.quoted === true, req.drilled, t);
@@ -277,20 +291,20 @@ window.__ModuleLoader__.load({
277
291
  ...directory ? { drill: true } : {}
278
292
  }];
279
293
  }
280
- function sessionCandidate(candidate, updatedAt, now, home, t) {
294
+ function sessionCandidate(candidate, label, updatedAt, now, home, section, t) {
281
295
  const { unit, n } = (0, _deepseek_ai_dsh_client_ui_primitives.relativeTime)(updatedAt, now);
282
296
  const age = unit === "now" ? t("time.now") : t(`time.${unit}`, { n });
283
297
  const location = candidate.sameWorkspace ? void 0 : candidate.cwd === void 0 ? t("candidate.noCwd") : abbreviateHomePath(candidate.cwd, home);
284
298
  const value = {
285
299
  kind: "session",
286
- label: candidate.label,
300
+ label,
287
301
  mention: candidate.mention
288
302
  };
289
303
  return {
290
- name: candidate.label,
304
+ name: label,
291
305
  description: location === void 0 ? age : `${location} · ${age}`,
292
306
  icon: "session",
293
- section: t("section.sessions"),
307
+ section,
294
308
  value: JSON.stringify(value)
295
309
  };
296
310
  }
@@ -10,6 +10,7 @@ export declare const NS = "reference";
10
10
  */
11
11
  export declare const zh: {
12
12
  'section.files': string;
13
+ 'section.subagents': string;
13
14
  'section.sessions': string;
14
15
  'candidate.noCwd': string;
15
16
  'crumb.root': string;
@@ -31,6 +32,7 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
31
32
  /** English dictionary, checked complete against the zh key set. */
32
33
  export declare const en: {
33
34
  'section.files': string;
35
+ 'section.subagents': string;
34
36
  'section.sessions': string;
35
37
  'candidate.noCwd': string;
36
38
  'crumb.root': string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-client-ui-reference",
3
3
  "description": "Unified Web @file and @session reference source",
4
- "version": "0.1.6-alpha.1",
4
+ "version": "0.1.6-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -43,20 +43,20 @@
43
43
  "@deepseek-ai/cordis": "^4.0.2"
44
44
  },
45
45
  "devDependencies": {
46
- "@deepseek-ai/dsh-api-remotes": "^0.1.6-alpha.1",
47
- "@deepseek-ai/dsh-api-session-controller": "^0.1.6-alpha.1",
48
- "@deepseek-ai/dsh-client-locale": "^0.1.6-alpha.1",
49
- "@deepseek-ai/dsh-client-connection": "^0.1.6-alpha.1",
50
- "@deepseek-ai/dsh-client-test-runtime": "^0.1.6-alpha.1",
51
- "@deepseek-ai/dsh-client-ui-input-trigger": "^0.1.6-alpha.1",
52
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.6-alpha.1",
53
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.6-alpha.1",
54
- "@deepseek-ai/dsh-file-reference": "^0.1.6-alpha.1",
55
- "@deepseek-ai/dsh-session-reference": "^0.1.6-alpha.1",
56
- "@deepseek-ai/dsh-typert-protocol": "^0.1.6-alpha.1",
57
- "@deepseek-ai/dsh-util-workspace-path": "^0.1.6-alpha.1",
46
+ "@deepseek-ai/dsh-api-remotes": "^0.1.6-alpha.2",
47
+ "@deepseek-ai/dsh-api-session-controller": "^0.1.6-alpha.2",
48
+ "@deepseek-ai/dsh-client-connection": "^0.1.6-alpha.2",
49
+ "@deepseek-ai/dsh-client-locale": "^0.1.6-alpha.2",
50
+ "@deepseek-ai/dsh-client-test-runtime": "^0.1.6-alpha.2",
51
+ "@deepseek-ai/dsh-client-ui-input-trigger": "^0.1.6-alpha.2",
52
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.6-alpha.2",
53
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.6-alpha.2",
54
+ "@deepseek-ai/dsh-file-reference": "^0.1.6-alpha.2",
55
+ "@deepseek-ai/dsh-session-reference": "^0.1.6-alpha.2",
56
+ "@deepseek-ai/dsh-typert-protocol": "^0.1.6-alpha.2",
57
+ "@deepseek-ai/dsh-util-workspace-path": "^0.1.6-alpha.2",
58
58
  "@deepseek-ai/cordis": "^4.0.2",
59
- "@deepseek-ai/dsh-client-ui-sidebar-right": "^0.1.6-alpha.1"
59
+ "@deepseek-ai/dsh-client-ui-sidebar-right": "^0.1.6-alpha.2"
60
60
  },
61
61
  "files": [
62
62
  "lib/index.js",