@qwen-code/qwen-code 0.9.0-nightly.20260130.0eb94a29 → 0.9.0-preview.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.
Files changed (2) hide show
  1. package/cli.js +23 -53
  2. package/package.json +2 -2
package/cli.js CHANGED
@@ -140837,7 +140837,9 @@ function buildRuntimeFetchOptions(sdkType, proxyUrl) {
140837
140837
  case "bun": {
140838
140838
  if (sdkType === "openai") {
140839
140839
  return {
140840
- timeout: false
140840
+ fetchOptions: {
140841
+ timeout: false
140842
+ }
140841
140843
  };
140842
140844
  } else {
140843
140845
  const bunFetch = /* @__PURE__ */ __name(async (input, init) => {
@@ -140854,59 +140856,27 @@ function buildRuntimeFetchOptions(sdkType, proxyUrl) {
140854
140856
  }
140855
140857
  }
140856
140858
  case "node": {
140857
- try {
140858
- const dispatcher = createDispatcher(proxyUrl);
140859
- if (sdkType === "openai") {
140860
- return {
140861
- dispatcher
140862
- };
140863
- } else {
140864
- return {
140865
- httpAgent: dispatcher
140866
- };
140867
- }
140868
- } catch {
140869
- if (sdkType === "openai") {
140870
- return void 0;
140871
- } else {
140872
- return {};
140873
- }
140874
- }
140859
+ return buildFetchOptionsWithDispatcher(sdkType, proxyUrl);
140875
140860
  }
140876
140861
  default: {
140877
- try {
140878
- const dispatcher = createDispatcher(proxyUrl);
140879
- if (sdkType === "openai") {
140880
- return {
140881
- dispatcher
140882
- };
140883
- } else {
140884
- return {
140885
- httpAgent: dispatcher
140886
- };
140887
- }
140888
- } catch {
140889
- if (sdkType === "openai") {
140890
- return void 0;
140891
- } else {
140892
- return {};
140893
- }
140894
- }
140862
+ return buildFetchOptionsWithDispatcher(sdkType, proxyUrl);
140895
140863
  }
140896
140864
  }
140897
140865
  }
140898
- function createDispatcher(proxyUrl) {
140899
- if (proxyUrl) {
140900
- return new import_undici.ProxyAgent({
140866
+ function buildFetchOptionsWithDispatcher(sdkType, proxyUrl) {
140867
+ try {
140868
+ const dispatcher = proxyUrl ? new import_undici.ProxyAgent({
140901
140869
  uri: proxyUrl,
140902
140870
  headersTimeout: 0,
140903
140871
  bodyTimeout: 0
140872
+ }) : new import_undici.Agent({
140873
+ headersTimeout: 0,
140874
+ bodyTimeout: 0
140904
140875
  });
140876
+ return { fetchOptions: { dispatcher } };
140877
+ } catch {
140878
+ return sdkType === "openai" ? void 0 : {};
140905
140879
  }
140906
- return new import_undici.Agent({
140907
- headersTimeout: 0,
140908
- bodyTimeout: 0
140909
- });
140910
140880
  }
140911
140881
  var import_undici;
140912
140882
  var init_runtimeFetchOptions = __esm({
@@ -140916,7 +140886,7 @@ var init_runtimeFetchOptions = __esm({
140916
140886
  import_undici = __toESM(require_undici(), 1);
140917
140887
  __name(detectRuntime, "detectRuntime");
140918
140888
  __name(buildRuntimeFetchOptions, "buildRuntimeFetchOptions");
140919
- __name(createDispatcher, "createDispatcher");
140889
+ __name(buildFetchOptionsWithDispatcher, "buildFetchOptionsWithDispatcher");
140920
140890
  }
140921
140891
  });
140922
140892
 
@@ -140951,14 +140921,14 @@ var init_default = __esm({
140951
140921
  buildClient() {
140952
140922
  const { apiKey, baseUrl, timeout: timeout2 = DEFAULT_TIMEOUT, maxRetries = DEFAULT_MAX_RETRIES } = this.contentGeneratorConfig;
140953
140923
  const defaultHeaders = this.buildHeaders();
140954
- const fetchOptions = buildRuntimeFetchOptions("openai", this.cliConfig.getProxy());
140924
+ const runtimeOptions = buildRuntimeFetchOptions("openai", this.cliConfig.getProxy());
140955
140925
  return new OpenAI({
140956
140926
  apiKey,
140957
140927
  baseURL: baseUrl,
140958
140928
  timeout: timeout2,
140959
140929
  maxRetries,
140960
140930
  defaultHeaders,
140961
- ...fetchOptions ? { fetchOptions } : {}
140931
+ ...runtimeOptions || {}
140962
140932
  });
140963
140933
  }
140964
140934
  buildRequest(request4, _userPromptId) {
@@ -141049,14 +141019,14 @@ var init_dashscope = __esm({
141049
141019
  buildClient() {
141050
141020
  const { apiKey, baseUrl = DEFAULT_DASHSCOPE_BASE_URL, timeout: timeout2 = DEFAULT_TIMEOUT, maxRetries = DEFAULT_MAX_RETRIES } = this.contentGeneratorConfig;
141051
141021
  const defaultHeaders = this.buildHeaders();
141052
- const fetchOptions = buildRuntimeFetchOptions("openai", this.cliConfig.getProxy());
141022
+ const runtimeOptions = buildRuntimeFetchOptions("openai", this.cliConfig.getProxy());
141053
141023
  return new OpenAI({
141054
141024
  apiKey,
141055
141025
  baseURL: baseUrl,
141056
141026
  timeout: timeout2,
141057
141027
  maxRetries,
141058
141028
  defaultHeaders,
141059
- ...fetchOptions ? { fetchOptions } : {}
141029
+ ...runtimeOptions || {}
141060
141030
  });
141061
141031
  }
141062
141032
  /**
@@ -155878,7 +155848,7 @@ __export(geminiContentGenerator_exports, {
155878
155848
  createGeminiContentGenerator: () => createGeminiContentGenerator
155879
155849
  });
155880
155850
  function createGeminiContentGenerator(config2, gcConfig) {
155881
- const version2 = "0.9.0-nightly.20260130.0eb94a29";
155851
+ const version2 = "0.9.0-preview.1";
155882
155852
  const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
155883
155853
  const baseHeaders = {
155884
155854
  "User-Agent": userAgent2
@@ -373358,7 +373328,7 @@ __name(getPackageJson, "getPackageJson");
373358
373328
  // packages/cli/src/utils/version.ts
373359
373329
  async function getCliVersion() {
373360
373330
  const pkgJson = await getPackageJson();
373361
- return "0.9.0-nightly.20260130.0eb94a29";
373331
+ return "0.9.0-preview.1";
373362
373332
  }
373363
373333
  __name(getCliVersion, "getCliVersion");
373364
373334
 
@@ -380894,7 +380864,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
380894
380864
 
380895
380865
  // packages/cli/src/generated/git-commit.ts
380896
380866
  init_esbuild_shims();
380897
- var GIT_COMMIT_INFO2 = "378fb40b";
380867
+ var GIT_COMMIT_INFO2 = "0464cc22";
380898
380868
 
380899
380869
  // packages/cli/src/utils/systemInfo.ts
380900
380870
  async function getNpmVersion() {
@@ -434316,7 +434286,7 @@ var GeminiAgent = class {
434316
434286
  name: APPROVAL_MODE_INFO[mode].name,
434317
434287
  description: APPROVAL_MODE_INFO[mode].description
434318
434288
  }));
434319
- const version2 = "0.9.0-nightly.20260130.0eb94a29";
434289
+ const version2 = "0.9.0-preview.1";
434320
434290
  return {
434321
434291
  protocolVersion: PROTOCOL_VERSION,
434322
434292
  agentInfo: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/qwen-code",
3
- "version": "0.9.0-nightly.20260130.0eb94a29",
3
+ "version": "0.9.0-preview.1",
4
4
  "description": "Qwen Code - AI-powered coding assistant",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  "locales"
21
21
  ],
22
22
  "config": {
23
- "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.9.0-nightly.20260130.0eb94a29"
23
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.9.0-preview.1"
24
24
  },
25
25
  "dependencies": {},
26
26
  "optionalDependencies": {