dsh-sidebar-view 0.0.0-stage → 1.0.0
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/LICENSE +21 -0
- package/README.en.md +125 -0
- package/README.md +123 -2
- package/client.js +4661 -0
- package/cordis.patch.yml +12 -0
- package/index.js +13 -0
- package/package.json +83 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Garin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.en.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# dsh-sidebar-view
|
|
2
|
+
|
|
3
|
+
[简体中文](README.md) | English
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-sidebar-view)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://github.com/deepseek-ai)
|
|
8
|
+
|
|
9
|
+
**Two things the DeepSeek Harness session list does not have: grouping by time, and filtering by status.**
|
|
10
|
+
|
|
11
|
+
When five or six sessions are open and you come back the next day, the shipped sidebar only stacks them by workspace, so you scroll until you recognize "the one that touched CI yesterday". This plugin adds a fourth grouping mode, by time, and a row of status tabs with live counts — pinned, today, yesterday, this week, earlier — so you can see what is running and what finished while you were away.
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
*① The new “By time” entry in View options ② Pinned → Today → Yesterday → This week, each header with a count and collapse ③ One list across projects, with the workspace name on every row*
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
- **Group by time**: a fourth entry in View options. Buckets are `Pinned → Today → Yesterday → This week (from Monday) → Earlier`; empty buckets disappear, and each header shows its count and collapses on click.
|
|
20
|
+
- **Flat across projects**: the time view ignores workspace boundaries, so sessions from every project share one timeline. Each row ends with its workspace name (`atlas-web`, `infra`, …) so you know where it came from without opening it.
|
|
21
|
+
- **Status tabs**: `All / Running / Awaiting / Unread` with live counts, sitting right under the section title. They apply to all four grouping modes (by workspace, workspace tree, one list, by time); groups and buckets that end up empty disappear.
|
|
22
|
+
- **Drag inside a bucket**: reorder rows in the time view, but only within the same bucket — dropping across buckets does nothing, because the bucket itself is decided by the last update time. The result is written back to the global manual order, so the one-list view reorders too.
|
|
23
|
+
- **Everything native still works**: search (local + host), context menus, rename, fork, pin, archive, manual sort, "show N more", add workspace, workspace menus, shortcuts, the collapsed 56 px rail — all delegated to the shipped implementation. The plugin only adds.
|
|
24
|
+
|
|
25
|
+
## What it solves
|
|
26
|
+
|
|
27
|
+
The shipped View options already covers by workspace, workspace tree, one list (flat), and hide-archived. What is missing is the time and status dimensions:
|
|
28
|
+
|
|
29
|
+
| Want | Shipped 0.2.2-rc.3 | This plugin |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| Flat across projects | One list | Kept, plus a workspace name per row |
|
|
32
|
+
| Today / yesterday / this week | None | By time (fourth grouping mode) |
|
|
33
|
+
| All / running / awaiting / unread | None (archive filter only) | Status tabs with counts |
|
|
34
|
+
| Group by workspace | Yes | Kept |
|
|
35
|
+
| Pinned first | Yes | Kept, and its own bucket in the time view |
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# From npm
|
|
41
|
+
dsh plugin --profile web add dsh-sidebar-view
|
|
42
|
+
|
|
43
|
+
# From GitHub (the repo ships the built client.js, no local build needed)
|
|
44
|
+
dsh plugin --profile web add git+https://github.com/GarinZ/dsh-sidebar-view.git
|
|
45
|
+
|
|
46
|
+
# Local development
|
|
47
|
+
dsh plugin --profile web add link:/path/to/dsh-sidebar-view
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Restart the app to take effect. Uninstall:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
dsh plugin --profile web remove dsh-sidebar-view
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The plugin never patches shipped files and never writes user data; remove it and the sidebar is exactly the shipped one again.
|
|
57
|
+
|
|
58
|
+
> The desktop app runs the `desktop` profile (managed by Electron, so `--dump-config` is unavailable).
|
|
59
|
+
> To install there, replace `web` with `desktop` above, then quit and reopen the app.
|
|
60
|
+
|
|
61
|
+
## Compatibility
|
|
62
|
+
|
|
63
|
+
| Environment | Status |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| DeepSeek Harness `0.2.2-rc.3` · macOS desktop (`desktop` profile) | Verified |
|
|
66
|
+
| DeepSeek Harness `0.2.2-rc.3` · browser / `web` profile | Verified |
|
|
67
|
+
| Clean isolated profile with only this plugin | Verified: boots cleanly |
|
|
68
|
+
| DSH `0.3.x` | Untested; the port needs realigning with the new `dsh-client-ui-workspace` |
|
|
69
|
+
|
|
70
|
+
## Usage
|
|
71
|
+
|
|
72
|
+
Open **View options** (the slider icon at the top right of the sidebar):
|
|
73
|
+
|
|
74
|
+
- pick **By time** under Grouping;
|
|
75
|
+
- click **All / Running / Awaiting / Unread** under the title to filter;
|
|
76
|
+
- click a bucket header to collapse it; drag rows to reorder inside a bucket.
|
|
77
|
+
|
|
78
|
+
Status meanings:
|
|
79
|
+
|
|
80
|
+
- **Running**: the session is working (including a running subagent);
|
|
81
|
+
- **Awaiting**: a tool call is waiting for your confirmation;
|
|
82
|
+
- **Unread**: the turn finished in the background and you have not opened it yet — this is the shipped `completionUnread` flag, and it resets on reload.
|
|
83
|
+
|
|
84
|
+
The incremental state lives in `localStorage["dsh.workspace.view.sidebar-view.v1"]`; the shipped
|
|
85
|
+
`dsh.workspace.view.v5` key stays owned by the shipped store. Delete both to reset.
|
|
86
|
+
|
|
87
|
+
## How it works: seated on the shipped component, not replacing it
|
|
88
|
+
|
|
89
|
+
The whole "sessions / workspaces" area is one component registered on the single
|
|
90
|
+
`sidebar.workspaces` slot. This plugin does **not** disable
|
|
91
|
+
`@deepseek-ai/dsh-client-ui-workspace` and does not register any service:
|
|
92
|
+
|
|
93
|
+
1. after the shipped plugin registers, wrap that entry's `component` in an error boundary;
|
|
94
|
+
2. the wrapper reads the shipped store snapshot, overlays two fields (`statusFilter`, bucket
|
|
95
|
+
collapse state), and passes the shipped props (including `renderSlot`) to the ported browser component;
|
|
96
|
+
3. if the wrapper throws, the boundary renders the shipped component; if the bundle never loads,
|
|
97
|
+
the shipped component was never touched.
|
|
98
|
+
|
|
99
|
+
Row decorations and row actions injected by other plugins keep working, and the worst case is
|
|
100
|
+
"the new features are missing", not "the client cannot boot".
|
|
101
|
+
|
|
102
|
+
## Limitations
|
|
103
|
+
|
|
104
|
+
- Relies on an undocumented internal contract of `0.2.2-rc.3` (`StoredEntry.component` is replaceable). If upstream changes it, the plugin goes inert instead of crashing.
|
|
105
|
+
- Drag only reorders inside a bucket: a bucket is decided by update time, so there is no valid cross-bucket target.
|
|
106
|
+
- The workspace chip takes about 72 px, so long titles truncate earlier than in the shipped UI.
|
|
107
|
+
- In a pure `web` profile the "add workspace" popover needs `dsh-client-ui-directory-picker-browse`; it works in the desktop app.
|
|
108
|
+
|
|
109
|
+
## Development
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npm install
|
|
113
|
+
node build.mjs # writes client.js (~220 KB, CSS inlined)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The build assembles the bundle in memory, smoke-tests it in `node:vm` (asserting that
|
|
117
|
+
`__ModuleLoader__.load` registers this package), then writes a temp file and `rename`s it into
|
|
118
|
+
place, so the host watcher can never read a half-written bundle.
|
|
119
|
+
|
|
120
|
+
The port lives in `src/browser/` (forked from the client sources of
|
|
121
|
+
`dsh-client-ui-workspace`); the incremental edits are commented in `src/browser/tree.ts`,
|
|
122
|
+
`stores.ts`, `locales.ts`, `rows/Rows.tsx` and `rows/WorkspaceBrowser.tsx`. On a DSH upgrade,
|
|
123
|
+
re-copy `src/browser/` from the new sources and re-apply those edits.
|
|
124
|
+
|
|
125
|
+
MIT License
|
package/README.md
CHANGED
|
@@ -1,3 +1,124 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-sidebar-view
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
简体中文 | [English](README.en.md)
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-sidebar-view)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://github.com/deepseek-ai)
|
|
8
|
+
|
|
9
|
+
**给 DeepSeek Harness 的会话列表加两件原生没有的事:按时间分组,按状态筛选。**
|
|
10
|
+
|
|
11
|
+
同时开五六个会话、隔天再回来的时候,原生侧栏只按工作区堆着,你得自己一行行找回「昨天那个改 CI 的」。
|
|
12
|
+
这个插件给侧栏加一种「按时间」的分组方式,以及一排带计数的状态 Tab——置顶、今天、昨天、本周、更早,
|
|
13
|
+
一眼看到哪个在跑、哪个跑完了还没看。
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
*① 视图选项里多出的「按时间」 ② 置顶 → 今天 → 昨天 → 本周,桶头带行数与折叠 ③ 单列表跨项目平铺,行尾标出工作区*
|
|
18
|
+
|
|
19
|
+
## 功能
|
|
20
|
+
|
|
21
|
+
- **按时间分组**:视图选项里多出第四种分组「按时间」。范围是 `置顶 → 今天 → 昨天 → 本周(周一起算)→ 更早`,空桶自动隐藏;桶头带行数与折叠三角,可以整段收起。
|
|
22
|
+
- **跨项目平铺**:时间视图不看工作区边界,所有项目的会话混在一条时间轴上,行尾标出所属工作区(`atlas-web`、`infra`……),不用点开就知道来自哪个项目。
|
|
23
|
+
- **状态 Tab**:标题下面一排 `全部 / 运行中 / 待确认 / 待查看`,带实时计数。四种分组方式(按工作区 / 按工作区树 / 单列表 / 按时间)都生效,过滤后为空的组和桶自动消失。
|
|
24
|
+
- **桶内拖拽**:时间视图里可以拖动排序,但只在同一个桶内生效——跨桶松手不会改序,因为桶本身由最后更新时间决定。落点写回全局手动顺序,单列表视图的顺序同步变化。
|
|
25
|
+
- **原生行为一个不少**:搜索(本地 + 宿主)、右键菜单、重命名、分叉、置顶、归档、手动排序、展开其余 N 个、添加工作区、工作区菜单、快捷键、收起 56px rail,全部沿用原生实现,插件只加不减。
|
|
26
|
+
|
|
27
|
+
## 它解决什么
|
|
28
|
+
|
|
29
|
+
原生的「视图选项」已经有三件事:按工作区、按工作区树、单列表(平铺),以及隐藏已归档。
|
|
30
|
+
缺的是时间维度和状态维度:
|
|
31
|
+
|
|
32
|
+
| 想要 | 原生 0.2.2-rc.3 | 本插件 |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| 跨项目平铺 | 单列表 | 保留,且行尾补上工作区名 |
|
|
35
|
+
| 今天 / 昨天 / 本周分组 | 无 | 按时间(第四种分组) |
|
|
36
|
+
| 全部 / 运行中 / 待确认 / 待查看 | 无(只有归档筛选) | 状态 Tab,带计数 |
|
|
37
|
+
| 按工作区分组 | 有 | 保留 |
|
|
38
|
+
| 置顶置前 | 有 | 保留,并在时间视图里单独成桶 |
|
|
39
|
+
|
|
40
|
+
## 安装
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# 从 npm 安装
|
|
44
|
+
dsh plugin --profile web add dsh-sidebar-view
|
|
45
|
+
|
|
46
|
+
# 从 GitHub 安装(仓库里带了构建好的 client.js,无需本地构建)
|
|
47
|
+
dsh plugin --profile web add git+https://github.com/GarinZ/dsh-sidebar-view.git
|
|
48
|
+
|
|
49
|
+
# 本地开发
|
|
50
|
+
dsh plugin --profile web add link:/path/to/dsh-sidebar-view
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
装完重启应用生效。卸载:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
dsh plugin --profile web remove dsh-sidebar-view
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
插件不改任何原生文件、不写用户数据;卸载后侧栏立刻回到原生样子。
|
|
60
|
+
|
|
61
|
+
> 真实桌面应用用的是 `desktop` profile(由 Electron 管理,不能 `--dump-config`)。
|
|
62
|
+
> 装进桌面版就把上面的 `web` 换成 `desktop`,装完退出应用再打开。
|
|
63
|
+
|
|
64
|
+
## 兼容性
|
|
65
|
+
|
|
66
|
+
| 环境 | 状态 |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| DeepSeek Harness `0.2.2-rc.3` · macOS Desktop(`desktop` profile) | 已验证 |
|
|
69
|
+
| DeepSeek Harness `0.2.2-rc.3` · 浏览器 / `web` profile | 已验证 |
|
|
70
|
+
| 隔离的干净 profile(只装本插件) | 已验证:启动无报错 |
|
|
71
|
+
| DSH `0.3.x` | 未验证,需要按新版 `dsh-client-ui-workspace` 重新对齐移植层 |
|
|
72
|
+
|
|
73
|
+
## 使用
|
|
74
|
+
|
|
75
|
+
打开侧栏右上角的**视图选项**(滑杆图标):
|
|
76
|
+
|
|
77
|
+
- 「分组方式」里选 **按时间**;
|
|
78
|
+
- 想看某一个状态,点标题下方的 **全部 / 运行中 / 待确认 / 待查看**;
|
|
79
|
+
- 时间视图的桶头点一下可以收起整段;拖动行只在同一桶内换序。
|
|
80
|
+
|
|
81
|
+
状态含义:
|
|
82
|
+
|
|
83
|
+
- **运行中**:会话正在跑(含正在跑子智能体);
|
|
84
|
+
- **待确认**:有工具调用在等你的确认;
|
|
85
|
+
- **待查看**:这一轮在后台跑完、你还没打开过(沿用原生 `completionUnread`,刷新页面会清空)。
|
|
86
|
+
|
|
87
|
+
增量状态存在 `localStorage["dsh.workspace.view.sidebar-view.v1"]`,原生 key
|
|
88
|
+
`dsh.workspace.view.v5` 由原生 store 独占。想彻底重置,把这两个 key 一起删掉即可。
|
|
89
|
+
|
|
90
|
+
## 实现方式:坐在原生组件上,而不是接管它
|
|
91
|
+
|
|
92
|
+
侧栏「会话 / 工作区」整块是同一个组件,注册在 `sidebar.workspaces` 这个 single 槽位上。
|
|
93
|
+
本插件**不禁用** `@deepseek-ai/dsh-client-ui-workspace`,也不注册任何服务:
|
|
94
|
+
|
|
95
|
+
1. 等它注册完,把该条目的 `component` 包进自己的错误边界;
|
|
96
|
+
2. 外壳读原生 store 快照,叠加两个增量字段(`statusFilter`、时间桶折叠状态),
|
|
97
|
+
再把原生 props(含 `renderSlot`)传给移植过的浏览器组件;
|
|
98
|
+
3. 组件抛错时,错误边界直接渲染原生组件;bundle 没加载时,原生组件根本没被动过。
|
|
99
|
+
|
|
100
|
+
所以第三方往行首/行尾注入的装饰、行操作按钮、目录选择器都照常工作,
|
|
101
|
+
最坏情况是「没有新功能」,而不是「客户端起不来」。
|
|
102
|
+
|
|
103
|
+
## 已知限制
|
|
104
|
+
|
|
105
|
+
- 依赖 `0.2.2-rc.3` 的未文档化内部契约(`StoredEntry.component` 可替换)。上游一旦改动,插件会「不生效」而不是崩溃。
|
|
106
|
+
- 时间视图的拖拽只作用于同一桶内:桶由更新时间决定,跨桶没有可写的目标位置。
|
|
107
|
+
- 行尾工作区 chip 占约 72px,长标题会比原生更早截断。
|
|
108
|
+
- 纯 `web` profile 下「添加工作区」的浮层需要 `dsh-client-ui-directory-picker-browse`,桌面应用里正常。
|
|
109
|
+
|
|
110
|
+
## 开发
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npm install
|
|
114
|
+
node build.mjs # 产出 client.js(约 220 KB,内含 CSS)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
构建先在内存里拼产物,用 `node:vm` 跑一遍冒烟测试(断言 `__ModuleLoader__.load` 注册了本包),
|
|
118
|
+
再写临时文件并 `rename` 原子替换——避免宿主 watcher 读到写了一半的文件。
|
|
119
|
+
|
|
120
|
+
移植层在 `src/browser/`(fork 自 `dsh-client-ui-workspace` 的 client 源码),
|
|
121
|
+
增量改动的坐标写在 `src/browser/tree.ts`、`stores.ts`、`locales.ts`、`rows/Rows.tsx`、
|
|
122
|
+
`rows/WorkspaceBrowser.tsx` 的注释里。DSH 升级后按新版源码重新覆盖 `src/browser/` 再贴回增量。
|
|
123
|
+
|
|
124
|
+
MIT License
|