dsh-better-workspace 0.26.0 → 0.27.1
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/dsh.plugin.json +2 -2
- package/package.json +3 -3
- package/src/client.js +16 -23
- package/src/index.js +8 -15
package/dsh.plugin.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-better-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.1",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"description": "侧边栏工作区树:按官方磁盘目录嵌套(官方 workspace-tree 语义),可选按名称中的 / 分组(默认关闭,设置里开启);新会话页的工作区选择器同树。Workspace tree for the DSH sidebar workspace list, nested by official disk folders with optional \"/\"-name grouping; the New Session workspace picker shows the same tree.",
|
|
6
6
|
"engines": {
|
|
7
|
-
"dsh": ">=0.
|
|
7
|
+
"dsh": ">=0.1.6-alpha.2"
|
|
8
8
|
},
|
|
9
9
|
"contributes": {
|
|
10
10
|
"tools": [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-better-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.1",
|
|
4
4
|
"description": "侧边栏工作区树:按官方磁盘目录嵌套(官方 workspace-tree 语义),可选按名称中的 / 分组(默认关闭,设置里开启);新会话页的工作区选择器同树(同一份视图选项即时同步);添加工作区走官方目录流。Workspace tree for the DSH sidebar: disk-path nesting (official workspace-tree semantics), with optional \"/\"-name grouping (off by default), and the same tree in the New Session workspace picker; add-workspace rides the official directory flow.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=18",
|
|
22
|
-
"dsh": ">=0.1.
|
|
22
|
+
"dsh": ">=0.1.6-alpha.2"
|
|
23
23
|
},
|
|
24
24
|
"dsh": {
|
|
25
25
|
"bundle": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"license": "MIT",
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
65
|
-
"@deepseek-ai/dsh": ">=0.1.
|
|
65
|
+
"@deepseek-ai/dsh": ">=0.1.6-alpha.2",
|
|
66
66
|
"@deepseek-ai/dsh-settings": ">=0.1.0-rc.7",
|
|
67
67
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
68
68
|
},
|
package/src/client.js
CHANGED
|
@@ -10,10 +10,9 @@
|
|
|
10
10
|
* declares the sidebar.workspaces.directoryFlow child hole without
|
|
11
11
|
* occupying it, so the official composed picker (OS chooser or in-app
|
|
12
12
|
* browser, whichever the Host serves) drives the add-workspace flow.
|
|
13
|
-
* 2.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* per host era — a seat whose slot is never declared never registers.
|
|
13
|
+
* 2. plugins.bundle.config (the Plugins panel's bundle page, dsh
|
|
14
|
+
* 0.1.6-alpha.2+; keyed by package name): the settings card — the single
|
|
15
|
+
* settings seat since the host floor was raised past the old list seat.
|
|
17
16
|
*
|
|
18
17
|
* Every require below is a dsh client baseline module (see
|
|
19
18
|
* @deepseek-ai/dsh-client-web seed.ts): react, @deepseek-ai/dsh-client-store,
|
|
@@ -4177,6 +4176,11 @@ window.__ModuleLoader__.load({
|
|
|
4177
4176
|
'.bw-rail-btn{width:36px;height:36px;border:none;background:transparent;border-radius:var(--dsw-radius-sm,8px);display:grid;place-items:center;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer;padding:0}',
|
|
4178
4177
|
'.bw-rail-btn:hover{background:var(--dsw-specific-sidebar-nav-item-hover,var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.12)));color:var(--dsw-alias-label-primary,#e6e6e6)}',
|
|
4179
4178
|
'.bw-modal-body{display:flex;flex-direction:column;gap:10px;min-width:300px;max-width:380px;box-sizing:border-box}',
|
|
4179
|
+
// issue #10: Modal 高度契约 — 卡片按 Modal 的 padding box 限高,超高内容滚 contentClassName 区
|
|
4180
|
+
// (官方 RiskConfirmation 同款范式;.dialog 为 overflow:hidden,不限高则上下被裁)
|
|
4181
|
+
'.bw-custom-dialog{max-height:100%}',
|
|
4182
|
+
'.bw-custom-scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain}',
|
|
4183
|
+
'@supports (height:100dvh){.bw-custom-dialog{max-height:calc(100dvh - 48px)}}',
|
|
4180
4184
|
'.bw-field{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--dsw-alias-label-secondary,#b8b8b8)}',
|
|
4181
4185
|
'.bw-appearance{display:flex;flex-direction:column;gap:10px}',
|
|
4182
4186
|
'.bw-appearance-box{margin-top:8px;padding:10px 12px;border:1px solid var(--dsw-alias-border-l1,rgba(127,127,127,.22));border-radius:8px;background:var(--dsw-alias-bg-layer-2,rgba(127,127,127,.06))}',
|
|
@@ -5873,6 +5877,9 @@ window.__ModuleLoader__.load({
|
|
|
5873
5877
|
onClose,
|
|
5874
5878
|
closeLabel: t('close'),
|
|
5875
5879
|
title: t('custom.title'),
|
|
5880
|
+
// issue #10: 限高 + 内容滚动,窗口矮于内容时 footer 按钮仍可见可点
|
|
5881
|
+
className: 'bw-custom-dialog',
|
|
5882
|
+
contentClassName: 'bw-custom-scroll',
|
|
5876
5883
|
footer: E('div', { className: 'bw-modal-actions' },
|
|
5877
5884
|
E(BTN, { variant: 'outline', onClick: () => { onReset(); onClose() } }, t('custom.reset')),
|
|
5878
5885
|
E(BTN, { variant: 'primary', onClick: commit }, t('custom.done')),
|
|
@@ -8857,26 +8864,12 @@ window.__ModuleLoader__.load({
|
|
|
8857
8864
|
console.warn('[dsh-better-workspace] configForms wiring failed', error)
|
|
8858
8865
|
}
|
|
8859
8866
|
|
|
8860
|
-
//
|
|
8861
|
-
// served namespaces — registered host-side — and settings.plugin.item
|
|
8862
|
-
// cards). The old left-nav settings.section entry was removed: the
|
|
8863
|
-
// plugins-section card is the single settings surface now.
|
|
8864
|
-
slots.inject('settings.plugin.item', guarded(
|
|
8865
|
-
'settings.plugin.item',
|
|
8866
|
-
{
|
|
8867
|
-
name: 'settings.plugin.item',
|
|
8868
|
-
key: 'better-workspace',
|
|
8869
|
-
locale: NS,
|
|
8870
|
-
store: viewStore,
|
|
8871
|
-
},
|
|
8872
|
-
BetterWorkspacePluginCard,
|
|
8873
|
-
))
|
|
8874
|
-
|
|
8875
|
-
// dsh 0.1.6-alpha.2+ moves third-party configuration to the Plugins
|
|
8867
|
+
// dsh 0.1.6-alpha.2+ hosts third-party configuration on the Plugins
|
|
8876
8868
|
// panel's bundle page: plugins.bundle.config, keyed by PACKAGE name and
|
|
8877
|
-
// rendered with view: 'page'.
|
|
8878
|
-
//
|
|
8879
|
-
//
|
|
8869
|
+
// rendered with view: 'page'. This is the only settings seat now — the
|
|
8870
|
+
// legacy settings-list card (the pre-alpha.2 Settings → Plugins list)
|
|
8871
|
+
// went away with the raised host floor. The inject waits for the
|
|
8872
|
+
// declaration, so older hosts simply never grow this seat.
|
|
8880
8873
|
slots.inject('plugins.bundle.config', guarded(
|
|
8881
8874
|
'plugins.bundle.config',
|
|
8882
8875
|
{
|
package/src/index.js
CHANGED
|
@@ -100,26 +100,19 @@ export function apply(ctx) {
|
|
|
100
100
|
// (schema(mergeLayers(...))) — that is @deepseek-ai/schemastery's contract:
|
|
101
101
|
// its schemas are callable and fill defaults on undefined. zod objects are
|
|
102
102
|
// NOT callable, so a zod schema throws "TypeError: ... is not a function"
|
|
103
|
-
// at register(); the namespace is then never served and the
|
|
104
|
-
//
|
|
105
|
-
// dispatches our card. Both modules resolve at runtime through normal Node
|
|
103
|
+
// at register(); the namespace is then never served and the settings card
|
|
104
|
+
// never gets data. The module resolves at runtime through normal Node
|
|
106
105
|
// resolution from the plugin's own node_modules (the same static-import
|
|
107
106
|
// pattern dsh-context uses).
|
|
108
|
-
|
|
109
|
-
.then((
|
|
107
|
+
import('@deepseek-ai/schemastery')
|
|
108
|
+
.then((sm) => {
|
|
110
109
|
const settings = sctx && sctx.settings
|
|
111
110
|
if (!settings || typeof settings.register !== 'function') return
|
|
112
111
|
const Schema = sm.default
|
|
113
|
-
// dsh
|
|
114
|
-
//
|
|
115
|
-
//
|
|
116
|
-
|
|
117
|
-
// accepted by the older register() — one call, both eras. Only use the
|
|
118
|
-
// helper when the installed package still ships it.
|
|
119
|
-
const ns = typeof ds.settingsNamespace === 'function'
|
|
120
|
-
? ds.settingsNamespace('better-workspace')
|
|
121
|
-
: 'better-workspace'
|
|
122
|
-
settings.register(ns, Schema.object({
|
|
112
|
+
// register() takes a plain string since dsh 0.1.2-alpha.2 removed the
|
|
113
|
+
// settingsNamespace() helper (the helper was compile-time branding only).
|
|
114
|
+
// The 0.1.6 floor guarantees the plain-string register() is what runs.
|
|
115
|
+
settings.register('better-workspace', Schema.object({
|
|
123
116
|
// Cross-device preferences live in the HOST settings store
|
|
124
117
|
// (~/.dsh/settings.yaml): web and the desktop app share one
|
|
125
118
|
// DSH_HOME, so appearance (styling) and the two toggles follow
|