dsh-better-workspace 0.21.0 → 0.21.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 +1 -1
- package/package.json +10 -1
- package/src/client.js +14 -2
- package/src/index.js +38 -10
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-better-workspace",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.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.",
|
|
6
6
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-better-workspace",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.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); add-workspace rides the official directory flow.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -62,9 +62,18 @@
|
|
|
62
62
|
"license": "MIT",
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
65
|
+
"@deepseek-ai/dsh": ">=0.1.0",
|
|
65
66
|
"@deepseek-ai/dsh-settings": ">=0.1.0-rc.7",
|
|
66
67
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
67
68
|
},
|
|
69
|
+
"peerDependenciesMeta": {
|
|
70
|
+
"@deepseek-ai/dsh": {
|
|
71
|
+
"optional": true
|
|
72
|
+
},
|
|
73
|
+
"@deepseek-ai/dsh-settings": {
|
|
74
|
+
"optional": true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
68
77
|
"homepage": "https://github.com/KannaKuron/dsh-better-workspace",
|
|
69
78
|
"bugs": {
|
|
70
79
|
"url": "https://github.com/KannaKuron/dsh-better-workspace/issues"
|
package/src/client.js
CHANGED
|
@@ -4908,6 +4908,9 @@ window.__ModuleLoader__.load({
|
|
|
4908
4908
|
'IconCompareSplitOutlineRegular', 'IconPluginPinwheelOutlineRegular',
|
|
4909
4909
|
'IconMicrophoneOutlineRegular', 'IconSendOutlineRegular',
|
|
4910
4910
|
'IconTreeCornerRegular', 'IconDeliverDocRegular', 'IconWrapFillRegular',
|
|
4911
|
+
// dsh 0.1.7-rc.1 added the users pair (agent-team / subagent surfaces);
|
|
4912
|
+
// committed here first and filtered on hosts that lack them.
|
|
4913
|
+
'IconUsersOutlineRegular', 'IconUsersOutlineMedium',
|
|
4911
4914
|
]
|
|
4912
4915
|
|
|
4913
4916
|
/**
|
|
@@ -7484,8 +7487,17 @@ window.__ModuleLoader__.load({
|
|
|
7484
7487
|
prefsScopeRef = null
|
|
7485
7488
|
prefsScopeVia = null
|
|
7486
7489
|
try {
|
|
7487
|
-
|
|
7488
|
-
|
|
7490
|
+
// dsh >= 0.1.7 removed the settings service, and READING the service
|
|
7491
|
+
// property on a host that never injected it throws on the cordis
|
|
7492
|
+
// Context proxy ("cannot get property \"settingsScope\" without
|
|
7493
|
+
// inject") — the pre-0.1.7 probe wrote a stack trace into the console
|
|
7494
|
+
// on EVERY boot, noise that hides real failures and made this seat look
|
|
7495
|
+
// broken during the rc.1 audit. ctx.get is the era-safe read: it
|
|
7496
|
+
// answers with the service when it exists (both eras) and simply
|
|
7497
|
+
// reports absence when it does not, so the property is never touched.
|
|
7498
|
+
const scopeHost = ctx && typeof ctx.get === 'function' ? ctx.get('settingsScope') : null
|
|
7499
|
+
if (scopeHost && typeof scopeHost.bind === 'function') {
|
|
7500
|
+
prefsScopeRef = scopeHost.bind({ namespace: 'better-workspace' })
|
|
7489
7501
|
prefsScopeVia = 'settingsScope'
|
|
7490
7502
|
}
|
|
7491
7503
|
} catch (error) {
|
package/src/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import Schema from '@deepseek-ai/schemastery'
|
|
2
1
|
/**
|
|
3
2
|
* dsh-better-workspace — host half (plain JavaScript, no build step).
|
|
4
3
|
*
|
|
@@ -21,20 +20,49 @@ function live(schema) {
|
|
|
21
20
|
return typeof schema.volatile === 'function' ? schema.volatile() : schema
|
|
22
21
|
}
|
|
23
22
|
|
|
23
|
+
/**
|
|
24
|
+
* The schemastery module, resolved LAZILY (0.21.1): `@deepseek-ai/schemastery`
|
|
25
|
+
* is a PEER, so a profile whose `node_modules` does not hoist it — the desktop
|
|
26
|
+
* app's bundled runtime, or any install that resolved the peers elsewhere —
|
|
27
|
+
* used to fail the *static* import at the top of this file. The Loader treats a
|
|
28
|
+
* failed plugin import as a non-fatal skip (`ctx.logger.error` + no fiber), so
|
|
29
|
+
* the row silently never mounted: no host half, no `dsh.client` scan, no client
|
|
30
|
+
* bundle in the boot graph, and the official sidebar quietly took the seat —
|
|
31
|
+
* the same all-green-log failure class as issue #9, reproduced on a clean
|
|
32
|
+
* isolated DSH_HOME. Deferring the import hides the schema where the module is
|
|
33
|
+
* absent instead of killing the row; on a host that has it (every dsh install
|
|
34
|
+
* that serves the settings surface) nothing changes. Null when unresolvable.
|
|
35
|
+
*/
|
|
36
|
+
let Schema = null
|
|
37
|
+
try {
|
|
38
|
+
Schema = (await import('@deepseek-ai/schemastery')).default
|
|
39
|
+
} catch (error) {
|
|
40
|
+
Schema = null
|
|
41
|
+
console.warn(
|
|
42
|
+
'[dsh-better-workspace] @deepseek-ai/schemastery is not resolvable here; the row Config surface is absent'
|
|
43
|
+
+ ' (the browser features do not depend on it): ' + (error && error.message || String(error)),
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
24
47
|
/**
|
|
25
48
|
* Row Config = the settings surface on dsh >= 0.1.7 (values persist under the
|
|
26
49
|
* row id 'better-workspace' — the same string as the old settings namespace,
|
|
27
50
|
* so the one-shot legacy settings.yaml import maps old user values onto the
|
|
28
|
-
* new home). Inert metadata on older hosts
|
|
29
|
-
*
|
|
30
|
-
*
|
|
51
|
+
* new home). Inert metadata on older hosts, and absent when schemastery is
|
|
52
|
+
* unresolvable (cordis then passes the row config through unvalidated; the
|
|
53
|
+
* browser half reads every value with its own fallbacks either way).
|
|
54
|
+
* NOTE: settings are per-profile on the new host; the client hides the manual
|
|
55
|
+
* cross-device sync section accordingly (the shared settings.yaml home no
|
|
56
|
+
* longer exists).
|
|
31
57
|
*/
|
|
32
|
-
export const Config = Schema
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
})
|
|
58
|
+
export const Config = Schema === null
|
|
59
|
+
? undefined
|
|
60
|
+
: Schema.object({
|
|
61
|
+
compactChains: live(Schema.boolean().default(true)),
|
|
62
|
+
statusPulse: live(Schema.boolean().default(true)),
|
|
63
|
+
styling: live(Schema.dict(Schema.any()).default({})),
|
|
64
|
+
appearance: live(Schema.dict(Schema.any()).default({})),
|
|
65
|
+
})
|
|
38
66
|
|
|
39
67
|
/** Read one Config value across eras: Volatile ref (>= 0.1.7) or plain value. */
|
|
40
68
|
export function valueOf(value) {
|