dsh-better-workspace 0.36.11 → 0.36.12

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.36.11",
3
+ "version": "0.36.12",
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.36.11",
3
+ "version": "0.36.12",
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": {
package/src/client.js CHANGED
@@ -10191,6 +10191,17 @@ window.__ModuleLoader__.load({
10191
10191
  }
10192
10192
  const wsHasCurrent = (w) => !!currentId && !!w
10193
10193
  && ((w.sessionIds || []).includes(currentId) || subHasCurrent(w.sub))
10194
+ // Name groups (slash view) have no disk path to prefix-match; the
10195
+ // folder glyph lights up whenever its SUBTREE holds the current
10196
+ // session — the official ProjectRow rule, applied tree-wide.
10197
+ const nodeHoldsCurrent = (level) => {
10198
+ if (!level || !currentId) return false
10199
+ for (const item of levelSeqOf(level)) {
10200
+ if (item.kind === 'ws') { if (wsHasCurrent(item.entry)) return true }
10201
+ else if (nodeHoldsCurrent(item.node)) return true
10202
+ }
10203
+ return false
10204
+ }
10194
10205
  const currentWsPath = currentId
10195
10206
  ? ((items || []).find((w) => (w.sessionIds || []).includes(currentId)) || {}).path
10196
10207
  : undefined
@@ -10226,7 +10237,7 @@ window.__ModuleLoader__.load({
10226
10237
  custStyle: rowStyleOf('folder:' + idPath),
10227
10238
  iconMode: (styleEntry('folder:' + idPath) || {}).icon || 'solid',
10228
10239
  pulse: expanded ? null : folderPulseOf(node),
10229
- active: pathHoldsCurrent(currentWsPath, node.path),
10240
+ active: pathHoldsCurrent(currentWsPath, node.path) || nodeHoldsCurrent(node),
10230
10241
  t,
10231
10242
  })]
10232
10243
  if (expanded) {