@sunshaobei/dsh-session-manager 3.0.7 → 3.0.9

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/client.css +5 -0
  2. package/client.js +11 -17
  3. package/package.json +1 -1
package/client.css CHANGED
@@ -1611,3 +1611,8 @@ body:not([data-ds-dark-theme]) .dsh-trash-container { color-scheme: light; }
1611
1611
  animation: none;
1612
1612
  }
1613
1613
  }
1614
+
1615
+ /* Embedded in the plugin detail page: drop the outer padding/margins — the page provides its own. */
1616
+ .dsh-trash-embedded { padding: 0 !important; margin: 0 !important; }
1617
+ .dsh-trash-embedded .dsh-trash-header { padding: 0 0 8px 0 !important; margin: 0 !important; }
1618
+ .dsh-trash-embedded .dsh-trash-title { display: none !important; }
package/client.js CHANGED
@@ -1578,14 +1578,10 @@ window.__ModuleLoader__.load({
1578
1578
  return groupOrder.map((key) => groups.get(key)).filter(Boolean);
1579
1579
  }, [items, searchQuery, filterWorkspace, sortOrder, ctx]);
1580
1580
 
1581
- return h('div', { className: 'dsh-trash-container' },
1582
- // Header
1581
+ return h('div', { className: 'dsh-trash-container dsh-trash-embedded' },
1582
+ // Header (compact: only the archived count, no duplicated title)
1583
1583
  h('div', { className: 'dsh-trash-header' },
1584
1584
  h('div', { className: 'dsh-trash-header-left' },
1585
- h('h2', { className: 'dsh-trash-title' },
1586
- renderTrashIcon({ className: 'dsh-trash-icon-title' }),
1587
- t('recycleBin')
1588
- ),
1589
1585
  h('p', { className: 'dsh-trash-subtitle' }, t('archivedCount', { count: items.length }))
1590
1586
  )
1591
1587
  ),
@@ -2139,8 +2135,9 @@ window.__ModuleLoader__.load({
2139
2135
  // 约等于视口 < 800px)就整项消失,这正是「设置里没有会话回收站」的真正原因。
2140
2136
  // 25 落在 20(mnemon「Memory System」)与 30(cost-meter「Cost」)之间,
2141
2137
  // 属于最上面几项,任何能看见设置导航的窗口都能看见它。
2142
- // 插件管理二级页(plugins.bundle.config,同 dsh-context)
2143
- const CFG_NS = 'session-trash'; // 与 cordis patch 行 id 一致
2138
+ // 插件管理二级页(plugins.bundle.config,同 dsh-context):
2139
+ // key 必须等于插件包名(页面用 configured = bundles.has(pkg.name) 决定是否渲染配置区)。
2140
+ const CFG_KEY = '@sunshaobei/dsh-session-manager';
2144
2141
  const settingsStore = (() => {
2145
2142
  let form; let state = {}; const listeners = new Set();
2146
2143
  const notify = () => listeners.forEach((fn) => fn());
@@ -2153,16 +2150,13 @@ window.__ModuleLoader__.load({
2153
2150
  })();
2154
2151
  const registerPluginsPageCard = (env) => {
2155
2152
  const cf = env && env.configForms;
2156
- if (!cf || typeof cf.get !== 'function' || typeof cf.whileServed !== 'function') return;
2157
- ctx.effect(() => settingsStore.attach(cf.get(CFG_NS)), 'session-trash: config forms');
2158
- ctx.effect(() => cf.whileServed([CFG_NS], () =>
2159
- ctx.slots.inject('plugins.bundle.config', () =>
2160
- ctx.slots.register(
2161
- { name: 'plugins.bundle.config', key: CFG_NS, inject: () => ({ hooks: { sessionTrash: settingsStore }, set: (k, v) => settingsStore.set(k, v) }) },
2162
- (props) => TrashTab({ ...props, ctx })
2163
- )
2153
+ if (cf && typeof cf.get === 'function') { try { settingsStore.attach(cf.get(CFG_KEY)); } catch {} }
2154
+ ctx.slots.inject('plugins.bundle.config', () =>
2155
+ ctx.slots.register(
2156
+ { name: 'plugins.bundle.config', key: CFG_KEY, inject: () => ({ hooks: { sessionTrash: settingsStore }, set: (k, v) => settingsStore.set(k, v) }) },
2157
+ (props) => TrashTab({ ...props, ctx })
2164
2158
  )
2165
- ), 'session-trash: plugins-page card');
2159
+ );
2166
2160
  };
2167
2161
  if (typeof ctx.inject === 'function') ctx.inject(['configForms'], registerPluginsPageCard);
2168
2162
  else registerPluginsPageCard(ctx);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunshaobei/dsh-session-manager",
3
- "version": "3.0.7",
3
+ "version": "3.0.9",
4
4
  "description": "DSH 会话回收站:会话详情归档入口、回收站多选还原/彻底删除、活跃会话保护。 · Session trash & permanent delete for DeepSeek Harness.",
5
5
  "type": "module",
6
6
  "main": "index.js",