dsh-sidebar-row-menu 1.9.1 → 1.9.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/CHANGELOG.md +22 -0
- package/README.en.md +6 -3
- package/README.md +4 -3
- package/lib/client.js +9 -17
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.2 — 2026-11-06
|
|
4
|
+
|
|
5
|
+
### 中文摘要
|
|
6
|
+
|
|
7
|
+
- **会话栏左上角的状态组件整体不进正文右键菜单。** 1.9.1 只隐藏了「本会话费用明细」,
|
|
8
|
+
但 DSH 内置的后台任务计数(有任务运行时才出现)同样挂在会话栏左上角,现在按槽位
|
|
9
|
+
统一处理:`conversation.session.header.actions` 里的组件一律视为状态入口,默认隐藏,
|
|
10
|
+
不逐个认标签。设置 →「行菜单」的开关改名为「显示左上角状态组件」,打开后费用明细、
|
|
11
|
+
后台任务计数等一起恢复;存储字段不变,旧配置照常生效。
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **Status widgets in the top-left corner of the session header are excluded from
|
|
16
|
+
the conversation-body menu as a group.** 1.9.1 only hid "Session cost", but DSH's
|
|
17
|
+
built-in background-job counter (shown while jobs run) lives in the same corner.
|
|
18
|
+
The rule is positional: everything injected into
|
|
19
|
+
`conversation.session.header.actions` counts as a status widget and is hidden by
|
|
20
|
+
default, with no per-label matching. The Settings → row menu switch is renamed to
|
|
21
|
+
"Show top-left status widgets"; turning it on restores cost details, job counters
|
|
22
|
+
and anything else added to that slot. The stored field is unchanged, so existing
|
|
23
|
+
settings keep working.
|
|
24
|
+
|
|
3
25
|
## 1.9.1 — 2026-11-06
|
|
4
26
|
|
|
5
27
|
### 中文摘要
|
package/README.en.md
CHANGED
|
@@ -140,8 +140,11 @@ the original button's icon:
|
|
|
140
140
|
- a "More" style overflow trigger is pinned to the last row (can be switched off in
|
|
141
141
|
Settings); buttons the organizer tucked into "More actions" do not show up on their
|
|
142
142
|
own;
|
|
143
|
-
-
|
|
144
|
-
|
|
143
|
+
- the status widgets in the top-left corner of the session header (the
|
|
144
|
+
`conversation.session.header.actions` slot: "Session cost", the background-job
|
|
145
|
+
counter, …) are left out as a whole; turn on "Show top-left status widgets" in
|
|
146
|
+
Settings to list them. The rule looks at the slot, not at labels, so status widgets
|
|
147
|
+
that DSH or other plugins add there later stay hidden by default too;
|
|
145
148
|
- selecting an ordinary row is a real click: the menu closes, then a `click` is
|
|
146
149
|
dispatched to the original header button, so "Find", "Toggle bottom panel" and
|
|
147
150
|
friends still open their native popovers;
|
|
@@ -168,7 +171,7 @@ Settings → "Row menu" toggles every new entry:
|
|
|
168
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 |
|
|
169
172
|
| 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 |
|
|
170
173
|
| 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 |
|
|
171
|
-
| Show
|
|
174
|
+
| 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 |
|
|
172
175
|
|
|
173
176
|
The "Also show in the "…" menu" switches are all off by default; until one is
|
|
174
177
|
enabled the "…" menu is exactly DSH's own.
|
package/README.md
CHANGED
|
@@ -113,8 +113,9 @@ DSH 0.2.2 把侧栏右键改成数据驱动:工作区菜单由宿主统一渲
|
|
|
113
113
|
都与 DSH 原生右键菜单对齐;
|
|
114
114
|
- 「更多操作」一类的溢出入口固定放在最后一项(可在设置里关掉);被 organizer 收进
|
|
115
115
|
「更多操作」的按钮不会单独出现;
|
|
116
|
-
-
|
|
117
|
-
|
|
116
|
+
- 会话栏左上角的状态组件(`conversation.session.header.actions` 槽位:费用明细、
|
|
117
|
+
后台任务计数等)整体不列进菜单,设置里打开「显示左上角状态组件」后才出现。这条规则
|
|
118
|
+
按槽位判断、不认识具体标签,所以宿主或插件以后往这个槽位加的状态组件也默认隐藏;
|
|
118
119
|
- 点普通条目就是点原按钮:先关菜单,再把 `click` 派发给宿主工具条里的那个按钮,所以
|
|
119
120
|
「查找」「展开底部面板」等弹出的仍是原生面板;
|
|
120
121
|
- 有选中文字时让位给浏览器的选区菜单;消息里的输入控件和链接也保留原生菜单;工具卡片、
|
|
@@ -137,7 +138,7 @@ DSH 0.2.2 把侧栏右键改成数据驱动:工作区菜单由宿主统一渲
|
|
|
137
138
|
| 同时放进「…」菜单 → 会话 | 逐项把会话行右键条目加进原生「…」菜单:打开方式、永久删除会话、删除所有已归档会话 |
|
|
138
139
|
| 启用空白处右键菜单 | 会话正文(空白处、思考过程、回复)的右键菜单总开关(默认开启);关闭后该区域恢复浏览器 / 宿主的原生菜单 |
|
|
139
140
|
| 「更多」固定在最右 | 默认开启;把「更多操作」一类的溢出入口固定在菜单最后一项,不受工具条当前顺序影响 |
|
|
140
|
-
|
|
|
141
|
+
| 显示左上角状态组件 | 默认关闭;打开后会话栏左上角 `conversation.session.header.actions` 槽位里的组件(费用明细、后台任务计数等)也会列进正文右键菜单 |
|
|
141
142
|
|
|
142
143
|
「同时放进「…」菜单」下的开关默认全部关闭,`…` 菜单在未开启时与 DSH 完全一致。
|
|
143
144
|
|
package/lib/client.js
CHANGED
|
@@ -248,8 +248,8 @@ window.__ModuleLoader__.load({
|
|
|
248
248
|
'settings.blankMenu.enabled.hint': '在会话正文的空白处、思考过程或回复上右键,弹出与右上角工具条一致的纵向菜单;取不到按钮时不接管原生菜单。',
|
|
249
249
|
'settings.blankMenu.keepMoreLast.label': '「更多」固定在最右',
|
|
250
250
|
'settings.blankMenu.keepMoreLast.hint': '把「更多操作」一类的入口固定在菜单最后一项,不受工具条当前顺序影响。',
|
|
251
|
-
'settings.blankMenu.showCostMeter.label': '
|
|
252
|
-
'settings.blankMenu.showCostMeter.hint': '
|
|
251
|
+
'settings.blankMenu.showCostMeter.label': '显示左上角状态组件',
|
|
252
|
+
'settings.blankMenu.showCostMeter.hint': '把会话栏左上角的状态组件(费用明细、后台任务计数等)也列进菜单;默认整体隐藏,需要时再打开。',
|
|
253
253
|
'delete.title': '永久删除会话?',
|
|
254
254
|
'delete.description': '会话「{name}」的日志将从磁盘永久删除,此操作无法撤销。',
|
|
255
255
|
'delete.untitled': '未命名会话',
|
|
@@ -346,8 +346,8 @@ window.__ModuleLoader__.load({
|
|
|
346
346
|
'settings.blankMenu.enabled.hint': 'Right-click blank space, thinking blocks or replies in the conversation body to open a vertical menu mirroring the top-right toolbar. When no button can be found the native menu is left alone.',
|
|
347
347
|
'settings.blankMenu.keepMoreLast.label': 'Pin "More" to the far right',
|
|
348
348
|
'settings.blankMenu.keepMoreLast.hint': 'Always put the "More" style entry last, regardless of its current position in the toolbar.',
|
|
349
|
-
'settings.blankMenu.showCostMeter.label': 'Show
|
|
350
|
-
'settings.blankMenu.showCostMeter.hint': 'Also list session cost
|
|
349
|
+
'settings.blankMenu.showCostMeter.label': 'Show top-left status widgets',
|
|
350
|
+
'settings.blankMenu.showCostMeter.hint': 'Also list the status widgets at the top-left of the session header (cost details, background job counter, …). Hidden as a whole by default; turn it on when you want them.',
|
|
351
351
|
'delete.title': 'Delete this session permanently?',
|
|
352
352
|
'delete.description': 'The log of "{name}" will be removed from disk. This cannot be undone.',
|
|
353
353
|
'delete.untitled': 'Untitled session',
|
|
@@ -2220,16 +2220,6 @@ window.__ModuleLoader__.load({
|
|
|
2220
2220
|
return candidates.some((candidate) => /更多打开方式|more open/i.test(headerButtonLabel(candidate)));
|
|
2221
2221
|
}
|
|
2222
2222
|
|
|
2223
|
-
/**
|
|
2224
|
-
* 工具条上的「本会话费用明细」一类统计入口(dsh-cost-meter 等)默认不列进菜单;
|
|
2225
|
-
* 这类按钮只有文字没有图标,点开是费用/后台任务面板。
|
|
2226
|
-
*/
|
|
2227
|
-
function isCostMeterButton(button, label) {
|
|
2228
|
-
const className = typeof button?.className === 'string' ? button.className : '';
|
|
2229
|
-
if (/cm-stat|cm-btn/i.test(className)) return true;
|
|
2230
|
-
return /费用明细|费用|cost|usage/i.test(label);
|
|
2231
|
-
}
|
|
2232
|
-
|
|
2233
2223
|
/**
|
|
2234
2224
|
* 收集工具条上的按钮,按屏幕从左到右排序;「更多」按开关压到末尾。
|
|
2235
2225
|
* 只统计真实可见、可点、有标签的节点:隐藏槽位、被 organizer 收进「…」的
|
|
@@ -2275,7 +2265,9 @@ window.__ModuleLoader__.load({
|
|
|
2275
2265
|
more,
|
|
2276
2266
|
menu: more ? findHeaderMenuController(button) : null,
|
|
2277
2267
|
openWith,
|
|
2278
|
-
|
|
2268
|
+
// 会话栏左上角(header actions 槽位)放的是费用 / 后台任务这类状态组件,
|
|
2269
|
+
// 不逐个认标签,整个槽位统一按状态入口处理,默认不列进菜单。
|
|
2270
|
+
stats: slot.section === 'actions',
|
|
2279
2271
|
section: slot.section,
|
|
2280
2272
|
left: rect.left,
|
|
2281
2273
|
top: rect.top,
|
|
@@ -2670,8 +2662,8 @@ window.__ModuleLoader__.load({
|
|
|
2670
2662
|
};
|
|
2671
2663
|
let openWithDone = false;
|
|
2672
2664
|
items.forEach((item, index) => {
|
|
2673
|
-
//
|
|
2674
|
-
if (item.
|
|
2665
|
+
// 费用 / 后台任务这类状态入口默认隐藏,设置里打开「显示状态与费用」才出现。
|
|
2666
|
+
if (item.stats && blankMenu.showCostMeter !== true) return;
|
|
2675
2667
|
// 设置里关掉「打开方式」时,空白菜单也不出现这一组,和工作区 / 会话右键一致。
|
|
2676
2668
|
if (item.openWith && itemsConfig.openWith === false) return;
|
|
2677
2669
|
if (item.openWith && ownOpenWith) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-sidebar-row-menu",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Adds open-with and cleanup entries to the DSH sidebar context menus (interleaved on 0.2.2+, self-drawn workspace menu on 0.2.1), plus a conversation-body right-click menu that mirrors the session header toolbar with in-menu open-with and more-actions submenus.",
|
|
6
6
|
"keywords": [
|