@restregular/dsh-powerup 0.19.11 → 0.19.12

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 (2) hide show
  1. package/client.js +50 -18
  2. package/package.json +2 -2
package/client.js CHANGED
@@ -98,7 +98,7 @@
98
98
  const requirementCreateDraft = { workspaceId: null, title: '', text: '', scope: 'current' };
99
99
  /** Fallback bucket when the hero cannot resolve an owning workspace yet. */
100
100
  const UNSCOPED_WORKSPACE = '__unscoped__';
101
- const VERSION = '0.19.11';
101
+ const VERSION = '0.19.12';
102
102
  const MENU_GAP = 8;
103
103
  const MENU_WIDTH = 248;
104
104
  /** Reference scheme understood by the Host's `powerup_step_read` tool. */
@@ -118,6 +118,8 @@
118
118
  'page.featureDesc': '在轨迹页面右键任意记录,快速复制、引用、查看详情、复制步骤引用,或从该记录 Fork 出一个新会话。',
119
119
  'page.enabled': '已启用',
120
120
  'page.disabled': '已停用',
121
+ 'page.details': '详情',
122
+ 'page.collapse': '收起',
121
123
  'page.actions': '可用操作',
122
124
  'page.howTitle': '怎么用',
123
125
  'page.how1': '打开任意会话,切到顶部的「轨迹」视图。',
@@ -527,6 +529,8 @@
527
529
  'page.featureDesc': 'Right-click any trajectory record to copy it, quote it, open its inspector, copy a step reference, or fork the session at that point.',
528
530
  'page.enabled': 'Enabled',
529
531
  'page.disabled': 'Disabled',
532
+ 'page.details': 'Details',
533
+ 'page.collapse': 'Hide',
530
534
  'page.actions': 'What you can do',
531
535
  'page.howTitle': 'How to use it',
532
536
  'page.how1': 'Open a session and switch to the Trajectory view.',
@@ -4200,9 +4204,14 @@ nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>[data-powerup-grid]:hover [cl
4200
4204
  .dsh-powerup-card{margin:0 0 14px;padding:16px;border:1px solid var(--dsw-alias-border-l1);border-radius:12px;background:var(--dsw-alias-bg-layer-1);transition:opacity .14s ease}
4201
4205
  .dsh-powerup-card.is-off .dsh-powerup-card-icon,.dsh-powerup-card.is-off .dsh-powerup-card-copy{opacity:.55}
4202
4206
  .dsh-powerup-card-head{display:flex;align-items:flex-start;gap:12px}
4203
- .dsh-powerup-card-how{margin:12px 0 0;padding:10px 12px;border-radius:var(--dsw-radius-md,8px);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.55;overflow-wrap:anywhere}
4207
+ .dsh-powerup-card-body{margin-top:12px}
4208
+ .dsh-powerup-card-how{margin:0 0 0;padding:10px 12px;border-radius:var(--dsw-radius-md,8px);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.55;overflow-wrap:anywhere}
4204
4209
  .dsh-powerup-card-detail{margin-top:12px;padding-top:4px}
4205
4210
  .dsh-powerup-how-card .dsh-powerup-section-title{margin-bottom:10px}
4211
+ .dsh-powerup-detail-btn{flex:none;padding:3px 9px;border:.5px solid var(--dsw-alias-border-l2);border-radius:7px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:11px;line-height:18px;cursor:pointer;white-space:nowrap}
4212
+ .dsh-powerup-detail-btn:hover{background:var(--dsw-alias-interactive-bg-hover,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-primary)}
4213
+ .dsh-powerup-detail-btn.on{color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}
4214
+ .dsh-powerup-detail-btn:focus-visible{outline:2px solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:1px}
4206
4215
  .dsh-powerup-card-icon{flex:none;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary)}
4207
4216
  .dsh-powerup-card-copy{min-width:0;flex:1 1 auto}
4208
4217
  .dsh-powerup-card-copy h2{margin:0;font-size:14px;line-height:1.35;font-weight:650}
@@ -4399,7 +4408,7 @@ nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>[data-powerup-grid]:hover [cl
4399
4408
  .dsh-powerup-update-quick-note-title{display:flex;align-items:center;gap:6px;color:var(--dsw-alias-state-warn-label);font-size:12px;line-height:17px;font-weight:500}
4400
4409
  .dsh-powerup-update-quick-note .dsh-powerup-update-note{color:var(--dsw-alias-label-secondary)}
4401
4410
  .dsh-powerup-update-close:focus-visible,.dsh-powerup-update-toggle:focus-visible,.dsh-powerup-update-version:focus-visible,.dsh-powerup-update-select-trigger:focus-visible,.dsh-powerup-update-option:focus-visible,.dsh-powerup-update-primary:focus-visible,.dsh-powerup-update-ghost:focus-visible,.dsh-powerup-update-quick:focus-visible,.dsh-powerup-update-button:focus-visible,.dsh-powerup-restart-action:focus-visible,.dsh-powerup-update-default:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:1px}
4402
- @media (max-width:680px){.dsh-powerup-page{padding:20px 16px 42px}.dsh-powerup-actions{grid-template-columns:minmax(0,1fr)}.dsh-powerup-hero-art{width:54px;height:54px}.dsh-powerup-hero h1{font-size:19px}.dsh-powerup-card-head{flex-wrap:wrap}.dsh-powerup-switch{margin-left:auto}.dsh-powerup-update-mask{padding:12px}.dsh-powerup-update-dialog{max-height:calc(100dvh - 24px)}.dsh-powerup-update-head{padding:18px 12px 10px 18px}.dsh-powerup-update-body{padding:0 18px 4px}.dsh-powerup-update-foot{padding:14px 18px 18px}}
4411
+ @media (max-width:680px){.dsh-powerup-page{padding:20px 16px 42px}.dsh-powerup-actions{grid-template-columns:minmax(0,1fr)}.dsh-powerup-hero-art{width:54px;height:54px}.dsh-powerup-hero h1{font-size:19px}.dsh-powerup-card-head{flex-wrap:wrap}.dsh-powerup-detail-btn{margin-left:auto}.dsh-powerup-update-mask{padding:12px}.dsh-powerup-update-dialog{max-height:calc(100dvh - 24px)}.dsh-powerup-update-head{padding:18px 12px 10px 18px}.dsh-powerup-update-body{padding:0 18px 4px}.dsh-powerup-update-foot{padding:14px 18px 18px}}
4403
4412
  `;
4404
4413
 
4405
4414
  const SESSION_SWITCH_CSS = `
@@ -10811,6 +10820,7 @@ html[data-platform="darwin"] .dsh-powerup-scrolltop:hover{background:var(--dsw-s
10811
10820
  const settings = useSettings();
10812
10821
  const [, forceLocale] = useState(0);
10813
10822
  const [tab, setTab] = useState('features');
10823
+ const [expandedCards, setExpandedCards] = useState(() => new Set());
10814
10824
  useEffect(() => {
10815
10825
  const locale = ctx.get('locale');
10816
10826
  if (locale === undefined || typeof locale.subscribe !== 'function') return undefined;
@@ -10853,22 +10863,44 @@ html[data-platform="darwin"] .dsh-powerup-scrolltop:hover{background:var(--dsw-s
10853
10863
  );
10854
10864
  };
10855
10865
 
10856
- /** One uniform feature card: icon + title + description + toggle, with optional detail rows. */
10857
- const featureCard = (key, iconComp, titleKey, descKey, howKey, detail) => h('section', {
10858
- key,
10859
- className: 'dsh-powerup-card' + (settings[key] === false ? ' is-off' : ''),
10860
- },
10861
- h('div', { className: 'dsh-powerup-card-head' },
10862
- h('div', { className: 'dsh-powerup-card-icon' }, h(iconComp, { size: 18 })),
10863
- h('div', { className: 'dsh-powerup-card-copy' },
10864
- h('h2', null, t(titleKey)),
10865
- h('p', null, t(descKey)),
10866
+ /** One uniform feature card: icon + title + description, a details button that folds the body, and an enable/disable switch. */
10867
+ const featureCard = (key, iconComp, titleKey, descKey, howKey, detail) => {
10868
+ const hasDetail = howKey !== undefined || detail !== undefined;
10869
+ const expanded = expandedCards.has(key);
10870
+ const toggleExpanded = () => {
10871
+ const next = new Set(expandedCards);
10872
+ if (next.has(key)) next.delete(key);
10873
+ else next.add(key);
10874
+ setExpandedCards(next);
10875
+ };
10876
+ return h('section', {
10877
+ key,
10878
+ className: 'dsh-powerup-card' + (settings[key] === false ? ' is-off' : ''),
10879
+ },
10880
+ h('div', { className: 'dsh-powerup-card-head' },
10881
+ h('div', { className: 'dsh-powerup-card-icon' }, h(iconComp, { size: 18 })),
10882
+ h('div', { className: 'dsh-powerup-card-copy' },
10883
+ h('h2', null, t(titleKey)),
10884
+ h('p', null, t(descKey)),
10885
+ ),
10886
+ hasDetail
10887
+ ? h('button', {
10888
+ type: 'button',
10889
+ className: 'dsh-powerup-detail-btn' + (expanded ? ' on' : ''),
10890
+ 'aria-expanded': expanded ? 'true' : 'false',
10891
+ onClick: toggleExpanded,
10892
+ }, t(expanded ? 'page.collapse' : 'page.details'))
10893
+ : null,
10894
+ toggle(key, t(titleKey)),
10866
10895
  ),
10867
- toggle(key, t(titleKey)),
10868
- ),
10869
- howKey !== undefined ? h('p', { className: 'dsh-powerup-card-how' }, t(howKey)) : null,
10870
- detail ?? null,
10871
- );
10896
+ hasDetail && expanded
10897
+ ? h('div', { className: 'dsh-powerup-card-body' },
10898
+ howKey !== undefined ? h('p', { className: 'dsh-powerup-card-how' }, t(howKey)) : null,
10899
+ detail ?? null,
10900
+ )
10901
+ : null,
10902
+ );
10903
+ };
10872
10904
 
10873
10905
  /** A label/hint sub-row inside a card (for secondary options). */
10874
10906
  const settingRow = (key, checked, label, hint) => h('div', { key, className: 'dsh-powerup-setting' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restregular/dsh-powerup",
3
- "version": "0.19.11",
3
+ "version": "0.19.12",
4
4
  "description": "为 DeepSeek Harness 提供一组可选的小型增强:轨迹右键菜单与步骤引用、后台任务停止原因、插件一键安装、侧边栏图标网格、会话切换、定位当前会话、工作区提示词、旁路模型生成的结构化任务进度;所有功能均可在 Power-Up 页面独立开关。 · Opt-in upgrades for DeepSeek Harness: Trajectory context menu and step references, job stop reasons, one-click plugin install, an adaptive sidebar launcher, session switching, locating the current session, workspace prompts, and non-blocking model-generated structured task progress — each toggled independently on the Power-Up page.",
5
5
  "icon": "./icon.svg",
6
6
  "type": "module",
@@ -104,4 +104,4 @@
104
104
  "license": "MIT",
105
105
  "author": "RestRegular"
106
106
  }
107
-
107
+