dsh-sidebar-row-menu 1.9.0 → 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 +40 -0
- package/README.en.md +6 -0
- package/README.md +4 -0
- package/lib/client.js +23 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
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
|
+
|
|
25
|
+
## 1.9.1 — 2026-11-06
|
|
26
|
+
|
|
27
|
+
### 中文摘要
|
|
28
|
+
|
|
29
|
+
- **「本会话费用明细」默认不再出现在会话正文右键菜单里。** 这类费用 / 用量统计入口
|
|
30
|
+
只有文字、点开是统计面板,和工具条按钮不同类,所以默认不列出。设置 →「行菜单」
|
|
31
|
+
新增「显示费用明细」开关(默认关闭),需要时打开即可恢复;旧配置里没有这个字段时
|
|
32
|
+
也按默认关闭处理,不用清缓存。
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- **Session cost entries are no longer listed in the conversation-body menu by
|
|
37
|
+
default.** Cost / usage stats entries such as "Session cost" are text-only and open
|
|
38
|
+
a stats panel, so they are now treated differently from toolbar buttons and stay
|
|
39
|
+
hidden. A new "Show cost details" switch under Settings → row menu (off by default)
|
|
40
|
+
brings them back; existing saved settings without the new field also default to
|
|
41
|
+
hidden.
|
|
42
|
+
|
|
3
43
|
## 1.9.0 — 2026-11-06
|
|
4
44
|
|
|
5
45
|
### 中文摘要
|
package/README.en.md
CHANGED
|
@@ -140,6 +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
|
+
- 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;
|
|
143
148
|
- selecting an ordinary row is a real click: the menu closes, then a `click` is
|
|
144
149
|
dispatched to the original header button, so "Find", "Toggle bottom panel" and
|
|
145
150
|
friends still open their native popovers;
|
|
@@ -166,6 +171,7 @@ Settings → "Row menu" toggles every new entry:
|
|
|
166
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
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 |
|
|
168
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 |
|
|
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 |
|
|
169
175
|
|
|
170
176
|
The "Also show in the "…" menu" switches are all off by default; until one is
|
|
171
177
|
enabled the "…" menu is exactly DSH's own.
|
package/README.md
CHANGED
|
@@ -113,6 +113,9 @@ DSH 0.2.2 把侧栏右键改成数据驱动:工作区菜单由宿主统一渲
|
|
|
113
113
|
都与 DSH 原生右键菜单对齐;
|
|
114
114
|
- 「更多操作」一类的溢出入口固定放在最后一项(可在设置里关掉);被 organizer 收进
|
|
115
115
|
「更多操作」的按钮不会单独出现;
|
|
116
|
+
- 会话栏左上角的状态组件(`conversation.session.header.actions` 槽位:费用明细、
|
|
117
|
+
后台任务计数等)整体不列进菜单,设置里打开「显示左上角状态组件」后才出现。这条规则
|
|
118
|
+
按槽位判断、不认识具体标签,所以宿主或插件以后往这个槽位加的状态组件也默认隐藏;
|
|
116
119
|
- 点普通条目就是点原按钮:先关菜单,再把 `click` 派发给宿主工具条里的那个按钮,所以
|
|
117
120
|
「查找」「展开底部面板」等弹出的仍是原生面板;
|
|
118
121
|
- 有选中文字时让位给浏览器的选区菜单;消息里的输入控件和链接也保留原生菜单;工具卡片、
|
|
@@ -135,6 +138,7 @@ DSH 0.2.2 把侧栏右键改成数据驱动:工作区菜单由宿主统一渲
|
|
|
135
138
|
| 同时放进「…」菜单 → 会话 | 逐项把会话行右键条目加进原生「…」菜单:打开方式、永久删除会话、删除所有已归档会话 |
|
|
136
139
|
| 启用空白处右键菜单 | 会话正文(空白处、思考过程、回复)的右键菜单总开关(默认开启);关闭后该区域恢复浏览器 / 宿主的原生菜单 |
|
|
137
140
|
| 「更多」固定在最右 | 默认开启;把「更多操作」一类的溢出入口固定在菜单最后一项,不受工具条当前顺序影响 |
|
|
141
|
+
| 显示左上角状态组件 | 默认关闭;打开后会话栏左上角 `conversation.session.header.actions` 槽位里的组件(费用明细、后台任务计数等)也会列进正文右键菜单 |
|
|
138
142
|
|
|
139
143
|
「同时放进「…」菜单」下的开关默认全部关闭,`…` 菜单在未开启时与 DSH 完全一致。
|
|
140
144
|
|
package/lib/client.js
CHANGED
|
@@ -153,6 +153,7 @@ window.__ModuleLoader__.load({
|
|
|
153
153
|
const BLANK_MENU_DEFAULTS = {
|
|
154
154
|
enabled: true,
|
|
155
155
|
keepMoreLast: true,
|
|
156
|
+
showCostMeter: false,
|
|
156
157
|
};
|
|
157
158
|
const BLANK_MENU_KEYS = Object.keys(BLANK_MENU_DEFAULTS);
|
|
158
159
|
/** 「更多操作」类入口的标签;用于按用户要求把它固定在菜单末尾。 */
|
|
@@ -241,12 +242,14 @@ window.__ModuleLoader__.load({
|
|
|
241
242
|
'settings.ellipsis.sessionDelete.hint': '在「…」菜单里永久删除这一个会话及其日志。',
|
|
242
243
|
'settings.ellipsis.sessionDeleteArchived.label': '删除所有已归档会话',
|
|
243
244
|
'settings.ellipsis.sessionDeleteArchived.hint': '在已归档会话的「…」菜单里一次清理全部归档会话。',
|
|
244
|
-
'settings.blankMenuTitle': '
|
|
245
|
-
'settings.blankMenuNote': '
|
|
246
|
-
'settings.blankMenu.enabled.label': '
|
|
247
|
-
'settings.blankMenu.enabled.hint': '
|
|
245
|
+
'settings.blankMenuTitle': '会话正文右键',
|
|
246
|
+
'settings.blankMenuNote': '在会话正文里右键(空白处、思考过程、回复都可以),会按顶部工具条的视觉顺序列出那排按钮;装了 dsh-sidebar-organizer 时跟随它的排序。分组之间自动加分隔线,「打开方式」和「更多操作」按工作区 / 会话菜单的规则收纳。输入框、工具卡片和工具条本身仍走各自的原生菜单。',
|
|
247
|
+
'settings.blankMenu.enabled.label': '启用正文右键菜单',
|
|
248
|
+
'settings.blankMenu.enabled.hint': '在会话正文的空白处、思考过程或回复上右键,弹出与右上角工具条一致的纵向菜单;取不到按钮时不接管原生菜单。',
|
|
248
249
|
'settings.blankMenu.keepMoreLast.label': '「更多」固定在最右',
|
|
249
250
|
'settings.blankMenu.keepMoreLast.hint': '把「更多操作」一类的入口固定在菜单最后一项,不受工具条当前顺序影响。',
|
|
251
|
+
'settings.blankMenu.showCostMeter.label': '显示左上角状态组件',
|
|
252
|
+
'settings.blankMenu.showCostMeter.hint': '把会话栏左上角的状态组件(费用明细、后台任务计数等)也列进菜单;默认整体隐藏,需要时再打开。',
|
|
250
253
|
'delete.title': '永久删除会话?',
|
|
251
254
|
'delete.description': '会话「{name}」的日志将从磁盘永久删除,此操作无法撤销。',
|
|
252
255
|
'delete.untitled': '未命名会话',
|
|
@@ -337,12 +340,14 @@ window.__ModuleLoader__.load({
|
|
|
337
340
|
'settings.ellipsis.sessionDelete.hint': 'Permanently delete this session and its log from the "…" menu.',
|
|
338
341
|
'settings.ellipsis.sessionDeleteArchived.label': 'Delete all archived sessions',
|
|
339
342
|
'settings.ellipsis.sessionDeleteArchived.hint': 'Clean up every archived session from an archived row\'s "…" menu.',
|
|
340
|
-
'settings.blankMenuTitle': 'Right-click
|
|
341
|
-
'settings.blankMenuNote': 'Right-click
|
|
342
|
-
'settings.blankMenu.enabled.label': 'Enable
|
|
343
|
-
'settings.blankMenu.enabled.hint': 'Right-click
|
|
343
|
+
'settings.blankMenuTitle': 'Right-click in the conversation body',
|
|
344
|
+
'settings.blankMenuNote': 'Right-click anywhere in the conversation body (blank space, thinking blocks or replies) to list the header toolbar buttons in their visual order. With dsh-sidebar-organizer installed the order follows its layout. Sections are separated by faint rules and "Open with" / "More actions" are collapsed like the workspace / session menus. Inputs, tool cards and the toolbar keep their own native menus.',
|
|
345
|
+
'settings.blankMenu.enabled.label': 'Enable conversation-body context menu',
|
|
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.',
|
|
344
347
|
'settings.blankMenu.keepMoreLast.label': 'Pin "More" to the far right',
|
|
345
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 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.',
|
|
346
351
|
'delete.title': 'Delete this session permanently?',
|
|
347
352
|
'delete.description': 'The log of "{name}" will be removed from disk. This cannot be undone.',
|
|
348
353
|
'delete.untitled': 'Untitled session',
|
|
@@ -823,7 +828,9 @@ window.__ModuleLoader__.load({
|
|
|
823
828
|
|
|
824
829
|
/** 该项默认开启:只有显式存成 false 才关闭。 */
|
|
825
830
|
function blankOption(key) {
|
|
826
|
-
|
|
831
|
+
const value = blankMenuSettings[key];
|
|
832
|
+
if (typeof value === 'boolean') return value;
|
|
833
|
+
return BLANK_MENU_DEFAULTS[key] !== false;
|
|
827
834
|
}
|
|
828
835
|
|
|
829
836
|
/* ------------------------------------- 打开方式:应用列表与二级开关 */
|
|
@@ -1617,6 +1624,7 @@ window.__ModuleLoader__.load({
|
|
|
1617
1624
|
const BLANK_MENU_ROWS = [
|
|
1618
1625
|
['enabled', 'settings.blankMenu.enabled.label', 'settings.blankMenu.enabled.hint'],
|
|
1619
1626
|
['keepMoreLast', 'settings.blankMenu.keepMoreLast.label', 'settings.blankMenu.keepMoreLast.hint'],
|
|
1627
|
+
['showCostMeter', 'settings.blankMenu.showCostMeter.label', 'settings.blankMenu.showCostMeter.hint'],
|
|
1620
1628
|
];
|
|
1621
1629
|
|
|
1622
1630
|
/**
|
|
@@ -2257,6 +2265,9 @@ window.__ModuleLoader__.load({
|
|
|
2257
2265
|
more,
|
|
2258
2266
|
menu: more ? findHeaderMenuController(button) : null,
|
|
2259
2267
|
openWith,
|
|
2268
|
+
// 会话栏左上角(header actions 槽位)放的是费用 / 后台任务这类状态组件,
|
|
2269
|
+
// 不逐个认标签,整个槽位统一按状态入口处理,默认不列进菜单。
|
|
2270
|
+
stats: slot.section === 'actions',
|
|
2260
2271
|
section: slot.section,
|
|
2261
2272
|
left: rect.left,
|
|
2262
2273
|
top: rect.top,
|
|
@@ -2601,6 +2612,7 @@ window.__ModuleLoader__.load({
|
|
|
2601
2612
|
const hostRef = useRef(null);
|
|
2602
2613
|
const [pos, setPos] = useState(null);
|
|
2603
2614
|
const itemsConfig = useItems();
|
|
2615
|
+
const blankMenu = useBlankMenu();
|
|
2604
2616
|
const apps = useApps();
|
|
2605
2617
|
useChildren();
|
|
2606
2618
|
usePinned();
|
|
@@ -2650,6 +2662,8 @@ window.__ModuleLoader__.load({
|
|
|
2650
2662
|
};
|
|
2651
2663
|
let openWithDone = false;
|
|
2652
2664
|
items.forEach((item, index) => {
|
|
2665
|
+
// 费用 / 后台任务这类状态入口默认隐藏,设置里打开「显示状态与费用」才出现。
|
|
2666
|
+
if (item.stats && blankMenu.showCostMeter !== true) return;
|
|
2653
2667
|
// 设置里关掉「打开方式」时,空白菜单也不出现这一组,和工作区 / 会话右键一致。
|
|
2654
2668
|
if (item.openWith && itemsConfig.openWith === false) return;
|
|
2655
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": [
|