dsh-sidebar-row-menu 1.9.2 → 1.10.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,57 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.10.0 — 2026-11-06
4
+
5
+ ### 中文摘要
6
+
7
+ - **工作区可以单独设置新会话的默认权限。** 工作区右键菜单新增「新会话默认权限」二级
8
+ 菜单,列出宿主原生的权限预设(仅可查看 / 工作区内修改 / 完全权限),当前生效的一项
9
+ 右侧打勾;选择后只影响该工作区之后新建的会话,已有会话不动。「跟随全局默认」清除
10
+ 本工作区的设置。设置存在 `$DSH_HOME/storages/dsh-sidebar-row-menu/permission-defaults.json`,
11
+ 由宿主插件在会话创建时通过 `permissionPresets` 原生接口落成会话事件,不靠客户端改默认值。
12
+ - **菜单条目可以只放进「…」菜单。** 设置 →「行菜单」→「菜单显示位置」把原来
13
+ 「同时放进「…」菜单」的开关改成三态:右键菜单 / 「…」菜单 / 两边,每个条目至少保留
14
+ 一边;旧配置自动迁移(开 → 两边,关 → 右键菜单)。
15
+
16
+ ### Changed
17
+
18
+ - **A workspace can now set the default permission for its new sessions.** The
19
+ workspace context menu gains a "Default permission for new sessions" submenu listing
20
+ the host's native presets (read-only / workspace-write / danger-full-access) with the
21
+ effective one checked. The choice applies only to sessions created afterwards in
22
+ that workspace and never touches existing sessions; "Follow global default" clears
23
+ it. The mapping is stored in
24
+ `$DSH_HOME/storages/dsh-sidebar-row-menu/permission-defaults.json`, and the host
25
+ plugin applies it through the native `permissionPresets` service when a session is
26
+ created, so it is recorded as a normal permission event rather than by mutating the
27
+ client default.
28
+ - **Entries can live only in the "…" menu.** Settings → "Row menu" → "Menu placement"
29
+ replaces the old "Also show in the '…' menu" switches with a tri-state choice per
30
+ entry (right-click / "…" / both), always keeping at least one side; existing
31
+ settings migrate automatically (on → both, off → right-click).
32
+
33
+ ## 1.9.3 — 2026-11-06
34
+
35
+ ### 中文摘要
36
+
37
+ - **二级菜单贴着屏幕右边缘时不再飞出去。** 之前子菜单按估算宽度(220)算位置,
38
+ 贴右边缘向左翻转时会和菜单之间空出一大截、还竖直跑到触发行上方。现在子菜单
39
+ 先测真实尺寸再定位:翻转后横向留 6px 间距、纵向和触发行齐平,箭头方向跟着翻转;
40
+ 底边 / 顶边超出屏幕时会被夹回视口内。主菜单定位也改成量真实宽高(原来是按入场
41
+ 动画中途的偏小尺寸夹取,贴右边缘会溢出几个像素),窗口 resize 或菜单行数变化会
42
+ 重新定位。
43
+
44
+ ### Changed
45
+
46
+ - **Submenus no longer fly off when opened against the right screen edge.** The
47
+ previous code estimated the submenu width (220px), so a left-flip near the edge left
48
+ a large gap from the menu and landed above the trigger row. The submenu is now
49
+ measured and then positioned: 6px horizontal gap when flipped, vertically aligned
50
+ with the trigger row, and its chevron mirrors to match. Panels are clamped back into
51
+ the viewport at the top and bottom edges. Menu surfaces also measure their real size
52
+ (the old code measured mid-animation, which let them overflow by a few pixels at the
53
+ right edge), and reposition on window resize or row-count changes.
54
+
3
55
  ## 1.9.2 — 2026-11-06
4
56
 
5
57
  ### 中文摘要
package/README.en.md CHANGED
@@ -27,13 +27,14 @@ Session menu content comes from the `sidebar.workspaces.session.menu.item` slot
27
27
  built-in actions and other plugins' actions are all there. This plugin only appends
28
28
  its own entries; it does not copy or hardcode any built-in action.
29
29
 
30
- > The "…" button menu stays exactly as DSH ships it. The plugin's entries appear
31
- > only when the menu is opened by right-click — on 0.2.2 that holds for workspace
32
- > and session rows alike, and each entry can be opted into the "…" menu in Settings.
30
+ > The plugin's entries appear in the right-click menu by default. Settings → "Row
31
+ > menu" → "Menu placement" can move each entry to the "…" menu only, or show it in
32
+ > both (at least one side always stays on).
33
33
  > On 0.2.2 both gestures share
34
34
  > one host menu, so the plugin tells them apart by the gesture itself: a right-click
35
35
  > sets a mark that is released once the menu panel has actually mounted, while the
36
- > pointerdown on the "…" button clears it immediately. A right-click menu does not
36
+ > pointerdown on the "…" button clears it immediately. The "…" menu therefore only
37
+ > carries entries placed there (or on both sides). A right-click menu does not
37
38
  > close when the pointer leaves it; it closes only on an outside click, an item
38
39
  > selection, or Escape.
39
40
 
@@ -45,9 +46,10 @@ On 0.2.2 the host renders this menu, and the plugin's items interleave with the
45
46
  built-in Rename (100), Reveal in file manager (200) and Delete workspace (300),
46
47
  using the same grouping rules as the session menu: New session 90, Open in new
47
48
  tab 110, archived-session toggle 130, Copy workspace path 150, pinned app 210,
48
- Open with 220, Delete workspace and all sessions 310. These items are right-click only by default; the row's "…"
49
- menu keeps its native content unless you opt entries in under Settings → "Also
50
- show in the "…" menu → workspace". On 0.2.1 the plugin draws the whole menu and
49
+ Open with 220, default permission for new sessions 225, Delete workspace and all
50
+ sessions 310. These items are right-click only by default; the row's "…"
51
+ menu keeps its native content unless you place entries under Settings → "Row
52
+ menu" → "Menu placement". On 0.2.1 the plugin draws the whole menu and
51
53
  runs the official dialogs for Rename and Delete workspace.
52
54
 
53
55
  | Item | Behavior |
@@ -60,6 +62,7 @@ runs the official dialogs for Rename and Delete workspace.
60
62
  | Reveal in file manager (built-in) | Opens the workspace directory in Explorer; provided by the host on 0.2.2, absent on 0.2.1 |
61
63
  | Pinned open-with app | A pinned app shows directly at the top level (e.g. "Open with Visual Studio Code") and opens the workspace directory |
62
64
  | Open with | A submenu of external apps (editors, terminals, file managers) sharing the session menu's catalog, pinning and toggles; hover expands it. Host menu items draw no submenu caret, so the plugin renders the label as text plus a right-aligned chevron, matching the session menu; the 0.2.1 self-drawn menu uses an arrow icon |
65
+ | Default permission for new sessions | A submenu of the host's native permission presets (read-only / workspace-write / danger-full-access). The chosen preset becomes the default for **sessions created afterwards in this workspace**; the effective one is checked on the right, and "Follow global default" clears the per-workspace value. Existing sessions are never changed |
63
66
  | Delete workspace (built-in) | Opens the official delete confirmation; removes only the workspace registration and leaves its sessions under "Ungrouped". On 0.2.1 the plugin renders this item itself |
64
67
  | Delete workspace and all sessions | Permanently deletes every session and transcript under the workspace first, then the workspace registration. If any session fails, the workspace is kept so the user can retry. The directory itself is not deleted |
65
68
 
@@ -91,25 +94,19 @@ Both delete entries are served by this plugin's own host route. They leave
91
94
  unarchived sessions alone by default; the opt-in switch extends the single-session
92
95
  entry to them. Deletion never cascades into forked child sessions.
93
96
 
94
- These entries are **right-click only by default**: they do not mount when the "…"
95
- button opens the menu. There is no time window any more; the plugin sets a
96
- right-click gesture mark and releases it only once the menu panel has actually
97
- appeared (0.2.2 mounts the menu asynchronously), and the pointerdown on the "…"
98
- button clears it at once. While the mark is live the entries render normally;
99
- otherwise they render `null`.
97
+ These entries appear in the **right-click menu** by default. To use them from the
98
+ row's "…" button, set each one under Settings → "Row menu" → "Menu placement":
100
99
 
101
- To use them from the row's "…" button, enable them one by one under Settings →
102
- "Row menu" → "Also show in the "…" menu":
100
+ - "…" menu: the entry appears only in the row's "…" menu and leaves the
101
+ right-click menu;
102
+ - "Both": it appears on both sides;
103
+ - "Right-click menu": the default, right-click only.
103
104
 
104
- - session entries mount into the native "…" menu;
105
- - workspace entries on 0.2.2: the host menu is data-driven, so an enabled entry skips
106
- the gesture check and appears in the "…" menu; with everything off that menu keeps
107
- only the native items;
108
- - workspace entries on 0.2.1: enabling any of them makes this plugin take over the
109
- row's "…" button and render the official "Rename / Delete workspace" items
110
- alongside the enabled plugin entries.
111
-
112
- With everything off, the "…" button behaves exactly like DSH's own.
105
+ Every entry must keep at least one side, so the switch for the last active side is
106
+ locked. Session entries and workspace entries (0.2.2) share the same
107
+ `contextMenus` providers and use the gesture mark to tell which menu is being
108
+ rendered; on 0.2.1 the plugin takes over the row's "…" button and draws the
109
+ workspace menu itself with the same placement rules.
113
110
 
114
111
  Blank draft sessions have no right-click menu and are left alone. Rows that are
115
112
  neither a workspace nor a session (e.g. "Show more") are not intercepted.
@@ -167,24 +164,27 @@ Settings → "Row menu" toggles every new entry:
167
164
  | Allow deleting unarchived sessions | Off by default; also shows "Delete session permanently" on unarchived rows. Requires the previous switch |
168
165
  | Delete all archived sessions | Hides the bulk-delete entry |
169
166
  | Show archived sessions | Hides the workspace "Show / hide archived sessions" entry (on by default; the entry itself only appears when that workspace has archived sessions) |
170
- | Also show in the "…" menu → workspace | Adds workspace right-click entries one by one to the row's "…" menu: New session, Open with, Copy workspace path, Open in new tab, archived-session toggle, Delete workspace and all sessions. On 0.2.1 enabling any of them makes this plugin render the "…" menu |
171
- | Also show in the "…" menu → session | Adds session right-click entries one by one to the native "…" menu: Open with, Delete session, Delete all archived sessions |
167
+ | Menu placement → workspace | Per-entry choice between the right-click menu, the "…" menu, or both: New session, Default permission for new sessions, Open with, Copy workspace path, Open in new tab, archived-session toggle, Delete workspace and all sessions |
168
+ | Menu placement → session | Per-entry choice for session-row entries: Open with, Delete session, Delete all archived sessions |
172
169
  | Enable blank-space context menu | Master switch for the conversation-body right-click menu (blank space, thinking blocks, replies; on by default); when off, that area keeps the browser/host native menu |
173
170
  | Pin "More" to the far right | On by default; keeps a "More actions" style overflow trigger as the last row regardless of its current toolbar position |
174
171
  | Show top-left status widgets | Off by default; also lists everything in the header's `conversation.session.header.actions` slot (Session cost, background-job counter, …) in the conversation-body menu |
175
172
 
176
- The "Also show in the "…" menu" switches are all off by default; until one is
177
- enabled the "…" menu is exactly DSH's own.
173
+ Every placement defaults to "Right-click menu", so untouched installs keep the "…"
174
+ menu exactly as DSH ships it.
178
175
 
179
- On DSH 0.2.2 and later the "…" button and right-click share one host menu, yet the
180
- plugin's entries still appear only on right-click; flipping a switch also puts that
181
- entry into the "…" menu. On 0.2.1 workspace rows have no host menu to contribute to,
182
- so the plugin takes over the "…" button and draws the menu itself.
176
+ On DSH 0.2.2 and later the "…" button and right-click share one host menu; the
177
+ plugin tells them apart by the gesture mark, and only entries placed in "…" or
178
+ "Both" join that menu. On 0.2.1 workspace rows have no host menu to contribute to,
179
+ so the plugin takes over the "…" button and draws the menu itself with the same
180
+ placement rules.
183
181
 
184
182
  Switches live in browser `localStorage` (`dsh.sidebar-row-menu.items.v1`,
185
183
  `dsh.sidebar-row-menu.open-with.v1`, `dsh.sidebar-row-menu.open-with.pinned.v1`,
186
- `dsh.sidebar-row-menu.ellipsis.v1` and `dsh.sidebar-row-menu.blank-menu.v1`)
187
- and apply immediately. Before the first explicit pin, the plugin derives one: the
184
+ `dsh.sidebar-row-menu.placement.v1` and `dsh.sidebar-row-menu.blank-menu.v1`)
185
+ and apply immediately. The legacy `dsh.sidebar-row-menu.ellipsis.v1` booleans are
186
+ migrated on first load (true → "Both", false → "Right-click menu"). Before the
187
+ first explicit pin, the plugin derives one: the
188
188
  first detected editor (usually VS Code), or the first catalog app when no editor
189
189
  exists.
190
190
 
@@ -486,8 +486,8 @@ mark only lives until "the panel for this gesture appeared", never into the next
486
486
  Workspace rows on 0.2.2 take a different path: the host menu is built from each
487
487
  `ctx.contextMenus.register` provider's `resolve`, which has no React entry to read the
488
488
  mark, so the provider checks the same mark while resolving. The "…" pointerdown
489
- clears it before the host resolves, hence the entries show on right-click only; the
490
- "Also show in the "…" menu → workspace" switches make the provider skip that check.
489
+ clears it before the host resolves, so the provider returns entries for the
490
+ right-click side or the "…" side according to each entry's "Menu placement".
491
491
 
492
492
  ### Why the conversation-body menu sorts by screen position
493
493
 
@@ -593,12 +593,12 @@ menus to a data-driven service, and the plugin picks the path by host capability
593
593
 
594
594
  - **0.2.2+**: workspace entries are registered with `ctx.contextMenus.register`
595
595
  (New session 90, Open in new tab 110, Copy workspace path 150, pinned app 210,
596
- Open with 220, Delete workspace and all sessions 310), interleaved by
596
+ Open with 220, default permission for new sessions 225, Delete workspace and all
597
+ sessions 310), interleaved by
597
598
  order with the native Rename (100), Reveal (200) and Delete workspace (300) and
598
599
  grouped with the same separators as the session menu.
599
- Right-click and the "…" button share the host's single menu; providers answer only
600
- during a right-click gesture (or when the matching "Also show in the "…" menu"
601
- switch is on).
600
+ Right-click and the "…" button share the host's single menu; providers answer per
601
+ entry according to the right-click gesture and that entry's "Menu placement".
602
602
  - **0.2.1**: no `contextMenus` service, so the plugin keeps drawing its own
603
603
  workspace menu.
604
604
  - **Session rows**: 0.2.2 still supports the
package/README.md CHANGED
@@ -22,10 +22,10 @@ DSH 0.2.2 把侧栏右键改成数据驱动:工作区菜单由宿主统一渲
22
22
  `sidebar.workspaces.session.menu.item` slot —— 内置动作和其他插件的动作都在里面,
23
23
  本插件只追加自己的条目,不复制、不硬编码任何内置动作。
24
24
 
25
- > 点行尾「…」按钮看到的菜单保持 DSH 原样;本插件的条目默认只在右键展开时出现(0.2.2 上
26
- > 工作区行与会话行都是如此,可以在设置里逐项开启)。
25
+ > 本插件的条目默认只在右键展开时出现;设置 →「行菜单」→「菜单显示位置」可以逐项改成
26
+ > 只进「…」菜单、或两边都进(至少保留一边)。
27
27
  > 0.2.2 上右键与「…」共用同一份宿主菜单,插件按“右键手势”区分:右键时打标,等菜单面板
28
- > 真正挂载后才收尾;点「…」的按下事件会立刻清标,所以那个菜单不带右键条目。
28
+ > 真正挂载后才收尾;点「…」的按下事件会立刻清标,所以那个菜单只带设为「…」或「两边」的条目。
29
29
  > 右键展开的菜单不会因为鼠标移出而关闭,只有点击外部、选中条目或按 Esc 才关闭。
30
30
 
31
31
  ## 功能
@@ -34,10 +34,10 @@ DSH 0.2.2 把侧栏右键改成数据驱动:工作区菜单由宿主统一渲
34
34
 
35
35
  0.2.2 上这份菜单由宿主渲染,本插件条目与内置「重命名」(100)、「在文件夹显示」(200)、
36
36
  「删除工作区」(300)按 order 交错,分组规则与会话菜单一致:新会话 90、在新标签打开 110、
37
- 归档会话开关 130、复制工作区路径 150、置顶应用 210、打开方式 220、删除工作区及所有会话 310。这些条目默认
38
- 只出现在右键菜单;行尾「…」里的菜单保持原生,想让它也带上插件条目,可在设置里逐项开启
39
- 「同时放进「…」菜单 → 工作区」。0.2.1 上整份菜单由本插件自绘,「重命名」「删除工作区」
40
- 由插件调用官方对话框。
37
+ 归档会话开关 130、复制工作区路径 150、置顶应用 210、打开方式 220、新会话默认权限 225、
38
+ 删除工作区及所有会话 310。这些条目默认只出现在右键菜单;行尾「…」里的菜单保持原生,
39
+ 想让它也带上插件条目,可在设置 →「行菜单」→「菜单显示位置」里逐项选择「…」或「两边」。
40
+ 0.2.1 上整份菜单由本插件自绘,「重命名」「删除工作区」由插件调用官方对话框。
41
41
 
42
42
  | 菜单项 | 行为 |
43
43
  | --- | --- |
@@ -49,6 +49,7 @@ DSH 0.2.2 把侧栏右键改成数据驱动:工作区菜单由宿主统一渲
49
49
  | 在文件夹显示(内置) | 在资源管理器里打开工作区目录;0.2.2 由宿主提供,0.2.1 上不出现 |
50
50
  | 置顶的打开方式 | 被置顶的应用直接显示在一级菜单(例如「用 Visual Studio Code 打开」),点击后用该应用打开工作区目录 |
51
51
  | 打开方式 | 二级菜单列出宿主提供的外部应用(编辑器、终端、文件管理器);与会话菜单共用同一套应用列表、置顶与开关设置,鼠标悬浮自动展开。宿主的菜单项不画二级箭头,本插件把标签渲染成「文字 + 右对齐箭头」,与会话菜单同一位置;0.2.1 自绘菜单画的是箭头图标 |
52
+ | 新会话默认权限 | 二级菜单列出宿主原生权限预设(仅可查看 / 工作区内修改 / 完全权限)。选中的预设成为**该工作区下以后新建会话**的默认权限,当前生效项右侧打勾;「跟随全局默认」清除本工作区的设置。只改新会话,不动已有会话 |
52
53
  | 删除工作区(内置) | 打开官方删除确认对话框;只删除工作区登记,会话保留并归入「未分组」。0.2.1 上由本插件代为渲染 |
53
54
  | 删除工作区及所有会话 | 先永久删除该工作区下的每个会话及其日志,全部成功后再删除工作区登记;任一会话删除失败则保留工作区,便于重试。工作区目录本身不删除 |
54
55
 
@@ -77,17 +78,16 @@ DSH 0.2.2 把侧栏右键改成数据驱动:工作区菜单由宿主统一渲
77
78
  一级菜单。两个删除入口由本插件自己的宿主路由完成,默认不会删除未归档会话;
78
79
  开启「允许删除未归档会话」后才会对普通会话开放。删除不会级联删除 fork 子会话。
79
80
 
80
- 这些条目默认是**右键专属**:点行尾「…」按钮时它们不挂载。实现上不再用时间窗口,而是
81
- 「右键手势标记」:右键时打标,等菜单面板真正出现(0.2.2 的挂载是异步的)后才释放;点
82
- 「…」的按下事件会立刻清标。标记有效期内的条目正常渲染,其余情况渲染直接返回 `null`。
81
+ 这些条目默认出现在**右键菜单**。想直接使用行尾「…」菜单,可以在设置 →「行菜单」→
82
+ 「菜单显示位置」里逐项选择:
83
83
 
84
- 如果想直接使用行尾「…」菜单,可以在设置 →「行菜单」→「同时放进「…」菜单」里逐个开启:
84
+ - 「…」菜单:条目只出现在行尾「…」打开的菜单里,右键菜单不再显示;
85
+ - 「两边」:右键和「…」都显示;
86
+ - 「右键菜单」:默认值,只在右键菜单里出现。
85
87
 
86
- - 会话条目:开启后挂进原生「…」菜单;
87
- - 工作区条目(0.2.2):宿主菜单本身是数据驱动的,开启后 provider 解析时不再看手势,
88
- 条目直接进入「…」菜单;全部关闭时「…」里只有原生项;
89
- - 工作区条目(0.2.1):开启任意一项后,本插件接管行尾「…」按钮,用同一套菜单展示
90
- 官方「重命名 / 删除工作区」加上已开启的插件条目。
88
+ 每个条目至少要保留一边,最后一边的开关会被锁住。会话条目与工作区条目(0.2.2)都走同一套
89
+ `contextMenus` provider,按手势标记决定当前是哪份菜单;工作区条目在 0.2.1 上由本插件接管
90
+ 行尾「…」按钮自绘,规则一致。
91
91
 
92
92
  草稿会话(还没有任何消息的空白会话)没有右键菜单,本插件同样不接管。
93
93
  非工作区 / 非会话的侧边栏行(如“显示更多”)也不会被拦截。
@@ -134,22 +134,23 @@ DSH 0.2.2 把侧栏右键改成数据驱动:工作区菜单由宿主统一渲
134
134
  | 允许删除未归档会话 | 默认关闭;开启后未归档会话的右键菜单也会出现「永久删除会话」,需先开启上一项 |
135
135
  | 删除所有已归档会话 | 关闭后不再出现批量删除入口 |
136
136
  | 显示已归档会话 | 关闭后工作区菜单里不再出现「显示 / 隐藏已归档会话」(默认开启;该项只在当前工作区存在已归档会话时出现) |
137
- | 同时放进「…」菜单 → 工作区 | 逐项把工作区行右键条目也放进行尾「…」菜单:新会话、打开方式、复制工作区路径、在新标签中打开、归档会话开关、删除工作区及所有会话。0.2.1 上开启任意一项后「…」按钮改由本插件渲染 |
138
- | 同时放进「…」菜单 → 会话 | 逐项把会话行右键条目加进原生「…」菜单:打开方式、永久删除会话、删除所有已归档会话 |
137
+ | 菜单显示位置 → 工作区 | 逐项选择工作区行条目出现在右键菜单、「…」菜单,或两边:新会话、新会话默认权限、打开方式、复制工作区路径、在新标签中打开、归档会话开关、删除工作区及所有会话 |
138
+ | 菜单显示位置 → 会话 | 逐项选择会话行条目的显示位置:打开方式、永久删除会话、删除所有已归档会话 |
139
139
  | 启用空白处右键菜单 | 会话正文(空白处、思考过程、回复)的右键菜单总开关(默认开启);关闭后该区域恢复浏览器 / 宿主的原生菜单 |
140
140
  | 「更多」固定在最右 | 默认开启;把「更多操作」一类的溢出入口固定在菜单最后一项,不受工具条当前顺序影响 |
141
141
  | 显示左上角状态组件 | 默认关闭;打开后会话栏左上角 `conversation.session.header.actions` 槽位里的组件(费用明细、后台任务计数等)也会列进正文右键菜单 |
142
142
 
143
- 「同时放进「…」菜单」下的开关默认全部关闭,`…` 菜单在未开启时与 DSH 完全一致。
143
+ 「菜单显示位置」默认全部是「右键菜单」,所以未改动时 `…` 菜单与 DSH 完全一致。
144
144
 
145
- DSH 0.2.2 起行尾「…」与右键共用同一份宿主菜单,但插件条目仍按手势只出现在右键菜单里;
146
- 上表的开关打开后,对应条目才会同时进入「…」菜单。0.2.1 上工作区行没有宿主菜单可贡献,
147
- 改由插件接管「…」按钮自绘。
145
+ DSH 0.2.2 起行尾「…」与右键共用同一份宿主菜单,插件条目按手势标记区分当前是哪份菜单;
146
+ 设为「…」或「两边」的条目才会进入「…」菜单。0.2.1 上工作区行没有宿主菜单可贡献,
147
+ 改由插件接管「…」按钮自绘,显示规则相同。
148
148
 
149
149
  开关存在浏览器 `localStorage`(`dsh.sidebar-row-menu.items.v1`、
150
150
  `dsh.sidebar-row-menu.open-with.v1`、`dsh.sidebar-row-menu.open-with.pinned.v1`、
151
- `dsh.sidebar-row-menu.ellipsis.v1` 与 `dsh.sidebar-row-menu.blank-menu.v1`),
152
- 改完立即生效,不需要重启。置顶项在第一次配置前是自动推导的:优先置顶检测到的第一个
151
+ `dsh.sidebar-row-menu.placement.v1` 与 `dsh.sidebar-row-menu.blank-menu.v1`),
152
+ 改完立即生效,不需要重启。旧版的 `dsh.sidebar-row-menu.ellipsis.v1`(布尔值)会在首次加载时
153
+ 自动迁移成「两边 / 右键菜单」。置顶项在第一次配置前是自动推导的:优先置顶检测到的第一个
153
154
  编辑器(通常是 VS Code),没有编辑器时置顶应用列表里的第一个。
154
155
 
155
156
  ### 与 dsh-session-menu 共存
@@ -412,8 +413,9 @@ DSH 的归档可见性只有一个全局筛选(`archivedFilter`:隐藏已归
412
413
 
413
414
  工作区行在 0.2.2 上走的是另一条路:宿主菜单的数据来自 `ctx.contextMenus.register` 的
414
415
  `resolve`,没有 React 条目可以读标记,所以 provider 在解析时直接判断同一枚手势标记,
415
- 并且行尾「…」的 `pointerdown` 清标发生在宿主解析之前 —— 右键时条目进菜单,点「…」时
416
- 不进。「同时放进「…」菜单 → 工作区」的开关则让 provider 跳过手势判断,条目不依赖右键。
416
+ 并且行尾「…」的 `pointerdown` 清标发生在宿主解析之前 —— 右键时按「右键菜单 / 两边」
417
+ 返回条目,点「…」时按「… 菜单 / 两边」返回。「菜单显示位置」的开关让 provider 分别
418
+ 跳过一侧的手势判断。
417
419
 
418
420
  ### 会话正文右键为什么按视觉顺序
419
421
 
@@ -508,10 +510,11 @@ DSH 宿主按该范围拒绝安装不兼容的宿主,插件市场也按它显
508
510
  与 `contextMenus` 实现适配。DSH 0.2.2 起把侧栏右键菜单改成数据驱动,本包按宿主能力自动选路:
509
511
 
510
512
  - **0.2.2 及以上**:工作区行改用 `ctx.contextMenus.register` 贡献动作
511
- (新会话 90、新标签 110、复制路径 150、置顶应用 210、打开方式 220、删除工作区及所有会话 310),
513
+ (新会话 90、新标签 110、复制路径 150、置顶应用 210、打开方式 220、新会话默认权限 225、
514
+ 删除工作区及所有会话 310),
512
515
  与原生「重命名」「在文件夹显示」「删除工作区」按 order 交错排列;分组分隔线与会话菜单同一
513
516
  套规则。右键与「…」共用同一份宿主菜单,插件不再自绘,也不再接管「…」按钮。provider 解析时
514
- 按右键手势(或设置里「同时放进「…」菜单」的开关)决定是否返回条目。会话行由宿主自己把原生
517
+ 按右键手势与每项的「菜单显示位置」决定是否返回条目。会话行由宿主自己把原生
515
518
  菜单开在指针处,本包条目继续从 `sidebar.workspaces.session.menu.item` 渲染;
516
519
  - **0.2.1**:没有 `contextMenus` 服务,保持原来的自绘工作区菜单;会话右键仍由插件把
517
520
  行尾「…」菜单搬到指针。