dsh-better-workspace 0.32.0 → 0.32.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-better-workspace",
3
- "version": "0.32.0",
3
+ "version": "0.32.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": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-better-workspace",
3
- "version": "0.32.0",
3
+ "version": "0.32.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": {
@@ -30,7 +30,8 @@
30
30
  "@deepseek-ai/dsh-client-locale",
31
31
  "@deepseek-ai/dsh-client-ui-slots",
32
32
  "@deepseek-ai/dsh-client-ui-conversation",
33
- "@deepseek-ai/dsh-client-modules"
33
+ "@deepseek-ai/dsh-client-modules",
34
+ "@deepseek-ai/dsh-api-remotes"
34
35
  ],
35
36
  "platform": "web"
36
37
  }
package/src/client.js CHANGED
@@ -9361,13 +9361,31 @@ window.__ModuleLoader__.load({
9361
9361
  try { officialT = ctx.locale.bind('workspace') } catch { officialT = null }
9362
9362
 
9363
9363
  // v0.32.0: the agent-preset face — {list, select} over the same remote
9364
- // channels the official hero preset chip uses. Probed defensively: the
9365
- // 'remote' service may be missing on older hosts, and a missing or
9366
- // reshaped surface simply hides the menu row (presetFace === null).
9364
+ // channels the official hero preset chip uses. v0.32.1 probe fix: the
9365
+ // official bundles reach it as the PROPERTY CHAIN ctx.remote.agentPresets
9366
+ // (their inject list declares it as the 'remote.agentPresets' fiber
9367
+ // service) — the client side has NO catalogued 'remote' service, so the
9368
+ // explicit ctx.get('remote') v0.32.0 shipped threw, the catch swallowed
9369
+ // it, and the menu row silently hid. Property chain first, explicit get
9370
+ // as the fallback, and a shape dump on failure so any future regression
9371
+ // is diagnosable straight from the console.
9367
9372
  let presetFace = null
9368
9373
  try {
9369
- const remote = ctx.get('remote')
9374
+ let remote = null
9375
+ try { remote = ctx.remote } catch { remote = null }
9376
+ if (!remote || !remote.agentPresets) {
9377
+ try {
9378
+ const viaGet = ctx.get('remote')
9379
+ if (viaGet && (!remote || !remote.agentPresets)) remote = viaGet
9380
+ } catch { /* keep the property-chain result */ }
9381
+ }
9370
9382
  const agentPresets = remote && remote.agentPresets
9383
+ if (!agentPresets) {
9384
+ console.warn('[dsh-better-workspace] agent-preset probe: remote.agentPresets unavailable', {
9385
+ remoteType: typeof remote,
9386
+ remoteKeys: remote ? Object.keys(remote).slice(0, 40) : null,
9387
+ })
9388
+ }
9371
9389
  if (agentPresets && typeof agentPresets.list === 'function' && typeof agentPresets.select === 'function') {
9372
9390
  presetFace = {
9373
9391
  // readRoster mirror: a gateway hiccup