@qzsy/dsh-workspace-combobox 0.0.0-stage → 0.2.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 qzsy
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,95 @@
1
- # Temporary Holding Version
1
+ # @qzsy/dsh-workspace-combobox
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
+ Workspace combobox plus a Git branch picker for DeepSeek Harness.
4
+
5
+ ## Install
6
+
7
+ ~~~bash
8
+ dsh plugin add @qzsy/dsh-workspace-combobox@0.2.0
9
+ ~~~
10
+
11
+ ## Features
12
+
13
+ ### Workspace combobox
14
+
15
+ The dropdown above the New Session composer becomes a focused search field with
16
+ a keyboard-driven list. One mixed-script query matches workspace names and full
17
+ paths:
18
+
19
+ - Han characters: 群星
20
+ - full pinyin: qunxing
21
+ - initials: qx
22
+ - English subsequences: flut
23
+ - mixed forms: qunxing-erp, 群erp
24
+
25
+ Arrow keys move, Enter picks, Escape closes. The panel renders through a React
26
+ portal, like the shipped picker.
27
+
28
+ <code>Ctrl+.</code> (macOS: <code>⌃.</code>) opens a frame-wide workspace
29
+ switcher over any surface. The command is editable in Settings -> Keyboard
30
+ shortcuts.
31
+
32
+ ### Git branch picker
33
+
34
+ When the selected workspace is a Git repository, a branch chip appears in the
35
+ New Session hero row, to the right of the agent preset (标准模式):
36
+
37
+ - shows the current branch, or detached HEAD with the short commit
38
+ - local and remote tabs, each with a count and search
39
+ - current branch is marked
40
+ - selecting a remote branch checks it out as a tracking branch
41
+ - switching shows a spinner in the chip and an animated overlay in the panel;
42
+ all branch rows are disabled until the operation finishes
43
+ - switching never forces, resets, or discards local changes; Git's own error is
44
+ shown in the panel when the working tree is dirty
45
+ - a second switch for the same workspace is rejected while one is running
46
+
47
+ ## Where it plugs in
48
+
49
+ | Surface | Mechanism |
50
+ | --- | --- |
51
+ | New Session workspace dropdown | <code>conversation.hero.workspace</code> occupant at <code>priority: -1</code>; the slot registry renders the lowest priority, shadowing the shipped picker panel. The trigger chip, open state, <code>selectedId</code>, and <code>onPick</code> still come from the conversation owner. |
52
+ | Branch chip beside the agent preset | <code>conversation.hero.options</code> list entry <code>workspace-combobox.branch</code>, after the agent-preset seat. The selected workspace path is shared through a small client store written by the workspace picker. |
53
+ | Frame-wide switcher | <code>shell.overlay</code> entry driven by the <code>workspace.combobox</code> shortcut. |
54
+ | Host capability | Two authenticated <code>/api</code> routes registered on <code>ctx.connection.fetch</code>: <code>/api/workspace-git</code> and <code>/api/workspace-git/switch</code>. |
55
+
56
+ The browser cannot read Git state by itself, so the Host half runs <code>git</code>
57
+ through <code>execFile</code> (no shell):
58
+
59
+ - paths must be absolute directories
60
+ - when the Workspace registry is mounted, the path must be one the registry owns
61
+ - switch targets must be present in the latest local or remote listing
62
+ - branch names starting with <code>-</code> or containing whitespace are rejected
63
+ - read timeout is 10s, switch timeout is 60s
64
+ - <code>GIT_TERMINAL_PROMPT=0</code> prevents credential prompts from hanging the plugin
65
+
66
+ Remote branches are the **local remote-tracking refs** (<code>refs/remotes</code>).
67
+ The plugin does not run <code>git fetch</code>, so the list reflects the last fetch
68
+ and switching is fast and offline-safe.
69
+
70
+ ## Files
71
+
72
+ - <code>package.json</code> - bundle manifest and <code>dshBuild</code> configuration
73
+ - <code>cordis.patch.yml</code> - inserts the Host row
74
+ - <code>src/index.ts</code> - Host half: Git status/switch routes and path validation
75
+ - <code>runtime/client.js</code> - prebuilt DSH Client module: combobox, branch
76
+ picker, switcher, shortcut, and the vendored pinyin engine
77
+ - <code>locale/en.json</code>, <code>locale/zh.json</code> - Plugin Manager title and description
78
+ - <code>icon.svg</code> - original artwork
79
+ - <code>vendor/</code> - vendored text-search-engine build and license
80
+
81
+ ## Upstream
82
+
83
+ The workspace combobox is derived from the local DSH plugin
84
+ <code>dsh-workspace-combobox</code>; the original workspace search and switcher
85
+ remain MIT licensed. The Git branch picker and Host routes are community
86
+ additions.
87
+
88
+ ## Limits
89
+
90
+ - The workspace trigger chip belongs to the conversation owner and is not
91
+ replaceable; typing happens inside the opened panel.
92
+ - Remote branch lists use already-fetched remote-tracking refs, not a live
93
+ network fetch.
94
+ - The branch chip lives in the conversation hero row, so it is visible while
95
+ the new-session hero is shown.
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: workspace-combobox
3
+ name: '@qzsy/dsh-workspace-combobox'