@qwen-code/qwen-code 0.17.0 → 0.17.1-nightly.20260604.16dd99fa3
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/bundled/qc-helper/docs/configuration/_meta.ts +0 -3
- package/bundled/qc-helper/docs/configuration/settings.md +13 -12
- package/bundled/qc-helper/docs/configuration/themes.md +39 -0
- package/bundled/qc-helper/docs/features/approval-mode.md +26 -22
- package/bundled/qc-helper/docs/features/commands.md +68 -12
- package/bundled/qc-helper/docs/features/status-line.md +168 -32
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +16 -0
- package/bundled/simplify/SKILL.md +123 -0
- package/chunks/{agent-KVXFGIOU.js → agent-GNHB6UIW.js} +14 -13
- package/chunks/{anthropicContentGenerator-L4HWAOIV.js → anthropicContentGenerator-M45RXZVS.js} +48 -5
- package/chunks/{askUserQuestion-DC6OWQIL.js → askUserQuestion-TGRD7FNQ.js} +1 -1
- package/chunks/{ca-NMZFEGAU.js → ca-6RSCDYUS.js} +2 -1
- package/chunks/{chunk-J5VCSWPA.js → chunk-3PJXIDKI.js} +1153 -103
- package/chunks/{chunk-EMVEDSVZ.js → chunk-6O244QKR.js} +43 -3
- package/chunks/chunk-7TQVELRB.js +10412 -0
- package/chunks/{chunk-HCSJIOLR.js → chunk-BNESGOSJ.js} +7450 -3516
- package/chunks/{chunk-7YJIR2FX.js → chunk-G4K6P5KN.js} +8 -15
- package/chunks/chunk-HX3JRTWL.js +393 -0
- package/chunks/{chunk-V7LMZR76.js → chunk-JBSYXHJF.js} +1 -1
- package/chunks/{chunk-R2B65CAN.js → chunk-JKUAX6UT.js} +0 -1
- package/chunks/{chunk-7EHPK6TK.js → chunk-JR346RJ5.js} +4007 -2390
- package/chunks/{chunk-JI7FDD65.js → chunk-K3VUDSWM.js} +9 -6
- package/chunks/chunk-MRO43B25.js +30 -0
- package/chunks/{chunk-4O2TWJK4.js → chunk-NDZEP7SA.js} +183 -40
- package/chunks/{chunk-7NNBQRV7.js → chunk-NJY4F5NM.js} +4 -4
- package/chunks/{chunk-ODPVJ6JJ.js → chunk-OJFMTECH.js} +6 -1
- package/chunks/{chunk-U2K6HDUJ.js → chunk-QVJ33ZBG.js} +23 -13
- package/chunks/{chunk-HAQCNXSG.js → chunk-RQW7WUJR.js} +15 -0
- package/chunks/{chunk-UQRYJQBE.js → chunk-SOGUPKP6.js} +1 -1
- package/chunks/{chunk-6NUSWV4M.js → chunk-TDZCEIK6.js} +2 -0
- package/chunks/{chunk-QEXSIXLX.js → chunk-XK4IGU5E.js} +10 -10
- package/chunks/{chunk-MEN6IEKX.js → chunk-YVGIQ2CS.js} +456 -1225
- package/chunks/{computer-use-2J5ZXEER.js → computer-use-NAHQPV2L.js} +24 -6
- package/chunks/{contextCommand-52NTEMCT.js → contextCommand-VKNIA257.js} +16 -15
- package/chunks/{cron-create-FXRORK2U.js → cron-create-V3UK2SJN.js} +1 -1
- package/chunks/{cron-delete-D24IN6CA.js → cron-delete-MANALPCP.js} +1 -1
- package/chunks/{cron-list-SMOX26SL.js → cron-list-UDIYK3B3.js} +1 -1
- package/chunks/{de-OIMT3OMI.js → de-APURNJ3I.js} +2 -1
- package/chunks/{dist-GRQVFL3G.js → dist-ATAKC63R.js} +1 -1
- package/chunks/{edit-RLFUTT5F.js → edit-YP22XCVA.js} +14 -13
- package/chunks/{en-2IFZ5THF.js → en-FYO57HJW.js} +3 -1
- package/chunks/{enter-worktree-CYRAPQKJ.js → enter-worktree-BD7UFMUZ.js} +14 -13
- package/chunks/{exit-worktree-WQZM72QD.js → exit-worktree-AVWBCQWY.js} +14 -13
- package/chunks/{exitPlanMode-STFEBQZE.js → exitPlanMode-2D6EGF76.js} +14 -13
- package/chunks/{fr-PVELSHTV.js → fr-32YHQZIS.js} +2 -1
- package/chunks/{geminiContentGenerator-DIV32SKO.js → geminiContentGenerator-YFVW6DXY.js} +4 -3
- package/chunks/{glob-N3XO4RVI.js → glob-NZWP66L5.js} +14 -13
- package/chunks/{grep-AK5MP7P3.js → grep-RFEZDGI4.js} +14 -13
- package/chunks/{ja-P5TK5GNN.js → ja-PEUXN4XT.js} +2 -1
- package/chunks/{ls-7FYQHPWF.js → ls-T4SVZWR6.js} +1 -1
- package/chunks/{lsp-DKG34USR.js → lsp-U4ZQLNIS.js} +1 -1
- package/chunks/{monitor-IVBWJZEZ.js → monitor-OHKCQLFQ.js} +17 -14
- package/chunks/{multipart-parser-IXGBIOIN.js → multipart-parser-AJ4WASWR.js} +2 -2
- package/chunks/{notebook-edit-PM46AXFS.js → notebook-edit-AFRICVUX.js} +14 -13
- package/chunks/{openaiContentGenerator-4QXCH7L2.js → openaiContentGenerator-47KB64GP.js} +11 -10
- package/chunks/{pt-A5GHG66T.js → pt-2INS7YVC.js} +2 -1
- package/chunks/{qwenContentGenerator-BLXQIIMX.js → qwenContentGenerator-7BC2OW3T.js} +16 -15
- package/chunks/{qwenOAuth2-BAN2EGSH.js → qwenOAuth2-LKXG7XVO.js} +2 -1
- package/chunks/{read-file-IEQAS3EZ.js → read-file-MXUW3RUF.js} +8 -7
- package/chunks/{ripGrep-HQO7IE4C.js → ripGrep-AHBINNF3.js} +14 -13
- package/chunks/{ru-66XKB4QX.js → ru-6CQ5HNHB.js} +2 -1
- package/chunks/scheduler-KBRJ3LFC.js +306 -0
- package/chunks/{send-message-ZL7CDM7K.js → send-message-GFYV7WLL.js} +1 -1
- package/chunks/{serve-CYRAK4UM.js → serve-PVFP6HD7.js} +43 -30
- package/chunks/{shell-UZBGNO2Q.js → shell-JOXQ5PPL.js} +14 -13
- package/chunks/{skill-JVC34QYN.js → skill-73RYGDJQ.js} +9 -8
- package/chunks/{src-TMOD5X6F.js → src-7XL4G4DC.js} +88 -46
- package/chunks/{src-FOODLH7B.js → src-DR3Y7J6D.js} +41 -15
- package/chunks/{syntheticOutput-U3YJ3GOO.js → syntheticOutput-DM43O6TY.js} +2 -2
- package/chunks/{task-stop-NPUI3YBA.js → task-stop-WKP5OB3V.js} +1 -1
- package/chunks/{todoWrite-Y6F7YEIM.js → todoWrite-GHL6DCLP.js} +14 -3
- package/chunks/{tool-search-P7PRPOW3.js → tool-search-DRMR34WX.js} +8 -7
- package/chunks/{web-fetch-XWEK4TFX.js → web-fetch-SZIV74ZX.js} +2 -2
- package/chunks/{write-file-SIIEUON5.js → write-file-B45ZAKUJ.js} +16 -15
- package/chunks/{zh-TW-3ND6DQRX.js → zh-TW-SSL3ATVZ.js} +3 -1
- package/chunks/{zh-OB5P2ZDO.js → zh-ZHZCMIRG.js} +3 -1
- package/cli.js +38665 -53791
- package/locales/ca.js +2 -1
- package/locales/de.js +2 -1
- package/locales/en.js +4 -1
- package/locales/fr.js +2 -1
- package/locales/ja.js +2 -1
- package/locales/pt.js +2 -1
- package/locales/ru.js +2 -1
- package/locales/zh-TW.js +4 -1
- package/locales/zh.js +4 -1
- package/package.json +2 -2
- package/chunks/chunk-EM6ETG2K.js +0 -60
- package/chunks/chunk-TI4GXJKO.js +0 -4277
- package/chunks/multipart-parser-3QWGTLK3.js +0 -384
- package/chunks/src-IPWIHNMI.js +0 -1406
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
RequestTokenizer
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JBSYXHJF.js";
|
|
6
6
|
import {
|
|
7
7
|
OpenAIContentConverter,
|
|
8
8
|
TaggedThinkingParser,
|
|
9
9
|
openaiRequestCaptureContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YVGIQ2CS.js";
|
|
11
11
|
import {
|
|
12
12
|
buildRuntimeFetchOptions,
|
|
13
13
|
redactProxyError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QVJ33ZBG.js";
|
|
15
15
|
import {
|
|
16
16
|
CAPPED_DEFAULT_MAX_TOKENS,
|
|
17
17
|
DASHSCOPE_PROXY_BASE_URL,
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
runtimeDiagnostics,
|
|
23
23
|
safeJsonParse,
|
|
24
24
|
tokenLimit
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-TDZCEIK6.js";
|
|
26
26
|
import {
|
|
27
27
|
GenerateContentResponse
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-BNESGOSJ.js";
|
|
29
29
|
import {
|
|
30
30
|
createDebugLogger,
|
|
31
31
|
isAbortError
|
|
@@ -8106,7 +8106,10 @@ var ContentGenerationPipeline = class {
|
|
|
8106
8106
|
const reasoningDisabled = request.config?.thinkingConfig?.includeThoughts === false || this.contentGeneratorConfig.reasoning === false;
|
|
8107
8107
|
if (reasoningDisabled) {
|
|
8108
8108
|
const typed = providerRequest;
|
|
8109
|
-
|
|
8109
|
+
const model = (context.model ?? "").toLowerCase();
|
|
8110
|
+
if (DashScopeOpenAICompatibleProvider.isDashScopeProvider(
|
|
8111
|
+
this.contentGeneratorConfig
|
|
8112
|
+
) && (model.startsWith("qwen") || model === "coder-model")) {
|
|
8110
8113
|
typed["enable_thinking"] = false;
|
|
8111
8114
|
}
|
|
8112
8115
|
if ("reasoning" in typed) {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
init_esbuild_shims
|
|
5
|
+
} from "./chunk-A4BMJM77.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-J2S4EL5Y.js";
|
|
9
|
+
|
|
10
|
+
// packages/cli/src/utils/housekeeping/lastInteractionAt.ts
|
|
11
|
+
init_esbuild_shims();
|
|
12
|
+
var lastInteractionAt = Date.now();
|
|
13
|
+
function noteInteraction() {
|
|
14
|
+
lastInteractionAt = Date.now();
|
|
15
|
+
}
|
|
16
|
+
__name(noteInteraction, "noteInteraction");
|
|
17
|
+
function msSinceLastInteraction() {
|
|
18
|
+
return Date.now() - lastInteractionAt;
|
|
19
|
+
}
|
|
20
|
+
__name(msSinceLastInteraction, "msSinceLastInteraction");
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
noteInteraction,
|
|
24
|
+
msSinceLastInteraction
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* @license
|
|
28
|
+
* Copyright 2025 Google LLC
|
|
29
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
30
|
+
*/
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getLanguageSettingsOptions,
|
|
7
7
|
t,
|
|
8
8
|
writeStderrLine
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XK4IGU5E.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_STOP_HOOK_BLOCK_CAP,
|
|
12
12
|
DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES,
|
|
@@ -15,10 +15,13 @@ import {
|
|
|
15
15
|
SkillError,
|
|
16
16
|
ideContextStore,
|
|
17
17
|
require_main
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JR346RJ5.js";
|
|
19
19
|
import {
|
|
20
20
|
isWithinRoot
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YVGIQ2CS.js";
|
|
22
|
+
import {
|
|
23
|
+
atomicWriteFileSync
|
|
24
|
+
} from "./chunk-HX3JRTWL.js";
|
|
22
25
|
import {
|
|
23
26
|
FatalConfigError,
|
|
24
27
|
QWEN_DIR,
|
|
@@ -14618,10 +14621,16 @@ function saveTrustedFolders(trustedFoldersFile) {
|
|
|
14618
14621
|
if (!fs2.existsSync(dirPath)) {
|
|
14619
14622
|
fs2.mkdirSync(dirPath, { recursive: true });
|
|
14620
14623
|
}
|
|
14621
|
-
|
|
14624
|
+
atomicWriteFileSync(
|
|
14622
14625
|
trustedFoldersFile.path,
|
|
14623
14626
|
JSON.stringify(trustedFoldersFile.config, null, 2),
|
|
14624
|
-
|
|
14627
|
+
// noFollow: refuse to follow any pre-placed symlink at the
|
|
14628
|
+
// config path — a redirected write could either leak the
|
|
14629
|
+
// trusted-folder list to an attacker target or leave the user's
|
|
14630
|
+
// real config silently stale. Matches the credential write
|
|
14631
|
+
// sites' security posture (sharedTokenManager, oauth-token-storage,
|
|
14632
|
+
// file-token-storage all use noFollow:true).
|
|
14633
|
+
{ encoding: "utf-8", mode: 384, forceMode: true, noFollow: true }
|
|
14625
14634
|
);
|
|
14626
14635
|
} catch (error) {
|
|
14627
14636
|
writeStderrLine("Error saving trusted folders file.");
|
|
@@ -14902,6 +14911,18 @@ var SETTINGS_SCHEMA = {
|
|
|
14902
14911
|
description: "How many minutes the terminal must be blurred before an auto-recap fires on the next focus-in. Matches Claude Code's default of 5 minutes; raise if you briefly alt-tab and do not want recaps to pile up.",
|
|
14903
14912
|
showInDialog: true
|
|
14904
14913
|
},
|
|
14914
|
+
cleanupPeriodDays: {
|
|
14915
|
+
type: "number",
|
|
14916
|
+
label: "Cleanup Period (days)",
|
|
14917
|
+
category: "General",
|
|
14918
|
+
// LoadedSettings._merged is cached without verified setValue→recompute
|
|
14919
|
+
// paths in all UI flows. Mark restart-required so users aren't
|
|
14920
|
+
// surprised when a mid-session edit doesn't take effect immediately.
|
|
14921
|
+
requiresRestart: true,
|
|
14922
|
+
default: 30,
|
|
14923
|
+
description: "Number of days to retain ~/.qwen/file-history/ session backups used by /rewind. Backups older than this are removed by a background housekeeping pass that runs at most once per day. Set to 0 for minimum retention (~1 hour) \u2014 protects sessions touched in the last hour, plus the currently active session. Other persistent caches will honor the same setting in the future.",
|
|
14924
|
+
showInDialog: true
|
|
14925
|
+
},
|
|
14905
14926
|
gitCoAuthor: {
|
|
14906
14927
|
type: "object",
|
|
14907
14928
|
label: "Attribution",
|
|
@@ -15118,7 +15139,7 @@ var SETTINGS_SCHEMA = {
|
|
|
15118
15139
|
category: "UI",
|
|
15119
15140
|
requiresRestart: false,
|
|
15120
15141
|
default: void 0,
|
|
15121
|
-
description: 'Status line display configuration. Use `type: "preset"` with built-in item ids, or `type: "command"` with a shell command. Optional command `refreshInterval` (seconds, >= 1) re-runs the command on a timer so external data stays fresh.',
|
|
15142
|
+
description: 'Status line display configuration. Use `type: "preset"` with built-in item ids, or `type: "command"` with a shell command. Optional command `refreshInterval` (seconds, >= 1) re-runs the command on a timer so external data stays fresh. Set `respectUserColors: true` to preserve ANSI color codes in command output instead of applying dim/theme styling. Set `hideContextIndicator: true` to hide the built-in context usage indicator in the footer right section.',
|
|
15122
15143
|
showInDialog: false
|
|
15123
15144
|
},
|
|
15124
15145
|
customThemes: {
|
|
@@ -15298,6 +15319,15 @@ var SETTINGS_SCHEMA = {
|
|
|
15298
15319
|
description: "Hide tool output and thinking for a cleaner view (toggle with Ctrl+O).",
|
|
15299
15320
|
showInDialog: true
|
|
15300
15321
|
},
|
|
15322
|
+
useTerminalBuffer: {
|
|
15323
|
+
type: "boolean",
|
|
15324
|
+
label: "Virtualized History (reduces flicker on long sessions)",
|
|
15325
|
+
category: "UI",
|
|
15326
|
+
requiresRestart: false,
|
|
15327
|
+
default: false,
|
|
15328
|
+
description: "Render conversation history in an in-app scrollable viewport instead of the terminal scrollback buffer. Recommended if you see flicker, scroll-storm, or interface freeze on long sessions, after Ctrl+O, after Ctrl+E / Ctrl+F (expand), after window resize, or when alt-tabbing back. Scroll with Shift+\u2191/\u2193 (line), PgUp/PgDn (page), Ctrl+Home/End (top/bottom), or the mouse wheel. Does NOT use the host terminal scrollback while enabled; for native text selection, hold Shift (or Option on macOS) while dragging.",
|
|
15329
|
+
showInDialog: true
|
|
15330
|
+
},
|
|
15301
15331
|
shellOutputMaxLines: {
|
|
15302
15332
|
type: "number",
|
|
15303
15333
|
label: "Shell Output Max Lines",
|
|
@@ -16118,7 +16148,7 @@ var SETTINGS_SCHEMA = {
|
|
|
16118
16148
|
showInDialog: true,
|
|
16119
16149
|
options: [
|
|
16120
16150
|
{ value: "plan" /* PLAN */, label: "Plan" },
|
|
16121
|
-
{ value: "default" /* DEFAULT */, label: "
|
|
16151
|
+
{ value: "default" /* DEFAULT */, label: "Ask permissions" },
|
|
16122
16152
|
{ value: "auto-edit" /* AUTO_EDIT */, label: "Auto Edit" },
|
|
16123
16153
|
{ value: "auto" /* AUTO */, label: "Auto" },
|
|
16124
16154
|
{ value: "yolo" /* YOLO */, label: "YOLO" }
|
|
@@ -16592,6 +16622,17 @@ var SETTINGS_SCHEMA = {
|
|
|
16592
16622
|
mergeStrategy: "concat" /* CONCAT */,
|
|
16593
16623
|
items: HOOK_DEFINITION_ITEMS
|
|
16594
16624
|
},
|
|
16625
|
+
PostToolBatch: {
|
|
16626
|
+
type: "array",
|
|
16627
|
+
label: "Post Tool Batch Hooks",
|
|
16628
|
+
category: "Advanced",
|
|
16629
|
+
requiresRestart: false,
|
|
16630
|
+
default: [],
|
|
16631
|
+
description: "Hooks that execute once after all tool calls in a batch resolve.",
|
|
16632
|
+
showInDialog: false,
|
|
16633
|
+
mergeStrategy: "concat" /* CONCAT */,
|
|
16634
|
+
items: HOOK_DEFINITION_ITEMS
|
|
16635
|
+
},
|
|
16595
16636
|
SessionStart: {
|
|
16596
16637
|
type: "array",
|
|
16597
16638
|
label: "Session Start Hooks",
|
|
@@ -17952,7 +17993,14 @@ function getUserSettingsDir() {
|
|
|
17952
17993
|
}
|
|
17953
17994
|
__name(getUserSettingsDir, "getUserSettingsDir");
|
|
17954
17995
|
var DEFAULT_EXCLUDED_ENV_VARS = ["DEBUG", "DEBUG_MODE"];
|
|
17955
|
-
var
|
|
17996
|
+
var ENV_CORRUPTED_PATH = "QWEN_CODE_SETTINGS_CORRUPTED_PATH";
|
|
17997
|
+
var ENV_WAS_RECOVERED = "QWEN_CODE_SETTINGS_WAS_RECOVERED";
|
|
17998
|
+
var PROJECT_ENV_HARDCODED_EXCLUSIONS = [
|
|
17999
|
+
"QWEN_HOME",
|
|
18000
|
+
"QWEN_RUNTIME_DIR",
|
|
18001
|
+
ENV_CORRUPTED_PATH,
|
|
18002
|
+
ENV_WAS_RECOVERED
|
|
18003
|
+
];
|
|
17956
18004
|
var SETTINGS_VERSION = 4;
|
|
17957
18005
|
var SETTINGS_VERSION_KEY = "$version";
|
|
17958
18006
|
function getSystemSettingsPath() {
|
|
@@ -18100,7 +18148,7 @@ var LoadedSettings = class {
|
|
|
18100
18148
|
static {
|
|
18101
18149
|
__name(this, "LoadedSettings");
|
|
18102
18150
|
}
|
|
18103
|
-
constructor(system, systemDefaults, user, workspace, isTrusted, migratedInMemorScopes, migrationWarnings = []) {
|
|
18151
|
+
constructor(system, systemDefaults, user, workspace, isTrusted, migratedInMemorScopes, migrationWarnings = [], corruptedPath = void 0, wasRecovered = false) {
|
|
18104
18152
|
this.system = system;
|
|
18105
18153
|
this.systemDefaults = systemDefaults;
|
|
18106
18154
|
this.user = user;
|
|
@@ -18108,6 +18156,8 @@ var LoadedSettings = class {
|
|
|
18108
18156
|
this.isTrusted = isTrusted;
|
|
18109
18157
|
this.migratedInMemorScopes = migratedInMemorScopes;
|
|
18110
18158
|
this.migrationWarnings = migrationWarnings;
|
|
18159
|
+
this.corruptedPath = corruptedPath;
|
|
18160
|
+
this.wasRecovered = wasRecovered;
|
|
18111
18161
|
this._merged = this.computeMergedSettings();
|
|
18112
18162
|
}
|
|
18113
18163
|
system;
|
|
@@ -18117,6 +18167,9 @@ var LoadedSettings = class {
|
|
|
18117
18167
|
isTrusted;
|
|
18118
18168
|
migratedInMemorScopes;
|
|
18119
18169
|
migrationWarnings;
|
|
18170
|
+
corruptedPath;
|
|
18171
|
+
wasRecovered;
|
|
18172
|
+
corruptionDialogDismissed = false;
|
|
18120
18173
|
_merged;
|
|
18121
18174
|
get merged() {
|
|
18122
18175
|
return this._merged;
|
|
@@ -18155,6 +18208,34 @@ var LoadedSettings = class {
|
|
|
18155
18208
|
recomputeMerged() {
|
|
18156
18209
|
this._merged = this.computeMergedSettings();
|
|
18157
18210
|
}
|
|
18211
|
+
reloadScopeFromDisk(scope) {
|
|
18212
|
+
const file = this.forScope(scope);
|
|
18213
|
+
try {
|
|
18214
|
+
if (!fs6.existsSync(file.path)) {
|
|
18215
|
+
file.settings = {};
|
|
18216
|
+
file.originalSettings = {};
|
|
18217
|
+
file.rawJson = void 0;
|
|
18218
|
+
this._merged = this.computeMergedSettings();
|
|
18219
|
+
return;
|
|
18220
|
+
}
|
|
18221
|
+
const content = fs6.readFileSync(file.path, "utf-8");
|
|
18222
|
+
const parsed = JSON.parse((0, import_strip_json_comments2.default)(content));
|
|
18223
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
18224
|
+
const resolved = resolveEnvVarsInObject(
|
|
18225
|
+
parsed,
|
|
18226
|
+
getHomeEnvFallbackVars()
|
|
18227
|
+
);
|
|
18228
|
+
file.settings = resolved;
|
|
18229
|
+
file.originalSettings = structuredClone(parsed);
|
|
18230
|
+
file.rawJson = content;
|
|
18231
|
+
}
|
|
18232
|
+
} catch (err) {
|
|
18233
|
+
debugLogger3.warn(
|
|
18234
|
+
`reloadScopeFromDisk(${scope}): ${getErrorMessage(err)}`
|
|
18235
|
+
);
|
|
18236
|
+
}
|
|
18237
|
+
this._merged = this.computeMergedSettings();
|
|
18238
|
+
}
|
|
18158
18239
|
/**
|
|
18159
18240
|
* Get user-level hooks from user settings (not merged with workspace).
|
|
18160
18241
|
* These hooks should always be loaded regardless of folder trust.
|
|
@@ -18187,7 +18268,9 @@ function createMinimalSettings() {
|
|
|
18187
18268
|
emptySettingsFile,
|
|
18188
18269
|
false,
|
|
18189
18270
|
/* @__PURE__ */ new Set(),
|
|
18190
|
-
[]
|
|
18271
|
+
[],
|
|
18272
|
+
void 0,
|
|
18273
|
+
false
|
|
18191
18274
|
);
|
|
18192
18275
|
}
|
|
18193
18276
|
__name(createMinimalSettings, "createMinimalSettings");
|
|
@@ -18245,6 +18328,33 @@ function readHomeEnvInto(file) {
|
|
|
18245
18328
|
}
|
|
18246
18329
|
}
|
|
18247
18330
|
__name(readHomeEnvInto, "readHomeEnvInto");
|
|
18331
|
+
function getHomeEnvFallbackVars() {
|
|
18332
|
+
const globalQwenDir = Storage.getGlobalQwenDir();
|
|
18333
|
+
const candidates = [path3.join(globalQwenDir, ".env")];
|
|
18334
|
+
if (!process2.env["QWEN_HOME"]) {
|
|
18335
|
+
candidates.push(path3.join(path3.dirname(globalQwenDir), ".env"));
|
|
18336
|
+
}
|
|
18337
|
+
const result = {};
|
|
18338
|
+
for (const candidate of candidates) {
|
|
18339
|
+
if (!fs6.existsSync(candidate)) {
|
|
18340
|
+
continue;
|
|
18341
|
+
}
|
|
18342
|
+
try {
|
|
18343
|
+
const parsed = dotenv.parse(fs6.readFileSync(candidate, "utf-8"));
|
|
18344
|
+
for (const key in parsed) {
|
|
18345
|
+
if (Object.hasOwn(parsed, key) && !Object.hasOwn(process2.env, key)) {
|
|
18346
|
+
result[key] ??= parsed[key];
|
|
18347
|
+
}
|
|
18348
|
+
}
|
|
18349
|
+
} catch (e) {
|
|
18350
|
+
debugLogger3.warn(
|
|
18351
|
+
`Failed to read home .env candidate ${candidate}: ${getErrorMessage(e)}`
|
|
18352
|
+
);
|
|
18353
|
+
}
|
|
18354
|
+
}
|
|
18355
|
+
return result;
|
|
18356
|
+
}
|
|
18357
|
+
__name(getHomeEnvFallbackVars, "getHomeEnvFallbackVars");
|
|
18248
18358
|
function detectQwenHomeRedirectWithoutMigration(activeUserSettingsPath) {
|
|
18249
18359
|
if (!process2.env["QWEN_HOME"]) {
|
|
18250
18360
|
return null;
|
|
@@ -18372,7 +18482,8 @@ function loadEnvironment(settings) {
|
|
|
18372
18482
|
}
|
|
18373
18483
|
}
|
|
18374
18484
|
__name(loadEnvironment, "loadEnvironment");
|
|
18375
|
-
|
|
18485
|
+
var CORRUPTED_SUFFIX = ".corrupted";
|
|
18486
|
+
function loadSettings(workspaceDir = process2.cwd(), consumeCorruptionEnvVars = true) {
|
|
18376
18487
|
preResolveHomeEnvOverrides();
|
|
18377
18488
|
const userSettingsPath = getUserSettingsPath();
|
|
18378
18489
|
const qwenHomeRedirectWarning = detectQwenHomeRedirectWithoutMigration(userSettingsPath);
|
|
@@ -18400,10 +18511,21 @@ function loadSettings(workspaceDir = process2.cwd()) {
|
|
|
18400
18511
|
if (fs6.existsSync(filePath)) {
|
|
18401
18512
|
let content = fs6.readFileSync(filePath, "utf-8");
|
|
18402
18513
|
let rawSettings;
|
|
18403
|
-
|
|
18514
|
+
const corruptedPath = `${filePath}${CORRUPTED_SUFFIX}`;
|
|
18515
|
+
let corruptedSaved = false;
|
|
18516
|
+
let recoveredFromBackup = false;
|
|
18517
|
+
let recoveredFromEnvVar = null;
|
|
18404
18518
|
try {
|
|
18405
18519
|
rawSettings = JSON.parse((0, import_strip_json_comments2.default)(content));
|
|
18406
18520
|
} catch (parseError) {
|
|
18521
|
+
try {
|
|
18522
|
+
fs6.copyFileSync(filePath, corruptedPath);
|
|
18523
|
+
corruptedSaved = true;
|
|
18524
|
+
} catch (copyError) {
|
|
18525
|
+
debugLogger3.warn(
|
|
18526
|
+
`Failed to copy corrupted file: ${getErrorMessage(copyError)}`
|
|
18527
|
+
);
|
|
18528
|
+
}
|
|
18407
18529
|
const backupPath = `${filePath}.orig`;
|
|
18408
18530
|
if (fs6.existsSync(backupPath)) {
|
|
18409
18531
|
debugLogger3.warn(
|
|
@@ -18419,7 +18541,7 @@ function loadSettings(workspaceDir = process2.cwd()) {
|
|
|
18419
18541
|
rawSettings = backupSettings;
|
|
18420
18542
|
const recoveryMsg = `Settings file ${filePath} had invalid JSON and was recovered from backup ${backupPath}. Some recent settings changes may have been lost.`;
|
|
18421
18543
|
debugLogger3.warn(recoveryMsg);
|
|
18422
|
-
|
|
18544
|
+
recoveredFromBackup = true;
|
|
18423
18545
|
} catch (backupError) {
|
|
18424
18546
|
debugLogger3.warn(
|
|
18425
18547
|
`Failed to recover from backup ${backupPath}: ${getErrorMessage(backupError)}. Falling back to empty settings.`
|
|
@@ -18427,24 +18549,29 @@ function loadSettings(workspaceDir = process2.cwd()) {
|
|
|
18427
18549
|
}
|
|
18428
18550
|
}
|
|
18429
18551
|
if (!rawSettings) {
|
|
18430
|
-
const
|
|
18431
|
-
let warningMsg;
|
|
18432
|
-
try {
|
|
18433
|
-
fs6.renameSync(filePath, corruptedPath);
|
|
18434
|
-
warningMsg = `Settings file ${filePath} has invalid JSON and was renamed to ${corruptedPath}. Your settings have been reset. To recover, fix the JSON in ${corruptedPath} and rename it back.`;
|
|
18435
|
-
} catch (renameError) {
|
|
18436
|
-
debugLogger3.error(
|
|
18437
|
-
`Failed to rename corrupted settings file: ${getErrorMessage(renameError)}`
|
|
18438
|
-
);
|
|
18439
|
-
warningMsg = `Settings file ${filePath} has invalid JSON. Your settings have been reset. Please fix the JSON in ${filePath} manually.`;
|
|
18440
|
-
}
|
|
18552
|
+
const warningMsg = `Settings file ${filePath} has invalid JSON. Your settings have been reset.`;
|
|
18441
18553
|
debugLogger3.warn(warningMsg);
|
|
18554
|
+
if (corruptedSaved) {
|
|
18555
|
+
try {
|
|
18556
|
+
fs6.writeFileSync(filePath, "{}", "utf-8");
|
|
18557
|
+
} catch {
|
|
18558
|
+
}
|
|
18559
|
+
}
|
|
18442
18560
|
return {
|
|
18443
18561
|
settings: {},
|
|
18444
|
-
migrationWarnings: [
|
|
18562
|
+
migrationWarnings: [],
|
|
18563
|
+
corruptedPath: corruptedSaved ? corruptedPath : void 0,
|
|
18564
|
+
wasRecovered: false
|
|
18445
18565
|
};
|
|
18446
18566
|
}
|
|
18447
18567
|
}
|
|
18568
|
+
const envCorruptedPath = process2.env[ENV_CORRUPTED_PATH];
|
|
18569
|
+
if (consumeCorruptionEnvVars && envCorruptedPath && envCorruptedPath === corruptedPath && scope === "User" /* User */) {
|
|
18570
|
+
corruptedSaved = true;
|
|
18571
|
+
recoveredFromEnvVar = process2.env[ENV_WAS_RECOVERED] === "1";
|
|
18572
|
+
delete process2.env[ENV_CORRUPTED_PATH];
|
|
18573
|
+
delete process2.env[ENV_WAS_RECOVERED];
|
|
18574
|
+
}
|
|
18448
18575
|
if (typeof rawSettings !== "object" || rawSettings === null || Array.isArray(rawSettings)) {
|
|
18449
18576
|
settingsErrors.push({
|
|
18450
18577
|
message: "Settings file is not a valid JSON object.",
|
|
@@ -18480,26 +18607,27 @@ function loadSettings(workspaceDir = process2.cwd()) {
|
|
|
18480
18607
|
settingsObject = migrationResult.settings;
|
|
18481
18608
|
migrationWarnings = migrationResult.warnings;
|
|
18482
18609
|
persistSettingsObject("Error migrating settings file on disk");
|
|
18483
|
-
} else if (hasLegacyNumericVersion || hasInvalidVersion) {
|
|
18610
|
+
} else if ((hasLegacyNumericVersion || hasInvalidVersion) && !corruptedSaved) {
|
|
18484
18611
|
settingsObject[SETTINGS_VERSION_KEY] = SETTINGS_VERSION;
|
|
18485
18612
|
debugLogger3.warn(
|
|
18486
18613
|
`Settings version metadata in ${filePath} could not be migrated by any registered migration. Normalizing ${SETTINGS_VERSION_KEY} to ${SETTINGS_VERSION}.`
|
|
18487
18614
|
);
|
|
18488
18615
|
persistSettingsObject("Error normalizing settings version on disk");
|
|
18489
18616
|
}
|
|
18490
|
-
} else if (!hasVersionKey || hasInvalidVersion || hasLegacyNumericVersion) {
|
|
18617
|
+
} else if ((!hasVersionKey || hasInvalidVersion || hasLegacyNumericVersion) && !corruptedSaved) {
|
|
18491
18618
|
settingsObject[SETTINGS_VERSION_KEY] = SETTINGS_VERSION;
|
|
18492
18619
|
persistSettingsObject("Error normalizing settings version on disk");
|
|
18493
18620
|
}
|
|
18494
|
-
const
|
|
18495
|
-
...recoveryWarning ? [recoveryWarning] : [],
|
|
18496
|
-
...migrationWarnings ?? []
|
|
18497
|
-
];
|
|
18498
|
-
return {
|
|
18621
|
+
const result = {
|
|
18499
18622
|
settings: settingsObject,
|
|
18500
18623
|
rawJson: content,
|
|
18501
|
-
migrationWarnings:
|
|
18624
|
+
migrationWarnings: migrationWarnings ?? []
|
|
18502
18625
|
};
|
|
18626
|
+
if (corruptedSaved) {
|
|
18627
|
+
result.corruptedPath = corruptedPath;
|
|
18628
|
+
result.wasRecovered = recoveredFromBackup || (recoveredFromEnvVar ?? false);
|
|
18629
|
+
}
|
|
18630
|
+
return result;
|
|
18503
18631
|
}
|
|
18504
18632
|
} catch (error) {
|
|
18505
18633
|
settingsErrors.push({
|
|
@@ -18531,10 +18659,20 @@ function loadSettings(workspaceDir = process2.cwd()) {
|
|
|
18531
18659
|
);
|
|
18532
18660
|
const userOriginalSettings = structuredClone(userResult.settings);
|
|
18533
18661
|
const workspaceOriginalSettings = structuredClone(workspaceResult.settings);
|
|
18534
|
-
|
|
18535
|
-
|
|
18536
|
-
|
|
18537
|
-
|
|
18662
|
+
const homeEnvFallback = getHomeEnvFallbackVars();
|
|
18663
|
+
systemSettings = resolveEnvVarsInObject(
|
|
18664
|
+
systemResult.settings,
|
|
18665
|
+
homeEnvFallback
|
|
18666
|
+
);
|
|
18667
|
+
systemDefaultSettings = resolveEnvVarsInObject(
|
|
18668
|
+
systemDefaultsResult.settings,
|
|
18669
|
+
homeEnvFallback
|
|
18670
|
+
);
|
|
18671
|
+
userSettings = resolveEnvVarsInObject(userResult.settings, homeEnvFallback);
|
|
18672
|
+
workspaceSettings = resolveEnvVarsInObject(
|
|
18673
|
+
workspaceResult.settings,
|
|
18674
|
+
homeEnvFallback
|
|
18675
|
+
);
|
|
18538
18676
|
if (userSettings.ui?.theme === "VS") {
|
|
18539
18677
|
userSettings.ui.theme = DefaultLight.name;
|
|
18540
18678
|
} else if (userSettings.ui?.theme === "VS2015") {
|
|
@@ -18603,7 +18741,9 @@ Please fix the configuration file(s) and try again.`
|
|
|
18603
18741
|
},
|
|
18604
18742
|
isTrusted,
|
|
18605
18743
|
migratedInMemorScopes,
|
|
18606
|
-
allMigrationWarnings
|
|
18744
|
+
allMigrationWarnings,
|
|
18745
|
+
userResult.corruptedPath,
|
|
18746
|
+
userResult.wasRecovered ?? false
|
|
18607
18747
|
);
|
|
18608
18748
|
}
|
|
18609
18749
|
__name(loadSettings, "loadSettings");
|
|
@@ -18872,7 +19012,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
18872
19012
|
// packages/cli/src/utils/version.ts
|
|
18873
19013
|
async function getCliVersion() {
|
|
18874
19014
|
const pkgJson = await getPackageJson();
|
|
18875
|
-
return "0.17.
|
|
19015
|
+
return "0.17.1-nightly.20260604.16dd99fa3";
|
|
18876
19016
|
}
|
|
18877
19017
|
__name(getCliVersion, "getCliVersion");
|
|
18878
19018
|
|
|
@@ -18967,7 +19107,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds, options) => {
|
|
|
18967
19107
|
|
|
18968
19108
|
// packages/cli/src/generated/git-commit.ts
|
|
18969
19109
|
init_esbuild_shims();
|
|
18970
|
-
var GIT_COMMIT_INFO = "
|
|
19110
|
+
var GIT_COMMIT_INFO = "b29e672ab";
|
|
18971
19111
|
|
|
18972
19112
|
// packages/cli/src/utils/systemInfo.ts
|
|
18973
19113
|
var debugLogger4 = createDebugLogger("STATUS");
|
|
@@ -19157,11 +19297,14 @@ export {
|
|
|
19157
19297
|
cleanupSettingsBackup,
|
|
19158
19298
|
SETTINGS_DIRECTORY_NAME,
|
|
19159
19299
|
getUserSettingsDir,
|
|
19300
|
+
ENV_CORRUPTED_PATH,
|
|
19301
|
+
ENV_WAS_RECOVERED,
|
|
19160
19302
|
SettingScope,
|
|
19161
19303
|
getSettingsWarnings,
|
|
19162
19304
|
createMinimalSettings,
|
|
19163
19305
|
preResolveHomeEnvOverrides,
|
|
19164
19306
|
loadEnvironment,
|
|
19307
|
+
CORRUPTED_SUFFIX,
|
|
19165
19308
|
loadSettings,
|
|
19166
19309
|
require_debug,
|
|
19167
19310
|
require_constants,
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
t
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XK4IGU5E.js";
|
|
6
6
|
import {
|
|
7
7
|
computeThresholds,
|
|
8
8
|
getCoreSystemPrompt
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JR346RJ5.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSkillLlmContent
|
|
12
12
|
} from "./chunk-EY6BDW7Y.js";
|
|
13
13
|
import {
|
|
14
14
|
DiscoveredMCPTool,
|
|
15
15
|
uiTelemetryService
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YVGIQ2CS.js";
|
|
17
17
|
import {
|
|
18
18
|
ToolNames
|
|
19
19
|
} from "./chunk-6RQTH7UQ.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_TOKEN_LIMIT
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TDZCEIK6.js";
|
|
23
23
|
import {
|
|
24
24
|
init_esbuild_shims
|
|
25
25
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
atomicWriteFileSync
|
|
5
|
+
} from "./chunk-HX3JRTWL.js";
|
|
3
6
|
import {
|
|
4
7
|
Storage,
|
|
5
8
|
createDebugLogger
|
|
@@ -36,7 +39,9 @@ var InstallationManager = class {
|
|
|
36
39
|
const installationIdFile = this.getInstallationIdPath();
|
|
37
40
|
const dir = path.dirname(installationIdFile);
|
|
38
41
|
fs.mkdirSync(dir, { recursive: true });
|
|
39
|
-
|
|
42
|
+
atomicWriteFileSync(installationIdFile, installationId, {
|
|
43
|
+
encoding: "utf-8"
|
|
44
|
+
});
|
|
40
45
|
}
|
|
41
46
|
/**
|
|
42
47
|
* Retrieves the installation ID from a file, creating it if it doesn't exist.
|
|
@@ -8480,7 +8480,7 @@ var require_agent = __commonJS({
|
|
|
8480
8480
|
return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts);
|
|
8481
8481
|
}
|
|
8482
8482
|
__name(defaultFactory, "defaultFactory");
|
|
8483
|
-
var
|
|
8483
|
+
var Agent2 = class extends DispatcherBase {
|
|
8484
8484
|
static {
|
|
8485
8485
|
__name(this, "Agent");
|
|
8486
8486
|
}
|
|
@@ -8555,7 +8555,7 @@ var require_agent = __commonJS({
|
|
|
8555
8555
|
await Promise.all(destroyPromises);
|
|
8556
8556
|
}
|
|
8557
8557
|
};
|
|
8558
|
-
module.exports =
|
|
8558
|
+
module.exports = Agent2;
|
|
8559
8559
|
}
|
|
8560
8560
|
});
|
|
8561
8561
|
|
|
@@ -8566,7 +8566,7 @@ var require_proxy_agent = __commonJS({
|
|
|
8566
8566
|
init_esbuild_shims();
|
|
8567
8567
|
var { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols();
|
|
8568
8568
|
var { URL: URL2 } = __require("node:url");
|
|
8569
|
-
var
|
|
8569
|
+
var Agent2 = require_agent();
|
|
8570
8570
|
var Pool = require_pool();
|
|
8571
8571
|
var DispatcherBase = require_dispatcher_base();
|
|
8572
8572
|
var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors();
|
|
@@ -8690,7 +8690,7 @@ var require_proxy_agent = __commonJS({
|
|
|
8690
8690
|
return agentFactory(origin2, options);
|
|
8691
8691
|
}, "factory");
|
|
8692
8692
|
this[kClient] = clientFactory(url, { connect });
|
|
8693
|
-
this[kAgent] = new
|
|
8693
|
+
this[kAgent] = new Agent2({
|
|
8694
8694
|
...opts,
|
|
8695
8695
|
factory,
|
|
8696
8696
|
connect: /* @__PURE__ */ __name(async (opts2, callback) => {
|
|
@@ -8802,7 +8802,7 @@ var require_env_http_proxy_agent = __commonJS({
|
|
|
8802
8802
|
var DispatcherBase = require_dispatcher_base();
|
|
8803
8803
|
var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols();
|
|
8804
8804
|
var ProxyAgent2 = require_proxy_agent();
|
|
8805
|
-
var
|
|
8805
|
+
var Agent2 = require_agent();
|
|
8806
8806
|
var DEFAULT_PORTS = {
|
|
8807
8807
|
"http:": 80,
|
|
8808
8808
|
"https:": 443
|
|
@@ -8825,7 +8825,7 @@ var require_env_http_proxy_agent = __commonJS({
|
|
|
8825
8825
|
});
|
|
8826
8826
|
}
|
|
8827
8827
|
const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts;
|
|
8828
|
-
this[kNoProxyAgent] = new
|
|
8828
|
+
this[kNoProxyAgent] = new Agent2(agentOpts);
|
|
8829
8829
|
const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY;
|
|
8830
8830
|
if (HTTP_PROXY) {
|
|
8831
8831
|
this[kHttpProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTP_PROXY });
|
|
@@ -11231,7 +11231,7 @@ var require_mock_agent = __commonJS({
|
|
|
11231
11231
|
"use strict";
|
|
11232
11232
|
init_esbuild_shims();
|
|
11233
11233
|
var { kClients } = require_symbols();
|
|
11234
|
-
var
|
|
11234
|
+
var Agent2 = require_agent();
|
|
11235
11235
|
var {
|
|
11236
11236
|
kAgent,
|
|
11237
11237
|
kMockAgentSet,
|
|
@@ -11261,7 +11261,7 @@ var require_mock_agent = __commonJS({
|
|
|
11261
11261
|
if (opts?.agent && typeof opts.agent.dispatch !== "function") {
|
|
11262
11262
|
throw new InvalidArgumentError("Argument opts.agent must implement Agent");
|
|
11263
11263
|
}
|
|
11264
|
-
const agent = opts?.agent ? opts.agent : new
|
|
11264
|
+
const agent = opts?.agent ? opts.agent : new Agent2(opts);
|
|
11265
11265
|
this[kAgent] = agent;
|
|
11266
11266
|
this[kClients] = agent[kClients];
|
|
11267
11267
|
this[kOptions] = buildMockOptions(opts);
|
|
@@ -11366,9 +11366,9 @@ var require_global2 = __commonJS({
|
|
|
11366
11366
|
init_esbuild_shims();
|
|
11367
11367
|
var globalDispatcher = Symbol.for("undici.globalDispatcher.1");
|
|
11368
11368
|
var { InvalidArgumentError } = require_errors();
|
|
11369
|
-
var
|
|
11369
|
+
var Agent2 = require_agent();
|
|
11370
11370
|
if (getGlobalDispatcher() === void 0) {
|
|
11371
|
-
setGlobalDispatcher(new
|
|
11371
|
+
setGlobalDispatcher(new Agent2());
|
|
11372
11372
|
}
|
|
11373
11373
|
function setGlobalDispatcher(agent) {
|
|
11374
11374
|
if (!agent || typeof agent.dispatch !== "function") {
|
|
@@ -18833,7 +18833,7 @@ var require_undici = __commonJS({
|
|
|
18833
18833
|
var Dispatcher = require_dispatcher();
|
|
18834
18834
|
var Pool = require_pool();
|
|
18835
18835
|
var BalancedPool = require_balanced_pool();
|
|
18836
|
-
var
|
|
18836
|
+
var Agent2 = require_agent();
|
|
18837
18837
|
var ProxyAgent2 = require_proxy_agent();
|
|
18838
18838
|
var EnvHttpProxyAgent = require_env_http_proxy_agent();
|
|
18839
18839
|
var RetryAgent = require_retry_agent();
|
|
@@ -18856,7 +18856,7 @@ var require_undici = __commonJS({
|
|
|
18856
18856
|
module.exports.Client = Client;
|
|
18857
18857
|
module.exports.Pool = Pool;
|
|
18858
18858
|
module.exports.BalancedPool = BalancedPool;
|
|
18859
|
-
module.exports.Agent =
|
|
18859
|
+
module.exports.Agent = Agent2;
|
|
18860
18860
|
module.exports.ProxyAgent = ProxyAgent2;
|
|
18861
18861
|
module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent;
|
|
18862
18862
|
module.exports.RetryAgent = RetryAgent;
|
|
@@ -19273,7 +19273,17 @@ function recordProxyFailure(hostname) {
|
|
|
19273
19273
|
__name(recordProxyFailure, "recordProxyFailure");
|
|
19274
19274
|
function buildFetchOptionsWithDispatcher(sdkType, proxyUrl) {
|
|
19275
19275
|
if (!proxyUrl) {
|
|
19276
|
-
|
|
19276
|
+
const NO_PROXY_KEY = "__no_proxy__";
|
|
19277
|
+
let dispatcher = dispatcherCache.get(NO_PROXY_KEY);
|
|
19278
|
+
if (!dispatcher) {
|
|
19279
|
+
dispatcher = new import_undici.Agent({
|
|
19280
|
+
headersTimeout: 0,
|
|
19281
|
+
bodyTimeout: 0,
|
|
19282
|
+
keepAliveTimeout: 6e4
|
|
19283
|
+
});
|
|
19284
|
+
dispatcherCache.set(NO_PROXY_KEY, dispatcher);
|
|
19285
|
+
}
|
|
19286
|
+
return { fetchOptions: { dispatcher }, fetch: import_undici.fetch };
|
|
19277
19287
|
}
|
|
19278
19288
|
try {
|
|
19279
19289
|
const dispatcher = getOrCreateSharedDispatcher(proxyUrl);
|