@qzsy/dsh-workspace-combobox 0.2.2 → 0.2.3
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.md +5 -5
- package/dist/client.js +12 -7
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Workspace combobox plus a Git branch picker for DeepSeek Harness.
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
~~~bash
|
|
8
|
-
dsh plugin add @qzsy/dsh-workspace-combobox@0.2.
|
|
8
|
+
dsh plugin add @qzsy/dsh-workspace-combobox@0.2.3
|
|
9
9
|
~~~
|
|
10
10
|
|
|
11
11
|
## Features
|
|
@@ -32,7 +32,7 @@ shortcuts.
|
|
|
32
32
|
### Git branch picker
|
|
33
33
|
|
|
34
34
|
When the selected workspace is a Git repository, a branch chip appears in the
|
|
35
|
-
New Session hero row,
|
|
35
|
+
New Session hero row, immediately beside the workspace chip (like Cursor):
|
|
36
36
|
|
|
37
37
|
- shows the current branch, or detached HEAD with the short commit
|
|
38
38
|
- local and remote tabs, each with a count and search
|
|
@@ -49,7 +49,7 @@ New Session hero row, to the right of the agent preset (标准模式):
|
|
|
49
49
|
| Surface | Mechanism |
|
|
50
50
|
| --- | --- |
|
|
51
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
|
|
52
|
+
| Branch chip beside the workspace trigger | Rendered from the same <code>conversation.hero.workspace</code> slot, directly after the shipped workspace chip; the selected path comes from the slot's <code>selectedId</code>. |
|
|
53
53
|
| Frame-wide switcher | <code>shell.overlay</code> entry driven by the <code>workspace.combobox</code> shortcut. |
|
|
54
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
55
|
|
|
@@ -91,5 +91,5 @@ additions.
|
|
|
91
91
|
replaceable; typing happens inside the opened panel.
|
|
92
92
|
- Remote branch lists use already-fetched remote-tracking refs, not a live
|
|
93
93
|
network fetch.
|
|
94
|
-
- The branch chip lives
|
|
95
|
-
the new-session hero is shown.
|
|
94
|
+
- The branch chip lives beside the workspace trigger in the conversation hero
|
|
95
|
+
row, so it is visible while the new-session hero is shown.
|
package/dist/client.js
CHANGED
|
@@ -810,12 +810,17 @@ window.__ModuleLoader__.load({
|
|
|
810
810
|
const button = buttonRef.current;
|
|
811
811
|
if (button === null) return;
|
|
812
812
|
const rect = button.getBoundingClientRect();
|
|
813
|
-
const
|
|
814
|
-
const
|
|
815
|
-
const
|
|
816
|
-
const
|
|
817
|
-
const
|
|
818
|
-
|
|
813
|
+
const margin = 8;
|
|
814
|
+
const gap = 6;
|
|
815
|
+
const width = Math.max(280, Math.min(360, window.innerWidth - margin * 2));
|
|
816
|
+
const left = Math.max(margin, Math.min(rect.left, window.innerWidth - width - margin));
|
|
817
|
+
const below = rect.bottom + gap;
|
|
818
|
+
const spaceBelow = window.innerHeight - below - margin;
|
|
819
|
+
const spaceAbove = rect.top - gap - margin;
|
|
820
|
+
const placeAbove = spaceBelow < 220 && spaceAbove > spaceBelow;
|
|
821
|
+
const maxHeight = Math.max(120, Math.min(420, placeAbove ? spaceAbove : spaceBelow));
|
|
822
|
+
const top = placeAbove ? Math.max(margin, rect.top - gap - maxHeight) : below;
|
|
823
|
+
setPosition({ left, top, width, maxHeight });
|
|
819
824
|
};
|
|
820
825
|
update();
|
|
821
826
|
window.addEventListener('resize', update);
|
|
@@ -898,7 +903,7 @@ window.__ModuleLoader__.load({
|
|
|
898
903
|
className: 'wsc-branch-menu',
|
|
899
904
|
role: 'dialog',
|
|
900
905
|
'aria-label': t('branch.title'),
|
|
901
|
-
style: position === null ? { visibility: 'hidden' } : { left: position.left + 'px', top: position.top + 'px', width: position.width + 'px' }
|
|
906
|
+
style: position === null ? { visibility: 'hidden' } : { left: position.left + 'px', top: position.top + 'px', width: position.width + 'px', maxHeight: position.maxHeight + 'px' }
|
|
902
907
|
},
|
|
903
908
|
h('div', { className: 'wsc-branch-head' },
|
|
904
909
|
h('span', { className: 'wsc-branch-headIcon' }, loading ? h('span', { className: 'wsc-spinner' }) : h(GitBranchIcon, null)),
|
package/locale/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Workspace Combobox",
|
|
4
|
-
"description": "Turns the New Session workspace picker into a combobox with mixed Chinese/English pinyin search, adds a Git branch picker beside the
|
|
4
|
+
"description": "Turns the New Session workspace picker into a combobox with mixed Chinese/English pinyin search, adds a Git branch picker beside the workspace chip with local/remote search and a visible switching state, and opens a frame-wide workspace switcher with Ctrl+."
|
|
5
5
|
}
|
|
6
6
|
}
|
package/locale/zh.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "工作区组合框",
|
|
4
|
-
"description": "把新会话的工作区选择器换成支持中英混拼(汉字 / 全拼 /
|
|
4
|
+
"description": "把新会话的工作区选择器换成支持中英混拼(汉字 / 全拼 / 首字母)检索的组合框,并在工作区选择器旁边显示 Git 分支选择器;支持本地/远程分支搜索与带加载状态的快速切换,Ctrl+. 随时打开全局工作区切换器。"
|
|
5
5
|
}
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qzsy/dsh-workspace-combobox",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Pinyin-aware workspace combobox for the New Session picker, plus a Git branch picker with local/remote branch switching and a Ctrl+. frame-wide workspace switcher.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|