@qwen-code/qwen-code 0.6.1-nightly.20260107.2c285394 → 0.6.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/cli.js +70 -23
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -131344,6 +131344,7 @@ var init_converter = __esm({
|
|
|
131344
131344
|
const totalTokens = usage2.total_tokens || 0;
|
|
131345
131345
|
const extendedUsage = usage2;
|
|
131346
131346
|
const cachedTokens = usage2.prompt_tokens_details?.cached_tokens ?? extendedUsage.cached_tokens ?? 0;
|
|
131347
|
+
const thinkingTokens = usage2.completion_tokens_details?.reasoning_tokens || 0;
|
|
131347
131348
|
let finalPromptTokens = promptTokens;
|
|
131348
131349
|
let finalCompletionTokens = completionTokens;
|
|
131349
131350
|
if (totalTokens > 0 && promptTokens === 0 && completionTokens === 0) {
|
|
@@ -131354,7 +131355,8 @@ var init_converter = __esm({
|
|
|
131354
131355
|
promptTokenCount: finalPromptTokens,
|
|
131355
131356
|
candidatesTokenCount: finalCompletionTokens,
|
|
131356
131357
|
totalTokenCount: totalTokens,
|
|
131357
|
-
cachedContentTokenCount: cachedTokens
|
|
131358
|
+
cachedContentTokenCount: cachedTokens,
|
|
131359
|
+
thoughtsTokenCount: thinkingTokens
|
|
131358
131360
|
};
|
|
131359
131361
|
}
|
|
131360
131362
|
return response;
|
|
@@ -139677,9 +139679,7 @@ var init_default = __esm({
|
|
|
139677
139679
|
};
|
|
139678
139680
|
}
|
|
139679
139681
|
getDefaultGenerationConfig() {
|
|
139680
|
-
return {
|
|
139681
|
-
topP: 0.95
|
|
139682
|
-
};
|
|
139682
|
+
return {};
|
|
139683
139683
|
}
|
|
139684
139684
|
};
|
|
139685
139685
|
}
|
|
@@ -140399,13 +140399,7 @@ var init_pipeline = __esm({
|
|
|
140399
140399
|
return params;
|
|
140400
140400
|
}
|
|
140401
140401
|
buildReasoningConfig() {
|
|
140402
|
-
|
|
140403
|
-
if (reasoning === false) {
|
|
140404
|
-
return {};
|
|
140405
|
-
}
|
|
140406
|
-
return {
|
|
140407
|
-
reasoning_effort: reasoning?.effort ?? "medium"
|
|
140408
|
-
};
|
|
140402
|
+
return {};
|
|
140409
140403
|
}
|
|
140410
140404
|
/**
|
|
140411
140405
|
* Common error handling wrapper for execute methods
|
|
@@ -154435,7 +154429,7 @@ __export(geminiContentGenerator_exports, {
|
|
|
154435
154429
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
154436
154430
|
});
|
|
154437
154431
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
154438
|
-
const version2 = "0.6.1
|
|
154432
|
+
const version2 = "0.6.1";
|
|
154439
154433
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
154440
154434
|
const baseHeaders = {
|
|
154441
154435
|
"User-Agent": userAgent2
|
|
@@ -171507,7 +171501,7 @@ var init_coreToolScheduler = __esm({
|
|
|
171507
171501
|
this.setToolCallOutcome(reqInfo.callId, ToolConfirmationOutcome.ProceedAlways);
|
|
171508
171502
|
this.setStatusInternal(reqInfo.callId, "scheduled");
|
|
171509
171503
|
} else {
|
|
171510
|
-
const shouldAutoDeny = !this.config.isInteractive() && !this.config.
|
|
171504
|
+
const shouldAutoDeny = !this.config.isInteractive() && !this.config.getExperimentalZedIntegration() && this.config.getInputFormat() !== InputFormat.STREAM_JSON;
|
|
171511
171505
|
if (shouldAutoDeny) {
|
|
171512
171506
|
const errorMessage = `Qwen Code requires permission to use "${reqInfo.name}", but that permission was declined.`;
|
|
171513
171507
|
this.setStatusInternal(reqInfo.callId, "error", createErrorResponse(reqInfo, new Error(errorMessage), ToolErrorType.EXECUTION_DENIED));
|
|
@@ -227009,6 +227003,7 @@ var init_src2 = __esm({
|
|
|
227009
227003
|
init_fileUtils();
|
|
227010
227004
|
init_retry();
|
|
227011
227005
|
init_shell_utils();
|
|
227006
|
+
init_tool_utils();
|
|
227012
227007
|
init_terminalSerializer();
|
|
227013
227008
|
init_systemEncoding();
|
|
227014
227009
|
init_textUtils();
|
|
@@ -356328,7 +356323,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
356328
356323
|
// packages/cli/src/utils/version.ts
|
|
356329
356324
|
async function getCliVersion() {
|
|
356330
356325
|
const pkgJson = await getPackageJson();
|
|
356331
|
-
return "0.6.1
|
|
356326
|
+
return "0.6.1";
|
|
356332
356327
|
}
|
|
356333
356328
|
__name(getCliVersion, "getCliVersion");
|
|
356334
356329
|
|
|
@@ -360776,14 +360771,36 @@ async function loadCliConfig(settings, extensions, extensionEnablementManager, a
|
|
|
360776
360771
|
interactive = false;
|
|
360777
360772
|
}
|
|
360778
360773
|
const extraExcludes = [];
|
|
360774
|
+
const resolvedCoreTools = argv.coreTools || settings.tools?.core || [];
|
|
360775
|
+
const resolvedAllowedTools = argv.allowedTools || settings.tools?.allowed || [];
|
|
360776
|
+
const isExplicitlyEnabled = /* @__PURE__ */ __name((toolName) => {
|
|
360777
|
+
if (resolvedCoreTools.length > 0) {
|
|
360778
|
+
if (isToolEnabled(toolName, resolvedCoreTools, [])) {
|
|
360779
|
+
return true;
|
|
360780
|
+
}
|
|
360781
|
+
}
|
|
360782
|
+
if (resolvedAllowedTools.length > 0) {
|
|
360783
|
+
if (isToolEnabled(toolName, resolvedAllowedTools, [])) {
|
|
360784
|
+
return true;
|
|
360785
|
+
}
|
|
360786
|
+
}
|
|
360787
|
+
return false;
|
|
360788
|
+
}, "isExplicitlyEnabled");
|
|
360789
|
+
const excludeUnlessExplicit = /* @__PURE__ */ __name((toolName) => {
|
|
360790
|
+
if (!isExplicitlyEnabled(toolName)) {
|
|
360791
|
+
extraExcludes.push(toolName);
|
|
360792
|
+
}
|
|
360793
|
+
}, "excludeUnlessExplicit");
|
|
360779
360794
|
if (!interactive && !argv.experimentalAcp && inputFormat !== InputFormat.STREAM_JSON) {
|
|
360780
360795
|
switch (approvalMode) {
|
|
360781
360796
|
case ApprovalMode.PLAN:
|
|
360782
360797
|
case ApprovalMode.DEFAULT:
|
|
360783
|
-
|
|
360798
|
+
excludeUnlessExplicit(ShellTool.Name);
|
|
360799
|
+
excludeUnlessExplicit(EditTool.Name);
|
|
360800
|
+
excludeUnlessExplicit(WriteFileTool.Name);
|
|
360784
360801
|
break;
|
|
360785
360802
|
case ApprovalMode.AUTO_EDIT:
|
|
360786
|
-
|
|
360803
|
+
excludeUnlessExplicit(ShellTool.Name);
|
|
360787
360804
|
break;
|
|
360788
360805
|
case ApprovalMode.YOLO:
|
|
360789
360806
|
break;
|
|
@@ -364389,7 +364406,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
364389
364406
|
|
|
364390
364407
|
// packages/cli/src/generated/git-commit.ts
|
|
364391
364408
|
init_esbuild_shims();
|
|
364392
|
-
var GIT_COMMIT_INFO2 = "
|
|
364409
|
+
var GIT_COMMIT_INFO2 = "570ec432";
|
|
364393
364410
|
|
|
364394
364411
|
// packages/cli/src/utils/systemInfo.ts
|
|
364395
364412
|
async function getNpmVersion() {
|
|
@@ -365498,11 +365515,23 @@ var ideCommand = /* @__PURE__ */ __name(async () => {
|
|
|
365498
365515
|
kind: "built-in" /* BUILT_IN */,
|
|
365499
365516
|
action: /* @__PURE__ */ __name(async (context2) => {
|
|
365500
365517
|
const installer = getIdeInstaller(currentIDE);
|
|
365518
|
+
const isSandBox = !!process.env["SANDBOX"];
|
|
365519
|
+
if (isSandBox) {
|
|
365520
|
+
context2.ui.addItem(
|
|
365521
|
+
{
|
|
365522
|
+
type: "info",
|
|
365523
|
+
text: `IDE integration needs to be installed on the host. If you have already installed it, you can directly connect the ide`
|
|
365524
|
+
},
|
|
365525
|
+
Date.now()
|
|
365526
|
+
);
|
|
365527
|
+
return;
|
|
365528
|
+
}
|
|
365501
365529
|
if (!installer) {
|
|
365530
|
+
const ideName = ideClient.getDetectedIdeDisplayName();
|
|
365502
365531
|
context2.ui.addItem(
|
|
365503
365532
|
{
|
|
365504
365533
|
type: "error",
|
|
365505
|
-
text: `
|
|
365534
|
+
text: `Automatic installation is not supported for ${ideName}. Please install the '${QWEN_CODE_COMPANION_EXTENSION_NAME}' extension manually from the marketplace.`
|
|
365506
365535
|
},
|
|
365507
365536
|
Date.now()
|
|
365508
365537
|
);
|
|
@@ -367833,15 +367862,28 @@ var ShellProcessor = class {
|
|
|
367833
367862
|
const command2 = injection.resolvedCommand;
|
|
367834
367863
|
if (!command2) continue;
|
|
367835
367864
|
const { allAllowed, disallowedCommands, blockReason, isHardDenial } = checkCommandPermissions(command2, config2, sessionShellAllowlist);
|
|
367865
|
+
const allowedTools = config2.getAllowedTools() || [];
|
|
367866
|
+
const invocation = {
|
|
367867
|
+
params: { command: command2 }
|
|
367868
|
+
};
|
|
367869
|
+
const isAllowedBySettings = doesToolInvocationMatch(
|
|
367870
|
+
"run_shell_command",
|
|
367871
|
+
invocation,
|
|
367872
|
+
allowedTools
|
|
367873
|
+
);
|
|
367836
367874
|
if (!allAllowed) {
|
|
367837
367875
|
if (isHardDenial) {
|
|
367838
367876
|
throw new Error(
|
|
367839
367877
|
`${this.commandName} cannot be run. Blocked command: "${command2}". Reason: ${blockReason || "Blocked by configuration."}`
|
|
367840
367878
|
);
|
|
367841
367879
|
}
|
|
367842
|
-
if (
|
|
367843
|
-
|
|
367880
|
+
if (isAllowedBySettings) {
|
|
367881
|
+
continue;
|
|
367844
367882
|
}
|
|
367883
|
+
if (config2.getApprovalMode() === ApprovalMode.YOLO) {
|
|
367884
|
+
continue;
|
|
367885
|
+
}
|
|
367886
|
+
disallowedCommands.forEach((uc) => commandsToConfirm.add(uc));
|
|
367845
367887
|
}
|
|
367846
367888
|
}
|
|
367847
367889
|
if (commandsToConfirm.size > 0) {
|
|
@@ -396290,6 +396332,7 @@ function IdeIntegrationNudge({
|
|
|
396290
396332
|
{ isActive: true }
|
|
396291
396333
|
);
|
|
396292
396334
|
const { displayName: ideName } = ide;
|
|
396335
|
+
const isInSandbox = !!process.env["SANDBOX"];
|
|
396293
396336
|
const isExtensionPreInstalled = !!process.env["QWEN_CODE_IDE_SERVER_PORT"] && !!process.env["QWEN_CODE_IDE_WORKSPACE_PATH"];
|
|
396294
396337
|
const OPTIONS = [
|
|
396295
396338
|
{
|
|
@@ -396317,7 +396360,7 @@ function IdeIntegrationNudge({
|
|
|
396317
396360
|
key: "No, don't ask again"
|
|
396318
396361
|
}
|
|
396319
396362
|
];
|
|
396320
|
-
const installText = isExtensionPreInstalled ? `If you select Yes, the CLI will have access to your open files and display diffs directly
|
|
396363
|
+
const installText = isInSandbox ? `Note: In sandbox environments, IDE integration requires manual setup on the host system. If you select Yes, you'll receive instructions on how to set this up.` : isExtensionPreInstalled ? `If you select Yes, the CLI will connect to your ${ideName ?? "editor"} and have access to your open files and display diffs directly.` : `If you select Yes, we'll install an extension that allows the CLI to access your open files and display diffs directly in ${ideName ?? "your editor"}.`;
|
|
396321
396364
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
396322
396365
|
Box_default,
|
|
396323
396366
|
{
|
|
@@ -411516,7 +411559,11 @@ ${queuedText}` : queuedText;
|
|
|
411516
411559
|
const handleIdePromptComplete = (0, import_react133.useCallback)(
|
|
411517
411560
|
(result) => {
|
|
411518
411561
|
if (result.userSelection === "yes") {
|
|
411519
|
-
|
|
411562
|
+
if (result.isExtensionPreInstalled) {
|
|
411563
|
+
handleSlashCommand2("/ide enable");
|
|
411564
|
+
} else {
|
|
411565
|
+
handleSlashCommand2("/ide install");
|
|
411566
|
+
}
|
|
411520
411567
|
settings.setValue("User" /* User */, "ide.hasSeenNudge", true);
|
|
411521
411568
|
} else if (result.userSelection === "dismiss") {
|
|
411522
411569
|
settings.setValue("User" /* User */, "ide.hasSeenNudge", true);
|
|
@@ -415391,7 +415438,7 @@ var GeminiAgent = class {
|
|
|
415391
415438
|
name: APPROVAL_MODE_INFO[mode].name,
|
|
415392
415439
|
description: APPROVAL_MODE_INFO[mode].description
|
|
415393
415440
|
}));
|
|
415394
|
-
const version2 = "0.6.1
|
|
415441
|
+
const version2 = "0.6.1";
|
|
415395
415442
|
return {
|
|
415396
415443
|
protocolVersion: PROTOCOL_VERSION,
|
|
415397
415444
|
agentInfo: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qwen-code/qwen-code",
|
|
3
|
-
"version": "0.6.1
|
|
3
|
+
"version": "0.6.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.6.1
|
|
23
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.6.1"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"tiktoken": "^1.0.21"
|