@sligqoer/dsh-usage-stats 0.2.1 → 0.2.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # 更新日志 / Changelog
2
2
 
3
+ ## 0.2.3 - 2026-10-16
4
+
5
+ <a id="v023-zh"></a>
6
+ **简体中文** · [English](#v023-en)
7
+
8
+ ### 🐛 问题修复
9
+
10
+ - 适配 DSH Desktop 0.2.0-rc.2 的桌面渲染器标记:preload 桥 `dshDesktop` 只暴露 `protocolVersion`,不再提供 `deviceInfo` 函数。「用量统计」设置页此前因此不注册,现在新旧两种标记都接受,纯浏览器访问仍保持不挂载。`0.2.1-alpha.2` 与 `0.2.0-rc.2` 两个宿主版本均受支持。
11
+
12
+ <a id="v023-en"></a>
13
+ **English** · [简体中文](#v023-zh)
14
+
15
+ ### 🐛 Bug Fixes
16
+
17
+ - Adapt to the DSH Desktop 0.2.0-rc.2 renderer marker: the `dshDesktop` preload bridge exposes only `protocolVersion` and no longer carries a `deviceInfo` function. The usage statistics settings page failed to register because of this; both markers are now accepted, while plain browser tabs still never mount. Both `0.2.1-alpha.2` and `0.2.0-rc.2` hosts remain supported.
18
+
19
+ ## 0.2.2 - 2026-10-16
20
+
21
+ <a id="v022-zh"></a>
22
+ **简体中文** · [English](#v022-en)
23
+
24
+ ### 🐛 问题修复
25
+
26
+ - 修正 DSH Desktop 兼容版本声明为 0.2.0-rc.2,避免该版本被宿主插件管理器误拒绝安装或启用。
27
+ - 保留 0.2.1-alpha.2 支持,并同步安装说明与中英日插件描述。
28
+
29
+ <a id="v022-en"></a>
30
+ **English** · [简体中文](#v022-zh)
31
+
32
+ ### 🐛 Bug Fixes
33
+
34
+ - Correct the DSH Desktop compatibility declaration to 0.2.0-rc.2 so the host plugin manager accepts installation and activation on that version.
35
+ - Retain support for 0.2.1-alpha.2 and update installation instructions and Chinese, English and Japanese plugin descriptions.
36
+
3
37
  ## 0.2.1 - 2026-10-14
4
38
 
5
39
  <a id="v021-zh"></a>
package/README.en.md CHANGED
@@ -74,7 +74,7 @@ Detection compares random-number samples with a reference library. Rankings and
74
74
 
75
75
  ## Installation
76
76
 
77
- Plugin version **0.2.1** requires **DSH Desktop `0.2.1-alpha.2` or `0.2.1-rc.2`**. The host plugin manager rejects installation or activation on a mismatched runtime.
77
+ Plugin version **0.2.3** requires **DSH Desktop `0.2.1-alpha.2` or `0.2.0-rc.2`**. The host plugin manager rejects installation or activation on a mismatched runtime.
78
78
 
79
79
  **Recommended: install the [npm package `@sligqoer/dsh-usage-stats`](https://www.npmjs.com/package/@sligqoer/dsh-usage-stats) through DSH Desktop.** It includes prebuilt modules, needs no Git checkout or local build, and supports Check updates when installed by package name.
80
80
 
package/README.md CHANGED
@@ -74,7 +74,7 @@
74
74
 
75
75
  ## 安装
76
76
 
77
- 当前插件版本为 **0.2.1**,适配 **DSH Desktop `0.2.1-alpha.2` 和 `0.2.1-rc.2`**。版本不匹配时,宿主插件管理器会拒绝安装或启用。
77
+ 当前插件版本为 **0.2.3**,适配 **DSH Desktop `0.2.1-alpha.2` 和 `0.2.0-rc.2`**。版本不匹配时,宿主插件管理器会拒绝安装或启用。
78
78
 
79
79
  **推荐通过 DSH Desktop 安装 [npm 包 `@sligqoer/dsh-usage-stats`](https://www.npmjs.com/package/@sligqoer/dsh-usage-stats)。** 已包含预构建模块,无需克隆仓库或在本机构建;通过包名安装后可使用插件页的「检查更新」。
80
80
 
package/lib/client.js CHANGED
@@ -8,7 +8,7 @@ var SECTION_ID = 'usage-stats'
8
8
 
9
9
  var STYLE_ID = 'dsh-usage-stats-styles'
10
10
 
11
- var PLUGIN_VERSION = "0.2.1"
11
+ var PLUGIN_VERSION = "0.2.3"
12
12
 
13
13
  var localeService = null
14
14
 
@@ -5477,7 +5477,14 @@ function registerLocale(ctx) {
5477
5477
  }
5478
5478
 
5479
5479
  function apply(ctx) {
5480
- if (!window.dshDesktop || typeof window.dshDesktop.deviceInfo !== 'function') return
5480
+ // DSH Desktop marks its renderer through the preload bridge dshDesktop.
5481
+ // 0.2.0-rc.2 exposes only { protocolVersion: 1 }; older builds carried a
5482
+ // deviceInfo() function. Accept either marker so the settings section
5483
+ // registers on both, while plain browser tabs (no bridge) still bail out.
5484
+ if (typeof window === 'undefined' || !window.dshDesktop) return
5485
+ var hasDeviceInfo = typeof window.dshDesktop.deviceInfo === 'function'
5486
+ var hasProtocolVersion = typeof window.dshDesktop.protocolVersion === 'number'
5487
+ if (!hasDeviceInfo && !hasProtocolVersion) return
5481
5488
  var slots = ctx.get('slots'); if (!slots) return
5482
5489
  registerLocale(ctx)
5483
5490
  var api = new UsageApi()
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Usage statistics",
4
- "description": "Usage statistics, provider quotas, model detection and controls for DSH Desktop 0.2.1-alpha.2 and 0.2.1-rc.2."
4
+ "description": "Usage statistics, provider quotas, model detection and controls for DSH Desktop 0.2.1-alpha.2 and 0.2.0-rc.2."
5
5
  }
6
6
  }
package/locale/ja.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "利用状況",
4
- "description": "利用統計、提供元の利用枠、モデル検査、操作設定。DSH Desktop 0.2.1-alpha.2 と 0.2.1-rc.2 に対応。"
4
+ "description": "利用統計、提供元の利用枠、モデル検査、操作設定。DSH Desktop 0.2.1-alpha.2 と 0.2.0-rc.2 に対応。"
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "用量统计",
4
- "description": "会话用量统计、供应商配额、模型检测与控制设置。适用于 DSH Desktop 0.2.1-alpha.2 和 0.2.1-rc.2。"
4
+ "description": "会话用量统计、供应商配额、模型检测与控制设置。适用于 DSH Desktop 0.2.1-alpha.2 和 0.2.0-rc.2。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sligqoer/dsh-usage-stats",
3
3
  "description": "DSH Desktop 的用量统计、供应商配额、模型检测与控制插件。",
4
- "version": "0.2.1",
4
+ "version": "0.2.3",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -54,7 +54,7 @@
54
54
  "license": "Apache-2.0",
55
55
  "icon": "screenshots/icon.svg",
56
56
  "peerDependencies": {
57
- "@deepseek-ai/dsh": "0.2.1-alpha.2 || 0.2.1-rc.2"
57
+ "@deepseek-ai/dsh": "0.2.1-alpha.2 || 0.2.0-rc.2"
58
58
  },
59
59
  "peerDependenciesMeta": {
60
60
  "@deepseek-ai/dsh": {