@sunshaobei/dsh-session-manager 3.0.4 → 3.0.5

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 +5 -4
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -251,7 +251,8 @@ window.__ModuleLoader__.load({
251
251
  try {
252
252
  active = hostLocale?.getLocale?.()?.active ?? hostLocale?.getSnapshot?.()?.active;
253
253
  } catch { /* service teardown — fall back to the browser */ }
254
- return /^zh(?:-|$)/i.test(String(active || browserLocale())) ? 'zh' : 'en';
254
+ if (String(active || '').trim() !== '') return /^zh(?:-|$)/i.test(String(active)) ? 'zh' : 'en';
255
+ return 'zh'; // no host locale service — the desktop app is zh-CN, default to Chinese
255
256
  }
256
257
 
257
258
  function t(key, params = {}) {
@@ -2138,11 +2139,11 @@ window.__ModuleLoader__.load({
2138
2139
  // 约等于视口 < 800px)就整项消失,这正是「设置里没有会话回收站」的真正原因。
2139
2140
  // 25 落在 20(mnemon「Memory System」)与 30(cost-meter「Cost」)之间,
2140
2141
  // 属于最上面几项,任何能看见设置导航的窗口都能看见它。
2141
- ctx.slots.inject('plugins.item', () =>
2142
+ ctx.slots.inject('settings.section', () =>
2142
2143
  ctx.slots.register(
2143
2144
  {
2144
- name: 'plugins.item',
2145
- id: '@sunshaobei/dsh-session-manager',
2145
+ name: 'settings.section',
2146
+ id: 'trash',
2146
2147
  order: 25,
2147
2148
  label: () => t('recycleBin'),
2148
2149
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunshaobei/dsh-session-manager",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "DSH 会话回收站:会话详情归档入口、回收站多选还原/彻底删除、活跃会话保护。 · Session trash & permanent delete for DeepSeek Harness.",
5
5
  "type": "module",
6
6
  "main": "index.js",