@mars-sea/dsh-commandcode-provider 0.9.1 → 0.10.0-alpha.1

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/lib/index.js CHANGED
@@ -2,10 +2,9 @@ import { homedir } from "node:os";
2
2
  import { dirname, join } from "node:path";
3
3
  import z from "@deepseek-ai/schemastery";
4
4
  import { MAX_TIMER_DELAY_MS } from "@deepseek-ai/dsh-timeout";
5
- import { CallId, LlmAdapter, LlmError, ReasoningEffortId, assertUsableApiKey, attributionHeaders, errorChain, resolveRetryPolicy } from "@deepseek-ai/dsh-llm";
5
+ import { LlmAdapter, LlmError, ReasoningEffortId, ToolCallId, assertUsableApiKey, attributionHeaders, errorChain, resolveRetryPolicy } from "@deepseek-ai/dsh-llm";
6
6
  import { credentialRef } from "@deepseek-ai/dsh-credentials";
7
7
  import { launchEnvironmentOf } from "@deepseek-ai/dsh-launch-environment";
8
- import { installSettingsSection, settingsNamespace } from "@deepseek-ai/dsh-settings";
9
8
  import { existsSync, readFileSync } from "node:fs";
10
9
  import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
11
10
  import { randomBytes, randomUUID } from "node:crypto";
@@ -1642,7 +1641,7 @@ var CommandCodeAdapter = class extends LlmAdapter {
1642
1641
  }, {
1643
1642
  type: "tool-call-delta",
1644
1643
  index,
1645
- id: CallId(id),
1644
+ id: ToolCallId(id),
1646
1645
  name,
1647
1646
  argumentsDelta: args
1648
1647
  }, {
@@ -1650,7 +1649,7 @@ var CommandCodeAdapter = class extends LlmAdapter {
1650
1649
  index,
1651
1650
  block: {
1652
1651
  type: "tool-call",
1653
- id: CallId(id),
1652
+ id: ToolCallId(id),
1654
1653
  name,
1655
1654
  arguments: args
1656
1655
  }
@@ -2124,6 +2123,11 @@ const USAGE_HOST_CONTRIBUTION = {
2124
2123
  package: USAGE_REMOTE_PACKAGE,
2125
2124
  face: "host",
2126
2125
  schemas: [],
2126
+ model: {
2127
+ services: [],
2128
+ events: [],
2129
+ objects: []
2130
+ },
2127
2131
  invocations: [{
2128
2132
  id: `${USAGE_REMOTE_PACKAGE}#${USAGE_REPORT_ENDPOINT}`,
2129
2133
  service: "commandcodeUsage",
@@ -2700,7 +2704,7 @@ function corsOrigin(origin) {
2700
2704
  */
2701
2705
  const name = "llm-commandcode";
2702
2706
  const inject = ["llm"];
2703
- const NS = settingsNamespace("llm-commandcode");
2707
+ const NS = "llm-commandcode";
2704
2708
  const DEFAULT_API_KEY_ENV = "COMMANDCODE_API_KEY";
2705
2709
  /** The single provider route this plugin owns. */
2706
2710
  const PROVIDER = "commandcode";
@@ -2868,11 +2872,13 @@ function apply(ctx, config) {
2868
2872
  reports: usageReports,
2869
2873
  login: loginFlow
2870
2874
  });
2871
- installSettingsSection(ctx, NS, Config, config, {
2872
- setSource: (source) => {
2873
- current = source;
2874
- },
2875
- onChange: () => {}
2875
+ ctx.inject(["settings"], (settingsCtx) => {
2876
+ settingsCtx.settings.installSection(ctx, NS, Config, config, {
2877
+ setSource: (source) => {
2878
+ current = source;
2879
+ },
2880
+ onChange: () => {}
2881
+ });
2876
2882
  });
2877
2883
  }
2878
2884
  //#endregion