@khorsheed/dsh-message-timeline 0.2.1 → 0.2.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/CHANGELOG.md +7 -0
- package/lib/client.js +13 -9
- package/lib/types/client/rail-tracker.js +5 -1
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +3 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# 变更记录
|
|
2
2
|
|
|
3
|
+
## 0.2.2(2026-09-26)
|
|
4
|
+
|
|
5
|
+
适配宿主 rc.1 线并实证 0.1.5/0.1.7 双线可用(0.1.5-rc.1 全量 boot 实证,2026-09-25)。
|
|
6
|
+
|
|
7
|
+
- 会话面迁移:宿主移除 `ISessions.open/current` 后的读面切换
|
|
8
|
+
- 插件清单展示元数据(`locale/*.json`):rc.1 宿主插件页的卡面标题/描述中文化
|
|
9
|
+
|
|
3
10
|
## 0.2.1(2026-09-11)
|
|
4
11
|
|
|
5
12
|
- 无功能变更:开发基线随仓内 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()
|
|
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 = ".
|
|
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
|
-
"
|
|
412
|
-
"
|
|
413
|
-
"
|
|
414
|
-
"
|
|
415
|
-
"
|
|
416
|
-
"
|
|
417
|
-
"
|
|
415
|
+
"itemFocused": "xnuhBq_itemFocused",
|
|
416
|
+
"itemCurrent": "xnuhBq_itemCurrent",
|
|
417
|
+
"item": "xnuhBq_item",
|
|
418
|
+
"tickCurrent": "xnuhBq_tickCurrent",
|
|
419
|
+
"panel": "xnuhBq_panel",
|
|
420
|
+
"itemText": "xnuhBq_itemText",
|
|
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()
|
|
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
package/locale/zh.json
ADDED
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.
|
|
4
|
+
"version": "0.2.2",
|
|
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": [
|