dsh-manage-session 2.0.4 → 2.0.6
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.en.md +1 -1
- package/README.md +1 -1
- package/dsh.plugin.json +2 -2
- package/lib/client.js +13 -3
- package/package.json +9 -9
- package/src/client/index.ts +21 -5
package/README.en.md
CHANGED
|
@@ -23,7 +23,7 @@ A DSH web plugin: **one console over active and archived sessions + a four-gate
|
|
|
23
23
|
|
|
24
24
|
<!-- hosts-sync:begin -->
|
|
25
25
|
<!-- Generated by scripts/sync-hosts.mjs; single source in scripts/hosts.mjs -->
|
|
26
|
-
Supports DSH 0.1.0-rc.2, 0.1.0-rc.3, 0.1.0-rc.6, 0.1.0-rc.7, 0.1.0-rc.8, 0.1.1-rc.1, 0.1.1-rc.2, 0.1.2-rc.1, 0.1.5-rc.1, 0.1.5-rc.2, 0.1.5-rc.3, 0.1.7-rc.1, 0.1.7-rc.2, 0.2.0-rc.1, 0.2.0-rc.2, 0.2.1-rc.1, 0.2.1-rc.2, 0.2.1-rc.3, 0.2.1-rc.4 (enumerated peers — a per-rc tested whitelist; alpha/beta releases are out of scope).
|
|
26
|
+
Supports DSH 0.1.0-rc.2, 0.1.0-rc.3, 0.1.0-rc.6, 0.1.0-rc.7, 0.1.0-rc.8, 0.1.1-rc.1, 0.1.1-rc.2, 0.1.2-rc.1, 0.1.5-rc.1, 0.1.5-rc.2, 0.1.5-rc.3, 0.1.7-rc.1, 0.1.7-rc.2, 0.2.0-rc.1, 0.2.0-rc.2, 0.2.1-rc.1, 0.2.1-rc.2, 0.2.1-rc.3, 0.2.1-rc.4, 0.2.1-rc.5 (enumerated peers — a per-rc tested whitelist; alpha/beta releases are out of scope).
|
|
27
27
|
<!-- hosts-sync:end -->
|
|
28
28
|
|
|
29
29
|
## Screenshots
|
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ DSH Web 插件:**活跃与归档会话的统一管理台 + 四门体检**。
|
|
|
28
28
|
|
|
29
29
|
<!-- hosts-sync:begin -->
|
|
30
30
|
<!-- 由 scripts/sync-hosts.mjs 生成,勿手改;单源在 scripts/hosts.mjs -->
|
|
31
|
-
支持 DSH 0.1.0-rc.2、0.1.0-rc.3、0.1.0-rc.6、0.1.0-rc.7、0.1.0-rc.8、0.1.1-rc.1、0.1.1-rc.2、0.1.2-rc.1、0.1.5-rc.1、0.1.5-rc.2、0.1.5-rc.3、0.1.7-rc.1、0.1.7-rc.2、0.2.0-rc.1、0.2.0-rc.2、0.2.1-rc.1、0.2.1-rc.2、0.2.1-rc.3、0.2.1-rc.4(枚举 peer,逐 rc 实测白名单;alpha/beta 不在支持范围)。
|
|
31
|
+
支持 DSH 0.1.0-rc.2、0.1.0-rc.3、0.1.0-rc.6、0.1.0-rc.7、0.1.0-rc.8、0.1.1-rc.1、0.1.1-rc.2、0.1.2-rc.1、0.1.5-rc.1、0.1.5-rc.2、0.1.5-rc.3、0.1.7-rc.1、0.1.7-rc.2、0.2.0-rc.1、0.2.0-rc.2、0.2.1-rc.1、0.2.1-rc.2、0.2.1-rc.3、0.2.1-rc.4、0.2.1-rc.5(枚举 peer,逐 rc 实测白名单;alpha/beta 不在支持范围)。
|
|
32
32
|
<!-- hosts-sync:end -->
|
|
33
33
|
|
|
34
34
|
## 截图
|
package/dsh.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-manage-session",
|
|
3
3
|
"name": "dsh-manage-session",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.6",
|
|
5
5
|
"description": {
|
|
6
6
|
"en": "Session Manager: one console over active and archived sessions (browse, filter, favorite, archive/unarchive, batch purge, delete) plus a four-gate session health checkup. The entry sits in the sidebar top tool slot right after the Plugins row when the host provides one, and falls back to the footer otherwise. No index of its own and no DRS dependency — search lives in dsh-search-index. Never rewrites session logs. (formerly dsh-session-steward)",
|
|
7
7
|
"zh": "会话管理台:一屏管理活跃与归档会话(列表、筛选、收藏、归档与取消归档、批量清理、删除),外加四门会话体检。宿主提供侧栏顶部工具槽位时入口落在「插件」行之后,否则回落底栏。不自建索引、不依赖 DRS——搜索能力在 dsh-search-index。不改写会话日志。(原名 dsh-session-steward)"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"engines": {
|
|
16
|
-
"dsh": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4"
|
|
16
|
+
"dsh": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5"
|
|
17
17
|
},
|
|
18
18
|
"components": {
|
|
19
19
|
"host": "lib/index.js",
|
package/lib/client.js
CHANGED
|
@@ -3045,7 +3045,11 @@ window.__ModuleLoader__.load({
|
|
|
3045
3045
|
order: 40,
|
|
3046
3046
|
label: () => translate(locale?.bind?.(NS), "family.title"),
|
|
3047
3047
|
locale: NS,
|
|
3048
|
-
inject: () => ({
|
|
3048
|
+
inject: () => ({
|
|
3049
|
+
hooks: { tabs: familyTabsHooks },
|
|
3050
|
+
ownId: STEWARD_ENTRY_ID,
|
|
3051
|
+
renderOwn: () => (0, react.createElement)(StewardSettingsCard, { scope: bound })
|
|
3052
|
+
}),
|
|
3049
3053
|
children: { [FAMILY_CHILD_KEY]: {
|
|
3050
3054
|
kind: "list",
|
|
3051
3055
|
scope: "root"
|
|
@@ -3091,13 +3095,19 @@ window.__ModuleLoader__.load({
|
|
|
3091
3095
|
subscribe: (listener) => slots.subscribe(FAMILY_CHILD_KEY, listener)
|
|
3092
3096
|
};
|
|
3093
3097
|
}
|
|
3094
|
-
/**
|
|
3098
|
+
/** 家族节接管组件:把 `dsh-family.tab` 账本里的每张贡献卡按 order 渲染;接管态本插件 own 卡内联直挂。 */
|
|
3095
3099
|
function StewardFamilySection(props) {
|
|
3096
3100
|
const tabs = (0, react.useSyncExternalStore)(props.hooks.tabs.subscribe, props.hooks.tabs.getSnapshot);
|
|
3101
|
+
const ownId = props.ownId ?? "__own__";
|
|
3102
|
+
const rows = props.renderOwn ? [{
|
|
3103
|
+
id: ownId,
|
|
3104
|
+
order: Number.NEGATIVE_INFINITY,
|
|
3105
|
+
label: ownId
|
|
3106
|
+
}, ...tabs.filter((tab) => tab.id !== ownId)] : tabs;
|
|
3097
3107
|
return (0, react.createElement)("div", { style: {
|
|
3098
3108
|
display: "grid",
|
|
3099
3109
|
gap: "12px"
|
|
3100
|
-
} }, ...
|
|
3110
|
+
} }, ...rows.map((row) => (0, react.createElement)("div", { key: row.id }, props.renderOwn && row.id === ownId ? props.renderOwn() : props.renderSlot(FAMILY_CHILD_KEY, {}, {
|
|
3101
3111
|
only: row.id,
|
|
3102
3112
|
fallback: null
|
|
3103
3113
|
}))));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-manage-session",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org",
|
|
6
6
|
"tag": "beta",
|
|
@@ -82,18 +82,18 @@
|
|
|
82
82
|
],
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=20",
|
|
85
|
-
"dsh": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4"
|
|
85
|
+
"dsh": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5"
|
|
86
86
|
},
|
|
87
87
|
"license": "MIT",
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
90
|
-
"@deepseek-ai/dsh-client-locale": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
|
|
91
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
|
|
92
|
-
"@deepseek-ai/dsh-client-ui-settings-general": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
|
|
93
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
|
|
90
|
+
"@deepseek-ai/dsh-client-locale": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5",
|
|
91
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5",
|
|
92
|
+
"@deepseek-ai/dsh-client-ui-settings-general": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5",
|
|
93
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5",
|
|
94
94
|
"@deepseek-ai/schemastery": "^3.18.4",
|
|
95
95
|
"react": "^18.2.0",
|
|
96
|
-
"@deepseek-ai/dsh-session": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4"
|
|
96
|
+
"@deepseek-ai/dsh-session": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5"
|
|
97
97
|
},
|
|
98
98
|
"peerDependenciesMeta": {
|
|
99
99
|
"@deepseek-ai/dsh-client-locale": {
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
},
|
|
115
115
|
"devDependencies": {
|
|
116
116
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
117
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.
|
|
117
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.5",
|
|
118
118
|
"@deepseek-ai/schemastery": "^3.18.4",
|
|
119
119
|
"@types/node": "^24.0.0",
|
|
120
120
|
"@types/react": "~18.3.1",
|
|
@@ -127,6 +127,6 @@
|
|
|
127
127
|
"typescript": "^5.6.0",
|
|
128
128
|
"vite-tsconfig-paths": "^6.1.1",
|
|
129
129
|
"vitest": "^4.1.1",
|
|
130
|
-
"@deepseek-ai/dsh-session": "0.2.1-rc.
|
|
130
|
+
"@deepseek-ai/dsh-session": "0.2.1-rc.5"
|
|
131
131
|
}
|
|
132
132
|
}
|
package/src/client/index.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* (settingsScope.bind 是数据死路,见 bridge-scope.ts);配置写入同链路。
|
|
14
14
|
*/
|
|
15
15
|
import type { Context } from 'cordis'
|
|
16
|
-
import { createElement, useState, useSyncExternalStore, type ReactElement } from 'react'
|
|
16
|
+
import { createElement, useState, useSyncExternalStore, type ReactElement, type ReactNode } from 'react'
|
|
17
17
|
import {
|
|
18
18
|
DEFAULT_CONFIG,
|
|
19
19
|
STEWARD_ENTRY_ID,
|
|
@@ -330,7 +330,13 @@ export function apply(ctx: Context): void {
|
|
|
330
330
|
order: 40,
|
|
331
331
|
label: () => translate((locale as { bind?: (n: string) => CardTranslate } | undefined)?.bind?.(NS), 'family.title'),
|
|
332
332
|
locale: NS,
|
|
333
|
-
inject: () => ({
|
|
333
|
+
inject: () => ({
|
|
334
|
+
hooks: { tabs: familyTabsHooks },
|
|
335
|
+
// 接管时本插件既是 owner 又是成员:自宣 dsh-family.tab 不触发自身 inject(账本恒无本卡),
|
|
336
|
+
// 故本卡内联直挂(ownId/renderOwn)。scope 走 bound(apply 级原生/桥两轨兜底)。
|
|
337
|
+
ownId: STEWARD_ENTRY_ID,
|
|
338
|
+
renderOwn: () => createElement(StewardSettingsCard, { scope: bound as StewardCardScope }),
|
|
339
|
+
}),
|
|
334
340
|
children: { [FAMILY_CHILD_KEY]: { kind: 'list', scope: 'root' } },
|
|
335
341
|
}, StewardFamilySection)
|
|
336
342
|
} catch {
|
|
@@ -388,15 +394,25 @@ interface FamilyTabEntry {
|
|
|
388
394
|
label: string
|
|
389
395
|
}
|
|
390
396
|
|
|
391
|
-
/**
|
|
397
|
+
/** 家族节接管组件:把 `dsh-family.tab` 账本里的每张贡献卡按 order 渲染;接管态本插件 own 卡内联直挂。 */
|
|
392
398
|
function StewardFamilySection(props: {
|
|
393
399
|
renderSlot: (key: string, owner?: object, opts?: { only?: string; fallback?: unknown }) => unknown
|
|
394
400
|
hooks: { tabs: { getSnapshot: () => readonly FamilyTabEntry[]; subscribe: (listener: () => void) => () => void } }
|
|
401
|
+
renderOwn?: () => ReactNode
|
|
402
|
+
ownId?: string
|
|
395
403
|
}): ReactElement {
|
|
396
404
|
const tabs = useSyncExternalStore(props.hooks.tabs.subscribe, props.hooks.tabs.getSnapshot)
|
|
405
|
+
// 接管时本插件既是 owner 又是成员:自宣 dsh-family.tab 不触发自身 inject(账本恒无本卡),
|
|
406
|
+
// 故本卡作 OWN 行内联直挂、其余走账本;已在账本则去重。对齐 thinking-levels OWN_TAB_ID。
|
|
407
|
+
const ownId = props.ownId ?? '__own__'
|
|
408
|
+
const rows: readonly FamilyTabEntry[] = props.renderOwn
|
|
409
|
+
? [{ id: ownId, order: Number.NEGATIVE_INFINITY, label: ownId }, ...tabs.filter(tab => tab.id !== ownId)]
|
|
410
|
+
: tabs
|
|
397
411
|
return createElement('div', { style: { display: 'grid', gap: '12px' } },
|
|
398
|
-
...
|
|
399
|
-
props.
|
|
412
|
+
...rows.map(row => createElement('div', { key: row.id },
|
|
413
|
+
props.renderOwn && row.id === ownId
|
|
414
|
+
? props.renderOwn() as ReactElement
|
|
415
|
+
: props.renderSlot(FAMILY_CHILD_KEY, {}, { only: row.id, fallback: null }) as ReactElement,
|
|
400
416
|
)),
|
|
401
417
|
)
|
|
402
418
|
}
|