@qwen-code/qwen-code 0.12.4-preview.0 → 0.12.4
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/cli.js +81 -8
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -133808,7 +133808,7 @@ var init_tokenLimits = __esm({
|
|
|
133808
133808
|
"use strict";
|
|
133809
133809
|
init_esbuild_shims();
|
|
133810
133810
|
DEFAULT_TOKEN_LIMIT = 131072;
|
|
133811
|
-
DEFAULT_OUTPUT_TOKEN_LIMIT =
|
|
133811
|
+
DEFAULT_OUTPUT_TOKEN_LIMIT = 16384;
|
|
133812
133812
|
LIMITS = {
|
|
133813
133813
|
"32k": 32768,
|
|
133814
133814
|
"64k": 65536,
|
|
@@ -133918,6 +133918,8 @@ var init_tokenLimits = __esm({
|
|
|
133918
133918
|
[/^qwen3\.5/, LIMITS["64k"]],
|
|
133919
133919
|
[/^coder-model$/, LIMITS["64k"]],
|
|
133920
133920
|
[/^qwen3-max/, LIMITS["64k"]],
|
|
133921
|
+
[/^qwen/, LIMITS["8k"]],
|
|
133922
|
+
// Qwen fallback (VL, turbo, plus, etc.): 8K
|
|
133921
133923
|
// DeepSeek
|
|
133922
133924
|
[/^deepseek-reasoner/, LIMITS["64k"]],
|
|
133923
133925
|
[/^deepseek-r1/, LIMITS["64k"]],
|
|
@@ -134799,6 +134801,18 @@ var init_modelsConfig = __esm({
|
|
|
134799
134801
|
detail: "auto-detected from model"
|
|
134800
134802
|
};
|
|
134801
134803
|
}
|
|
134804
|
+
if (!this._generationConfig.samplingParams?.max_tokens) {
|
|
134805
|
+
const outputLimit = tokenLimit(model.id, "output");
|
|
134806
|
+
if (!this._generationConfig.samplingParams) {
|
|
134807
|
+
this._generationConfig.samplingParams = {};
|
|
134808
|
+
}
|
|
134809
|
+
this._generationConfig.samplingParams.max_tokens = outputLimit;
|
|
134810
|
+
const existingSource = this.generationConfigSources["samplingParams"];
|
|
134811
|
+
this.generationConfigSources["samplingParams"] = {
|
|
134812
|
+
kind: "computed",
|
|
134813
|
+
detail: existingSource ? `max_tokens auto-detected from model (other params from ${existingSource.kind})` : "max_tokens auto-detected from model"
|
|
134814
|
+
};
|
|
134815
|
+
}
|
|
134802
134816
|
if (gc.modalities === void 0) {
|
|
134803
134817
|
this._generationConfig.modalities = defaultModalities(model.id);
|
|
134804
134818
|
this.generationConfigSources["modalities"] = {
|
|
@@ -157764,7 +157778,7 @@ __export(geminiContentGenerator_exports, {
|
|
|
157764
157778
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
157765
157779
|
});
|
|
157766
157780
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
157767
|
-
const version2 = "0.12.4
|
|
157781
|
+
const version2 = "0.12.4";
|
|
157768
157782
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
157769
157783
|
const baseHeaders = {
|
|
157770
157784
|
"User-Agent": userAgent2
|
|
@@ -178808,7 +178822,62 @@ var init_terminalSerializer = __esm({
|
|
|
178808
178822
|
import { spawn as cpSpawn, spawnSync as spawnSync2 } from "node:child_process";
|
|
178809
178823
|
import { TextDecoder as TextDecoder2 } from "node:util";
|
|
178810
178824
|
import os12 from "node:os";
|
|
178811
|
-
|
|
178825
|
+
function mergeWindowsPathValues(env7, pathKeys) {
|
|
178826
|
+
const mergedEntries = [];
|
|
178827
|
+
const seenEntries = /* @__PURE__ */ new Set();
|
|
178828
|
+
for (const key of pathKeys) {
|
|
178829
|
+
const value = env7[key];
|
|
178830
|
+
if (value === void 0) {
|
|
178831
|
+
continue;
|
|
178832
|
+
}
|
|
178833
|
+
for (const entry of value.split(WINDOWS_PATH_DELIMITER)) {
|
|
178834
|
+
if (seenEntries.has(entry)) {
|
|
178835
|
+
continue;
|
|
178836
|
+
}
|
|
178837
|
+
seenEntries.add(entry);
|
|
178838
|
+
mergedEntries.push(entry);
|
|
178839
|
+
}
|
|
178840
|
+
}
|
|
178841
|
+
return mergedEntries.length > 0 ? mergedEntries.join(WINDOWS_PATH_DELIMITER) : void 0;
|
|
178842
|
+
}
|
|
178843
|
+
function getWindowsPathFingerprint(env7, pathKeys) {
|
|
178844
|
+
return pathKeys.map((key) => `${key}=${env7[key] ?? ""}`).join("\0");
|
|
178845
|
+
}
|
|
178846
|
+
function normalizePathEnvForWindows(env7) {
|
|
178847
|
+
if (os12.platform() !== "win32") {
|
|
178848
|
+
return env7;
|
|
178849
|
+
}
|
|
178850
|
+
const normalized2 = { ...env7 };
|
|
178851
|
+
const pathKeys = Object.keys(normalized2).filter((key) => key.toLowerCase() === "path");
|
|
178852
|
+
if (pathKeys.length === 0) {
|
|
178853
|
+
return normalized2;
|
|
178854
|
+
}
|
|
178855
|
+
const orderedPathKeys = [...pathKeys].sort((left3, right3) => {
|
|
178856
|
+
if (left3 === "PATH") {
|
|
178857
|
+
return -1;
|
|
178858
|
+
}
|
|
178859
|
+
if (right3 === "PATH") {
|
|
178860
|
+
return 1;
|
|
178861
|
+
}
|
|
178862
|
+
return left3.localeCompare(right3);
|
|
178863
|
+
});
|
|
178864
|
+
const fingerprint = getWindowsPathFingerprint(normalized2, orderedPathKeys);
|
|
178865
|
+
const canonicalValue = fingerprint === cachedWindowsPathFingerprint ? cachedMergedWindowsPath : mergeWindowsPathValues(normalized2, orderedPathKeys);
|
|
178866
|
+
if (fingerprint !== cachedWindowsPathFingerprint) {
|
|
178867
|
+
cachedWindowsPathFingerprint = fingerprint;
|
|
178868
|
+
cachedMergedWindowsPath = canonicalValue;
|
|
178869
|
+
}
|
|
178870
|
+
for (const key of pathKeys) {
|
|
178871
|
+
if (key !== "PATH") {
|
|
178872
|
+
delete normalized2[key];
|
|
178873
|
+
}
|
|
178874
|
+
}
|
|
178875
|
+
if (canonicalValue !== void 0) {
|
|
178876
|
+
normalized2["PATH"] = canonicalValue;
|
|
178877
|
+
}
|
|
178878
|
+
return normalized2;
|
|
178879
|
+
}
|
|
178880
|
+
var import_headless, Terminal, SIGKILL_TIMEOUT_MS, WINDOWS_PATH_DELIMITER, cachedWindowsPathFingerprint, cachedMergedWindowsPath, REPLAY_TERMINAL_COLS, REPLAY_TERMINAL_ROWS, REPLAY_TERMINAL_SCROLLBACK, getFullBufferText, replayTerminalOutput, windowsStrategy, posixStrategy, getCleanupStrategy, ShellExecutionService;
|
|
178812
178881
|
var init_shellExecutionService = __esm({
|
|
178813
178882
|
"packages/core/dist/src/services/shellExecutionService.js"() {
|
|
178814
178883
|
"use strict";
|
|
@@ -178822,6 +178891,10 @@ var init_shellExecutionService = __esm({
|
|
|
178822
178891
|
init_terminalSerializer();
|
|
178823
178892
|
({ Terminal } = import_headless.default);
|
|
178824
178893
|
SIGKILL_TIMEOUT_MS = 200;
|
|
178894
|
+
WINDOWS_PATH_DELIMITER = ";";
|
|
178895
|
+
__name(mergeWindowsPathValues, "mergeWindowsPathValues");
|
|
178896
|
+
__name(getWindowsPathFingerprint, "getWindowsPathFingerprint");
|
|
178897
|
+
__name(normalizePathEnvForWindows, "normalizePathEnvForWindows");
|
|
178825
178898
|
REPLAY_TERMINAL_COLS = 1024;
|
|
178826
178899
|
REPLAY_TERMINAL_ROWS = 24;
|
|
178827
178900
|
REPLAY_TERMINAL_SCROLLBACK = 2e3;
|
|
@@ -178934,7 +179007,7 @@ var init_shellExecutionService = __esm({
|
|
|
178934
179007
|
detached: !isWindows9,
|
|
178935
179008
|
windowsHide: isWindows9,
|
|
178936
179009
|
env: {
|
|
178937
|
-
...process.env,
|
|
179010
|
+
...normalizePathEnvForWindows(process.env),
|
|
178938
179011
|
QWEN_CODE: "1",
|
|
178939
179012
|
TERM: "xterm-256color",
|
|
178940
179013
|
PAGER: "cat"
|
|
@@ -179090,7 +179163,7 @@ var init_shellExecutionService = __esm({
|
|
|
179090
179163
|
cols,
|
|
179091
179164
|
rows,
|
|
179092
179165
|
env: {
|
|
179093
|
-
...process.env,
|
|
179166
|
+
...normalizePathEnvForWindows(process.env),
|
|
179094
179167
|
QWEN_CODE: "1",
|
|
179095
179168
|
TERM: "xterm-256color",
|
|
179096
179169
|
PAGER: shellExecutionConfig.pager ?? "cat",
|
|
@@ -389929,7 +390002,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
389929
390002
|
// packages/cli/src/utils/version.ts
|
|
389930
390003
|
async function getCliVersion() {
|
|
389931
390004
|
const pkgJson = await getPackageJson();
|
|
389932
|
-
return "0.12.4
|
|
390005
|
+
return "0.12.4";
|
|
389933
390006
|
}
|
|
389934
390007
|
__name(getCliVersion, "getCliVersion");
|
|
389935
390008
|
|
|
@@ -397490,7 +397563,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
397490
397563
|
|
|
397491
397564
|
// packages/cli/src/generated/git-commit.ts
|
|
397492
397565
|
init_esbuild_shims();
|
|
397493
|
-
var GIT_COMMIT_INFO = "
|
|
397566
|
+
var GIT_COMMIT_INFO = "0a93ad616";
|
|
397494
397567
|
|
|
397495
397568
|
// packages/cli/src/utils/systemInfo.ts
|
|
397496
397569
|
async function getNpmVersion() {
|
|
@@ -456167,7 +456240,7 @@ var QwenAgent = class {
|
|
|
456167
456240
|
async initialize(args) {
|
|
456168
456241
|
this.clientCapabilities = args.clientCapabilities;
|
|
456169
456242
|
const authMethods = buildAuthMethods();
|
|
456170
|
-
const version2 = "0.12.4
|
|
456243
|
+
const version2 = "0.12.4";
|
|
456171
456244
|
return {
|
|
456172
456245
|
protocolVersion: PROTOCOL_VERSION,
|
|
456173
456246
|
agentInfo: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qwen-code/qwen-code",
|
|
3
|
-
"version": "0.12.4
|
|
3
|
+
"version": "0.12.4",
|
|
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.12.4
|
|
23
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.12.4"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {},
|
|
26
26
|
"optionalDependencies": {
|