dsh-better-workspace 0.38.1 → 0.38.2
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 +1 -0
- package/dsh.plugin.json +1 -1
- package/package.json +1 -1
- package/src/client.js +14 -2
package/README.md
CHANGED
|
@@ -125,6 +125,7 @@ DSH 的侧边栏浏览区是一个公开插槽 `sidebar.workspaces`(single),官
|
|
|
125
125
|
- **dsh 0.1.6-alpha.2**:设置页重组——本插件 **0.12.0 起双座位**注册设置卡片(旧宿主的 设置→插件 卡片 + 新宿主 插件面板 bundle 页,按包名挂载);工作区树新增**磁盘目录嵌套层**(官方 workspace-tree 语义),添加工作区回归官方目录流(原生选择器 / 官方应用内浏览器)。
|
|
126
126
|
- **dsh 0.2.2-alpha.2**:自绘会话行渲染官方 `sidebar.session.row.trailing` 行尾座位(时间之后、置顶角标之前;空会话不渲染),官方实验性 worktree / PR 图标因此在插件接管侧栏后仍能出现;同时接受官方的空白会话复用语义(不传 `agentPreset` 时会复用同工作区任意 preset 的空白会话)。该座位按能力探测:老宿主没有它时行尾照常渲染,不会因此报错。兼容下限保持 `>=0.1.6-alpha.2`。
|
|
127
127
|
- **dsh 0.2.2-alpha.3**:会话/工作区行接入官方统一右键菜单(`contextMenus`)——官方条目与插件补充项同席,插件条目 order 700、排在其后并以分隔线隔开,官方今后新增的条目会自动出现。工作区分组 / 会话分组行是插件私有虚拟对象,仍用插件菜单;没有该服务的旧宿主整体回退本地菜单,兼容下限保持 `>=0.1.6-alpha.2`。
|
|
128
|
+
- **dsh 0.2.2-rc.1**:客户端 ModuleLoader / package-local chunk、官方 `contextMenus` 与侧栏座位均按原契约工作;自绘侧栏复刻的官方行内座位补上 rc.1 新增的全局 `useSessionAccess` 标准 hook,首条会话渲染时 pin/archive 按钮不再抛错拖垮整栏(旧宿主没有该 hook 时自动省略)。`ui-settings` 新增的可选 `settings.section.icon` 未被本插件使用。真机验证侧栏树、右键菜单、外观与 chunk 加载正常,兼容下限保持 `>=0.1.6-alpha.2`。
|
|
128
129
|
- **跨端**:web 与桌面共用同一套客户端资产;外观 / 开关可经设置卡片手动跨端同步,**折叠状态与会话本地序每端本地**(设计如此)。
|
|
129
130
|
|
|
130
131
|
## 限制与路线图
|
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-better-workspace",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.2",
|
|
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.38.
|
|
3
|
+
"version": "0.38.2",
|
|
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
|
@@ -599,9 +599,9 @@ window.__ModuleLoader__.load({
|
|
|
599
599
|
* React discipline — the occupant mounts once per row and keeps its own
|
|
600
600
|
* state across our re-renders).
|
|
601
601
|
*/
|
|
602
|
-
function ShippedSeatOccupant({ seat, ownerProps, t, useMenuOpenState }) {
|
|
602
|
+
function ShippedSeatOccupant({ seat, ownerProps, standardProps, t, useMenuOpenState }) {
|
|
603
603
|
const bound = React.useMemo(() => bindOccupantFace(seat.face), [seat])
|
|
604
|
-
return E(seat.component, Object.assign({}, ownerProps, bound, t ? { t } : null,
|
|
604
|
+
return E(seat.component, Object.assign({}, standardProps || null, ownerProps, bound, t ? { t } : null,
|
|
605
605
|
// The menu.item slot's hookContext factory (ui-slots) hands its
|
|
606
606
|
// occupants the menu open-state pair through a useMenuOpenState
|
|
607
607
|
// hook; the slot renderer would inject it, our in-row menu
|
|
@@ -2386,6 +2386,7 @@ window.__ModuleLoader__.load({
|
|
|
2386
2386
|
? E(QuietBoundary, { key: 'schedule-seat' }, E(ShippedSeatOccupant, {
|
|
2387
2387
|
seat: scheduleSeat,
|
|
2388
2388
|
ownerProps: { sessionId: node.id },
|
|
2389
|
+
standardProps: sessionActions ? sessionActions.standardProps : null,
|
|
2389
2390
|
t: scheduleSeat.t,
|
|
2390
2391
|
}))
|
|
2391
2392
|
: null
|
|
@@ -2402,6 +2403,7 @@ window.__ModuleLoader__.load({
|
|
|
2402
2403
|
}, E(ShippedSeatOccupant, {
|
|
2403
2404
|
seat,
|
|
2404
2405
|
ownerProps: { sessionId: node.id },
|
|
2406
|
+
standardProps: sessionActions ? sessionActions.standardProps : null,
|
|
2405
2407
|
t: seat.t,
|
|
2406
2408
|
}))))
|
|
2407
2409
|
: null
|
|
@@ -2436,6 +2438,7 @@ window.__ModuleLoader__.load({
|
|
|
2436
2438
|
key: 'row-action-seat-' + index,
|
|
2437
2439
|
seat,
|
|
2438
2440
|
ownerProps: { sessionId: node.id, displayTitle: node.leaf || node.title },
|
|
2441
|
+
standardProps: sessionActions.standardProps,
|
|
2439
2442
|
t: seat.t,
|
|
2440
2443
|
})))
|
|
2441
2444
|
: null,
|
|
@@ -3716,6 +3719,7 @@ window.__ModuleLoader__.load({
|
|
|
3716
3719
|
const {
|
|
3717
3720
|
wide, expandSidebar,
|
|
3718
3721
|
useSessions, useSessionPendingInteraction, useSessionStatus, useWorkspaces,
|
|
3722
|
+
useSessionAccess,
|
|
3719
3723
|
useStore: injectedUseStore, actions: injectedActions,
|
|
3720
3724
|
localStore: localStoreProp,
|
|
3721
3725
|
startSession, open, renameSession, forkSession, renameWorkspace, deleteWorkspace,
|
|
@@ -3755,6 +3759,12 @@ window.__ModuleLoader__.load({
|
|
|
3755
3759
|
console.error('[dsh-better-workspace] standard snapshot hooks missing; browser renders nothing')
|
|
3756
3760
|
return null
|
|
3757
3761
|
}
|
|
3762
|
+
// rc.1 added useSessionAccess to the GLOBAL standard hooks. Shipped seat
|
|
3763
|
+
// occupants (row.action pin/archive) call it directly, so an in-row
|
|
3764
|
+
// reproduction must hand it down exactly like the slot renderer does.
|
|
3765
|
+
// Older hosts do not define it; omit the prop there so the seats stay
|
|
3766
|
+
// compatible with their own generation.
|
|
3767
|
+
const seatStandardProps = typeof useSessionAccess === 'function' ? { useSessionAccess } : null
|
|
3758
3768
|
|
|
3759
3769
|
const storedItems = useWorkspaces(s => s.items)
|
|
3760
3770
|
// Official rc.2 first-use naming (see withDisplayTitles): every surface
|
|
@@ -4675,6 +4685,7 @@ window.__ModuleLoader__.load({
|
|
|
4675
4685
|
...(Array.isArray(hoverSeat) ? hoverSeat.map((seat, index) => E(QuietBoundary, { key: 'hover-seat-' + index }, E(ShippedSeatOccupant, {
|
|
4676
4686
|
seat,
|
|
4677
4687
|
ownerProps: { sessionId: node.id },
|
|
4688
|
+
standardProps: sessionActions ? sessionActions.standardProps : null,
|
|
4678
4689
|
t: seat.t,
|
|
4679
4690
|
}))) : []),
|
|
4680
4691
|
status && typeof ui.StateDot === 'function' ? E('div', { className: 'bw-hover-status' },
|
|
@@ -4724,6 +4735,7 @@ window.__ModuleLoader__.load({
|
|
|
4724
4735
|
// menu.item occupants need slot-level inject hooks an in-row
|
|
4725
4736
|
// reproduction cannot supply); the context menu keeps every entry
|
|
4726
4737
|
// through sessionMenuEntriesFor + handleCtxPick.
|
|
4738
|
+
standardProps: seatStandardProps,
|
|
4727
4739
|
rowActionSeat,
|
|
4728
4740
|
trailingSeat,
|
|
4729
4741
|
rename: (node) => setDialog({ kind: 'sess-rename', session: node }),
|