@restregular/dsh-powerup 0.8.3 → 0.8.4

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.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/client.js +27 -4
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -116,6 +116,9 @@ entries other plugins add) become an icon grid instead of a one-per-row list:
116
116
  its own (chat glyph + label) that calls `layout.selectPanel(null)` to return
117
117
  to the Conversation; it highlights when no global panel is selected, can be
118
118
  placed anywhere by dragging, and never joins a folder either.
119
+ - **Ungroup expands in place.** Dissolving a folder puts its icons back on the
120
+ grid exactly where the folder sat, in the folder's own order — nothing jumps
121
+ to the end of the grid.
119
122
  - **Drag inside a folder.** Tiles in the flyout are drag handles: drag one over
120
123
  another to reorder the folder's contents, or drag it out of the flyout and
121
124
  drop it anywhere else to put it back on the grid right after the folder
package/client.js CHANGED
@@ -69,7 +69,7 @@
69
69
 
70
70
  const NS = 'dsh-powerup';
71
71
  const SETTINGS_KEY = 'dsh-powerup:settings:v1';
72
- const VERSION = '0.8.3';
72
+ const VERSION = '0.8.4';
73
73
  const MENU_GAP = 8;
74
74
  const MENU_WIDTH = 248;
75
75
  /** Reference scheme understood by the Host's `powerup_step_read` tool. */
@@ -630,6 +630,30 @@
630
630
  return { order, groups };
631
631
  }
632
632
 
633
+ /**
634
+ * Replace a folder entry with its members, in the folder's own order, at
635
+ * the exact position the folder occupied. Used by "ungroup" so dissolving
636
+ * a folder is a pure expansion and never scatters the icons to the end.
637
+ * @param {string[]} order current top-level order
638
+ * @param {string} folderEntry the `group:<id>` entry being dissolved
639
+ * @param {string[]} items member keys in folder order
640
+ * @returns {string[]} the new top-level order
641
+ */
642
+ function dissolveGroupOrder(order, folderEntry, items) {
643
+ const source = Array.isArray(order) ? order : [];
644
+ const list = source.filter((entry) => entry !== folderEntry);
645
+ const index = source.indexOf(folderEntry);
646
+ const members = [];
647
+ for (const key of Array.isArray(items) ? items : []) {
648
+ if (typeof key !== 'string' || key === '' || key.startsWith('__')) continue;
649
+ if (list.includes(key) || members.includes(key)) continue;
650
+ members.push(key);
651
+ }
652
+ const insertAt = index < 0 ? list.length : Math.min(index, list.length);
653
+ list.splice(insertAt, 0, ...members);
654
+ return list;
655
+ }
656
+
633
657
  /**
634
658
  * DOM-driven controller for the sidebar launcher.
635
659
  *
@@ -1458,9 +1482,7 @@
1458
1482
  if (group === undefined) return;
1459
1483
  const groups = { ...state.groups };
1460
1484
  delete groups[groupId];
1461
- const order = state.order
1462
- .filter((entry) => entry !== launcherGroupEntry(groupId))
1463
- .concat(group.items.filter((key) => !state.order.includes(key)));
1485
+ const order = dissolveGroupOrder(state.order, launcherGroupEntry(groupId), group.items);
1464
1486
  state = { order, groups };
1465
1487
  save();
1466
1488
  closePopup();
@@ -5628,6 +5650,7 @@ nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>button:hover [class*="panelTi
5628
5650
  LAUNCHER_CSS,
5629
5651
  LAUNCHER_STORAGE_KEY,
5630
5652
  normalizeLauncherState,
5653
+ dissolveGroupOrder,
5631
5654
  createLauncherCore,
5632
5655
  installLauncher,
5633
5656
  PowerUpLineIcon,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restregular/dsh-powerup",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "Power-Up — small, opt-in upgrades for DeepSeek Harness. Adds a right-click action menu to the Trajectory ledger, an optional stop reason in the session header's background jobs panel (appended to the injected completion notice), and an install control for third-party plugins from the Plugins page: read versions from the configured registries, install the version in the input through the Add plugin path (removing the old copy first), mark restart-needed installs, hand Power-Up's own install to the background, and optionally restart DSH. One-click install skips the enable and restart questions and can apply those actions automatically with configurable defaults. The ledger menu also copies a step reference (session id + step id) that the read-only powerup_step_read tool resolves back into the raw session data. · 为 DeepSeek Harness 提供小型增强:在轨迹页面右键记录即可复制、引用、查看详情或从该记录 Fork;右键「复制步骤引用」得到「会话 ID + 步骤 ID」,Agent 用只读工具 powerup_step_read 即可取回该步骤的完整原始数据;在会话顶部的后台任务面板手动停止任务时可填写停止原因,原因会附加到任务结束后的会话提示;并在插件页为第三方已安装插件提供安装按钮,从安装源读取版本,按输入框中的版本沿用「添加插件」流程安装(先卸载旧版),支持待重启标记、Power-Up 自身后台安装与可选重启;安装面板提供「一键安装」,按输入框版本安装并跳过启用/重启询问,默认自动启用并重启,可在 Power-Up 页面调整默认行为。 · 侧边栏启动器:把左侧边栏的面板按钮变成随宽度自适应的图标网格(图标在上、文字在下),支持拖拽排序与分组(拖到另一个图标中间即合并为分组,点击分组弹出浮层展示内部图标),可随时整体关闭。",
5
5
  "icon": "./icon.svg",
6
6
  "type": "module",