dsh-provider-usage 0.3.5 → 0.3.6

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/lib/index.js +10 -8
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import z from "@deepseek-ai/schemastery";
2
2
  import { credentialRef } from "@deepseek-ai/dsh-credentials";
3
3
  import { launchEnvironmentOf } from "@deepseek-ai/dsh-launch-environment";
4
- import { installSettingsSection, settingsNamespace } from "@deepseek-ai/dsh-settings";
5
4
  import { Remote, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
6
5
  //#region src/index.ts
7
6
  const name = "provider-usage";
8
7
  /** Own package version, baked in by tsdown `define` at build time (the
9
8
  fallback only fires if the sources are compiled some other way). */
10
- const version = "0.3.5";
11
- const NS = settingsNamespace("provider-usage");
9
+ const version = "0.3.6";
10
+ /** Settings namespace this plugin owns (registered through `ctx.settings`). */
11
+ const NS = "provider-usage";
12
12
  const PROVIDER_KINDS = [
13
13
  "deepseek",
14
14
  "kimi-coding",
@@ -855,11 +855,13 @@ function markRemoteMethod(prototype, method, exportName) {
855
855
  markRemoteMethod(UsageService.prototype, "list", "list");
856
856
  function apply(ctx, config) {
857
857
  let current = () => config;
858
- installSettingsSection(ctx, NS, Config, config, {
859
- setSource: (source) => {
860
- current = source;
861
- },
862
- onChange: () => {}
858
+ ctx.inject(["settings"], (settingsCtx) => {
859
+ settingsCtx.settings.installSection(ctx, NS, Config, config, {
860
+ setSource: (source) => {
861
+ current = source;
862
+ },
863
+ onChange: () => {}
864
+ });
863
865
  });
864
866
  new UsageService(ctx, () => current());
865
867
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-provider-usage",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "DeepSeek Harness plugin: live account balance/usage panel for every configured LLM provider (draggable floating-ball widget, configurable refresh interval)",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",