@khorsheed/dsh-message-timeline 0.2.1 → 0.2.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # 变更记录
2
2
 
3
+ ## 0.2.3(2026-09-27)
4
+
5
+ 无功能变更。随宿主 0.1.7-rc.2 基线发布波重发:全量构建+测试在 rc.2 基线通过(rc.1→rc.2 无触及本包的宿主变更)。
6
+
7
+ ## 0.2.2(2026-09-26)
8
+
9
+ 适配宿主 rc.1 线并实证 0.1.5/0.1.7 双线可用(0.1.5-rc.1 全量 boot 实证,2026-09-25)。
10
+
11
+ - 会话面迁移:宿主移除 `ISessions.open/current` 后的读面切换
12
+ - 插件清单展示元数据(`locale/*.json`):rc.1 宿主插件页的卡面标题/描述中文化
13
+
3
14
  ## 0.2.1(2026-09-11)
4
15
 
5
16
  - 无功能变更:开发基线随仓内 pin 对齐官方 `0.1.5-rc.1` / cordis `4.0.2`(消除 4.0.1/4.0.2 双实例图分裂);peer 依赖范围与 minHost(`0.1.2-rc.1`)不变
package/lib/client.js CHANGED
@@ -69,6 +69,10 @@ window.__ModuleLoader__.load({
69
69
  const RAIL_VERTICAL_PADDING = 8;
70
70
  /** Keep the target row this far below the scrollport top after a jump (px). */
71
71
  const JUMP_OFFSET = 16;
72
+ function mainSessionId(list) {
73
+ const view = list;
74
+ return Object.values(view.byId).find((s) => (s.retainedBy?.mainView ?? 0) > 0)?.id ?? view.current;
75
+ }
72
76
  /** Idle state published before any session binds or while none is current. */
73
77
  const IDLE = {
74
78
  sessionId: void 0,
@@ -288,7 +292,7 @@ window.__ModuleLoader__.load({
288
292
  });
289
293
  };
290
294
  const bindCurrent = () => {
291
- bind(ctx.sessions.list.getSnapshot().current);
295
+ bind(mainSessionId(ctx.sessions.list.getSnapshot()));
292
296
  };
293
297
  const stopList = ctx.sessions.list.subscribe(bindCurrent);
294
298
  const stopProvide = ctx.sessions.currentProvideInfo?.subscribe(bindCurrent);
@@ -398,7 +402,7 @@ window.__ModuleLoader__.load({
398
402
  }
399
403
  //#endregion
400
404
  //#region \0dsh-css:src/client/TimelineRail.module.css.mjs
401
- const css = "._8u17xW_panel{scrollbar-width:none;z-index:100;pointer-events:none;flex-direction:column;padding:4px 8px;display:flex;position:fixed;overflow-y:auto}._8u17xW_panel:before,._8u17xW_panel:after{content:\"\";margin:auto}._8u17xW_panel::-webkit-scrollbar{display:none}._8u17xW_item{width:100%;max-width:20px;color:var(--dsw-alias-label-tertiary);text-align:left;cursor:pointer;-webkit-user-select:none;user-select:none;pointer-events:auto;opacity:.55;background:0 0;border:none;flex:none;align-items:center;gap:8px;padding:5px 0;font-size:13px;line-height:1.5;transition:opacity .12s;display:flex}._8u17xW_panel:hover ._8u17xW_item,._8u17xW_panel:focus-within ._8u17xW_item{opacity:1;max-width:100%}._8u17xW_tick{background:var(--dsw-static-deepseek-400);border-radius:2px;flex:none;width:3px;height:14px}._8u17xW_itemCurrent{color:var(--dsw-static-deepseek-500);opacity:.75}._8u17xW_tickCurrent{background:var(--dsw-static-deepseek-500)}._8u17xW_itemText{white-space:nowrap;text-overflow:ellipsis;opacity:0;transition:opacity .12s;overflow:hidden}._8u17xW_panel:hover ._8u17xW_itemText,._8u17xW_panel:focus-within ._8u17xW_itemText{opacity:1;transition-delay:90ms}._8u17xW_itemFocused{color:var(--dsw-alias-label-primary);font-weight:600}._8u17xW_item:focus:not(:focus-visible){outline:none}._8u17xW_item:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:1px}";
405
+ const css = ".xnuhBq_panel{scrollbar-width:none;z-index:100;pointer-events:none;flex-direction:column;padding:4px 8px;display:flex;position:fixed;overflow-y:auto}.xnuhBq_panel:before,.xnuhBq_panel:after{content:\"\";margin:auto}.xnuhBq_panel::-webkit-scrollbar{display:none}.xnuhBq_item{width:100%;max-width:20px;color:var(--dsw-alias-label-tertiary);text-align:left;cursor:pointer;-webkit-user-select:none;user-select:none;pointer-events:auto;opacity:.55;background:0 0;border:none;flex:none;align-items:center;gap:8px;padding:5px 0;font-size:13px;line-height:1.5;transition:opacity .12s;display:flex}.xnuhBq_panel:hover .xnuhBq_item,.xnuhBq_panel:focus-within .xnuhBq_item{opacity:1;max-width:100%}.xnuhBq_tick{background:var(--dsw-static-deepseek-400);border-radius:2px;flex:none;width:3px;height:14px}.xnuhBq_itemCurrent{color:var(--dsw-static-deepseek-500);opacity:.75}.xnuhBq_tickCurrent{background:var(--dsw-static-deepseek-500)}.xnuhBq_itemText{white-space:nowrap;text-overflow:ellipsis;opacity:0;transition:opacity .12s;overflow:hidden}.xnuhBq_panel:hover .xnuhBq_itemText,.xnuhBq_panel:focus-within .xnuhBq_itemText{opacity:1;transition-delay:90ms}.xnuhBq_itemFocused{color:var(--dsw-alias-label-primary);font-weight:600}.xnuhBq_item:focus:not(:focus-visible){outline:none}.xnuhBq_item:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:1px}";
402
406
  const tagId = "@khorsheed/dsh-message-timeline/TimelineRail.module.css";
403
407
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
404
408
  const tag = document.createElement("style");
@@ -408,13 +412,13 @@ window.__ModuleLoader__.load({
408
412
  document.head.appendChild(tag);
409
413
  }
410
414
  var TimelineRail_module_css_default = {
411
- "tickCurrent": "_8u17xW_tickCurrent",
412
- "item": "_8u17xW_item",
413
- "itemText": "_8u17xW_itemText",
414
- "tick": "_8u17xW_tick",
415
- "itemFocused": "_8u17xW_itemFocused",
416
- "panel": "_8u17xW_panel",
417
- "itemCurrent": "_8u17xW_itemCurrent"
415
+ "panel": "xnuhBq_panel",
416
+ "itemText": "xnuhBq_itemText",
417
+ "itemFocused": "xnuhBq_itemFocused",
418
+ "itemCurrent": "xnuhBq_itemCurrent",
419
+ "tickCurrent": "xnuhBq_tickCurrent",
420
+ "item": "xnuhBq_item",
421
+ "tick": "xnuhBq_tick"
418
422
  };
419
423
  //#endregion
420
424
  //#region src/client/TimelineRail.tsx
@@ -5,6 +5,10 @@ const RAIL_LEFT_INSET = 6;
5
5
  const RAIL_VERTICAL_PADDING = 8;
6
6
  /** Keep the target row this far below the scrollport top after a jump (px). */
7
7
  const JUMP_OFFSET = 16;
8
+ function mainSessionId(list) {
9
+ const view = list;
10
+ return Object.values(view.byId).find(s => (s.retainedBy?.mainView ?? 0) > 0)?.id ?? view.current;
11
+ }
8
12
  /** Idle state published before any session binds or while none is current. */
9
13
  const IDLE = {
10
14
  sessionId: undefined, ready: false, left: 0, top: 0, height: 0, scrollportWidth: 0, flowLeft: null,
@@ -256,7 +260,7 @@ export function installRailTracker(ctx, includeSteering) {
256
260
  });
257
261
  };
258
262
  const bindCurrent = () => {
259
- bind(ctx.sessions.list.getSnapshot().current);
263
+ bind(mainSessionId(ctx.sessions.list.getSnapshot()));
260
264
  };
261
265
  const stopList = ctx.sessions.list.subscribe(bindCurrent);
262
266
  // Host 0.1.2-alpha.1 removed ISessions.currentProvideInfo (commit
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Message Timeline",
4
+ "description": "Jump back to any of your messages from a floating conversation timeline"
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "消息时间轴",
4
+ "description": "在对话左缘展示消息时间轴,一点跳回任意一条你说过的消息。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@khorsheed/dsh-message-timeline",
3
3
  "description": "Message timeline: a flat floating list over the conversation scrollport that jumps to any user message, with a tick-only rest state",
4
- "version": "0.2.1",
4
+ "version": "0.2.3",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/types/index.d.ts",
@@ -19,6 +19,7 @@
19
19
  "default": "./lib/client.js"
20
20
  },
21
21
  "./src/*": "./src/*",
22
+ "./locale/*.json": "./locale/*.json",
22
23
  "./package.json": "./package.json"
23
24
  },
24
25
  "dsh": {
@@ -48,30 +49,10 @@
48
49
  "@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
49
50
  "react": "^18.2.0"
50
51
  },
51
- "devDependencies": {
52
- "@deepseek-ai/cordis": "^4.0.1",
53
- "@deepseek-ai/dsh-api-remotes": "^0.1.5-rc.1",
54
- "@deepseek-ai/dsh-api-session-controller": "^0.1.5-rc.1",
55
- "@deepseek-ai/dsh-client-locale": "^0.1.5-rc.1",
56
- "@deepseek-ai/dsh-client-store": "^0.1.5-rc.1",
57
- "@deepseek-ai/dsh-client-test-runtime": "^0.1.5-rc.1",
58
- "@deepseek-ai/dsh-client-ui-chat": "^0.1.5-rc.1",
59
- "@deepseek-ai/dsh-client-ui-conversation": "^0.1.5-rc.1",
60
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.5-rc.1",
61
- "@deepseek-ai/dsh-client-ui-session": "^0.1.5-rc.1",
62
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.5-rc.1",
63
- "@deepseek-ai/dsh-invariants": "^0.1.5-rc.1",
64
- "@deepseek-ai/dsh-llm": "^0.1.5-rc.1",
65
- "@testing-library/react": "^16.1.0",
66
- "@types/node": "^26.2.0",
67
- "@types/react": "~18.3.1",
68
- "@types/react-dom": "~18.3.1",
69
- "react": "^18.2.0",
70
- "react-dom": "^18.2.0"
71
- },
72
52
  "files": [
73
53
  "lib",
74
54
  "cordis.patch.yml",
55
+ "locale/*.json",
75
56
  "CHANGELOG.md"
76
57
  ],
77
58
  "keywords": [