@anionex/dsh-pinned-sessions 0.1.0 → 0.1.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 +41 -0
- package/README.md +79 -20
- package/README.zh.md +81 -22
- package/assets/hero.png +0 -0
- package/assets/pinned-session-menu.png +0 -0
- package/assets/social-preview.png +0 -0
- package/lib/client.js +534 -46
- package/lib/client.js.map +1 -1
- package/lib/types/client/index.d.ts +35 -2
- package/package.json +10 -5
- package/src/client/dsh-primitives.d.ts +51 -0
- package/src/client/index.tsx +516 -53
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.2 — 2026-10-01
|
|
4
|
+
|
|
5
|
+
- Use DSH 0.2's official session-menu slot and workspace navigation service. Keep the legacy menu bridge for older hosts, and bundle icons whose old host export names were removed.
|
|
6
|
+
- 使用 DSH 0.2 的官方会话菜单 slot 和工作区导航服务;保留旧版菜单桥接,并打包已被宿主移除旧名称的图标。
|
|
7
|
+
- The plugin's top section remains independent of the new native workspace pin action. Menu labels explicitly name the top section.
|
|
8
|
+
- 插件顶部分组与新版宿主工作区内置置顶分别保留;菜单文字明确指向顶部分组。
|
|
9
|
+
- Verified DSH `0.2.0-rc.2` on Web and the official Electron Desktop: clean tarball installation, pin, restart persistence, navigation from the pinned section, and unpin.
|
|
10
|
+
- 已在 DSH `0.2.0-rc.2` Web 及官方 Electron Desktop 实测压缩包安装、置顶、重启持久化、置顶会话导航和取消置顶。
|
|
11
|
+
|
|
12
|
+
This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html) while its public API remains pre-1.0.
|
|
13
|
+
|
|
14
|
+
## [Unreleased]
|
|
15
|
+
|
|
16
|
+
## [0.1.1] - 2026-09-04
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- A hover/focus ellipsis menu on every pinned Session row.
|
|
21
|
+
- Native Rename, Fork, Unpin, and Archive actions on Web.
|
|
22
|
+
- Optional Delete and action-failure Toasts when the Desktop Archive Manager capability is active.
|
|
23
|
+
- Keyboard menu navigation and focus handoff after a pinned row disappears.
|
|
24
|
+
- English and Chinese product visuals, setup guidance, compatibility notes, and project policies.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- Replaced the direct unpin control with the same Menu, Modal, Button, and icon primitives used by DSH.
|
|
29
|
+
- Made Desktop delete availability react to service activation and disposal.
|
|
30
|
+
|
|
31
|
+
## [0.1.0] - 2026-09-04
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- Initial Web and Desktop profile bundle.
|
|
36
|
+
- Exact Session ID capture from native menus.
|
|
37
|
+
- Local pinned-session storage and a compact Workspace-header section.
|
|
38
|
+
|
|
39
|
+
[Unreleased]: https://github.com/Anionex/dsh-pinned-sessions/compare/v0.1.1...HEAD
|
|
40
|
+
[0.1.1]: https://github.com/Anionex/dsh-pinned-sessions/compare/v0.1.0...v0.1.1
|
|
41
|
+
[0.1.0]: https://github.com/Anionex/dsh-pinned-sessions/releases/tag/v0.1.0
|
package/README.md
CHANGED
|
@@ -1,44 +1,103 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/hero.png" alt="DSH Pinned Sessions showing a pinned Session and its native action menu in the DeepSeek Harness sidebar" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# DSH Pinned Sessions
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/@anionex/dsh-pinned-sessions"><img alt="npm version" src="https://img.shields.io/npm/v/@anionex/dsh-pinned-sessions?style=flat-square"></a>
|
|
9
|
+
<a href="https://github.com/Anionex/dsh-pinned-sessions/actions/workflows/ci.yml"><img alt="CI status" src="https://img.shields.io/github/actions/workflow/status/Anionex/dsh-pinned-sessions/ci.yml?branch=main&style=flat-square&label=CI"></a>
|
|
10
|
+
<a href="LICENSE"><img alt="MIT license" src="https://img.shields.io/github/license/Anionex/dsh-pinned-sessions?style=flat-square"></a>
|
|
11
|
+
<img alt="DeepSeek Harness Web and Desktop" src="https://img.shields.io/badge/DSH-Web%20%2B%20Desktop-0F766E?style=flat-square">
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<p align="center"><strong>Pin important Sessions. Open them without searching through every Workspace.</strong></p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<strong>English</strong> · <a href="README.zh.md">简体中文</a>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
DeepSeek Harness keeps Sessions inside their original Workspaces. Once the list grows, returning to a few active Sessions takes repeated scanning. DSH Pinned Sessions adds a compact pinned section below the Workspace header while leaving every native Session row in place.
|
|
21
|
+
|
|
22
|
+
## See It in Action
|
|
23
|
+
|
|
24
|
+
<p align="center">
|
|
25
|
+
<img src="assets/pinned-session-menu.png" alt="A pinned Session at the top of the Workspace sidebar with Rename, Fork, Unpin, and Archive actions open" width="465">
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
Hover a pinned row to reveal its ellipsis menu. The Web profile shows **Rename**, **Fork session**, **Unpin from top section**, and **Archive session**. The Desktop profile also shows **Delete session** when Archive Manager provides the same action on native rows.
|
|
4
29
|
|
|
5
|
-
##
|
|
30
|
+
## Highlights
|
|
6
31
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
32
|
+
- **Reach active work from the top of the sidebar:** pinned copies stay below the Workspace header, ordered newest first.
|
|
33
|
+
- **Keep native organization intact:** the original Session remains in its Workspace.
|
|
34
|
+
- **Use familiar actions:** pinned rows use DSH Menu, Modal, Button, icon, and service APIs.
|
|
35
|
+
- **Work with exact Session identities:** pinning never guesses from a title or list position.
|
|
36
|
+
- **Stay local:** the plugin stores Session IDs and pin timestamps in browser storage. It does not read or copy conversation content.
|
|
37
|
+
- **Navigate by keyboard:** Arrow keys move through the menu, Escape returns focus, and removed rows hand focus to the next useful target.
|
|
13
38
|
|
|
14
|
-
##
|
|
39
|
+
## Quick Start
|
|
15
40
|
|
|
16
|
-
|
|
41
|
+
Install the plugin in either profile, or run both commands:
|
|
17
42
|
|
|
18
43
|
```bash
|
|
19
|
-
dsh plugin --profile web
|
|
20
|
-
dsh plugin --profile desktop
|
|
44
|
+
dsh plugin add @anionex/dsh-pinned-sessions --profile web
|
|
45
|
+
dsh plugin add @anionex/dsh-pinned-sessions --profile desktop
|
|
21
46
|
```
|
|
22
47
|
|
|
23
|
-
|
|
48
|
+
Refresh Web or restart Desktop. Open any native Session ellipsis menu and choose **Pin to top section**. The pinned copy appears below the Workspace header; use **Unpin from top section** from either menu to remove it.
|
|
24
49
|
|
|
25
|
-
|
|
50
|
+
### Requirements
|
|
51
|
+
|
|
52
|
+
- DeepSeek Harness `>=0.1.0-rc.8 <0.2.0`
|
|
53
|
+
- Node.js `^22.19.0` or `>=24.0.0`
|
|
54
|
+
- A `web` or `desktop` DSH profile
|
|
26
55
|
|
|
27
56
|
## Compatibility
|
|
28
57
|
|
|
29
|
-
|
|
58
|
+
| Profile | Pinned-row actions | Verified behavior |
|
|
59
|
+
| --- | --- | --- |
|
|
60
|
+
| Web | Rename, Fork, Unpin, Archive | Official DSH primitives and Session/Workspace services |
|
|
61
|
+
| Desktop | Rename, Fork, Unpin, Archive, optional Delete | Delete and failure Toasts appear only while Archive Manager exposes its Session deletion capability |
|
|
62
|
+
|
|
63
|
+
Existing release ranges are preserved. Version 0.1.2 adds DSH `0.2.0-rc.2` installation support and uses its official session-menu slot and workspace navigation service. The plugin's top section remains separate from native workspace pinning. Web and official Electron Desktop installation and interactions have been verified; see [CHANGELOG](CHANGELOG.md). Legacy hosts retain the stable slot/ARIA bridge.
|
|
64
|
+
|
|
65
|
+
## How It Works
|
|
66
|
+
|
|
67
|
+
1. A click in the native Session menu captures that Session's exact ID synchronously.
|
|
68
|
+
2. `PinStore` persists the ID and pin timestamp under `dsh.pinned-sessions.v1` in `localStorage`.
|
|
69
|
+
3. The `shell.overlay` mount observes `[data-slot="sidebar.workspaces"]` and portals a compact list below its header.
|
|
70
|
+
4. Pinned actions call DSH Session and Workspace services; Desktop Delete calls the optional Workspace Registry service.
|
|
30
71
|
|
|
31
|
-
|
|
72
|
+
The store keeps at most 500 unique IDs and prunes Sessions that no longer exist or have been archived.
|
|
73
|
+
|
|
74
|
+
## Data and Limitations
|
|
75
|
+
|
|
76
|
+
- Pins belong to the current DSH browser origin/profile. The plugin does not sync them between machines.
|
|
77
|
+
- The plugin stores only Session IDs and `pinnedAt` timestamps in `localStorage`.
|
|
78
|
+
- Pinned rows duplicate native rows by design; they do not move or remove the originals.
|
|
79
|
+
- Delete stays hidden unless the Desktop deletion provider is active.
|
|
80
|
+
- DSH client APIs change across prereleases; use the exact tested release verdicts in the package compatibility metadata.
|
|
32
81
|
|
|
33
82
|
## Development
|
|
34
83
|
|
|
35
84
|
```bash
|
|
36
|
-
|
|
85
|
+
git clone https://github.com/Anionex/dsh-pinned-sessions.git
|
|
86
|
+
cd dsh-pinned-sessions
|
|
87
|
+
corepack enable
|
|
88
|
+
pnpm install --frozen-lockfile
|
|
37
89
|
pnpm run check
|
|
38
90
|
```
|
|
39
91
|
|
|
40
|
-
|
|
92
|
+
`pnpm run check` type-checks both targets, rebuilds the distributable client, runs the Vitest and package-layout suites, and performs an npm pack dry run.
|
|
93
|
+
|
|
94
|
+
## Community
|
|
41
95
|
|
|
42
|
-
|
|
96
|
+
- Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request.
|
|
97
|
+
- Report vulnerabilities through the process in [SECURITY.md](SECURITY.md).
|
|
98
|
+
- Use [SUPPORT.md](SUPPORT.md) to choose the right issue path.
|
|
99
|
+
- Review release history in [CHANGELOG.md](CHANGELOG.md).
|
|
100
|
+
- Read [FUNDING.md](FUNDING.md) before sponsoring maintenance.
|
|
101
|
+
- Follow the [Code of Conduct](CODE_OF_CONDUCT.md) in project spaces.
|
|
43
102
|
|
|
44
|
-
MIT
|
|
103
|
+
Released under the [MIT License](LICENSE).
|
package/README.zh.md
CHANGED
|
@@ -1,44 +1,103 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/hero.png" alt="DeepSeek Harness 侧栏中显示置顶会话及其原生操作菜单" width="100%">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
# DSH Pinned Sessions
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/@anionex/dsh-pinned-sessions"><img alt="npm 版本" src="https://img.shields.io/npm/v/@anionex/dsh-pinned-sessions?style=flat-square"></a>
|
|
9
|
+
<a href="https://github.com/Anionex/dsh-pinned-sessions/actions/workflows/ci.yml"><img alt="CI 状态" src="https://img.shields.io/github/actions/workflow/status/Anionex/dsh-pinned-sessions/ci.yml?branch=main&style=flat-square&label=CI"></a>
|
|
10
|
+
<a href="LICENSE"><img alt="MIT 许可证" src="https://img.shields.io/github/license/Anionex/dsh-pinned-sessions?style=flat-square"></a>
|
|
11
|
+
<img alt="支持 DeepSeek Harness Web 和 Desktop" src="https://img.shields.io/badge/DSH-Web%20%2B%20Desktop-0F766E?style=flat-square">
|
|
12
|
+
</p>
|
|
6
13
|
|
|
7
|
-
|
|
8
|
-
- 在原生工作区树上方显示紧凑的置顶会话列表。
|
|
9
|
-
- 点击置顶项时通过 DSH 官方 Session 服务打开会话。
|
|
10
|
-
- 原会话仍保留在原工作区中,搜索、分组、拖拽排序、分叉、重命名和归档全部保持原样。
|
|
11
|
-
- 使用带版本号的浏览器 profile 存储;DSH 数据就绪后自动移除已归档或已消失的条目。
|
|
12
|
-
- 同时支持 DSH `web` profile 和 DSH Desktop 内嵌的 Web 客户端。
|
|
14
|
+
<p align="center"><strong>置顶重要会话,不必再从每个工作区里反复查找。</strong></p>
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="README.md">English</a> · <strong>简体中文</strong>
|
|
18
|
+
</p>
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
DeepSeek Harness 会把 Session 保留在原工作区中。会话增多后,返回少数活跃 Session 需要反复扫描列表。DSH Pinned Sessions 在工作区标题下增加一块紧凑的置顶区,同时保留每条原生 Session 行。
|
|
21
|
+
|
|
22
|
+
## 实际效果
|
|
23
|
+
|
|
24
|
+
<p align="center">
|
|
25
|
+
<img src="assets/pinned-session-menu.png" alt="工作区侧栏顶部的一条置顶会话,已打开重命名、分叉、取消置顶和归档操作" width="465">
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
悬浮置顶行即可显示三点菜单。Web profile 提供**重命名**、**分叉会话**、**从顶部分组取消置顶**和**归档会话**。Desktop profile 在 Archive Manager 为原生会话提供删除能力时,还会显示**删除会话**。
|
|
29
|
+
|
|
30
|
+
## 主要能力
|
|
31
|
+
|
|
32
|
+
- **从侧栏顶部直接返回活跃任务:**置顶副本位于工作区标题下,按最近置顶排序。
|
|
33
|
+
- **保留原有工作区结构:**原生 Session 不会被移动或删除。
|
|
34
|
+
- **沿用熟悉的操作:**置顶行使用 DSH 的 Menu、Modal、Button、图标和服务 API。
|
|
35
|
+
- **绑定准确的 Session ID:**插件不会根据标题或列表位置猜测会话。
|
|
36
|
+
- **数据留在本机:**插件只保存 Session ID 和置顶时间,不读取或复制对话内容。
|
|
37
|
+
- **支持键盘操作:**方向键可切换菜单项,Escape 会归还焦点,删除行后焦点会落到下一个有效目标。
|
|
38
|
+
|
|
39
|
+
## 快速开始
|
|
40
|
+
|
|
41
|
+
按需安装到一个 profile,也可以执行两条命令:
|
|
17
42
|
|
|
18
43
|
```bash
|
|
19
|
-
dsh plugin --profile web
|
|
20
|
-
dsh plugin --profile desktop
|
|
44
|
+
dsh plugin add @anionex/dsh-pinned-sessions --profile web
|
|
45
|
+
dsh plugin add @anionex/dsh-pinned-sessions --profile desktop
|
|
21
46
|
```
|
|
22
47
|
|
|
23
|
-
|
|
48
|
+
刷新 Web 或重启 Desktop。打开任意原生 Session 的三点菜单,选择**置顶到顶部分组**。置顶副本会出现在工作区标题下;从任意一侧菜单选择**从顶部分组取消置顶**即可移除。
|
|
24
49
|
|
|
25
|
-
|
|
50
|
+
### 环境要求
|
|
26
51
|
|
|
27
|
-
|
|
52
|
+
- DeepSeek Harness `>=0.1.0-rc.8 <0.2.0`
|
|
53
|
+
- Node.js `^22.19.0` 或 `>=24.0.0`
|
|
54
|
+
- `web` 或 `desktop` DSH profile
|
|
28
55
|
|
|
29
|
-
|
|
56
|
+
## 兼容性
|
|
30
57
|
|
|
31
|
-
|
|
58
|
+
| Profile | 置顶行操作 | 已验证行为 |
|
|
59
|
+
| --- | --- | --- |
|
|
60
|
+
| Web | 重命名、分叉、取消置顶、归档 | 使用 DSH 官方组件和 Session/Workspace 服务 |
|
|
61
|
+
| Desktop | 重命名、分叉、取消置顶、归档、可选删除 | 仅在 Archive Manager 暴露删除能力时显示删除和失败 Toast |
|
|
62
|
+
|
|
63
|
+
保留既有版本范围。0.1.2 版 增加 DSH `0.2.0-rc.2` 安装支持,使用其官方会话菜单 slot 和工作区导航服务。插件顶部分组与宿主工作区内置置顶分别保留。已通过 Web 及官方 Electron Desktop 安装与交互验收,见 [CHANGELOG](CHANGELOG.md)。旧版宿主继续使用稳定的 slot/ARIA 桥接。
|
|
64
|
+
|
|
65
|
+
## 工作原理
|
|
66
|
+
|
|
67
|
+
1. 用户点击原生 Session 菜单时,插件同步捕获该 Session 的准确 ID。
|
|
68
|
+
2. `PinStore` 把 ID 和置顶时间写入 `localStorage` 的 `dsh.pinned-sessions.v1`。
|
|
69
|
+
3. `shell.overlay` 挂载点观察 `[data-slot="sidebar.workspaces"]`,并把紧凑列表 portal 到标题下方。
|
|
70
|
+
4. 置顶行通过 DSH Session 和 Workspace 服务执行操作;Desktop 删除使用可选的 Workspace Registry 服务。
|
|
71
|
+
|
|
72
|
+
存储层最多保留 500 个唯一 ID,并自动清理已不存在或已归档的 Session。
|
|
73
|
+
|
|
74
|
+
## 数据与限制
|
|
75
|
+
|
|
76
|
+
- 置顶状态属于当前 DSH 浏览器源/profile,不会跨设备同步。
|
|
77
|
+
- 插件只在 `localStorage` 中保存 Session ID 和 `pinnedAt` 时间戳。
|
|
78
|
+
- 置顶行是原生行的快捷副本,不会移动或删除原位置。
|
|
79
|
+
- Desktop 删除能力未加载时,删除菜单项保持隐藏。
|
|
80
|
+
- DSH 客户端 API 会随预发布版本变化;请以包兼容元数据中明确实测的版本结论为准。
|
|
32
81
|
|
|
33
82
|
## 开发
|
|
34
83
|
|
|
35
84
|
```bash
|
|
36
|
-
|
|
85
|
+
git clone https://github.com/Anionex/dsh-pinned-sessions.git
|
|
86
|
+
cd dsh-pinned-sessions
|
|
87
|
+
corepack enable
|
|
88
|
+
pnpm install --frozen-lockfile
|
|
37
89
|
pnpm run check
|
|
38
90
|
```
|
|
39
91
|
|
|
40
|
-
|
|
92
|
+
`pnpm run check` 会检查两个目标的类型、重建可分发客户端、运行 Vitest 和包布局测试,并执行 npm 打包预检。
|
|
93
|
+
|
|
94
|
+
## 社区
|
|
41
95
|
|
|
42
|
-
|
|
96
|
+
- 提交 Pull Request 前请阅读 [CONTRIBUTING.md](CONTRIBUTING.md)。
|
|
97
|
+
- 安全问题按 [SECURITY.md](SECURITY.md) 中的私密渠道报告。
|
|
98
|
+
- [SUPPORT.md](SUPPORT.md) 说明了不同问题应使用的入口。
|
|
99
|
+
- [CHANGELOG.md](CHANGELOG.md) 记录每个版本的变化。
|
|
100
|
+
- 赞助维护工作前请阅读 [FUNDING.md](FUNDING.md)。
|
|
101
|
+
- 参与项目空间时请遵守 [行为准则](CODE_OF_CONDUCT.md)。
|
|
43
102
|
|
|
44
|
-
MIT
|
|
103
|
+
项目采用 [MIT License](LICENSE)。
|
package/assets/hero.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|