dsh-nested-workspaces 0.0.0-stage → 1.3.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 poker
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.md CHANGED
@@ -1,3 +1,123 @@
1
- # Temporary Holding Version
1
+ # dsh-nested-workspaces
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Nested child workspaces for the DeepSeek Harness sidebar.
4
+
5
+ DeepSeek Harness lists every workspace as a peer. This plugin turns that list
6
+ into a tree: a workspace can own child workspaces that live inside its directory,
7
+ sessions can be filed under any workspace, and the section title becomes yours to
8
+ name.
9
+
10
+ ## What it does
11
+
12
+ - **Editable section title.** Double-click 「工作区」 (or `Workspaces`) to rename
13
+ it, press `Enter` to keep the name and `Escape` to cancel. `Enter` or `F2` does
14
+ the same from the keyboard. The name is stored in this browser and falls back to
15
+ the built-in label when emptied.
16
+ - **Add child workspace.** Right-click a workspace (or use its `…` menu) and pick
17
+ **添加子工作区 / Add child workspace**. The dialog asks for a folder name and
18
+ creates that directory *inside* the parent workspace's directory, then registers
19
+ it as a workspace. Because the child path sits under the parent path, the tree
20
+ nests it automatically.
21
+ - **File sessions under any workspace.** Drag a session row onto a workspace
22
+ header, or drop it above/below another session to place it exactly. The `…` menu
23
+ on every session also offers **移动到工作区 / Move to workspace** with one entry
24
+ per workspace — the same change without dragging.
25
+ - **Every row keeps its affordances.** Each workspace row, child or not, has the
26
+ same `…` menu (add child, new session, rename, delete) and the same
27
+ new-session button.
28
+ - **Reorder workspaces.** Drag a workspace row above or below another row that
29
+ shares its parent: a child moves among its siblings, a root moves among the
30
+ roots, and a drag that would cross the parent boundary is refused so a child
31
+ can never be hoisted out of the workspace it belongs to. A newly created child
32
+ is anchored above its existing siblings instead of below them.
33
+ - **Last-used time.** Every session row shows how long ago it was last used
34
+ (`刚刚 / 12分钟 / 3小时 / 2天`, `now / 12min / 3h / 2d`), hover-swapped for the
35
+ row buttons exactly like the shipped browser. The full sentence (`12分钟前`)
36
+ is the tooltip.
37
+ - **Pin.** The row's pin button pins the session; pinned rows show a filled pin
38
+ glyph beside the time and sort to the top of their workspace. The session `…`
39
+ menu offers the same toggle as **置顶 / 取消置顶**.
40
+ - **Row status, like the shipped browser.** An idle session row draws nothing in
41
+ front of its title. While the session is working it shows the same rotating
42
+ ring the built-in sidebar uses; a pending approval, plan review or question
43
+ shows the amber warning dot, and an unread completion shows the green dot.
44
+ - **Nested indent.** A session row sitting inside a child workspace is indented
45
+ by the same 12px step as that child, so sessions line up under their own
46
+ workspace instead of under the root.
47
+ - **Workspace rename and delete.** Double-click a workspace title to rename it in
48
+ place; the `…` menu offers the same plus a delete confirmation. Deleting a
49
+ workspace only removes it from the sidebar — the folder and its sessions stay on
50
+ disk and the sessions reappear under *Ungrouped*.
51
+ - **Search.** The magnifier filters workspaces and sessions by title or path.
52
+ - **Archived sessions.** The archive button in the header reveals them; each
53
+ revealed row carries an unarchive button. Unarchive is otherwise unavailable
54
+ while this plugin owns the sidebar — the shipped browser's own archive view
55
+ is replaced.
56
+
57
+ ## Limits
58
+
59
+ DSH assigns a session to a workspace by comparing the session's recorded working
60
+ directory with the workspace path. A session therefore cannot be re-homed to a
61
+ workspace with a different path. Filing a session under another workspace is a
62
+ *view* assignment kept by this plugin: the row is shown under the workspace you
63
+ dropped it on, and open/fork/archive keep working, but the session's own working
64
+ directory is unchanged. New sessions you start from a child workspace do get the
65
+ child directory as their working directory, because they are created there.
66
+
67
+ This plugin replaces the shipped workspace browser (it registers the same sidebar
68
+ seat at a lower priority, which is the only way to own the section title and the
69
+ row list). A few things come with that trade:
70
+
71
+ - Workspace rows carry this plugin's own menu instead of the shipped one: rename,
72
+ delete, new session and add child workspace all live there. Entries that other
73
+ plugins contribute to the *shipped* workspace context menu are not shown here.
74
+ - Session rows carry this plugin's own pin button and resting cell (time + pin
75
+ glyph) instead of the shipped ones, and per-session archiving stays in the
76
+ session's own `…` menu, which is still the shipped menu.
77
+ - The shipped browser's child seats
78
+ (`sidebar.workspaces.directoryFlow`, `sidebar.workspaces.session.row.action`,
79
+ `sidebar.session.row.leading`, `sidebar.session.row.trailing`,
80
+ `sidebar.session.row.hover`) are not rendered on these rows, so additions other
81
+ plugins place in them will not appear inside this section. The session `…` menu
82
+ is unaffected and remains the supported extension point.
83
+ - **Add child workspace does not need the browse picker.** A Host whose composed
84
+ directory picker is the OS chooser (the `native` capability) cannot serve
85
+ `directoryPicker.createDirectory`. This bundle's Host half therefore creates the
86
+ folder itself over the Connection route `/api/nested-workspaces`. The plugin
87
+ falls back to the shipped `createDirectory` endpoint if that route cannot be
88
+ called (for example an older Host half), which on a `native`-only Host is the
89
+ error you would otherwise see.
90
+
91
+ ## Using it
92
+
93
+ Right-click any workspace in the sidebar.
94
+
95
+ | Action | Where |
96
+ | --- | --- |
97
+ | Rename the section title | double-click the 「工作区」 label |
98
+ | Add a child workspace | workspace `…` menu → 添加子工作区 |
99
+ | Reorder workspaces | drag a workspace row above or below a sibling that shares its parent |
100
+ | New session in a child | the `+` on the child's row |
101
+ | File a session under another workspace | drag the session row, or session `…` menu → 移动到工作区 |
102
+ | Rename / delete a workspace | double-click its title, or its `…` menu |
103
+ | Pin / unpin a session | the pin button on its row, or session `…` menu → 置顶 |
104
+ | See the last-used time | the resting label on its row; hover for the sentence |
105
+ | See whether a session is working | the rotating ring in front of its title |
106
+ | Show archived sessions | the archive button in the section header |
107
+
108
+ ## Languages
109
+
110
+ The interface ships Simplified Chinese, English and Japanese. Other Harness
111
+ locales fall back to English.
112
+
113
+ ## Install
114
+
115
+ ```sh
116
+ dsh plugin add dsh-nested-workspaces
117
+ ```
118
+
119
+ Restart `dsh web` after installing.
120
+
121
+ ## License
122
+
123
+ MIT