dsh-bots 0.2.18 → 0.2.19
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/lib/client.js +24 -7
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -284,7 +284,8 @@
|
|
|
284
284
|
.dbs-navBody{display:flex;flex-direction:column;min-height:0;flex:1}
|
|
285
285
|
.dbs-botsBody{overflow-y:auto;scrollbar-gutter:stable;padding-right:var(--dsh-sidebar-inline-padding,8px)}
|
|
286
286
|
.dbs-navBodyErr{padding:6px 12px;font-size:12px;line-height:20px;color:var(--dsw-alias-label-tertiary)}
|
|
287
|
-
.dbs-secHead{position:relative}
|
|
287
|
+
.dbs-secHead{position:relative;cursor:pointer;border-radius:8px}
|
|
288
|
+
.dbs-secHead:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
288
289
|
.dbs-secHead .dbs-rowActions{display:none}
|
|
289
290
|
.dbs-secHead:hover .dbs-rowActions,.dbs-secHead:focus-within .dbs-rowActions{display:inline-flex}
|
|
290
291
|
.dbs-secMenu{position:absolute;top:100%;right:0;z-index:40;min-width:148px;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);border-radius:12px;padding:4px;box-shadow:0 12px 40px rgba(0,0,0,.22);animation:dbs-modal-in .14s ease-out}
|
|
@@ -802,6 +803,7 @@
|
|
|
802
803
|
manageMembers: null,
|
|
803
804
|
settingsAgentId: null,
|
|
804
805
|
sectionMenu: null,
|
|
806
|
+
sectionsOpen: null,
|
|
805
807
|
/** Bumped on a language switch so module-scope `t` output re-renders. */
|
|
806
808
|
localeRev: 0,
|
|
807
809
|
};
|
|
@@ -1142,17 +1144,32 @@
|
|
|
1142
1144
|
*/
|
|
1143
1145
|
function sectionRows(label, list, addAction, menuKind, menuItems) {
|
|
1144
1146
|
const menuOpen = s.sectionMenu === menuKind;
|
|
1147
|
+
// Group-header collapse contract, mirrored from 「工作区|Bots」:
|
|
1148
|
+
// chevron + whole-row click toggle, body suppressed when closed.
|
|
1149
|
+
const isOpen = s.sectionsOpen?.[menuKind] !== false;
|
|
1150
|
+
const toggle = () => {
|
|
1151
|
+
patch({ sectionMenu: null, sectionsOpen: { ...(s.sectionsOpen ?? {}), [menuKind]: !isOpen } });
|
|
1152
|
+
};
|
|
1145
1153
|
return e('div', { key: label }, e('div', {
|
|
1146
|
-
className: 'dbs-navBodyErr dbs-secHead',
|
|
1154
|
+
className: 'dbs-navBodyErr dbs-secHead', role: 'button', tabIndex: 0, 'aria-expanded': isOpen,
|
|
1147
1155
|
// Native sectionHeader outdent: label at x=16 (12 sidebar
|
|
1148
1156
|
// padding + 4), aligned with the group headers. The previous
|
|
1149
1157
|
// 12px here pushed section labels 8px right of the native
|
|
1150
1158
|
// baseline, making both sections read horizontally off.
|
|
1151
|
-
style: { padding: '4px 8px 2px 4px', display: 'flex', alignItems: 'center' },
|
|
1152
|
-
|
|
1159
|
+
style: { padding: '4px 8px 2px 4px', display: 'flex', alignItems: 'center', gap: 2 },
|
|
1160
|
+
onClick: toggle,
|
|
1161
|
+
onKeyDown: (ev) => { if (ev.key === 'Enter' || ev.key === ' ') {
|
|
1162
|
+
ev.preventDefault();
|
|
1163
|
+
toggle();
|
|
1164
|
+
} },
|
|
1165
|
+
}, e(Chevron, { open: isOpen }), e('span', { style: { flex: 1 } }, label),
|
|
1153
1166
|
// Native workspace pattern: header actions appear on hover
|
|
1154
|
-
// (.dbs-rowActions is hover-gated in .dbs-secHead CSS)
|
|
1155
|
-
|
|
1167
|
+
// (.dbs-rowActions is hover-gated in .dbs-secHead CSS); their
|
|
1168
|
+
// clicks must not fold the section with them.
|
|
1169
|
+
e('div', {
|
|
1170
|
+
className: 'dbs-rowActions', style: { alignItems: 'center', gap: 2 },
|
|
1171
|
+
onClick: (ev) => { ev.stopPropagation(); },
|
|
1172
|
+
}, e(Button, {
|
|
1156
1173
|
variant: 'ghost', size: 'sm', title: addAction.title, 'aria-label': addAction.title,
|
|
1157
1174
|
icon: Ico('IconPlusOutline16', { size: 14 }),
|
|
1158
1175
|
onClick: addAction.onClick,
|
|
@@ -1165,7 +1182,7 @@
|
|
|
1165
1182
|
key: item.label, className: 'dbs-secMenuItem', type: 'button',
|
|
1166
1183
|
onClick: () => { patch({ sectionMenu: null }); item.onClick(); },
|
|
1167
1184
|
}, item.label))))
|
|
1168
|
-
: null), list.map(row));
|
|
1185
|
+
: null), isOpen ? list.map(row) : null);
|
|
1169
1186
|
}
|
|
1170
1187
|
// No footer: the gateway status moved to the Bots group-header dot's
|
|
1171
1188
|
// hover tooltip (0.2.8) — see SidebarNav's StateDot `title`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-bots",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.19",
|
|
4
4
|
"description": "Multi-bot workbench for DeepSeek Harness: bridges the sdk-bots orchestration gateway (group chats, single bots) into the dsh web shell with official-styled UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|