@qwen-code/qwen-code 0.12.1 → 0.12.2-nightly.20260313.46d57afb
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 +438 -1359
- package/locales/de.js +11 -0
- package/locales/en.js +11 -0
- package/locales/ja.js +11 -0
- package/locales/pt.js +11 -0
- package/locales/ru.js +11 -0
- package/locales/zh.js +11 -0
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -31045,9 +31045,9 @@ var require_logging_utils = __commonJS({
|
|
|
31045
31045
|
this.debugPkg = pkg2;
|
|
31046
31046
|
}
|
|
31047
31047
|
makeLogger(namespace) {
|
|
31048
|
-
const
|
|
31048
|
+
const debugLogger137 = this.debugPkg(namespace);
|
|
31049
31049
|
return (fields, ...args) => {
|
|
31050
|
-
|
|
31050
|
+
debugLogger137(args[0], ...args.slice(1));
|
|
31051
31051
|
};
|
|
31052
31052
|
}
|
|
31053
31053
|
setFilters() {
|
|
@@ -31071,7 +31071,7 @@ var require_logging_utils = __commonJS({
|
|
|
31071
31071
|
}
|
|
31072
31072
|
makeLogger(namespace) {
|
|
31073
31073
|
var _a7;
|
|
31074
|
-
const
|
|
31074
|
+
const debugLogger137 = (_a7 = this.upstream) === null || _a7 === void 0 ? void 0 : _a7.makeLogger(namespace);
|
|
31075
31075
|
return (fields, ...args) => {
|
|
31076
31076
|
var _a8;
|
|
31077
31077
|
const severity = (_a8 = fields.severity) !== null && _a8 !== void 0 ? _a8 : LogSeverity.INFO;
|
|
@@ -31080,8 +31080,8 @@ var require_logging_utils = __commonJS({
|
|
|
31080
31080
|
message: util3.format(...args)
|
|
31081
31081
|
}, fields);
|
|
31082
31082
|
const jsonString = JSON.stringify(json3);
|
|
31083
|
-
if (
|
|
31084
|
-
|
|
31083
|
+
if (debugLogger137) {
|
|
31084
|
+
debugLogger137(fields, jsonString);
|
|
31085
31085
|
} else {
|
|
31086
31086
|
console.log("%s", jsonString);
|
|
31087
31087
|
}
|
|
@@ -82560,7 +82560,7 @@ var require_error = __commonJS({
|
|
|
82560
82560
|
init_esbuild_shims();
|
|
82561
82561
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
82562
82562
|
exports2.getErrorMessage = getErrorMessage4;
|
|
82563
|
-
exports2.getErrorCode =
|
|
82563
|
+
exports2.getErrorCode = getErrorCode4;
|
|
82564
82564
|
function getErrorMessage4(error40) {
|
|
82565
82565
|
if (error40 instanceof Error) {
|
|
82566
82566
|
return error40.message;
|
|
@@ -82569,14 +82569,14 @@ var require_error = __commonJS({
|
|
|
82569
82569
|
}
|
|
82570
82570
|
}
|
|
82571
82571
|
__name(getErrorMessage4, "getErrorMessage");
|
|
82572
|
-
function
|
|
82572
|
+
function getErrorCode4(error40) {
|
|
82573
82573
|
if (typeof error40 === "object" && error40 !== null && "code" in error40 && typeof error40.code === "number") {
|
|
82574
82574
|
return error40.code;
|
|
82575
82575
|
} else {
|
|
82576
82576
|
return null;
|
|
82577
82577
|
}
|
|
82578
82578
|
}
|
|
82579
|
-
__name(
|
|
82579
|
+
__name(getErrorCode4, "getErrorCode");
|
|
82580
82580
|
}
|
|
82581
82581
|
});
|
|
82582
82582
|
|
|
@@ -130045,7 +130045,7 @@ function initializeTelemetry(config2) {
|
|
|
130045
130045
|
if (telemetryInitialized || !config2.getTelemetryEnabled()) {
|
|
130046
130046
|
return;
|
|
130047
130047
|
}
|
|
130048
|
-
const
|
|
130048
|
+
const debugLogger137 = createDebugLogger("OTEL");
|
|
130049
130049
|
const resource = (0, import_resources.resourceFromAttributes)({
|
|
130050
130050
|
[SemanticResourceAttributes.SERVICE_NAME]: SERVICE_NAME,
|
|
130051
130051
|
[SemanticResourceAttributes.SERVICE_VERSION]: process.version,
|
|
@@ -130114,11 +130114,11 @@ function initializeTelemetry(config2) {
|
|
|
130114
130114
|
});
|
|
130115
130115
|
try {
|
|
130116
130116
|
sdk.start();
|
|
130117
|
-
|
|
130117
|
+
debugLogger137.debug("OpenTelemetry SDK started successfully.");
|
|
130118
130118
|
telemetryInitialized = true;
|
|
130119
130119
|
initializeMetrics(config2);
|
|
130120
130120
|
} catch (error40) {
|
|
130121
|
-
|
|
130121
|
+
debugLogger137.error("Error starting OpenTelemetry SDK:", error40);
|
|
130122
130122
|
}
|
|
130123
130123
|
process.on("SIGTERM", () => {
|
|
130124
130124
|
shutdownTelemetry();
|
|
@@ -130134,12 +130134,12 @@ async function shutdownTelemetry() {
|
|
|
130134
130134
|
if (!telemetryInitialized || !sdk) {
|
|
130135
130135
|
return;
|
|
130136
130136
|
}
|
|
130137
|
-
const
|
|
130137
|
+
const debugLogger137 = createDebugLogger("OTEL");
|
|
130138
130138
|
try {
|
|
130139
130139
|
await sdk.shutdown();
|
|
130140
|
-
|
|
130140
|
+
debugLogger137.debug("OpenTelemetry SDK shut down successfully.");
|
|
130141
130141
|
} catch (error40) {
|
|
130142
|
-
|
|
130142
|
+
debugLogger137.error("Error shutting down SDK:", error40);
|
|
130143
130143
|
} finally {
|
|
130144
130144
|
telemetryInitialized = false;
|
|
130145
130145
|
}
|
|
@@ -142990,6 +142990,46 @@ var init_deepseek = __esm({
|
|
|
142990
142990
|
const baseUrl = contentGeneratorConfig.baseUrl ?? "";
|
|
142991
142991
|
return baseUrl.toLowerCase().includes("api.deepseek.com");
|
|
142992
142992
|
}
|
|
142993
|
+
/**
|
|
142994
|
+
* DeepSeek's API requires message content to be a plain string, not an
|
|
142995
|
+
* array of content parts. Flatten any text-part arrays into joined strings
|
|
142996
|
+
* and reject non-text parts that DeepSeek cannot handle.
|
|
142997
|
+
*/
|
|
142998
|
+
buildRequest(request4, userPromptId) {
|
|
142999
|
+
const baseRequest = super.buildRequest(request4, userPromptId);
|
|
143000
|
+
if (!baseRequest.messages?.length) {
|
|
143001
|
+
return baseRequest;
|
|
143002
|
+
}
|
|
143003
|
+
const messages = baseRequest.messages.map((message) => {
|
|
143004
|
+
if (!("content" in message)) {
|
|
143005
|
+
return message;
|
|
143006
|
+
}
|
|
143007
|
+
const { content } = message;
|
|
143008
|
+
if (typeof content === "string" || content === null || content === void 0) {
|
|
143009
|
+
return message;
|
|
143010
|
+
}
|
|
143011
|
+
if (!Array.isArray(content)) {
|
|
143012
|
+
return message;
|
|
143013
|
+
}
|
|
143014
|
+
const text = content.map((part) => {
|
|
143015
|
+
if (typeof part === "string") {
|
|
143016
|
+
return part;
|
|
143017
|
+
}
|
|
143018
|
+
if (part.type === "text") {
|
|
143019
|
+
return part.text ?? "";
|
|
143020
|
+
}
|
|
143021
|
+
return `[Unsupported content type: ${part.type}]`;
|
|
143022
|
+
}).join("\n\n");
|
|
143023
|
+
return {
|
|
143024
|
+
...message,
|
|
143025
|
+
content: text
|
|
143026
|
+
};
|
|
143027
|
+
});
|
|
143028
|
+
return {
|
|
143029
|
+
...baseRequest,
|
|
143030
|
+
messages
|
|
143031
|
+
};
|
|
143032
|
+
}
|
|
142993
143033
|
getDefaultGenerationConfig() {
|
|
142994
143034
|
return {
|
|
142995
143035
|
temperature: 0
|
|
@@ -157672,7 +157712,7 @@ __export(geminiContentGenerator_exports, {
|
|
|
157672
157712
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
157673
157713
|
});
|
|
157674
157714
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
157675
|
-
const version2 = "0.12.
|
|
157715
|
+
const version2 = "0.12.2-nightly.20260313.46d57afb";
|
|
157676
157716
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
157677
157717
|
const baseHeaders = {
|
|
157678
157718
|
"User-Agent": userAgent2
|
|
@@ -220892,7 +220932,7 @@ var init_grep2 = __esm({
|
|
|
220892
220932
|
// packages/core/dist/src/tools/ls.js
|
|
220893
220933
|
import fs37 from "node:fs/promises";
|
|
220894
220934
|
import path38 from "node:path";
|
|
220895
|
-
var debugLogger40, LSToolInvocation, LSTool;
|
|
220935
|
+
var debugLogger40, MAX_ENTRY_COUNT, LSToolInvocation, LSTool;
|
|
220896
220936
|
var init_ls = __esm({
|
|
220897
220937
|
"packages/core/dist/src/tools/ls.js"() {
|
|
220898
220938
|
"use strict";
|
|
@@ -220905,6 +220945,7 @@ var init_ls = __esm({
|
|
|
220905
220945
|
init_tool_names();
|
|
220906
220946
|
init_debugLogger();
|
|
220907
220947
|
debugLogger40 = createDebugLogger("LS");
|
|
220948
|
+
MAX_ENTRY_COUNT = 100;
|
|
220908
220949
|
LSToolInvocation = class extends BaseToolInvocation {
|
|
220909
220950
|
static {
|
|
220910
220951
|
__name(this, "LSToolInvocation");
|
|
@@ -221006,9 +221047,21 @@ var init_ls = __esm({
|
|
|
221006
221047
|
return 1;
|
|
221007
221048
|
return a2.name.localeCompare(b2.name);
|
|
221008
221049
|
});
|
|
221009
|
-
const
|
|
221010
|
-
|
|
221050
|
+
const totalEntryCount = entries.length;
|
|
221051
|
+
const entryLimit = Math.min(MAX_ENTRY_COUNT, this.config.getTruncateToolOutputLines());
|
|
221052
|
+
const truncated = totalEntryCount > entryLimit;
|
|
221053
|
+
const entriesToShow = truncated ? entries.slice(0, entryLimit) : entries;
|
|
221054
|
+
const directoryContent = entriesToShow.map((entry) => `${entry.isDirectory ? "[DIR] " : ""}${entry.name}`).join("\n");
|
|
221055
|
+
let resultMessage = `Listed ${totalEntryCount} item(s) in ${this.params.path}:
|
|
221056
|
+
---
|
|
221011
221057
|
${directoryContent}`;
|
|
221058
|
+
if (truncated) {
|
|
221059
|
+
const omittedEntries = totalEntryCount - entryLimit;
|
|
221060
|
+
const entryTerm = omittedEntries === 1 ? "item" : "items";
|
|
221061
|
+
resultMessage += `
|
|
221062
|
+
---
|
|
221063
|
+
[${omittedEntries} ${entryTerm} truncated] ...`;
|
|
221064
|
+
}
|
|
221012
221065
|
const ignoredMessages = [];
|
|
221013
221066
|
if (gitIgnoredCount > 0) {
|
|
221014
221067
|
ignoredMessages.push(`${gitIgnoredCount} git-ignored`);
|
|
@@ -221021,10 +221074,13 @@ ${directoryContent}`;
|
|
|
221021
221074
|
|
|
221022
221075
|
(${ignoredMessages.join(", ")})`;
|
|
221023
221076
|
}
|
|
221024
|
-
let displayMessage = `Listed ${
|
|
221077
|
+
let displayMessage = `Listed ${totalEntryCount} item(s)`;
|
|
221025
221078
|
if (ignoredMessages.length > 0) {
|
|
221026
221079
|
displayMessage += ` (${ignoredMessages.join(", ")})`;
|
|
221027
221080
|
}
|
|
221081
|
+
if (truncated) {
|
|
221082
|
+
displayMessage += " (truncated)";
|
|
221083
|
+
}
|
|
221028
221084
|
return {
|
|
221029
221085
|
llmContent: resultMessage,
|
|
221030
221086
|
returnDisplay: displayMessage
|
|
@@ -223884,7 +223940,7 @@ var init_oauth_utils = __esm({
|
|
|
223884
223940
|
import * as http4 from "node:http";
|
|
223885
223941
|
import * as crypto10 from "node:crypto";
|
|
223886
223942
|
import { URL as URL4 } from "node:url";
|
|
223887
|
-
var OAUTH_DISPLAY_MESSAGE_EVENT, debugLogger51, HTTP_OK, MCPOAuthProvider;
|
|
223943
|
+
var OAUTH_DISPLAY_MESSAGE_EVENT, debugLogger51, activeCallbackServer, activeCallbackTimeout, HTTP_OK, MCPOAuthProvider;
|
|
223888
223944
|
var init_oauth_provider = __esm({
|
|
223889
223945
|
"packages/core/dist/src/mcp/oauth-provider.js"() {
|
|
223890
223946
|
"use strict";
|
|
@@ -223897,6 +223953,8 @@ var init_oauth_provider = __esm({
|
|
|
223897
223953
|
init_constants6();
|
|
223898
223954
|
OAUTH_DISPLAY_MESSAGE_EVENT = "oauth-display-message";
|
|
223899
223955
|
debugLogger51 = createDebugLogger("MCP_OAUTH");
|
|
223956
|
+
activeCallbackServer = null;
|
|
223957
|
+
activeCallbackTimeout = null;
|
|
223900
223958
|
HTTP_OK = 200;
|
|
223901
223959
|
MCPOAuthProvider = class {
|
|
223902
223960
|
static {
|
|
@@ -223965,6 +224023,17 @@ var init_oauth_provider = __esm({
|
|
|
223965
224023
|
* @returns Promise that resolves with the authorization code
|
|
223966
224024
|
*/
|
|
223967
224025
|
async startCallbackServer(expectedState) {
|
|
224026
|
+
if (activeCallbackServer) {
|
|
224027
|
+
try {
|
|
224028
|
+
activeCallbackServer.close();
|
|
224029
|
+
} catch {
|
|
224030
|
+
}
|
|
224031
|
+
activeCallbackServer = null;
|
|
224032
|
+
}
|
|
224033
|
+
if (activeCallbackTimeout) {
|
|
224034
|
+
clearTimeout(activeCallbackTimeout);
|
|
224035
|
+
activeCallbackTimeout = null;
|
|
224036
|
+
}
|
|
223968
224037
|
return new Promise((resolve30, reject) => {
|
|
223969
224038
|
const server = http4.createServer(async (req, res) => {
|
|
223970
224039
|
try {
|
|
@@ -223989,6 +224058,7 @@ var init_oauth_provider = __esm({
|
|
|
223989
224058
|
</body>
|
|
223990
224059
|
</html>
|
|
223991
224060
|
`);
|
|
224061
|
+
activeCallbackServer = null;
|
|
223992
224062
|
server.close();
|
|
223993
224063
|
reject(new Error(`OAuth error: ${error40}`));
|
|
223994
224064
|
return;
|
|
@@ -224001,6 +224071,7 @@ var init_oauth_provider = __esm({
|
|
|
224001
224071
|
if (state !== expectedState) {
|
|
224002
224072
|
res.writeHead(400);
|
|
224003
224073
|
res.end("Invalid state parameter");
|
|
224074
|
+
activeCallbackServer = null;
|
|
224004
224075
|
server.close();
|
|
224005
224076
|
reject(new Error("State mismatch - possible CSRF attack"));
|
|
224006
224077
|
return;
|
|
@@ -224015,9 +224086,11 @@ var init_oauth_provider = __esm({
|
|
|
224015
224086
|
</body>
|
|
224016
224087
|
</html>
|
|
224017
224088
|
`);
|
|
224089
|
+
activeCallbackServer = null;
|
|
224018
224090
|
server.close();
|
|
224019
224091
|
resolve30({ code: code2, state });
|
|
224020
224092
|
} catch (error40) {
|
|
224093
|
+
activeCallbackServer = null;
|
|
224021
224094
|
server.close();
|
|
224022
224095
|
reject(error40);
|
|
224023
224096
|
}
|
|
@@ -224026,7 +224099,10 @@ var init_oauth_provider = __esm({
|
|
|
224026
224099
|
server.listen(OAUTH_REDIRECT_PORT, () => {
|
|
224027
224100
|
debugLogger51.debug(`OAuth callback server listening on port ${OAUTH_REDIRECT_PORT}`);
|
|
224028
224101
|
});
|
|
224029
|
-
|
|
224102
|
+
activeCallbackServer = server;
|
|
224103
|
+
activeCallbackTimeout = setTimeout(() => {
|
|
224104
|
+
activeCallbackServer = null;
|
|
224105
|
+
activeCallbackTimeout = null;
|
|
224030
224106
|
server.close();
|
|
224031
224107
|
reject(new Error("OAuth callback timeout"));
|
|
224032
224108
|
}, 5 * 60 * 1e3);
|
|
@@ -224244,7 +224320,11 @@ var init_oauth_provider = __esm({
|
|
|
224244
224320
|
if (events) {
|
|
224245
224321
|
events.emit(OAUTH_DISPLAY_MESSAGE_EVENT, message);
|
|
224246
224322
|
} else {
|
|
224247
|
-
|
|
224323
|
+
if (typeof message === "string") {
|
|
224324
|
+
debugLogger51.info(message);
|
|
224325
|
+
} else {
|
|
224326
|
+
debugLogger51.info(`[${message.key}]${message.params ? ` ${JSON.stringify(message.params)}` : ""}`);
|
|
224327
|
+
}
|
|
224248
224328
|
}
|
|
224249
224329
|
}, "displayMessage");
|
|
224250
224330
|
if (!config2.authorizationUrl && mcpServerUrl) {
|
|
@@ -224325,13 +224405,15 @@ var init_oauth_provider = __esm({
|
|
|
224325
224405
|
}
|
|
224326
224406
|
const pkceParams = this.generatePKCEParams();
|
|
224327
224407
|
const authUrl = this.buildAuthorizationUrl(config2, pkceParams, mcpServerUrl);
|
|
224328
|
-
displayMessage(
|
|
224329
|
-
|
|
224330
|
-
|
|
224331
|
-
|
|
224332
|
-
|
|
224333
|
-
|
|
224334
|
-
|
|
224408
|
+
displayMessage({
|
|
224409
|
+
key: "If the browser does not open, copy and paste this URL into your browser:"
|
|
224410
|
+
});
|
|
224411
|
+
displayMessage(`
|
|
224412
|
+
${authUrl.toString()}
|
|
224413
|
+
`);
|
|
224414
|
+
displayMessage({
|
|
224415
|
+
key: "Make sure to copy the COMPLETE URL - it may wrap across multiple lines."
|
|
224416
|
+
});
|
|
224335
224417
|
const callbackPromise = this.startCallbackServer(pkceParams.state);
|
|
224336
224418
|
try {
|
|
224337
224419
|
await openBrowserSecurely(authUrl);
|
|
@@ -225341,6 +225423,16 @@ Signal: Signal number or \`(none)\` if no signal was received.
|
|
|
225341
225423
|
}
|
|
225342
225424
|
}
|
|
225343
225425
|
}
|
|
225426
|
+
/**
|
|
225427
|
+
* Disconnects an MCP server by removing its tools, prompts, and disconnecting the client.
|
|
225428
|
+
* Unlike disableMcpServer, this does NOT add the server to the exclusion list.
|
|
225429
|
+
* @param serverName The name of the server to disconnect.
|
|
225430
|
+
*/
|
|
225431
|
+
async disconnectServer(serverName) {
|
|
225432
|
+
this.removeMcpToolsByServer(serverName);
|
|
225433
|
+
this.config.getPromptRegistry().removePromptsByServer(serverName);
|
|
225434
|
+
await this.mcpClientManager.disconnectServer(serverName);
|
|
225435
|
+
}
|
|
225344
225436
|
/**
|
|
225345
225437
|
* Disables an MCP server by removing its tools, prompts, and disconnecting the client.
|
|
225346
225438
|
* Also updates the config's exclusion list.
|
|
@@ -231900,7 +231992,7 @@ var init_write_file = __esm({
|
|
|
231900
231992
|
};
|
|
231901
231993
|
}
|
|
231902
231994
|
const { originalContent, correctedContent: fileContent, fileExists: fileExists2 } = correctedContentResult;
|
|
231903
|
-
|
|
231995
|
+
let isNewFile = !fileExists2;
|
|
231904
231996
|
try {
|
|
231905
231997
|
const dirName = path46.dirname(file_path);
|
|
231906
231998
|
if (!fs43.existsSync(dirName)) {
|
|
@@ -231909,11 +232001,20 @@ var init_write_file = __esm({
|
|
|
231909
232001
|
let useBOM = false;
|
|
231910
232002
|
let detectedEncoding;
|
|
231911
232003
|
if (!isNewFile) {
|
|
231912
|
-
|
|
231913
|
-
|
|
231914
|
-
|
|
231915
|
-
|
|
232004
|
+
try {
|
|
232005
|
+
const fileInfo = await this.config.getFileSystemService().readTextFileWithInfo(file_path);
|
|
232006
|
+
useBOM = fileInfo.bom;
|
|
232007
|
+
detectedEncoding = fileInfo.encoding;
|
|
232008
|
+
} catch (error40) {
|
|
232009
|
+
if (!isNodeError(error40) || error40.code !== "ENOENT") {
|
|
232010
|
+
throw error40;
|
|
232011
|
+
}
|
|
232012
|
+
isNewFile = true;
|
|
232013
|
+
}
|
|
232014
|
+
}
|
|
232015
|
+
if (isNewFile) {
|
|
231916
232016
|
useBOM = this.config.getDefaultFileEncoding() === FileEncoding.UTF8_BOM;
|
|
232017
|
+
detectedEncoding = void 0;
|
|
231917
232018
|
}
|
|
231918
232019
|
await this.config.getFileSystemService().writeTextFile(file_path, fileContent, {
|
|
231919
232020
|
bom: useBOM,
|
|
@@ -289605,7 +289706,7 @@ var require_backend = __commonJS({
|
|
|
289605
289706
|
value: a2
|
|
289606
289707
|
});
|
|
289607
289708
|
}, "useInsertionEffect"),
|
|
289608
|
-
useMemo: /* @__PURE__ */ __name(function
|
|
289709
|
+
useMemo: /* @__PURE__ */ __name(function useMemo33(a2) {
|
|
289609
289710
|
var b2 = C2();
|
|
289610
289711
|
a2 = null !== b2 ? b2.memoizedState[0] : a2();
|
|
289611
289712
|
x3.push({
|
|
@@ -304238,6 +304339,11 @@ var init_de2 = __esm({
|
|
|
304238
304339
|
"Successfully authenticated and refreshed tools for '{{name}}'.": "Erfolgreich authentifiziert und Werkzeuge f\xFCr '{{name}}' aktualisiert.",
|
|
304239
304340
|
"Failed to authenticate with MCP server '{{name}}': {{error}}": "Authentifizierung mit MCP-Server '{{name}}' fehlgeschlagen: {{error}}",
|
|
304240
304341
|
"Re-discovering tools from '{{name}}'...": "Werkzeuge von '{{name}}' werden neu erkannt...",
|
|
304342
|
+
"Discovered {{count}} tool(s) from '{{name}}'.": "{{count}} Werkzeug(e) von '{{name}}' entdeckt.",
|
|
304343
|
+
"Authentication complete. Returning to server details...": "Authentifizierung abgeschlossen. Zur\xFCck zu den Serverdetails...",
|
|
304344
|
+
"Authentication successful.": "Authentifizierung erfolgreich.",
|
|
304345
|
+
"If the browser does not open, copy and paste this URL into your browser:": "Falls der Browser sich nicht \xF6ffnet, kopieren Sie diese URL und f\xFCgen Sie sie in Ihren Browser ein:",
|
|
304346
|
+
"Make sure to copy the COMPLETE URL - it may wrap across multiple lines.": "\u26A0\uFE0F Stellen Sie sicher, dass Sie die VOLLST\xC4NDIGE URL kopieren \u2013 sie kann \xFCber mehrere Zeilen gehen.",
|
|
304241
304347
|
// ============================================================================
|
|
304242
304348
|
// Commands - Chat
|
|
304243
304349
|
// ============================================================================
|
|
@@ -304348,6 +304454,8 @@ var init_de2 = __esm({
|
|
|
304348
304454
|
Disable: "Deaktivieren",
|
|
304349
304455
|
Enable: "Aktivieren",
|
|
304350
304456
|
Authenticate: "Authentifizieren",
|
|
304457
|
+
"Re-authenticate": "Erneut authentifizieren",
|
|
304458
|
+
"Clear Authentication": "Authentifizierung l\xF6schen",
|
|
304351
304459
|
disabled: "deaktiviert",
|
|
304352
304460
|
"Server:": "Server:",
|
|
304353
304461
|
Reconnect: "Neu verbinden",
|
|
@@ -305505,6 +305613,11 @@ var init_en3 = __esm({
|
|
|
305505
305613
|
"Successfully authenticated and refreshed tools for '{{name}}'.": "Successfully authenticated and refreshed tools for '{{name}}'.",
|
|
305506
305614
|
"Failed to authenticate with MCP server '{{name}}': {{error}}": "Failed to authenticate with MCP server '{{name}}': {{error}}",
|
|
305507
305615
|
"Re-discovering tools from '{{name}}'...": "Re-discovering tools from '{{name}}'...",
|
|
305616
|
+
"Discovered {{count}} tool(s) from '{{name}}'.": "Discovered {{count}} tool(s) from '{{name}}'.",
|
|
305617
|
+
"Authentication complete. Returning to server details...": "Authentication complete. Returning to server details...",
|
|
305618
|
+
"Authentication successful.": "Authentication successful.",
|
|
305619
|
+
"If the browser does not open, copy and paste this URL into your browser:": "If the browser does not open, copy and paste this URL into your browser:",
|
|
305620
|
+
"Make sure to copy the COMPLETE URL - it may wrap across multiple lines.": "Make sure to copy the COMPLETE URL - it may wrap across multiple lines.",
|
|
305508
305621
|
// ============================================================================
|
|
305509
305622
|
// MCP Management Dialog
|
|
305510
305623
|
// ============================================================================
|
|
@@ -305530,6 +305643,8 @@ var init_en3 = __esm({
|
|
|
305530
305643
|
Enable: "Enable",
|
|
305531
305644
|
Disable: "Disable",
|
|
305532
305645
|
Authenticate: "Authenticate",
|
|
305646
|
+
"Re-authenticate": "Re-authenticate",
|
|
305647
|
+
"Clear Authentication": "Clear Authentication",
|
|
305533
305648
|
"Server:": "Server:",
|
|
305534
305649
|
"Command:": "Command:",
|
|
305535
305650
|
"Working Directory:": "Working Directory:",
|
|
@@ -306551,6 +306666,11 @@ var init_ja2 = __esm({
|
|
|
306551
306666
|
"Successfully authenticated and refreshed tools for '{{name}}'.": "'{{name}}' \u306E\u8A8D\u8A3C\u3068\u30C4\u30FC\u30EB\u66F4\u65B0\u306B\u6210\u529F\u3057\u307E\u3057\u305F",
|
|
306552
306667
|
"Failed to authenticate with MCP server '{{name}}': {{error}}": "MCP\u30B5\u30FC\u30D0\u30FC '{{name}}' \u3067\u306E\u8A8D\u8A3C\u306B\u5931\u6557: {{error}}",
|
|
306553
306668
|
"Re-discovering tools from '{{name}}'...": "'{{name}}' \u304B\u3089\u30C4\u30FC\u30EB\u3092\u518D\u691C\u51FA\u4E2D...",
|
|
306669
|
+
"Discovered {{count}} tool(s) from '{{name}}'.": "'{{name}}' \u304B\u3089 {{count}} \u500B\u306E\u30C4\u30FC\u30EB\u3092\u691C\u51FA\u3057\u307E\u3057\u305F\u3002",
|
|
306670
|
+
"Authentication complete. Returning to server details...": "\u8A8D\u8A3C\u5B8C\u4E86\u3002\u30B5\u30FC\u30D0\u30FC\u8A73\u7D30\u306B\u623B\u308A\u307E\u3059...",
|
|
306671
|
+
"Authentication successful.": "\u8A8D\u8A3C\u6210\u529F\u3002",
|
|
306672
|
+
"If the browser does not open, copy and paste this URL into your browser:": "\u30D6\u30E9\u30A6\u30B6\u304C\u958B\u304B\u306A\u3044\u5834\u5408\u306F\u3001\u3053\u306EURL\u3092\u30B3\u30D4\u30FC\u3057\u3066\u30D6\u30E9\u30A6\u30B6\u306B\u8CBC\u308A\u4ED8\u3051\u3066\u304F\u3060\u3055\u3044\uFF1A",
|
|
306673
|
+
"Make sure to copy the COMPLETE URL - it may wrap across multiple lines.": "\u26A0\uFE0F URL\u5168\u4F53\u3092\u30B3\u30D4\u30FC\u3057\u3066\u304F\u3060\u3055\u3044\u2014\u2014\u8907\u6570\u884C\u306B\u307E\u305F\u304C\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002",
|
|
306554
306674
|
"Configured MCP servers:": "\u8A2D\u5B9A\u6E08\u307FMCP\u30B5\u30FC\u30D0\u30FC:",
|
|
306555
306675
|
Ready: "\u6E96\u5099\u5B8C\u4E86",
|
|
306556
306676
|
Disconnected: "\u5207\u65AD",
|
|
@@ -306651,6 +306771,8 @@ var init_ja2 = __esm({
|
|
|
306651
306771
|
Disable: "\u7121\u52B9\u5316",
|
|
306652
306772
|
Enable: "\u6709\u52B9\u5316",
|
|
306653
306773
|
Authenticate: "\u8A8D\u8A3C",
|
|
306774
|
+
"Re-authenticate": "\u518D\u8A8D\u8A3C",
|
|
306775
|
+
"Clear Authentication": "\u8A8D\u8A3C\u3092\u30AF\u30EA\u30A2",
|
|
306654
306776
|
disabled: "\u7121\u52B9",
|
|
306655
306777
|
"Server:": "\u30B5\u30FC\u30D0\u30FC:",
|
|
306656
306778
|
Reconnect: "\u518D\u63A5\u7D9A",
|
|
@@ -307561,6 +307683,11 @@ var init_pt2 = __esm({
|
|
|
307561
307683
|
"Successfully authenticated and refreshed tools for '{{name}}'.": "Autenticado com sucesso e ferramentas atualizadas para '{{name}}'.",
|
|
307562
307684
|
"Failed to authenticate with MCP server '{{name}}': {{error}}": "Falha ao autenticar com o servidor MCP '{{name}}': {{error}}",
|
|
307563
307685
|
"Re-discovering tools from '{{name}}'...": "Redescobrindo ferramentas de '{{name}}'...",
|
|
307686
|
+
"Discovered {{count}} tool(s) from '{{name}}'.": "{{count}} ferramenta(s) descoberta(s) de '{{name}}'.",
|
|
307687
|
+
"Authentication complete. Returning to server details...": "Autentica\xE7\xE3o conclu\xEDda. Retornando aos detalhes do servidor...",
|
|
307688
|
+
"Authentication successful.": "Autentica\xE7\xE3o bem-sucedida.",
|
|
307689
|
+
"If the browser does not open, copy and paste this URL into your browser:": "Se o navegador n\xE3o abrir, copie e cole esta URL no seu navegador:",
|
|
307690
|
+
"Make sure to copy the COMPLETE URL - it may wrap across multiple lines.": "\u26A0\uFE0F Certifique-se de copiar a URL COMPLETA \u2013 ela pode ocupar v\xE1rias linhas.",
|
|
307564
307691
|
// ============================================================================
|
|
307565
307692
|
// Commands - Chat
|
|
307566
307693
|
// ============================================================================
|
|
@@ -307671,6 +307798,8 @@ var init_pt2 = __esm({
|
|
|
307671
307798
|
Disable: "Desativar",
|
|
307672
307799
|
Enable: "Ativar",
|
|
307673
307800
|
Authenticate: "Autenticar",
|
|
307801
|
+
"Re-authenticate": "Reautenticar",
|
|
307802
|
+
"Clear Authentication": "Limpar autentica\xE7\xE3o",
|
|
307674
307803
|
disabled: "desativado",
|
|
307675
307804
|
"Server:": "Servidor:",
|
|
307676
307805
|
Reconnect: "Reconectar",
|
|
@@ -308762,6 +308891,11 @@ var init_ru2 = __esm({
|
|
|
308762
308891
|
"Successfully authenticated and refreshed tools for '{{name}}'.": "\u0423\u0441\u043F\u0435\u0448\u043D\u043E \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u043E\u0432\u0430\u043D\u043E \u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u044B \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u044B \u0434\u043B\u044F '{{name}}'.",
|
|
308763
308892
|
"Failed to authenticate with MCP server '{{name}}': {{error}}": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 MCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 '{{name}}': {{error}}",
|
|
308764
308893
|
"Re-discovering tools from '{{name}}'...": "\u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u0438\u0435 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432 \u043E\u0442 '{{name}}'...",
|
|
308894
|
+
"Discovered {{count}} tool(s) from '{{name}}'.": "\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E {{count}} \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442(\u043E\u0432) \u043E\u0442 '{{name}}'.",
|
|
308895
|
+
"Authentication complete. Returning to server details...": "\u0410\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430. \u0412\u043E\u0437\u0432\u0440\u0430\u0442 \u043A \u0434\u0435\u0442\u0430\u043B\u044F\u043C \u0441\u0435\u0440\u0432\u0435\u0440\u0430...",
|
|
308896
|
+
"Authentication successful.": "\u0410\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u0430.",
|
|
308897
|
+
"If the browser does not open, copy and paste this URL into your browser:": "\u0415\u0441\u043B\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u043B\u0441\u044F, \u0441\u043A\u043E\u043F\u0438\u0440\u0443\u0439\u0442\u0435 \u044D\u0442\u043E\u0442 URL \u0438 \u0432\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0435\u0433\u043E \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440:",
|
|
308898
|
+
"Make sure to copy the COMPLETE URL - it may wrap across multiple lines.": "\u26A0\uFE0F \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044C, \u0447\u0442\u043E \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043B\u0438 \u041F\u041E\u041B\u041D\u042B\u0419 URL \u2014 \u043E\u043D \u043C\u043E\u0436\u0435\u0442 \u0437\u0430\u043D\u0438\u043C\u0430\u0442\u044C \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0442\u0440\u043E\u043A.",
|
|
308765
308899
|
// ============================================================================
|
|
308766
308900
|
// Команды - Чат
|
|
308767
308901
|
// ============================================================================
|
|
@@ -308855,6 +308989,8 @@ var init_ru2 = __esm({
|
|
|
308855
308989
|
Disable: "\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C",
|
|
308856
308990
|
Enable: "\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C",
|
|
308857
308991
|
Authenticate: "\u0410\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F",
|
|
308992
|
+
"Re-authenticate": "\u041F\u043E\u0432\u0442\u043E\u0440\u043D\u0430\u044F \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F",
|
|
308993
|
+
"Clear Authentication": "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044E",
|
|
308858
308994
|
disabled: "\u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D",
|
|
308859
308995
|
"Server:": "\u0421\u0435\u0440\u0432\u0435\u0440:",
|
|
308860
308996
|
Reconnect: "\u041F\u0435\u0440\u0435\u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C",
|
|
@@ -310032,6 +310168,11 @@ var init_zh = __esm({
|
|
|
310032
310168
|
"Successfully authenticated and refreshed tools for '{{name}}'.": "\u6210\u529F\u8BA4\u8BC1\u5E76\u5237\u65B0\u4E86 '{{name}}' \u7684\u5DE5\u5177",
|
|
310033
310169
|
"Failed to authenticate with MCP server '{{name}}': {{error}}": "\u8BA4\u8BC1 MCP \u670D\u52A1\u5668 '{{name}}' \u5931\u8D25\uFF1A{{error}}",
|
|
310034
310170
|
"Re-discovering tools from '{{name}}'...": "\u6B63\u5728\u91CD\u65B0\u53D1\u73B0 '{{name}}' \u7684\u5DE5\u5177...",
|
|
310171
|
+
"Discovered {{count}} tool(s) from '{{name}}'.": "\u4ECE '{{name}}' \u53D1\u73B0\u4E86 {{count}} \u4E2A\u5DE5\u5177\u3002",
|
|
310172
|
+
"Authentication complete. Returning to server details...": "\u8BA4\u8BC1\u5B8C\u6210\uFF0C\u6B63\u5728\u8FD4\u56DE\u670D\u52A1\u5668\u8BE6\u60C5...",
|
|
310173
|
+
"Authentication successful.": "\u8BA4\u8BC1\u6210\u529F\u3002",
|
|
310174
|
+
"If the browser does not open, copy and paste this URL into your browser:": "\u5982\u679C\u6D4F\u89C8\u5668\u672A\u81EA\u52A8\u6253\u5F00\uFF0C\u8BF7\u590D\u5236\u4EE5\u4E0B URL \u5E76\u7C98\u8D34\u5230\u6D4F\u89C8\u5668\u4E2D\uFF1A",
|
|
310175
|
+
"Make sure to copy the COMPLETE URL - it may wrap across multiple lines.": "\u26A0\uFE0F \u8BF7\u786E\u4FDD\u590D\u5236\u5B8C\u6574\u7684 URL \u2014\u2014 \u5B83\u53EF\u80FD\u8DE8\u8D8A\u591A\u884C\u3002",
|
|
310035
310176
|
// ============================================================================
|
|
310036
310177
|
// MCP Management Dialog
|
|
310037
310178
|
// ============================================================================
|
|
@@ -310057,6 +310198,8 @@ var init_zh = __esm({
|
|
|
310057
310198
|
Enable: "\u542F\u7528",
|
|
310058
310199
|
Disable: "\u7981\u7528",
|
|
310059
310200
|
Authenticate: "\u8BA4\u8BC1",
|
|
310201
|
+
"Re-authenticate": "\u91CD\u65B0\u8BA4\u8BC1",
|
|
310202
|
+
"Clear Authentication": "\u6E05\u7A7A\u8BA4\u8BC1",
|
|
310060
310203
|
disabled: "\u5DF2\u7981\u7528",
|
|
310061
310204
|
"Server:": "\u670D\u52A1\u5668\uFF1A",
|
|
310062
310205
|
"(disabled)": "(\u5DF2\u7981\u7528)",
|
|
@@ -356553,1092 +356696,6 @@ var require_supports_hyperlinks = __commonJS({
|
|
|
356553
356696
|
}
|
|
356554
356697
|
});
|
|
356555
356698
|
|
|
356556
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRMode.js
|
|
356557
|
-
var require_QRMode = __commonJS({
|
|
356558
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRMode.js"(exports2, module2) {
|
|
356559
|
-
init_esbuild_shims();
|
|
356560
|
-
module2.exports = {
|
|
356561
|
-
MODE_NUMBER: 1 << 0,
|
|
356562
|
-
MODE_ALPHA_NUM: 1 << 1,
|
|
356563
|
-
MODE_8BIT_BYTE: 1 << 2,
|
|
356564
|
-
MODE_KANJI: 1 << 3
|
|
356565
|
-
};
|
|
356566
|
-
}
|
|
356567
|
-
});
|
|
356568
|
-
|
|
356569
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js
|
|
356570
|
-
var require_QR8bitByte = __commonJS({
|
|
356571
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js"(exports2, module2) {
|
|
356572
|
-
init_esbuild_shims();
|
|
356573
|
-
var QRMode = require_QRMode();
|
|
356574
|
-
function QR8bitByte(data) {
|
|
356575
|
-
this.mode = QRMode.MODE_8BIT_BYTE;
|
|
356576
|
-
this.data = data;
|
|
356577
|
-
}
|
|
356578
|
-
__name(QR8bitByte, "QR8bitByte");
|
|
356579
|
-
QR8bitByte.prototype = {
|
|
356580
|
-
getLength: /* @__PURE__ */ __name(function() {
|
|
356581
|
-
return this.data.length;
|
|
356582
|
-
}, "getLength"),
|
|
356583
|
-
write: /* @__PURE__ */ __name(function(buffer) {
|
|
356584
|
-
for (var i3 = 0; i3 < this.data.length; i3++) {
|
|
356585
|
-
buffer.put(this.data.charCodeAt(i3), 8);
|
|
356586
|
-
}
|
|
356587
|
-
}, "write")
|
|
356588
|
-
};
|
|
356589
|
-
module2.exports = QR8bitByte;
|
|
356590
|
-
}
|
|
356591
|
-
});
|
|
356592
|
-
|
|
356593
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRMath.js
|
|
356594
|
-
var require_QRMath = __commonJS({
|
|
356595
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRMath.js"(exports2, module2) {
|
|
356596
|
-
init_esbuild_shims();
|
|
356597
|
-
var QRMath = {
|
|
356598
|
-
glog: /* @__PURE__ */ __name(function(n3) {
|
|
356599
|
-
if (n3 < 1) {
|
|
356600
|
-
throw new Error("glog(" + n3 + ")");
|
|
356601
|
-
}
|
|
356602
|
-
return QRMath.LOG_TABLE[n3];
|
|
356603
|
-
}, "glog"),
|
|
356604
|
-
gexp: /* @__PURE__ */ __name(function(n3) {
|
|
356605
|
-
while (n3 < 0) {
|
|
356606
|
-
n3 += 255;
|
|
356607
|
-
}
|
|
356608
|
-
while (n3 >= 256) {
|
|
356609
|
-
n3 -= 255;
|
|
356610
|
-
}
|
|
356611
|
-
return QRMath.EXP_TABLE[n3];
|
|
356612
|
-
}, "gexp"),
|
|
356613
|
-
EXP_TABLE: new Array(256),
|
|
356614
|
-
LOG_TABLE: new Array(256)
|
|
356615
|
-
};
|
|
356616
|
-
for (i3 = 0; i3 < 8; i3++) {
|
|
356617
|
-
QRMath.EXP_TABLE[i3] = 1 << i3;
|
|
356618
|
-
}
|
|
356619
|
-
var i3;
|
|
356620
|
-
for (i3 = 8; i3 < 256; i3++) {
|
|
356621
|
-
QRMath.EXP_TABLE[i3] = QRMath.EXP_TABLE[i3 - 4] ^ QRMath.EXP_TABLE[i3 - 5] ^ QRMath.EXP_TABLE[i3 - 6] ^ QRMath.EXP_TABLE[i3 - 8];
|
|
356622
|
-
}
|
|
356623
|
-
var i3;
|
|
356624
|
-
for (i3 = 0; i3 < 255; i3++) {
|
|
356625
|
-
QRMath.LOG_TABLE[QRMath.EXP_TABLE[i3]] = i3;
|
|
356626
|
-
}
|
|
356627
|
-
var i3;
|
|
356628
|
-
module2.exports = QRMath;
|
|
356629
|
-
}
|
|
356630
|
-
});
|
|
356631
|
-
|
|
356632
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js
|
|
356633
|
-
var require_QRPolynomial = __commonJS({
|
|
356634
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js"(exports2, module2) {
|
|
356635
|
-
init_esbuild_shims();
|
|
356636
|
-
var QRMath = require_QRMath();
|
|
356637
|
-
function QRPolynomial(num, shift) {
|
|
356638
|
-
if (num.length === void 0) {
|
|
356639
|
-
throw new Error(num.length + "/" + shift);
|
|
356640
|
-
}
|
|
356641
|
-
var offset = 0;
|
|
356642
|
-
while (offset < num.length && num[offset] === 0) {
|
|
356643
|
-
offset++;
|
|
356644
|
-
}
|
|
356645
|
-
this.num = new Array(num.length - offset + shift);
|
|
356646
|
-
for (var i3 = 0; i3 < num.length - offset; i3++) {
|
|
356647
|
-
this.num[i3] = num[i3 + offset];
|
|
356648
|
-
}
|
|
356649
|
-
}
|
|
356650
|
-
__name(QRPolynomial, "QRPolynomial");
|
|
356651
|
-
QRPolynomial.prototype = {
|
|
356652
|
-
get: /* @__PURE__ */ __name(function(index) {
|
|
356653
|
-
return this.num[index];
|
|
356654
|
-
}, "get"),
|
|
356655
|
-
getLength: /* @__PURE__ */ __name(function() {
|
|
356656
|
-
return this.num.length;
|
|
356657
|
-
}, "getLength"),
|
|
356658
|
-
multiply: /* @__PURE__ */ __name(function(e4) {
|
|
356659
|
-
var num = new Array(this.getLength() + e4.getLength() - 1);
|
|
356660
|
-
for (var i3 = 0; i3 < this.getLength(); i3++) {
|
|
356661
|
-
for (var j2 = 0; j2 < e4.getLength(); j2++) {
|
|
356662
|
-
num[i3 + j2] ^= QRMath.gexp(QRMath.glog(this.get(i3)) + QRMath.glog(e4.get(j2)));
|
|
356663
|
-
}
|
|
356664
|
-
}
|
|
356665
|
-
return new QRPolynomial(num, 0);
|
|
356666
|
-
}, "multiply"),
|
|
356667
|
-
mod: /* @__PURE__ */ __name(function(e4) {
|
|
356668
|
-
if (this.getLength() - e4.getLength() < 0) {
|
|
356669
|
-
return this;
|
|
356670
|
-
}
|
|
356671
|
-
var ratio = QRMath.glog(this.get(0)) - QRMath.glog(e4.get(0));
|
|
356672
|
-
var num = new Array(this.getLength());
|
|
356673
|
-
for (var i3 = 0; i3 < this.getLength(); i3++) {
|
|
356674
|
-
num[i3] = this.get(i3);
|
|
356675
|
-
}
|
|
356676
|
-
for (var x3 = 0; x3 < e4.getLength(); x3++) {
|
|
356677
|
-
num[x3] ^= QRMath.gexp(QRMath.glog(e4.get(x3)) + ratio);
|
|
356678
|
-
}
|
|
356679
|
-
return new QRPolynomial(num, 0).mod(e4);
|
|
356680
|
-
}, "mod")
|
|
356681
|
-
};
|
|
356682
|
-
module2.exports = QRPolynomial;
|
|
356683
|
-
}
|
|
356684
|
-
});
|
|
356685
|
-
|
|
356686
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js
|
|
356687
|
-
var require_QRMaskPattern = __commonJS({
|
|
356688
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js"(exports2, module2) {
|
|
356689
|
-
init_esbuild_shims();
|
|
356690
|
-
module2.exports = {
|
|
356691
|
-
PATTERN000: 0,
|
|
356692
|
-
PATTERN001: 1,
|
|
356693
|
-
PATTERN010: 2,
|
|
356694
|
-
PATTERN011: 3,
|
|
356695
|
-
PATTERN100: 4,
|
|
356696
|
-
PATTERN101: 5,
|
|
356697
|
-
PATTERN110: 6,
|
|
356698
|
-
PATTERN111: 7
|
|
356699
|
-
};
|
|
356700
|
-
}
|
|
356701
|
-
});
|
|
356702
|
-
|
|
356703
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js
|
|
356704
|
-
var require_QRUtil = __commonJS({
|
|
356705
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js"(exports2, module2) {
|
|
356706
|
-
init_esbuild_shims();
|
|
356707
|
-
var QRMode = require_QRMode();
|
|
356708
|
-
var QRPolynomial = require_QRPolynomial();
|
|
356709
|
-
var QRMath = require_QRMath();
|
|
356710
|
-
var QRMaskPattern = require_QRMaskPattern();
|
|
356711
|
-
var QRUtil = {
|
|
356712
|
-
PATTERN_POSITION_TABLE: [
|
|
356713
|
-
[],
|
|
356714
|
-
[6, 18],
|
|
356715
|
-
[6, 22],
|
|
356716
|
-
[6, 26],
|
|
356717
|
-
[6, 30],
|
|
356718
|
-
[6, 34],
|
|
356719
|
-
[6, 22, 38],
|
|
356720
|
-
[6, 24, 42],
|
|
356721
|
-
[6, 26, 46],
|
|
356722
|
-
[6, 28, 50],
|
|
356723
|
-
[6, 30, 54],
|
|
356724
|
-
[6, 32, 58],
|
|
356725
|
-
[6, 34, 62],
|
|
356726
|
-
[6, 26, 46, 66],
|
|
356727
|
-
[6, 26, 48, 70],
|
|
356728
|
-
[6, 26, 50, 74],
|
|
356729
|
-
[6, 30, 54, 78],
|
|
356730
|
-
[6, 30, 56, 82],
|
|
356731
|
-
[6, 30, 58, 86],
|
|
356732
|
-
[6, 34, 62, 90],
|
|
356733
|
-
[6, 28, 50, 72, 94],
|
|
356734
|
-
[6, 26, 50, 74, 98],
|
|
356735
|
-
[6, 30, 54, 78, 102],
|
|
356736
|
-
[6, 28, 54, 80, 106],
|
|
356737
|
-
[6, 32, 58, 84, 110],
|
|
356738
|
-
[6, 30, 58, 86, 114],
|
|
356739
|
-
[6, 34, 62, 90, 118],
|
|
356740
|
-
[6, 26, 50, 74, 98, 122],
|
|
356741
|
-
[6, 30, 54, 78, 102, 126],
|
|
356742
|
-
[6, 26, 52, 78, 104, 130],
|
|
356743
|
-
[6, 30, 56, 82, 108, 134],
|
|
356744
|
-
[6, 34, 60, 86, 112, 138],
|
|
356745
|
-
[6, 30, 58, 86, 114, 142],
|
|
356746
|
-
[6, 34, 62, 90, 118, 146],
|
|
356747
|
-
[6, 30, 54, 78, 102, 126, 150],
|
|
356748
|
-
[6, 24, 50, 76, 102, 128, 154],
|
|
356749
|
-
[6, 28, 54, 80, 106, 132, 158],
|
|
356750
|
-
[6, 32, 58, 84, 110, 136, 162],
|
|
356751
|
-
[6, 26, 54, 82, 110, 138, 166],
|
|
356752
|
-
[6, 30, 58, 86, 114, 142, 170]
|
|
356753
|
-
],
|
|
356754
|
-
G15: 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0,
|
|
356755
|
-
G18: 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0,
|
|
356756
|
-
G15_MASK: 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1,
|
|
356757
|
-
getBCHTypeInfo: /* @__PURE__ */ __name(function(data) {
|
|
356758
|
-
var d2 = data << 10;
|
|
356759
|
-
while (QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
|
|
356760
|
-
d2 ^= QRUtil.G15 << QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G15);
|
|
356761
|
-
}
|
|
356762
|
-
return (data << 10 | d2) ^ QRUtil.G15_MASK;
|
|
356763
|
-
}, "getBCHTypeInfo"),
|
|
356764
|
-
getBCHTypeNumber: /* @__PURE__ */ __name(function(data) {
|
|
356765
|
-
var d2 = data << 12;
|
|
356766
|
-
while (QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
|
|
356767
|
-
d2 ^= QRUtil.G18 << QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G18);
|
|
356768
|
-
}
|
|
356769
|
-
return data << 12 | d2;
|
|
356770
|
-
}, "getBCHTypeNumber"),
|
|
356771
|
-
getBCHDigit: /* @__PURE__ */ __name(function(data) {
|
|
356772
|
-
var digit = 0;
|
|
356773
|
-
while (data !== 0) {
|
|
356774
|
-
digit++;
|
|
356775
|
-
data >>>= 1;
|
|
356776
|
-
}
|
|
356777
|
-
return digit;
|
|
356778
|
-
}, "getBCHDigit"),
|
|
356779
|
-
getPatternPosition: /* @__PURE__ */ __name(function(typeNumber) {
|
|
356780
|
-
return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
|
|
356781
|
-
}, "getPatternPosition"),
|
|
356782
|
-
getMask: /* @__PURE__ */ __name(function(maskPattern, i3, j2) {
|
|
356783
|
-
switch (maskPattern) {
|
|
356784
|
-
case QRMaskPattern.PATTERN000:
|
|
356785
|
-
return (i3 + j2) % 2 === 0;
|
|
356786
|
-
case QRMaskPattern.PATTERN001:
|
|
356787
|
-
return i3 % 2 === 0;
|
|
356788
|
-
case QRMaskPattern.PATTERN010:
|
|
356789
|
-
return j2 % 3 === 0;
|
|
356790
|
-
case QRMaskPattern.PATTERN011:
|
|
356791
|
-
return (i3 + j2) % 3 === 0;
|
|
356792
|
-
case QRMaskPattern.PATTERN100:
|
|
356793
|
-
return (Math.floor(i3 / 2) + Math.floor(j2 / 3)) % 2 === 0;
|
|
356794
|
-
case QRMaskPattern.PATTERN101:
|
|
356795
|
-
return i3 * j2 % 2 + i3 * j2 % 3 === 0;
|
|
356796
|
-
case QRMaskPattern.PATTERN110:
|
|
356797
|
-
return (i3 * j2 % 2 + i3 * j2 % 3) % 2 === 0;
|
|
356798
|
-
case QRMaskPattern.PATTERN111:
|
|
356799
|
-
return (i3 * j2 % 3 + (i3 + j2) % 2) % 2 === 0;
|
|
356800
|
-
default:
|
|
356801
|
-
throw new Error("bad maskPattern:" + maskPattern);
|
|
356802
|
-
}
|
|
356803
|
-
}, "getMask"),
|
|
356804
|
-
getErrorCorrectPolynomial: /* @__PURE__ */ __name(function(errorCorrectLength) {
|
|
356805
|
-
var a2 = new QRPolynomial([1], 0);
|
|
356806
|
-
for (var i3 = 0; i3 < errorCorrectLength; i3++) {
|
|
356807
|
-
a2 = a2.multiply(new QRPolynomial([1, QRMath.gexp(i3)], 0));
|
|
356808
|
-
}
|
|
356809
|
-
return a2;
|
|
356810
|
-
}, "getErrorCorrectPolynomial"),
|
|
356811
|
-
getLengthInBits: /* @__PURE__ */ __name(function(mode, type) {
|
|
356812
|
-
if (1 <= type && type < 10) {
|
|
356813
|
-
switch (mode) {
|
|
356814
|
-
case QRMode.MODE_NUMBER:
|
|
356815
|
-
return 10;
|
|
356816
|
-
case QRMode.MODE_ALPHA_NUM:
|
|
356817
|
-
return 9;
|
|
356818
|
-
case QRMode.MODE_8BIT_BYTE:
|
|
356819
|
-
return 8;
|
|
356820
|
-
case QRMode.MODE_KANJI:
|
|
356821
|
-
return 8;
|
|
356822
|
-
default:
|
|
356823
|
-
throw new Error("mode:" + mode);
|
|
356824
|
-
}
|
|
356825
|
-
} else if (type < 27) {
|
|
356826
|
-
switch (mode) {
|
|
356827
|
-
case QRMode.MODE_NUMBER:
|
|
356828
|
-
return 12;
|
|
356829
|
-
case QRMode.MODE_ALPHA_NUM:
|
|
356830
|
-
return 11;
|
|
356831
|
-
case QRMode.MODE_8BIT_BYTE:
|
|
356832
|
-
return 16;
|
|
356833
|
-
case QRMode.MODE_KANJI:
|
|
356834
|
-
return 10;
|
|
356835
|
-
default:
|
|
356836
|
-
throw new Error("mode:" + mode);
|
|
356837
|
-
}
|
|
356838
|
-
} else if (type < 41) {
|
|
356839
|
-
switch (mode) {
|
|
356840
|
-
case QRMode.MODE_NUMBER:
|
|
356841
|
-
return 14;
|
|
356842
|
-
case QRMode.MODE_ALPHA_NUM:
|
|
356843
|
-
return 13;
|
|
356844
|
-
case QRMode.MODE_8BIT_BYTE:
|
|
356845
|
-
return 16;
|
|
356846
|
-
case QRMode.MODE_KANJI:
|
|
356847
|
-
return 12;
|
|
356848
|
-
default:
|
|
356849
|
-
throw new Error("mode:" + mode);
|
|
356850
|
-
}
|
|
356851
|
-
} else {
|
|
356852
|
-
throw new Error("type:" + type);
|
|
356853
|
-
}
|
|
356854
|
-
}, "getLengthInBits"),
|
|
356855
|
-
getLostPoint: /* @__PURE__ */ __name(function(qrCode) {
|
|
356856
|
-
var moduleCount = qrCode.getModuleCount();
|
|
356857
|
-
var lostPoint = 0;
|
|
356858
|
-
var row = 0;
|
|
356859
|
-
var col = 0;
|
|
356860
|
-
for (row = 0; row < moduleCount; row++) {
|
|
356861
|
-
for (col = 0; col < moduleCount; col++) {
|
|
356862
|
-
var sameCount = 0;
|
|
356863
|
-
var dark = qrCode.isDark(row, col);
|
|
356864
|
-
for (var r5 = -1; r5 <= 1; r5++) {
|
|
356865
|
-
if (row + r5 < 0 || moduleCount <= row + r5) {
|
|
356866
|
-
continue;
|
|
356867
|
-
}
|
|
356868
|
-
for (var c4 = -1; c4 <= 1; c4++) {
|
|
356869
|
-
if (col + c4 < 0 || moduleCount <= col + c4) {
|
|
356870
|
-
continue;
|
|
356871
|
-
}
|
|
356872
|
-
if (r5 === 0 && c4 === 0) {
|
|
356873
|
-
continue;
|
|
356874
|
-
}
|
|
356875
|
-
if (dark === qrCode.isDark(row + r5, col + c4)) {
|
|
356876
|
-
sameCount++;
|
|
356877
|
-
}
|
|
356878
|
-
}
|
|
356879
|
-
}
|
|
356880
|
-
if (sameCount > 5) {
|
|
356881
|
-
lostPoint += 3 + sameCount - 5;
|
|
356882
|
-
}
|
|
356883
|
-
}
|
|
356884
|
-
}
|
|
356885
|
-
for (row = 0; row < moduleCount - 1; row++) {
|
|
356886
|
-
for (col = 0; col < moduleCount - 1; col++) {
|
|
356887
|
-
var count = 0;
|
|
356888
|
-
if (qrCode.isDark(row, col)) count++;
|
|
356889
|
-
if (qrCode.isDark(row + 1, col)) count++;
|
|
356890
|
-
if (qrCode.isDark(row, col + 1)) count++;
|
|
356891
|
-
if (qrCode.isDark(row + 1, col + 1)) count++;
|
|
356892
|
-
if (count === 0 || count === 4) {
|
|
356893
|
-
lostPoint += 3;
|
|
356894
|
-
}
|
|
356895
|
-
}
|
|
356896
|
-
}
|
|
356897
|
-
for (row = 0; row < moduleCount; row++) {
|
|
356898
|
-
for (col = 0; col < moduleCount - 6; col++) {
|
|
356899
|
-
if (qrCode.isDark(row, col) && !qrCode.isDark(row, col + 1) && qrCode.isDark(row, col + 2) && qrCode.isDark(row, col + 3) && qrCode.isDark(row, col + 4) && !qrCode.isDark(row, col + 5) && qrCode.isDark(row, col + 6)) {
|
|
356900
|
-
lostPoint += 40;
|
|
356901
|
-
}
|
|
356902
|
-
}
|
|
356903
|
-
}
|
|
356904
|
-
for (col = 0; col < moduleCount; col++) {
|
|
356905
|
-
for (row = 0; row < moduleCount - 6; row++) {
|
|
356906
|
-
if (qrCode.isDark(row, col) && !qrCode.isDark(row + 1, col) && qrCode.isDark(row + 2, col) && qrCode.isDark(row + 3, col) && qrCode.isDark(row + 4, col) && !qrCode.isDark(row + 5, col) && qrCode.isDark(row + 6, col)) {
|
|
356907
|
-
lostPoint += 40;
|
|
356908
|
-
}
|
|
356909
|
-
}
|
|
356910
|
-
}
|
|
356911
|
-
var darkCount = 0;
|
|
356912
|
-
for (col = 0; col < moduleCount; col++) {
|
|
356913
|
-
for (row = 0; row < moduleCount; row++) {
|
|
356914
|
-
if (qrCode.isDark(row, col)) {
|
|
356915
|
-
darkCount++;
|
|
356916
|
-
}
|
|
356917
|
-
}
|
|
356918
|
-
}
|
|
356919
|
-
var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
|
|
356920
|
-
lostPoint += ratio * 10;
|
|
356921
|
-
return lostPoint;
|
|
356922
|
-
}, "getLostPoint")
|
|
356923
|
-
};
|
|
356924
|
-
module2.exports = QRUtil;
|
|
356925
|
-
}
|
|
356926
|
-
});
|
|
356927
|
-
|
|
356928
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js
|
|
356929
|
-
var require_QRErrorCorrectLevel = __commonJS({
|
|
356930
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js"(exports2, module2) {
|
|
356931
|
-
init_esbuild_shims();
|
|
356932
|
-
module2.exports = {
|
|
356933
|
-
L: 1,
|
|
356934
|
-
M: 0,
|
|
356935
|
-
Q: 3,
|
|
356936
|
-
H: 2
|
|
356937
|
-
};
|
|
356938
|
-
}
|
|
356939
|
-
});
|
|
356940
|
-
|
|
356941
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js
|
|
356942
|
-
var require_QRRSBlock = __commonJS({
|
|
356943
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js"(exports2, module2) {
|
|
356944
|
-
init_esbuild_shims();
|
|
356945
|
-
var QRErrorCorrectLevel = require_QRErrorCorrectLevel();
|
|
356946
|
-
function QRRSBlock(totalCount, dataCount) {
|
|
356947
|
-
this.totalCount = totalCount;
|
|
356948
|
-
this.dataCount = dataCount;
|
|
356949
|
-
}
|
|
356950
|
-
__name(QRRSBlock, "QRRSBlock");
|
|
356951
|
-
QRRSBlock.RS_BLOCK_TABLE = [
|
|
356952
|
-
// L
|
|
356953
|
-
// M
|
|
356954
|
-
// Q
|
|
356955
|
-
// H
|
|
356956
|
-
// 1
|
|
356957
|
-
[1, 26, 19],
|
|
356958
|
-
[1, 26, 16],
|
|
356959
|
-
[1, 26, 13],
|
|
356960
|
-
[1, 26, 9],
|
|
356961
|
-
// 2
|
|
356962
|
-
[1, 44, 34],
|
|
356963
|
-
[1, 44, 28],
|
|
356964
|
-
[1, 44, 22],
|
|
356965
|
-
[1, 44, 16],
|
|
356966
|
-
// 3
|
|
356967
|
-
[1, 70, 55],
|
|
356968
|
-
[1, 70, 44],
|
|
356969
|
-
[2, 35, 17],
|
|
356970
|
-
[2, 35, 13],
|
|
356971
|
-
// 4
|
|
356972
|
-
[1, 100, 80],
|
|
356973
|
-
[2, 50, 32],
|
|
356974
|
-
[2, 50, 24],
|
|
356975
|
-
[4, 25, 9],
|
|
356976
|
-
// 5
|
|
356977
|
-
[1, 134, 108],
|
|
356978
|
-
[2, 67, 43],
|
|
356979
|
-
[2, 33, 15, 2, 34, 16],
|
|
356980
|
-
[2, 33, 11, 2, 34, 12],
|
|
356981
|
-
// 6
|
|
356982
|
-
[2, 86, 68],
|
|
356983
|
-
[4, 43, 27],
|
|
356984
|
-
[4, 43, 19],
|
|
356985
|
-
[4, 43, 15],
|
|
356986
|
-
// 7
|
|
356987
|
-
[2, 98, 78],
|
|
356988
|
-
[4, 49, 31],
|
|
356989
|
-
[2, 32, 14, 4, 33, 15],
|
|
356990
|
-
[4, 39, 13, 1, 40, 14],
|
|
356991
|
-
// 8
|
|
356992
|
-
[2, 121, 97],
|
|
356993
|
-
[2, 60, 38, 2, 61, 39],
|
|
356994
|
-
[4, 40, 18, 2, 41, 19],
|
|
356995
|
-
[4, 40, 14, 2, 41, 15],
|
|
356996
|
-
// 9
|
|
356997
|
-
[2, 146, 116],
|
|
356998
|
-
[3, 58, 36, 2, 59, 37],
|
|
356999
|
-
[4, 36, 16, 4, 37, 17],
|
|
357000
|
-
[4, 36, 12, 4, 37, 13],
|
|
357001
|
-
// 10
|
|
357002
|
-
[2, 86, 68, 2, 87, 69],
|
|
357003
|
-
[4, 69, 43, 1, 70, 44],
|
|
357004
|
-
[6, 43, 19, 2, 44, 20],
|
|
357005
|
-
[6, 43, 15, 2, 44, 16],
|
|
357006
|
-
// 11
|
|
357007
|
-
[4, 101, 81],
|
|
357008
|
-
[1, 80, 50, 4, 81, 51],
|
|
357009
|
-
[4, 50, 22, 4, 51, 23],
|
|
357010
|
-
[3, 36, 12, 8, 37, 13],
|
|
357011
|
-
// 12
|
|
357012
|
-
[2, 116, 92, 2, 117, 93],
|
|
357013
|
-
[6, 58, 36, 2, 59, 37],
|
|
357014
|
-
[4, 46, 20, 6, 47, 21],
|
|
357015
|
-
[7, 42, 14, 4, 43, 15],
|
|
357016
|
-
// 13
|
|
357017
|
-
[4, 133, 107],
|
|
357018
|
-
[8, 59, 37, 1, 60, 38],
|
|
357019
|
-
[8, 44, 20, 4, 45, 21],
|
|
357020
|
-
[12, 33, 11, 4, 34, 12],
|
|
357021
|
-
// 14
|
|
357022
|
-
[3, 145, 115, 1, 146, 116],
|
|
357023
|
-
[4, 64, 40, 5, 65, 41],
|
|
357024
|
-
[11, 36, 16, 5, 37, 17],
|
|
357025
|
-
[11, 36, 12, 5, 37, 13],
|
|
357026
|
-
// 15
|
|
357027
|
-
[5, 109, 87, 1, 110, 88],
|
|
357028
|
-
[5, 65, 41, 5, 66, 42],
|
|
357029
|
-
[5, 54, 24, 7, 55, 25],
|
|
357030
|
-
[11, 36, 12],
|
|
357031
|
-
// 16
|
|
357032
|
-
[5, 122, 98, 1, 123, 99],
|
|
357033
|
-
[7, 73, 45, 3, 74, 46],
|
|
357034
|
-
[15, 43, 19, 2, 44, 20],
|
|
357035
|
-
[3, 45, 15, 13, 46, 16],
|
|
357036
|
-
// 17
|
|
357037
|
-
[1, 135, 107, 5, 136, 108],
|
|
357038
|
-
[10, 74, 46, 1, 75, 47],
|
|
357039
|
-
[1, 50, 22, 15, 51, 23],
|
|
357040
|
-
[2, 42, 14, 17, 43, 15],
|
|
357041
|
-
// 18
|
|
357042
|
-
[5, 150, 120, 1, 151, 121],
|
|
357043
|
-
[9, 69, 43, 4, 70, 44],
|
|
357044
|
-
[17, 50, 22, 1, 51, 23],
|
|
357045
|
-
[2, 42, 14, 19, 43, 15],
|
|
357046
|
-
// 19
|
|
357047
|
-
[3, 141, 113, 4, 142, 114],
|
|
357048
|
-
[3, 70, 44, 11, 71, 45],
|
|
357049
|
-
[17, 47, 21, 4, 48, 22],
|
|
357050
|
-
[9, 39, 13, 16, 40, 14],
|
|
357051
|
-
// 20
|
|
357052
|
-
[3, 135, 107, 5, 136, 108],
|
|
357053
|
-
[3, 67, 41, 13, 68, 42],
|
|
357054
|
-
[15, 54, 24, 5, 55, 25],
|
|
357055
|
-
[15, 43, 15, 10, 44, 16],
|
|
357056
|
-
// 21
|
|
357057
|
-
[4, 144, 116, 4, 145, 117],
|
|
357058
|
-
[17, 68, 42],
|
|
357059
|
-
[17, 50, 22, 6, 51, 23],
|
|
357060
|
-
[19, 46, 16, 6, 47, 17],
|
|
357061
|
-
// 22
|
|
357062
|
-
[2, 139, 111, 7, 140, 112],
|
|
357063
|
-
[17, 74, 46],
|
|
357064
|
-
[7, 54, 24, 16, 55, 25],
|
|
357065
|
-
[34, 37, 13],
|
|
357066
|
-
// 23
|
|
357067
|
-
[4, 151, 121, 5, 152, 122],
|
|
357068
|
-
[4, 75, 47, 14, 76, 48],
|
|
357069
|
-
[11, 54, 24, 14, 55, 25],
|
|
357070
|
-
[16, 45, 15, 14, 46, 16],
|
|
357071
|
-
// 24
|
|
357072
|
-
[6, 147, 117, 4, 148, 118],
|
|
357073
|
-
[6, 73, 45, 14, 74, 46],
|
|
357074
|
-
[11, 54, 24, 16, 55, 25],
|
|
357075
|
-
[30, 46, 16, 2, 47, 17],
|
|
357076
|
-
// 25
|
|
357077
|
-
[8, 132, 106, 4, 133, 107],
|
|
357078
|
-
[8, 75, 47, 13, 76, 48],
|
|
357079
|
-
[7, 54, 24, 22, 55, 25],
|
|
357080
|
-
[22, 45, 15, 13, 46, 16],
|
|
357081
|
-
// 26
|
|
357082
|
-
[10, 142, 114, 2, 143, 115],
|
|
357083
|
-
[19, 74, 46, 4, 75, 47],
|
|
357084
|
-
[28, 50, 22, 6, 51, 23],
|
|
357085
|
-
[33, 46, 16, 4, 47, 17],
|
|
357086
|
-
// 27
|
|
357087
|
-
[8, 152, 122, 4, 153, 123],
|
|
357088
|
-
[22, 73, 45, 3, 74, 46],
|
|
357089
|
-
[8, 53, 23, 26, 54, 24],
|
|
357090
|
-
[12, 45, 15, 28, 46, 16],
|
|
357091
|
-
// 28
|
|
357092
|
-
[3, 147, 117, 10, 148, 118],
|
|
357093
|
-
[3, 73, 45, 23, 74, 46],
|
|
357094
|
-
[4, 54, 24, 31, 55, 25],
|
|
357095
|
-
[11, 45, 15, 31, 46, 16],
|
|
357096
|
-
// 29
|
|
357097
|
-
[7, 146, 116, 7, 147, 117],
|
|
357098
|
-
[21, 73, 45, 7, 74, 46],
|
|
357099
|
-
[1, 53, 23, 37, 54, 24],
|
|
357100
|
-
[19, 45, 15, 26, 46, 16],
|
|
357101
|
-
// 30
|
|
357102
|
-
[5, 145, 115, 10, 146, 116],
|
|
357103
|
-
[19, 75, 47, 10, 76, 48],
|
|
357104
|
-
[15, 54, 24, 25, 55, 25],
|
|
357105
|
-
[23, 45, 15, 25, 46, 16],
|
|
357106
|
-
// 31
|
|
357107
|
-
[13, 145, 115, 3, 146, 116],
|
|
357108
|
-
[2, 74, 46, 29, 75, 47],
|
|
357109
|
-
[42, 54, 24, 1, 55, 25],
|
|
357110
|
-
[23, 45, 15, 28, 46, 16],
|
|
357111
|
-
// 32
|
|
357112
|
-
[17, 145, 115],
|
|
357113
|
-
[10, 74, 46, 23, 75, 47],
|
|
357114
|
-
[10, 54, 24, 35, 55, 25],
|
|
357115
|
-
[19, 45, 15, 35, 46, 16],
|
|
357116
|
-
// 33
|
|
357117
|
-
[17, 145, 115, 1, 146, 116],
|
|
357118
|
-
[14, 74, 46, 21, 75, 47],
|
|
357119
|
-
[29, 54, 24, 19, 55, 25],
|
|
357120
|
-
[11, 45, 15, 46, 46, 16],
|
|
357121
|
-
// 34
|
|
357122
|
-
[13, 145, 115, 6, 146, 116],
|
|
357123
|
-
[14, 74, 46, 23, 75, 47],
|
|
357124
|
-
[44, 54, 24, 7, 55, 25],
|
|
357125
|
-
[59, 46, 16, 1, 47, 17],
|
|
357126
|
-
// 35
|
|
357127
|
-
[12, 151, 121, 7, 152, 122],
|
|
357128
|
-
[12, 75, 47, 26, 76, 48],
|
|
357129
|
-
[39, 54, 24, 14, 55, 25],
|
|
357130
|
-
[22, 45, 15, 41, 46, 16],
|
|
357131
|
-
// 36
|
|
357132
|
-
[6, 151, 121, 14, 152, 122],
|
|
357133
|
-
[6, 75, 47, 34, 76, 48],
|
|
357134
|
-
[46, 54, 24, 10, 55, 25],
|
|
357135
|
-
[2, 45, 15, 64, 46, 16],
|
|
357136
|
-
// 37
|
|
357137
|
-
[17, 152, 122, 4, 153, 123],
|
|
357138
|
-
[29, 74, 46, 14, 75, 47],
|
|
357139
|
-
[49, 54, 24, 10, 55, 25],
|
|
357140
|
-
[24, 45, 15, 46, 46, 16],
|
|
357141
|
-
// 38
|
|
357142
|
-
[4, 152, 122, 18, 153, 123],
|
|
357143
|
-
[13, 74, 46, 32, 75, 47],
|
|
357144
|
-
[48, 54, 24, 14, 55, 25],
|
|
357145
|
-
[42, 45, 15, 32, 46, 16],
|
|
357146
|
-
// 39
|
|
357147
|
-
[20, 147, 117, 4, 148, 118],
|
|
357148
|
-
[40, 75, 47, 7, 76, 48],
|
|
357149
|
-
[43, 54, 24, 22, 55, 25],
|
|
357150
|
-
[10, 45, 15, 67, 46, 16],
|
|
357151
|
-
// 40
|
|
357152
|
-
[19, 148, 118, 6, 149, 119],
|
|
357153
|
-
[18, 75, 47, 31, 76, 48],
|
|
357154
|
-
[34, 54, 24, 34, 55, 25],
|
|
357155
|
-
[20, 45, 15, 61, 46, 16]
|
|
357156
|
-
];
|
|
357157
|
-
QRRSBlock.getRSBlocks = function(typeNumber, errorCorrectLevel) {
|
|
357158
|
-
var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);
|
|
357159
|
-
if (rsBlock === void 0) {
|
|
357160
|
-
throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel);
|
|
357161
|
-
}
|
|
357162
|
-
var length = rsBlock.length / 3;
|
|
357163
|
-
var list3 = [];
|
|
357164
|
-
for (var i3 = 0; i3 < length; i3++) {
|
|
357165
|
-
var count = rsBlock[i3 * 3 + 0];
|
|
357166
|
-
var totalCount = rsBlock[i3 * 3 + 1];
|
|
357167
|
-
var dataCount = rsBlock[i3 * 3 + 2];
|
|
357168
|
-
for (var j2 = 0; j2 < count; j2++) {
|
|
357169
|
-
list3.push(new QRRSBlock(totalCount, dataCount));
|
|
357170
|
-
}
|
|
357171
|
-
}
|
|
357172
|
-
return list3;
|
|
357173
|
-
};
|
|
357174
|
-
QRRSBlock.getRsBlockTable = function(typeNumber, errorCorrectLevel) {
|
|
357175
|
-
switch (errorCorrectLevel) {
|
|
357176
|
-
case QRErrorCorrectLevel.L:
|
|
357177
|
-
return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];
|
|
357178
|
-
case QRErrorCorrectLevel.M:
|
|
357179
|
-
return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];
|
|
357180
|
-
case QRErrorCorrectLevel.Q:
|
|
357181
|
-
return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];
|
|
357182
|
-
case QRErrorCorrectLevel.H:
|
|
357183
|
-
return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];
|
|
357184
|
-
default:
|
|
357185
|
-
return void 0;
|
|
357186
|
-
}
|
|
357187
|
-
};
|
|
357188
|
-
module2.exports = QRRSBlock;
|
|
357189
|
-
}
|
|
357190
|
-
});
|
|
357191
|
-
|
|
357192
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js
|
|
357193
|
-
var require_QRBitBuffer = __commonJS({
|
|
357194
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js"(exports2, module2) {
|
|
357195
|
-
init_esbuild_shims();
|
|
357196
|
-
function QRBitBuffer() {
|
|
357197
|
-
this.buffer = [];
|
|
357198
|
-
this.length = 0;
|
|
357199
|
-
}
|
|
357200
|
-
__name(QRBitBuffer, "QRBitBuffer");
|
|
357201
|
-
QRBitBuffer.prototype = {
|
|
357202
|
-
get: /* @__PURE__ */ __name(function(index) {
|
|
357203
|
-
var bufIndex = Math.floor(index / 8);
|
|
357204
|
-
return (this.buffer[bufIndex] >>> 7 - index % 8 & 1) == 1;
|
|
357205
|
-
}, "get"),
|
|
357206
|
-
put: /* @__PURE__ */ __name(function(num, length) {
|
|
357207
|
-
for (var i3 = 0; i3 < length; i3++) {
|
|
357208
|
-
this.putBit((num >>> length - i3 - 1 & 1) == 1);
|
|
357209
|
-
}
|
|
357210
|
-
}, "put"),
|
|
357211
|
-
getLengthInBits: /* @__PURE__ */ __name(function() {
|
|
357212
|
-
return this.length;
|
|
357213
|
-
}, "getLengthInBits"),
|
|
357214
|
-
putBit: /* @__PURE__ */ __name(function(bit) {
|
|
357215
|
-
var bufIndex = Math.floor(this.length / 8);
|
|
357216
|
-
if (this.buffer.length <= bufIndex) {
|
|
357217
|
-
this.buffer.push(0);
|
|
357218
|
-
}
|
|
357219
|
-
if (bit) {
|
|
357220
|
-
this.buffer[bufIndex] |= 128 >>> this.length % 8;
|
|
357221
|
-
}
|
|
357222
|
-
this.length++;
|
|
357223
|
-
}, "putBit")
|
|
357224
|
-
};
|
|
357225
|
-
module2.exports = QRBitBuffer;
|
|
357226
|
-
}
|
|
357227
|
-
});
|
|
357228
|
-
|
|
357229
|
-
// node_modules/qrcode-terminal/vendor/QRCode/index.js
|
|
357230
|
-
var require_QRCode = __commonJS({
|
|
357231
|
-
"node_modules/qrcode-terminal/vendor/QRCode/index.js"(exports2, module2) {
|
|
357232
|
-
init_esbuild_shims();
|
|
357233
|
-
var QR8bitByte = require_QR8bitByte();
|
|
357234
|
-
var QRUtil = require_QRUtil();
|
|
357235
|
-
var QRPolynomial = require_QRPolynomial();
|
|
357236
|
-
var QRRSBlock = require_QRRSBlock();
|
|
357237
|
-
var QRBitBuffer = require_QRBitBuffer();
|
|
357238
|
-
function QRCode(typeNumber, errorCorrectLevel) {
|
|
357239
|
-
this.typeNumber = typeNumber;
|
|
357240
|
-
this.errorCorrectLevel = errorCorrectLevel;
|
|
357241
|
-
this.modules = null;
|
|
357242
|
-
this.moduleCount = 0;
|
|
357243
|
-
this.dataCache = null;
|
|
357244
|
-
this.dataList = [];
|
|
357245
|
-
}
|
|
357246
|
-
__name(QRCode, "QRCode");
|
|
357247
|
-
QRCode.prototype = {
|
|
357248
|
-
addData: /* @__PURE__ */ __name(function(data) {
|
|
357249
|
-
var newData = new QR8bitByte(data);
|
|
357250
|
-
this.dataList.push(newData);
|
|
357251
|
-
this.dataCache = null;
|
|
357252
|
-
}, "addData"),
|
|
357253
|
-
isDark: /* @__PURE__ */ __name(function(row, col) {
|
|
357254
|
-
if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {
|
|
357255
|
-
throw new Error(row + "," + col);
|
|
357256
|
-
}
|
|
357257
|
-
return this.modules[row][col];
|
|
357258
|
-
}, "isDark"),
|
|
357259
|
-
getModuleCount: /* @__PURE__ */ __name(function() {
|
|
357260
|
-
return this.moduleCount;
|
|
357261
|
-
}, "getModuleCount"),
|
|
357262
|
-
make: /* @__PURE__ */ __name(function() {
|
|
357263
|
-
if (this.typeNumber < 1) {
|
|
357264
|
-
var typeNumber = 1;
|
|
357265
|
-
for (typeNumber = 1; typeNumber < 40; typeNumber++) {
|
|
357266
|
-
var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel);
|
|
357267
|
-
var buffer = new QRBitBuffer();
|
|
357268
|
-
var totalDataCount = 0;
|
|
357269
|
-
for (var i3 = 0; i3 < rsBlocks.length; i3++) {
|
|
357270
|
-
totalDataCount += rsBlocks[i3].dataCount;
|
|
357271
|
-
}
|
|
357272
|
-
for (var x3 = 0; x3 < this.dataList.length; x3++) {
|
|
357273
|
-
var data = this.dataList[x3];
|
|
357274
|
-
buffer.put(data.mode, 4);
|
|
357275
|
-
buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
|
|
357276
|
-
data.write(buffer);
|
|
357277
|
-
}
|
|
357278
|
-
if (buffer.getLengthInBits() <= totalDataCount * 8)
|
|
357279
|
-
break;
|
|
357280
|
-
}
|
|
357281
|
-
this.typeNumber = typeNumber;
|
|
357282
|
-
}
|
|
357283
|
-
this.makeImpl(false, this.getBestMaskPattern());
|
|
357284
|
-
}, "make"),
|
|
357285
|
-
makeImpl: /* @__PURE__ */ __name(function(test, maskPattern) {
|
|
357286
|
-
this.moduleCount = this.typeNumber * 4 + 17;
|
|
357287
|
-
this.modules = new Array(this.moduleCount);
|
|
357288
|
-
for (var row = 0; row < this.moduleCount; row++) {
|
|
357289
|
-
this.modules[row] = new Array(this.moduleCount);
|
|
357290
|
-
for (var col = 0; col < this.moduleCount; col++) {
|
|
357291
|
-
this.modules[row][col] = null;
|
|
357292
|
-
}
|
|
357293
|
-
}
|
|
357294
|
-
this.setupPositionProbePattern(0, 0);
|
|
357295
|
-
this.setupPositionProbePattern(this.moduleCount - 7, 0);
|
|
357296
|
-
this.setupPositionProbePattern(0, this.moduleCount - 7);
|
|
357297
|
-
this.setupPositionAdjustPattern();
|
|
357298
|
-
this.setupTimingPattern();
|
|
357299
|
-
this.setupTypeInfo(test, maskPattern);
|
|
357300
|
-
if (this.typeNumber >= 7) {
|
|
357301
|
-
this.setupTypeNumber(test);
|
|
357302
|
-
}
|
|
357303
|
-
if (this.dataCache === null) {
|
|
357304
|
-
this.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);
|
|
357305
|
-
}
|
|
357306
|
-
this.mapData(this.dataCache, maskPattern);
|
|
357307
|
-
}, "makeImpl"),
|
|
357308
|
-
setupPositionProbePattern: /* @__PURE__ */ __name(function(row, col) {
|
|
357309
|
-
for (var r5 = -1; r5 <= 7; r5++) {
|
|
357310
|
-
if (row + r5 <= -1 || this.moduleCount <= row + r5) continue;
|
|
357311
|
-
for (var c4 = -1; c4 <= 7; c4++) {
|
|
357312
|
-
if (col + c4 <= -1 || this.moduleCount <= col + c4) continue;
|
|
357313
|
-
if (0 <= r5 && r5 <= 6 && (c4 === 0 || c4 === 6) || 0 <= c4 && c4 <= 6 && (r5 === 0 || r5 === 6) || 2 <= r5 && r5 <= 4 && 2 <= c4 && c4 <= 4) {
|
|
357314
|
-
this.modules[row + r5][col + c4] = true;
|
|
357315
|
-
} else {
|
|
357316
|
-
this.modules[row + r5][col + c4] = false;
|
|
357317
|
-
}
|
|
357318
|
-
}
|
|
357319
|
-
}
|
|
357320
|
-
}, "setupPositionProbePattern"),
|
|
357321
|
-
getBestMaskPattern: /* @__PURE__ */ __name(function() {
|
|
357322
|
-
var minLostPoint = 0;
|
|
357323
|
-
var pattern = 0;
|
|
357324
|
-
for (var i3 = 0; i3 < 8; i3++) {
|
|
357325
|
-
this.makeImpl(true, i3);
|
|
357326
|
-
var lostPoint = QRUtil.getLostPoint(this);
|
|
357327
|
-
if (i3 === 0 || minLostPoint > lostPoint) {
|
|
357328
|
-
minLostPoint = lostPoint;
|
|
357329
|
-
pattern = i3;
|
|
357330
|
-
}
|
|
357331
|
-
}
|
|
357332
|
-
return pattern;
|
|
357333
|
-
}, "getBestMaskPattern"),
|
|
357334
|
-
createMovieClip: /* @__PURE__ */ __name(function(target_mc, instance_name, depth) {
|
|
357335
|
-
var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);
|
|
357336
|
-
var cs = 1;
|
|
357337
|
-
this.make();
|
|
357338
|
-
for (var row = 0; row < this.modules.length; row++) {
|
|
357339
|
-
var y2 = row * cs;
|
|
357340
|
-
for (var col = 0; col < this.modules[row].length; col++) {
|
|
357341
|
-
var x3 = col * cs;
|
|
357342
|
-
var dark = this.modules[row][col];
|
|
357343
|
-
if (dark) {
|
|
357344
|
-
qr_mc.beginFill(0, 100);
|
|
357345
|
-
qr_mc.moveTo(x3, y2);
|
|
357346
|
-
qr_mc.lineTo(x3 + cs, y2);
|
|
357347
|
-
qr_mc.lineTo(x3 + cs, y2 + cs);
|
|
357348
|
-
qr_mc.lineTo(x3, y2 + cs);
|
|
357349
|
-
qr_mc.endFill();
|
|
357350
|
-
}
|
|
357351
|
-
}
|
|
357352
|
-
}
|
|
357353
|
-
return qr_mc;
|
|
357354
|
-
}, "createMovieClip"),
|
|
357355
|
-
setupTimingPattern: /* @__PURE__ */ __name(function() {
|
|
357356
|
-
for (var r5 = 8; r5 < this.moduleCount - 8; r5++) {
|
|
357357
|
-
if (this.modules[r5][6] !== null) {
|
|
357358
|
-
continue;
|
|
357359
|
-
}
|
|
357360
|
-
this.modules[r5][6] = r5 % 2 === 0;
|
|
357361
|
-
}
|
|
357362
|
-
for (var c4 = 8; c4 < this.moduleCount - 8; c4++) {
|
|
357363
|
-
if (this.modules[6][c4] !== null) {
|
|
357364
|
-
continue;
|
|
357365
|
-
}
|
|
357366
|
-
this.modules[6][c4] = c4 % 2 === 0;
|
|
357367
|
-
}
|
|
357368
|
-
}, "setupTimingPattern"),
|
|
357369
|
-
setupPositionAdjustPattern: /* @__PURE__ */ __name(function() {
|
|
357370
|
-
var pos2 = QRUtil.getPatternPosition(this.typeNumber);
|
|
357371
|
-
for (var i3 = 0; i3 < pos2.length; i3++) {
|
|
357372
|
-
for (var j2 = 0; j2 < pos2.length; j2++) {
|
|
357373
|
-
var row = pos2[i3];
|
|
357374
|
-
var col = pos2[j2];
|
|
357375
|
-
if (this.modules[row][col] !== null) {
|
|
357376
|
-
continue;
|
|
357377
|
-
}
|
|
357378
|
-
for (var r5 = -2; r5 <= 2; r5++) {
|
|
357379
|
-
for (var c4 = -2; c4 <= 2; c4++) {
|
|
357380
|
-
if (Math.abs(r5) === 2 || Math.abs(c4) === 2 || r5 === 0 && c4 === 0) {
|
|
357381
|
-
this.modules[row + r5][col + c4] = true;
|
|
357382
|
-
} else {
|
|
357383
|
-
this.modules[row + r5][col + c4] = false;
|
|
357384
|
-
}
|
|
357385
|
-
}
|
|
357386
|
-
}
|
|
357387
|
-
}
|
|
357388
|
-
}
|
|
357389
|
-
}, "setupPositionAdjustPattern"),
|
|
357390
|
-
setupTypeNumber: /* @__PURE__ */ __name(function(test) {
|
|
357391
|
-
var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
|
|
357392
|
-
var mod2;
|
|
357393
|
-
for (var i3 = 0; i3 < 18; i3++) {
|
|
357394
|
-
mod2 = !test && (bits >> i3 & 1) === 1;
|
|
357395
|
-
this.modules[Math.floor(i3 / 3)][i3 % 3 + this.moduleCount - 8 - 3] = mod2;
|
|
357396
|
-
}
|
|
357397
|
-
for (var x3 = 0; x3 < 18; x3++) {
|
|
357398
|
-
mod2 = !test && (bits >> x3 & 1) === 1;
|
|
357399
|
-
this.modules[x3 % 3 + this.moduleCount - 8 - 3][Math.floor(x3 / 3)] = mod2;
|
|
357400
|
-
}
|
|
357401
|
-
}, "setupTypeNumber"),
|
|
357402
|
-
setupTypeInfo: /* @__PURE__ */ __name(function(test, maskPattern) {
|
|
357403
|
-
var data = this.errorCorrectLevel << 3 | maskPattern;
|
|
357404
|
-
var bits = QRUtil.getBCHTypeInfo(data);
|
|
357405
|
-
var mod2;
|
|
357406
|
-
for (var v2 = 0; v2 < 15; v2++) {
|
|
357407
|
-
mod2 = !test && (bits >> v2 & 1) === 1;
|
|
357408
|
-
if (v2 < 6) {
|
|
357409
|
-
this.modules[v2][8] = mod2;
|
|
357410
|
-
} else if (v2 < 8) {
|
|
357411
|
-
this.modules[v2 + 1][8] = mod2;
|
|
357412
|
-
} else {
|
|
357413
|
-
this.modules[this.moduleCount - 15 + v2][8] = mod2;
|
|
357414
|
-
}
|
|
357415
|
-
}
|
|
357416
|
-
for (var h3 = 0; h3 < 15; h3++) {
|
|
357417
|
-
mod2 = !test && (bits >> h3 & 1) === 1;
|
|
357418
|
-
if (h3 < 8) {
|
|
357419
|
-
this.modules[8][this.moduleCount - h3 - 1] = mod2;
|
|
357420
|
-
} else if (h3 < 9) {
|
|
357421
|
-
this.modules[8][15 - h3 - 1 + 1] = mod2;
|
|
357422
|
-
} else {
|
|
357423
|
-
this.modules[8][15 - h3 - 1] = mod2;
|
|
357424
|
-
}
|
|
357425
|
-
}
|
|
357426
|
-
this.modules[this.moduleCount - 8][8] = !test;
|
|
357427
|
-
}, "setupTypeInfo"),
|
|
357428
|
-
mapData: /* @__PURE__ */ __name(function(data, maskPattern) {
|
|
357429
|
-
var inc = -1;
|
|
357430
|
-
var row = this.moduleCount - 1;
|
|
357431
|
-
var bitIndex = 7;
|
|
357432
|
-
var byteIndex = 0;
|
|
357433
|
-
for (var col = this.moduleCount - 1; col > 0; col -= 2) {
|
|
357434
|
-
if (col === 6) col--;
|
|
357435
|
-
while (true) {
|
|
357436
|
-
for (var c4 = 0; c4 < 2; c4++) {
|
|
357437
|
-
if (this.modules[row][col - c4] === null) {
|
|
357438
|
-
var dark = false;
|
|
357439
|
-
if (byteIndex < data.length) {
|
|
357440
|
-
dark = (data[byteIndex] >>> bitIndex & 1) === 1;
|
|
357441
|
-
}
|
|
357442
|
-
var mask = QRUtil.getMask(maskPattern, row, col - c4);
|
|
357443
|
-
if (mask) {
|
|
357444
|
-
dark = !dark;
|
|
357445
|
-
}
|
|
357446
|
-
this.modules[row][col - c4] = dark;
|
|
357447
|
-
bitIndex--;
|
|
357448
|
-
if (bitIndex === -1) {
|
|
357449
|
-
byteIndex++;
|
|
357450
|
-
bitIndex = 7;
|
|
357451
|
-
}
|
|
357452
|
-
}
|
|
357453
|
-
}
|
|
357454
|
-
row += inc;
|
|
357455
|
-
if (row < 0 || this.moduleCount <= row) {
|
|
357456
|
-
row -= inc;
|
|
357457
|
-
inc = -inc;
|
|
357458
|
-
break;
|
|
357459
|
-
}
|
|
357460
|
-
}
|
|
357461
|
-
}
|
|
357462
|
-
}, "mapData")
|
|
357463
|
-
};
|
|
357464
|
-
QRCode.PAD0 = 236;
|
|
357465
|
-
QRCode.PAD1 = 17;
|
|
357466
|
-
QRCode.createData = function(typeNumber, errorCorrectLevel, dataList) {
|
|
357467
|
-
var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);
|
|
357468
|
-
var buffer = new QRBitBuffer();
|
|
357469
|
-
for (var i3 = 0; i3 < dataList.length; i3++) {
|
|
357470
|
-
var data = dataList[i3];
|
|
357471
|
-
buffer.put(data.mode, 4);
|
|
357472
|
-
buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
|
|
357473
|
-
data.write(buffer);
|
|
357474
|
-
}
|
|
357475
|
-
var totalDataCount = 0;
|
|
357476
|
-
for (var x3 = 0; x3 < rsBlocks.length; x3++) {
|
|
357477
|
-
totalDataCount += rsBlocks[x3].dataCount;
|
|
357478
|
-
}
|
|
357479
|
-
if (buffer.getLengthInBits() > totalDataCount * 8) {
|
|
357480
|
-
throw new Error("code length overflow. (" + buffer.getLengthInBits() + ">" + totalDataCount * 8 + ")");
|
|
357481
|
-
}
|
|
357482
|
-
if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {
|
|
357483
|
-
buffer.put(0, 4);
|
|
357484
|
-
}
|
|
357485
|
-
while (buffer.getLengthInBits() % 8 !== 0) {
|
|
357486
|
-
buffer.putBit(false);
|
|
357487
|
-
}
|
|
357488
|
-
while (true) {
|
|
357489
|
-
if (buffer.getLengthInBits() >= totalDataCount * 8) {
|
|
357490
|
-
break;
|
|
357491
|
-
}
|
|
357492
|
-
buffer.put(QRCode.PAD0, 8);
|
|
357493
|
-
if (buffer.getLengthInBits() >= totalDataCount * 8) {
|
|
357494
|
-
break;
|
|
357495
|
-
}
|
|
357496
|
-
buffer.put(QRCode.PAD1, 8);
|
|
357497
|
-
}
|
|
357498
|
-
return QRCode.createBytes(buffer, rsBlocks);
|
|
357499
|
-
};
|
|
357500
|
-
QRCode.createBytes = function(buffer, rsBlocks) {
|
|
357501
|
-
var offset = 0;
|
|
357502
|
-
var maxDcCount = 0;
|
|
357503
|
-
var maxEcCount = 0;
|
|
357504
|
-
var dcdata = new Array(rsBlocks.length);
|
|
357505
|
-
var ecdata = new Array(rsBlocks.length);
|
|
357506
|
-
for (var r5 = 0; r5 < rsBlocks.length; r5++) {
|
|
357507
|
-
var dcCount = rsBlocks[r5].dataCount;
|
|
357508
|
-
var ecCount = rsBlocks[r5].totalCount - dcCount;
|
|
357509
|
-
maxDcCount = Math.max(maxDcCount, dcCount);
|
|
357510
|
-
maxEcCount = Math.max(maxEcCount, ecCount);
|
|
357511
|
-
dcdata[r5] = new Array(dcCount);
|
|
357512
|
-
for (var i3 = 0; i3 < dcdata[r5].length; i3++) {
|
|
357513
|
-
dcdata[r5][i3] = 255 & buffer.buffer[i3 + offset];
|
|
357514
|
-
}
|
|
357515
|
-
offset += dcCount;
|
|
357516
|
-
var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
|
|
357517
|
-
var rawPoly = new QRPolynomial(dcdata[r5], rsPoly.getLength() - 1);
|
|
357518
|
-
var modPoly = rawPoly.mod(rsPoly);
|
|
357519
|
-
ecdata[r5] = new Array(rsPoly.getLength() - 1);
|
|
357520
|
-
for (var x3 = 0; x3 < ecdata[r5].length; x3++) {
|
|
357521
|
-
var modIndex = x3 + modPoly.getLength() - ecdata[r5].length;
|
|
357522
|
-
ecdata[r5][x3] = modIndex >= 0 ? modPoly.get(modIndex) : 0;
|
|
357523
|
-
}
|
|
357524
|
-
}
|
|
357525
|
-
var totalCodeCount = 0;
|
|
357526
|
-
for (var y2 = 0; y2 < rsBlocks.length; y2++) {
|
|
357527
|
-
totalCodeCount += rsBlocks[y2].totalCount;
|
|
357528
|
-
}
|
|
357529
|
-
var data = new Array(totalCodeCount);
|
|
357530
|
-
var index = 0;
|
|
357531
|
-
for (var z2 = 0; z2 < maxDcCount; z2++) {
|
|
357532
|
-
for (var s5 = 0; s5 < rsBlocks.length; s5++) {
|
|
357533
|
-
if (z2 < dcdata[s5].length) {
|
|
357534
|
-
data[index++] = dcdata[s5][z2];
|
|
357535
|
-
}
|
|
357536
|
-
}
|
|
357537
|
-
}
|
|
357538
|
-
for (var xx = 0; xx < maxEcCount; xx++) {
|
|
357539
|
-
for (var t5 = 0; t5 < rsBlocks.length; t5++) {
|
|
357540
|
-
if (xx < ecdata[t5].length) {
|
|
357541
|
-
data[index++] = ecdata[t5][xx];
|
|
357542
|
-
}
|
|
357543
|
-
}
|
|
357544
|
-
}
|
|
357545
|
-
return data;
|
|
357546
|
-
};
|
|
357547
|
-
module2.exports = QRCode;
|
|
357548
|
-
}
|
|
357549
|
-
});
|
|
357550
|
-
|
|
357551
|
-
// node_modules/qrcode-terminal/lib/main.js
|
|
357552
|
-
var require_main2 = __commonJS({
|
|
357553
|
-
"node_modules/qrcode-terminal/lib/main.js"(exports2, module2) {
|
|
357554
|
-
init_esbuild_shims();
|
|
357555
|
-
var QRCode = require_QRCode();
|
|
357556
|
-
var QRErrorCorrectLevel = require_QRErrorCorrectLevel();
|
|
357557
|
-
var black = "\x1B[40m \x1B[0m";
|
|
357558
|
-
var white = "\x1B[47m \x1B[0m";
|
|
357559
|
-
var toCell = /* @__PURE__ */ __name(function(isBlack) {
|
|
357560
|
-
return isBlack ? black : white;
|
|
357561
|
-
}, "toCell");
|
|
357562
|
-
var repeat = /* @__PURE__ */ __name(function(color) {
|
|
357563
|
-
return {
|
|
357564
|
-
times: /* @__PURE__ */ __name(function(count) {
|
|
357565
|
-
return new Array(count).join(color);
|
|
357566
|
-
}, "times")
|
|
357567
|
-
};
|
|
357568
|
-
}, "repeat");
|
|
357569
|
-
var fill = /* @__PURE__ */ __name(function(length, value) {
|
|
357570
|
-
var arr = new Array(length);
|
|
357571
|
-
for (var i3 = 0; i3 < length; i3++) {
|
|
357572
|
-
arr[i3] = value;
|
|
357573
|
-
}
|
|
357574
|
-
return arr;
|
|
357575
|
-
}, "fill");
|
|
357576
|
-
module2.exports = {
|
|
357577
|
-
error: QRErrorCorrectLevel.L,
|
|
357578
|
-
generate: /* @__PURE__ */ __name(function(input, opts, cb) {
|
|
357579
|
-
if (typeof opts === "function") {
|
|
357580
|
-
cb = opts;
|
|
357581
|
-
opts = {};
|
|
357582
|
-
}
|
|
357583
|
-
var qrcode2 = new QRCode(-1, this.error);
|
|
357584
|
-
qrcode2.addData(input);
|
|
357585
|
-
qrcode2.make();
|
|
357586
|
-
var output = "";
|
|
357587
|
-
if (opts && opts.small) {
|
|
357588
|
-
var BLACK = true, WHITE = false;
|
|
357589
|
-
var moduleCount = qrcode2.getModuleCount();
|
|
357590
|
-
var moduleData = qrcode2.modules.slice();
|
|
357591
|
-
var oddRow = moduleCount % 2 === 1;
|
|
357592
|
-
if (oddRow) {
|
|
357593
|
-
moduleData.push(fill(moduleCount, WHITE));
|
|
357594
|
-
}
|
|
357595
|
-
var platte = {
|
|
357596
|
-
WHITE_ALL: "\u2588",
|
|
357597
|
-
WHITE_BLACK: "\u2580",
|
|
357598
|
-
BLACK_WHITE: "\u2584",
|
|
357599
|
-
BLACK_ALL: " "
|
|
357600
|
-
};
|
|
357601
|
-
var borderTop = repeat(platte.BLACK_WHITE).times(moduleCount + 3);
|
|
357602
|
-
var borderBottom = repeat(platte.WHITE_BLACK).times(moduleCount + 3);
|
|
357603
|
-
output += borderTop + "\n";
|
|
357604
|
-
for (var row = 0; row < moduleCount; row += 2) {
|
|
357605
|
-
output += platte.WHITE_ALL;
|
|
357606
|
-
for (var col = 0; col < moduleCount; col++) {
|
|
357607
|
-
if (moduleData[row][col] === WHITE && moduleData[row + 1][col] === WHITE) {
|
|
357608
|
-
output += platte.WHITE_ALL;
|
|
357609
|
-
} else if (moduleData[row][col] === WHITE && moduleData[row + 1][col] === BLACK) {
|
|
357610
|
-
output += platte.WHITE_BLACK;
|
|
357611
|
-
} else if (moduleData[row][col] === BLACK && moduleData[row + 1][col] === WHITE) {
|
|
357612
|
-
output += platte.BLACK_WHITE;
|
|
357613
|
-
} else {
|
|
357614
|
-
output += platte.BLACK_ALL;
|
|
357615
|
-
}
|
|
357616
|
-
}
|
|
357617
|
-
output += platte.WHITE_ALL + "\n";
|
|
357618
|
-
}
|
|
357619
|
-
if (!oddRow) {
|
|
357620
|
-
output += borderBottom;
|
|
357621
|
-
}
|
|
357622
|
-
} else {
|
|
357623
|
-
var border = repeat(white).times(qrcode2.getModuleCount() + 3);
|
|
357624
|
-
output += border + "\n";
|
|
357625
|
-
qrcode2.modules.forEach(function(row2) {
|
|
357626
|
-
output += white;
|
|
357627
|
-
output += row2.map(toCell).join("");
|
|
357628
|
-
output += white + "\n";
|
|
357629
|
-
});
|
|
357630
|
-
output += border;
|
|
357631
|
-
}
|
|
357632
|
-
if (cb) cb(output);
|
|
357633
|
-
else console.log(output);
|
|
357634
|
-
}, "generate"),
|
|
357635
|
-
setErrorLevel: /* @__PURE__ */ __name(function(error40) {
|
|
357636
|
-
this.error = QRErrorCorrectLevel[error40] || this.error;
|
|
357637
|
-
}, "setErrorLevel")
|
|
357638
|
-
};
|
|
357639
|
-
}
|
|
357640
|
-
});
|
|
357641
|
-
|
|
357642
356699
|
// packages/cli/node_modules/gaxios/package.json
|
|
357643
356700
|
var require_package6 = __commonJS({
|
|
357644
356701
|
"packages/cli/node_modules/gaxios/package.json"(exports2, module2) {
|
|
@@ -360733,9 +359790,9 @@ var require_logging_utils2 = __commonJS({
|
|
|
360733
359790
|
this.debugPkg = pkg2;
|
|
360734
359791
|
}
|
|
360735
359792
|
makeLogger(namespace) {
|
|
360736
|
-
const
|
|
359793
|
+
const debugLogger137 = this.debugPkg(namespace);
|
|
360737
359794
|
return (fields, ...args) => {
|
|
360738
|
-
|
|
359795
|
+
debugLogger137(args[0], ...args.slice(1));
|
|
360739
359796
|
};
|
|
360740
359797
|
}
|
|
360741
359798
|
setFilters() {
|
|
@@ -360759,7 +359816,7 @@ var require_logging_utils2 = __commonJS({
|
|
|
360759
359816
|
}
|
|
360760
359817
|
makeLogger(namespace) {
|
|
360761
359818
|
var _a7;
|
|
360762
|
-
const
|
|
359819
|
+
const debugLogger137 = (_a7 = this.upstream) === null || _a7 === void 0 ? void 0 : _a7.makeLogger(namespace);
|
|
360763
359820
|
return (fields, ...args) => {
|
|
360764
359821
|
var _a8;
|
|
360765
359822
|
const severity = (_a8 = fields.severity) !== null && _a8 !== void 0 ? _a8 : LogSeverity.INFO;
|
|
@@ -360768,8 +359825,8 @@ var require_logging_utils2 = __commonJS({
|
|
|
360768
359825
|
message: util3.format(...args)
|
|
360769
359826
|
}, fields);
|
|
360770
359827
|
const jsonString = JSON.stringify(json3);
|
|
360771
|
-
if (
|
|
360772
|
-
|
|
359828
|
+
if (debugLogger137) {
|
|
359829
|
+
debugLogger137(fields, jsonString);
|
|
360773
359830
|
} else {
|
|
360774
359831
|
console.log("%s", jsonString);
|
|
360775
359832
|
}
|
|
@@ -390472,7 +389529,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
390472
389529
|
// packages/cli/src/utils/version.ts
|
|
390473
389530
|
async function getCliVersion() {
|
|
390474
389531
|
const pkgJson = await getPackageJson();
|
|
390475
|
-
return "0.12.
|
|
389532
|
+
return "0.12.2-nightly.20260313.46d57afb";
|
|
390476
389533
|
}
|
|
390477
389534
|
__name(getCliVersion, "getCliVersion");
|
|
390478
389535
|
|
|
@@ -398033,7 +397090,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
398033
397090
|
|
|
398034
397091
|
// packages/cli/src/generated/git-commit.ts
|
|
398035
397092
|
init_esbuild_shims();
|
|
398036
|
-
var GIT_COMMIT_INFO = "
|
|
397093
|
+
var GIT_COMMIT_INFO = "fbfa0d51";
|
|
398037
397094
|
|
|
398038
397095
|
// packages/cli/src/utils/systemInfo.ts
|
|
398039
397096
|
async function getNpmVersion() {
|
|
@@ -400430,7 +399487,8 @@ async function exportMarkdownAction(context2) {
|
|
|
400430
399487
|
}
|
|
400431
399488
|
try {
|
|
400432
399489
|
const sessionService = new SessionService(cwd7);
|
|
400433
|
-
const
|
|
399490
|
+
const sessionId = config2.getSessionId();
|
|
399491
|
+
const sessionData = await sessionService.loadSession(sessionId);
|
|
400434
399492
|
if (!sessionData) {
|
|
400435
399493
|
return {
|
|
400436
399494
|
type: "message",
|
|
@@ -400483,7 +399541,8 @@ async function exportHtmlAction(context2) {
|
|
|
400483
399541
|
}
|
|
400484
399542
|
try {
|
|
400485
399543
|
const sessionService = new SessionService(cwd7);
|
|
400486
|
-
const
|
|
399544
|
+
const sessionId = config2.getSessionId();
|
|
399545
|
+
const sessionData = await sessionService.loadSession(sessionId);
|
|
400487
399546
|
if (!sessionData) {
|
|
400488
399547
|
return {
|
|
400489
399548
|
type: "message",
|
|
@@ -400536,7 +399595,8 @@ async function exportJsonAction(context2) {
|
|
|
400536
399595
|
}
|
|
400537
399596
|
try {
|
|
400538
399597
|
const sessionService = new SessionService(cwd7);
|
|
400539
|
-
const
|
|
399598
|
+
const sessionId = config2.getSessionId();
|
|
399599
|
+
const sessionData = await sessionService.loadSession(sessionId);
|
|
400540
399600
|
if (!sessionData) {
|
|
400541
399601
|
return {
|
|
400542
399602
|
type: "message",
|
|
@@ -400589,7 +399649,8 @@ async function exportJsonlAction(context2) {
|
|
|
400589
399649
|
}
|
|
400590
399650
|
try {
|
|
400591
399651
|
const sessionService = new SessionService(cwd7);
|
|
400592
|
-
const
|
|
399652
|
+
const sessionId = config2.getSessionId();
|
|
399653
|
+
const sessionData = await sessionService.loadSession(sessionId);
|
|
400593
399654
|
if (!sessionData) {
|
|
400594
399655
|
return {
|
|
400595
399656
|
type: "message",
|
|
@@ -434279,7 +433340,7 @@ var Header2 = /* @__PURE__ */ __name(({
|
|
|
434279
433340
|
Box_default,
|
|
434280
433341
|
{
|
|
434281
433342
|
flexDirection: "column",
|
|
434282
|
-
borderStyle: "
|
|
433343
|
+
borderStyle: "single",
|
|
434283
433344
|
borderColor: theme.border.default,
|
|
434284
433345
|
paddingX: infoPanelPaddingX,
|
|
434285
433346
|
flexGrow: showLogo ? 0 : 1,
|
|
@@ -436289,72 +435350,13 @@ Link.propTypes = {
|
|
|
436289
435350
|
var dist_default6 = Link;
|
|
436290
435351
|
|
|
436291
435352
|
// packages/cli/src/ui/components/QwenOAuthProgress.tsx
|
|
436292
|
-
var import_qrcode_terminal = __toESM(require_main2(), 1);
|
|
436293
435353
|
var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
|
|
436294
|
-
|
|
436295
|
-
|
|
436296
|
-
|
|
436297
|
-
|
|
436298
|
-
}) {
|
|
436299
|
-
if (!qrCodeData) {
|
|
436300
|
-
return null;
|
|
436301
|
-
}
|
|
436302
|
-
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
436303
|
-
Box_default,
|
|
436304
|
-
{
|
|
436305
|
-
borderStyle: "round",
|
|
436306
|
-
borderColor: Colors.AccentBlue,
|
|
436307
|
-
flexDirection: "column",
|
|
436308
|
-
padding: 1,
|
|
436309
|
-
width: "100%",
|
|
436310
|
-
children: [
|
|
436311
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, color: Colors.AccentBlue, children: t4("Qwen OAuth Authentication") }),
|
|
436312
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: t4("Please visit this URL to authorize:") }) }),
|
|
436313
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(dist_default6, { url: verificationUrl, fallback: false, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: Colors.AccentGreen, bold: true, children: verificationUrl }) }),
|
|
436314
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: t4("Or scan the QR code below:") }) }),
|
|
436315
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: qrCodeData }) })
|
|
436316
|
-
]
|
|
436317
|
-
}
|
|
436318
|
-
);
|
|
436319
|
-
}
|
|
436320
|
-
__name(QrCodeDisplay, "QrCodeDisplay");
|
|
436321
|
-
function StatusDisplay({
|
|
436322
|
-
timeRemaining,
|
|
436323
|
-
dots
|
|
436324
|
-
}) {
|
|
436325
|
-
const formatTime = /* @__PURE__ */ __name((seconds) => {
|
|
436326
|
-
const minutes = Math.floor(seconds / 60);
|
|
436327
|
-
const remainingSeconds = seconds % 60;
|
|
436328
|
-
return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`;
|
|
436329
|
-
}, "formatTime");
|
|
436330
|
-
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
436331
|
-
Box_default,
|
|
436332
|
-
{
|
|
436333
|
-
borderStyle: "round",
|
|
436334
|
-
borderColor: Colors.AccentBlue,
|
|
436335
|
-
flexDirection: "column",
|
|
436336
|
-
padding: 1,
|
|
436337
|
-
width: "100%",
|
|
436338
|
-
children: [
|
|
436339
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text3, { children: [
|
|
436340
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(build_default, { type: "dots" }),
|
|
436341
|
-
" ",
|
|
436342
|
-
t4("Waiting for authorization"),
|
|
436343
|
-
dots
|
|
436344
|
-
] }) }),
|
|
436345
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Box_default, { marginTop: 1, justifyContent: "space-between", children: [
|
|
436346
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text3, { color: Colors.Gray, children: [
|
|
436347
|
-
t4("Time remaining:"),
|
|
436348
|
-
" ",
|
|
436349
|
-
formatTime(timeRemaining)
|
|
436350
|
-
] }),
|
|
436351
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: Colors.AccentPurple, children: t4("(Press ESC or CTRL+C to cancel)") })
|
|
436352
|
-
] })
|
|
436353
|
-
]
|
|
436354
|
-
}
|
|
436355
|
-
);
|
|
435354
|
+
function formatTime(seconds) {
|
|
435355
|
+
const minutes = Math.floor(seconds / 60);
|
|
435356
|
+
const remainingSeconds = seconds % 60;
|
|
435357
|
+
return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`;
|
|
436356
435358
|
}
|
|
436357
|
-
__name(
|
|
435359
|
+
__name(formatTime, "formatTime");
|
|
436358
435360
|
function QwenOAuthProgress({
|
|
436359
435361
|
onTimeout,
|
|
436360
435362
|
onCancel,
|
|
@@ -436364,8 +435366,7 @@ function QwenOAuthProgress({
|
|
|
436364
435366
|
}) {
|
|
436365
435367
|
const defaultTimeout = deviceAuth?.expires_in || 300;
|
|
436366
435368
|
const [timeRemaining, setTimeRemaining] = (0, import_react80.useState)(defaultTimeout);
|
|
436367
|
-
const [dots, setDots] = (0, import_react80.useState)("");
|
|
436368
|
-
const [qrCodeData, setQrCodeData] = (0, import_react80.useState)(null);
|
|
435369
|
+
const [dots, setDots] = (0, import_react80.useState)("...");
|
|
436369
435370
|
useKeypress(
|
|
436370
435371
|
(key) => {
|
|
436371
435372
|
if (authStatus === "timeout" || authStatus === "error") {
|
|
@@ -436376,26 +435377,6 @@ function QwenOAuthProgress({
|
|
|
436376
435377
|
},
|
|
436377
435378
|
{ isActive: true }
|
|
436378
435379
|
);
|
|
436379
|
-
(0, import_react80.useEffect)(() => {
|
|
436380
|
-
if (!deviceAuth?.verification_uri_complete) {
|
|
436381
|
-
return;
|
|
436382
|
-
}
|
|
436383
|
-
const generateQR = /* @__PURE__ */ __name(() => {
|
|
436384
|
-
try {
|
|
436385
|
-
import_qrcode_terminal.default.generate(
|
|
436386
|
-
deviceAuth.verification_uri_complete,
|
|
436387
|
-
{ small: true },
|
|
436388
|
-
(qrcode2) => {
|
|
436389
|
-
setQrCodeData(qrcode2);
|
|
436390
|
-
}
|
|
436391
|
-
);
|
|
436392
|
-
} catch (error40) {
|
|
436393
|
-
debugLogger115.error("Failed to generate QR code:", error40);
|
|
436394
|
-
setQrCodeData(null);
|
|
436395
|
-
}
|
|
436396
|
-
}, "generateQR");
|
|
436397
|
-
generateQR();
|
|
436398
|
-
}, [deviceAuth?.verification_uri_complete]);
|
|
436399
435380
|
(0, import_react80.useEffect)(() => {
|
|
436400
435381
|
const timer = setInterval(() => {
|
|
436401
435382
|
setTimeRemaining((prev) => {
|
|
@@ -436409,42 +435390,32 @@ function QwenOAuthProgress({
|
|
|
436409
435390
|
return () => clearInterval(timer);
|
|
436410
435391
|
}, [onTimeout]);
|
|
436411
435392
|
(0, import_react80.useEffect)(() => {
|
|
435393
|
+
const dotFrames = [". ", ".. ", "..."];
|
|
435394
|
+
let frameIndex = 0;
|
|
436412
435395
|
const dotsTimer = setInterval(() => {
|
|
436413
|
-
|
|
436414
|
-
|
|
436415
|
-
return prev + ".";
|
|
436416
|
-
});
|
|
435396
|
+
frameIndex = (frameIndex + 1) % dotFrames.length;
|
|
435397
|
+
setDots(dotFrames[frameIndex]);
|
|
436417
435398
|
}, 500);
|
|
436418
435399
|
return () => clearInterval(dotsTimer);
|
|
436419
435400
|
}, []);
|
|
436420
|
-
const qrCodeDisplay = (0, import_react80.useMemo)(() => {
|
|
436421
|
-
if (!deviceAuth?.verification_uri_complete) return null;
|
|
436422
|
-
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
436423
|
-
QrCodeDisplay,
|
|
436424
|
-
{
|
|
436425
|
-
verificationUrl: deviceAuth.verification_uri_complete,
|
|
436426
|
-
qrCodeData
|
|
436427
|
-
}
|
|
436428
|
-
);
|
|
436429
|
-
}, [deviceAuth?.verification_uri_complete, qrCodeData]);
|
|
436430
435401
|
if (authStatus === "timeout") {
|
|
436431
435402
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
436432
435403
|
Box_default,
|
|
436433
435404
|
{
|
|
436434
|
-
borderStyle: "
|
|
436435
|
-
borderColor:
|
|
435405
|
+
borderStyle: "single",
|
|
435406
|
+
borderColor: theme.border.default,
|
|
436436
435407
|
flexDirection: "column",
|
|
436437
435408
|
padding: 1,
|
|
436438
435409
|
width: "100%",
|
|
436439
435410
|
children: [
|
|
436440
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, color:
|
|
435411
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, color: theme.status.error, children: t4("Qwen OAuth Authentication Timeout") }),
|
|
436441
435412
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: authMessage || t4(
|
|
436442
435413
|
"OAuth token expired (over {{seconds}} seconds). Please select authentication method again.",
|
|
436443
435414
|
{
|
|
436444
435415
|
seconds: defaultTimeout.toString()
|
|
436445
435416
|
}
|
|
436446
435417
|
) }) }),
|
|
436447
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color:
|
|
435418
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: theme.text.secondary, children: t4("Press any key to return to authentication type selection.") }) })
|
|
436448
435419
|
]
|
|
436449
435420
|
}
|
|
436450
435421
|
);
|
|
@@ -436453,15 +435424,15 @@ function QwenOAuthProgress({
|
|
|
436453
435424
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
436454
435425
|
Box_default,
|
|
436455
435426
|
{
|
|
436456
|
-
borderStyle: "
|
|
436457
|
-
borderColor:
|
|
435427
|
+
borderStyle: "single",
|
|
435428
|
+
borderColor: theme.border.default,
|
|
436458
435429
|
flexDirection: "column",
|
|
436459
435430
|
padding: 1,
|
|
436460
435431
|
width: "100%",
|
|
436461
435432
|
children: [
|
|
436462
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, color:
|
|
436463
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: authMessage || "An error occurred during authentication. Please try again." }) }),
|
|
436464
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color:
|
|
435433
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, color: theme.status.error, children: t4("Qwen OAuth Authentication Error") }),
|
|
435434
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: authMessage || t4("An error occurred during authentication. Please try again.") }) }),
|
|
435435
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: theme.text.secondary, children: t4("Press any key to return to authentication type selection.") }) })
|
|
436465
435436
|
]
|
|
436466
435437
|
}
|
|
436467
435438
|
);
|
|
@@ -436470,34 +435441,53 @@ function QwenOAuthProgress({
|
|
|
436470
435441
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
436471
435442
|
Box_default,
|
|
436472
435443
|
{
|
|
436473
|
-
borderStyle: "
|
|
436474
|
-
borderColor:
|
|
435444
|
+
borderStyle: "single",
|
|
435445
|
+
borderColor: theme.border.default,
|
|
436475
435446
|
flexDirection: "column",
|
|
436476
435447
|
padding: 1,
|
|
436477
435448
|
width: "100%",
|
|
436478
435449
|
children: [
|
|
436479
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
436480
|
-
|
|
436481
|
-
t4("Waiting for Qwen OAuth authentication...")
|
|
436482
|
-
|
|
436483
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Box_default, { marginTop: 1, justifyContent: "space-between", children: [
|
|
436484
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text3, { color: Colors.Gray, children: [
|
|
435450
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, children: t4("Qwen OAuth Authentication") }),
|
|
435451
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
435452
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: t4("Waiting for Qwen OAuth authentication...") }),
|
|
435453
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text3, { children: [
|
|
436485
435454
|
t4("Time remaining:"),
|
|
436486
435455
|
" ",
|
|
436487
|
-
|
|
436488
|
-
|
|
436489
|
-
|
|
436490
|
-
|
|
436491
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: Colors.AccentPurple, children: t4("(Press ESC or CTRL+C to cancel)") })
|
|
436492
|
-
] })
|
|
435456
|
+
formatTime(timeRemaining)
|
|
435457
|
+
] })
|
|
435458
|
+
] }),
|
|
435459
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: theme.text.secondary, children: t4("Esc to cancel") }) })
|
|
436493
435460
|
]
|
|
436494
435461
|
}
|
|
436495
435462
|
);
|
|
436496
435463
|
}
|
|
436497
|
-
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
436498
|
-
|
|
436499
|
-
|
|
436500
|
-
|
|
435464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
435465
|
+
Box_default,
|
|
435466
|
+
{
|
|
435467
|
+
borderStyle: "single",
|
|
435468
|
+
borderColor: theme.border.default,
|
|
435469
|
+
flexDirection: "column",
|
|
435470
|
+
padding: 1,
|
|
435471
|
+
width: "100%",
|
|
435472
|
+
children: [
|
|
435473
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { bold: true, children: t4("Qwen OAuth Authentication") }),
|
|
435474
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { children: t4("Please visit this URL to authorize:") }) }),
|
|
435475
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(dist_default6, { url: deviceAuth.verification_uri_complete || "", fallback: false, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: theme.text.link, bold: true, children: deviceAuth.verification_uri_complete }) }),
|
|
435476
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
435477
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text3, { children: [
|
|
435478
|
+
t4("Waiting for authorization"),
|
|
435479
|
+
dots
|
|
435480
|
+
] }),
|
|
435481
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Text3, { children: [
|
|
435482
|
+
t4("Time remaining:"),
|
|
435483
|
+
" ",
|
|
435484
|
+
formatTime(timeRemaining)
|
|
435485
|
+
] })
|
|
435486
|
+
] }),
|
|
435487
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text3, { color: theme.text.secondary, children: t4("Esc to cancel") }) })
|
|
435488
|
+
]
|
|
435489
|
+
}
|
|
435490
|
+
);
|
|
436501
435491
|
}
|
|
436502
435492
|
__name(QwenOAuthProgress, "QwenOAuthProgress");
|
|
436503
435493
|
|
|
@@ -436830,7 +435820,7 @@ function AuthDialog() {
|
|
|
436830
435820
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
436831
435821
|
Box_default,
|
|
436832
435822
|
{
|
|
436833
|
-
borderStyle: "
|
|
435823
|
+
borderStyle: "single",
|
|
436834
435824
|
borderColor: theme?.border?.default,
|
|
436835
435825
|
flexDirection: "column",
|
|
436836
435826
|
padding: 1,
|
|
@@ -436916,7 +435906,7 @@ var editorSettingsManager = new EditorSettingsManager();
|
|
|
436916
435906
|
|
|
436917
435907
|
// packages/cli/src/ui/components/EditorSettingsDialog.tsx
|
|
436918
435908
|
var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
|
|
436919
|
-
var
|
|
435909
|
+
var debugLogger115 = createDebugLogger("EDITOR_SETTINGS_DIALOG");
|
|
436920
435910
|
function EditorSettingsDialog({
|
|
436921
435911
|
onSelect,
|
|
436922
435912
|
settings,
|
|
@@ -436943,7 +435933,7 @@ function EditorSettingsDialog({
|
|
|
436943
435933
|
(item) => item.type === currentPreference
|
|
436944
435934
|
) : 0;
|
|
436945
435935
|
if (editorIndex === -1) {
|
|
436946
|
-
|
|
435936
|
+
debugLogger115.error(`Editor is not supported: ${currentPreference}`);
|
|
436947
435937
|
editorIndex = 0;
|
|
436948
435938
|
}
|
|
436949
435939
|
const handleEditorSelect = /* @__PURE__ */ __name((editorType) => {
|
|
@@ -437687,7 +436677,7 @@ import process35 from "node:process";
|
|
|
437687
436677
|
// packages/cli/src/ui/components/IdeTrustChangeDialog.tsx
|
|
437688
436678
|
init_esbuild_shims();
|
|
437689
436679
|
var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
|
|
437690
|
-
var
|
|
436680
|
+
var debugLogger116 = createDebugLogger("IDE_TRUST_DIALOG");
|
|
437691
436681
|
var IdeTrustChangeDialog = /* @__PURE__ */ __name(({ reason }) => {
|
|
437692
436682
|
useKeypress(
|
|
437693
436683
|
(key) => {
|
|
@@ -437699,7 +436689,7 @@ var IdeTrustChangeDialog = /* @__PURE__ */ __name(({ reason }) => {
|
|
|
437699
436689
|
);
|
|
437700
436690
|
let message = "Workspace trust has changed.";
|
|
437701
436691
|
if (reason === "NONE") {
|
|
437702
|
-
|
|
436692
|
+
debugLogger116.error(
|
|
437703
436693
|
'IdeTrustChangeDialog rendered with unexpected reason "NONE"'
|
|
437704
436694
|
);
|
|
437705
436695
|
} else if (reason === "CONNECTION_CHANGE") {
|
|
@@ -438088,7 +437078,7 @@ var ActionSelectionStep2 = /* @__PURE__ */ __name(({
|
|
|
438088
437078
|
// packages/cli/src/ui/components/extensions/steps/UninstallConfirmStep.tsx
|
|
438089
437079
|
init_esbuild_shims();
|
|
438090
437080
|
var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
|
|
438091
|
-
var
|
|
437081
|
+
var debugLogger117 = createDebugLogger("EXTENSION_UNINSTALL_STEP");
|
|
438092
437082
|
function UninstallConfirmStep({
|
|
438093
437083
|
selectedExtension,
|
|
438094
437084
|
onConfirm,
|
|
@@ -438101,7 +437091,7 @@ function UninstallConfirmStep({
|
|
|
438101
437091
|
try {
|
|
438102
437092
|
await onConfirm(selectedExtension);
|
|
438103
437093
|
} catch (error40) {
|
|
438104
|
-
|
|
437094
|
+
debugLogger117.error("Failed to uninstall extension:", error40);
|
|
438105
437095
|
}
|
|
438106
437096
|
} else if (key.name === "n" || key.name === "escape") {
|
|
438107
437097
|
onNavigateBack();
|
|
@@ -438168,7 +437158,7 @@ __name(ScopeSelectStep, "ScopeSelectStep");
|
|
|
438168
437158
|
|
|
438169
437159
|
// packages/cli/src/ui/components/extensions/ExtensionsManagerDialog.tsx
|
|
438170
437160
|
var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
|
|
438171
|
-
var
|
|
437161
|
+
var debugLogger118 = createDebugLogger("EXTENSIONS_MANAGER_DIALOG");
|
|
438172
437162
|
function ExtensionsManagerDialog({
|
|
438173
437163
|
onClose,
|
|
438174
437164
|
config: config2
|
|
@@ -438189,7 +437179,7 @@ function ExtensionsManagerDialog({
|
|
|
438189
437179
|
if (!config2) return;
|
|
438190
437180
|
const extensionManager = config2.getExtensionManager();
|
|
438191
437181
|
if (!extensionManager) {
|
|
438192
|
-
|
|
437182
|
+
debugLogger118.error("ExtensionManager not available");
|
|
438193
437183
|
return;
|
|
438194
437184
|
}
|
|
438195
437185
|
try {
|
|
@@ -438197,7 +437187,7 @@ function ExtensionsManagerDialog({
|
|
|
438197
437187
|
const loadedExtensions = extensionManager.getLoadedExtensions();
|
|
438198
437188
|
setExtensions(loadedExtensions);
|
|
438199
437189
|
} catch (error40) {
|
|
438200
|
-
|
|
437190
|
+
debugLogger118.error("Failed to load extensions:", error40);
|
|
438201
437191
|
}
|
|
438202
437192
|
}, [config2]);
|
|
438203
437193
|
(0, import_react90.useEffect)(() => {
|
|
@@ -438251,12 +437241,12 @@ function ExtensionsManagerDialog({
|
|
|
438251
437241
|
selectedExtension,
|
|
438252
437242
|
"update available" /* UPDATE_AVAILABLE */,
|
|
438253
437243
|
(name3, newState) => {
|
|
438254
|
-
|
|
437244
|
+
debugLogger118.debug(`Update state for ${name3}:`, newState);
|
|
438255
437245
|
}
|
|
438256
437246
|
);
|
|
438257
437247
|
await loadExtensions();
|
|
438258
437248
|
await extensionManager.checkForAllExtensionUpdates((name3, newState) => {
|
|
438259
|
-
|
|
437249
|
+
debugLogger118.debug(`Recheck update state for ${name3}:`, newState);
|
|
438260
437250
|
});
|
|
438261
437251
|
setSuccessMessage(
|
|
438262
437252
|
t4('Extension "{{name}}" updated successfully.', {
|
|
@@ -438265,7 +437255,7 @@ function ExtensionsManagerDialog({
|
|
|
438265
437255
|
);
|
|
438266
437256
|
handleNavigateBack();
|
|
438267
437257
|
} catch (error40) {
|
|
438268
|
-
|
|
437258
|
+
debugLogger118.error("Failed to update extension:", error40);
|
|
438269
437259
|
setUpdateError(
|
|
438270
437260
|
error40 instanceof Error ? error40.message : "Unknown error occurred"
|
|
438271
437261
|
);
|
|
@@ -438338,7 +437328,7 @@ function ExtensionsManagerDialog({
|
|
|
438338
437328
|
setErrorMessage(null);
|
|
438339
437329
|
setNavigationStack([MANAGEMENT_STEPS2.EXTENSION_LIST]);
|
|
438340
437330
|
} catch (error40) {
|
|
438341
|
-
|
|
437331
|
+
debugLogger118.error(
|
|
438342
437332
|
`Failed to ${newState ? "enable" : "disable"} extension:`,
|
|
438343
437333
|
error40
|
|
438344
437334
|
);
|
|
@@ -438379,7 +437369,7 @@ function ExtensionsManagerDialog({
|
|
|
438379
437369
|
setNavigationStack([MANAGEMENT_STEPS2.EXTENSION_LIST]);
|
|
438380
437370
|
setSelectedExtensionIndex(-1);
|
|
438381
437371
|
} catch (error40) {
|
|
438382
|
-
|
|
437372
|
+
debugLogger118.error("Failed to uninstall extension:", error40);
|
|
438383
437373
|
throw error40;
|
|
438384
437374
|
}
|
|
438385
437375
|
},
|
|
@@ -438800,6 +437790,7 @@ var ServerDetailStep = /* @__PURE__ */ __name(({
|
|
|
438800
437790
|
onReconnect,
|
|
438801
437791
|
onDisable,
|
|
438802
437792
|
onAuthenticate,
|
|
437793
|
+
onClearAuth,
|
|
438803
437794
|
onBack
|
|
438804
437795
|
}) => {
|
|
438805
437796
|
const statusColor = server ? server.isDisabled ? "yellow" : getStatusColor3(server.status) : "gray";
|
|
@@ -438830,10 +437821,17 @@ var ServerDetailStep = /* @__PURE__ */ __name(({
|
|
|
438830
437821
|
if (!server.isDisabled) {
|
|
438831
437822
|
result.push({
|
|
438832
437823
|
key: "authenticate",
|
|
438833
|
-
label: t4("Authenticate"),
|
|
437824
|
+
label: server.hasOAuthTokens ? t4("Re-authenticate") : t4("Authenticate"),
|
|
438834
437825
|
value: "authenticate"
|
|
438835
437826
|
});
|
|
438836
437827
|
}
|
|
437828
|
+
if (!server.isDisabled && server.hasOAuthTokens) {
|
|
437829
|
+
result.push({
|
|
437830
|
+
key: "clear-auth",
|
|
437831
|
+
label: t4("Clear Authentication"),
|
|
437832
|
+
value: "clear-auth"
|
|
437833
|
+
});
|
|
437834
|
+
}
|
|
438837
437835
|
return result;
|
|
438838
437836
|
}, [server]);
|
|
438839
437837
|
useKeypress(
|
|
@@ -438915,6 +437913,9 @@ var ServerDetailStep = /* @__PURE__ */ __name(({
|
|
|
438915
437913
|
case "authenticate":
|
|
438916
437914
|
onAuthenticate?.();
|
|
438917
437915
|
break;
|
|
437916
|
+
case "clear-auth":
|
|
437917
|
+
onClearAuth?.();
|
|
437918
|
+
break;
|
|
438918
437919
|
default:
|
|
438919
437920
|
break;
|
|
438920
437921
|
}
|
|
@@ -439155,9 +438156,9 @@ var DisableScopeSelectStep = /* @__PURE__ */ __name(({
|
|
|
439155
438156
|
init_esbuild_shims();
|
|
439156
438157
|
var import_react95 = __toESM(require_react(), 1);
|
|
439157
438158
|
var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
|
|
438159
|
+
var AUTO_BACK_DELAY_MS = 2e3;
|
|
439158
438160
|
var AuthenticateStep = /* @__PURE__ */ __name(({
|
|
439159
438161
|
server,
|
|
439160
|
-
onSuccess,
|
|
439161
438162
|
onBack
|
|
439162
438163
|
}) => {
|
|
439163
438164
|
const config2 = useConfig();
|
|
@@ -439172,7 +438173,8 @@ var AuthenticateStep = /* @__PURE__ */ __name(({
|
|
|
439172
438173
|
setMessages([]);
|
|
439173
438174
|
setErrorMessage(null);
|
|
439174
438175
|
const displayListener = /* @__PURE__ */ __name((message) => {
|
|
439175
|
-
|
|
438176
|
+
const text = typeof message === "string" ? message : t4(message.key, message.params);
|
|
438177
|
+
setMessages((prev) => [...prev, text]);
|
|
439176
438178
|
}, "displayListener");
|
|
439177
438179
|
appEvents.on("oauth-display-message" /* OauthDisplayMessage */, displayListener);
|
|
439178
438180
|
try {
|
|
@@ -439208,13 +438210,24 @@ var AuthenticateStep = /* @__PURE__ */ __name(({
|
|
|
439208
438210
|
})
|
|
439209
438211
|
]);
|
|
439210
438212
|
await toolRegistry.discoverToolsForServer(server.name);
|
|
438213
|
+
const discoveredTools = toolRegistry.getToolsByServer(server.name);
|
|
438214
|
+
setMessages((prev) => [
|
|
438215
|
+
...prev,
|
|
438216
|
+
t4("Discovered {{count}} tool(s) from '{{name}}'.", {
|
|
438217
|
+
count: String(discoveredTools.length),
|
|
438218
|
+
name: server.name
|
|
438219
|
+
})
|
|
438220
|
+
]);
|
|
439211
438221
|
}
|
|
439212
438222
|
const geminiClient = config2.getGeminiClient();
|
|
439213
438223
|
if (geminiClient) {
|
|
439214
438224
|
await geminiClient.setTools();
|
|
439215
438225
|
}
|
|
438226
|
+
setMessages((prev) => [
|
|
438227
|
+
...prev,
|
|
438228
|
+
t4("Authentication complete. Returning to server details...")
|
|
438229
|
+
]);
|
|
439216
438230
|
setAuthState("success");
|
|
439217
|
-
onSuccess?.();
|
|
439218
438231
|
} catch (error40) {
|
|
439219
438232
|
setErrorMessage(getErrorMessage(error40));
|
|
439220
438233
|
setAuthState("error");
|
|
@@ -439222,10 +438235,17 @@ var AuthenticateStep = /* @__PURE__ */ __name(({
|
|
|
439222
438235
|
isRunning.current = false;
|
|
439223
438236
|
appEvents.removeListener("oauth-display-message" /* OauthDisplayMessage */, displayListener);
|
|
439224
438237
|
}
|
|
439225
|
-
}, [server, config2
|
|
438238
|
+
}, [server, config2]);
|
|
439226
438239
|
(0, import_react95.useEffect)(() => {
|
|
439227
438240
|
runAuthentication();
|
|
439228
438241
|
}, []);
|
|
438242
|
+
(0, import_react95.useEffect)(() => {
|
|
438243
|
+
if (authState !== "success") return;
|
|
438244
|
+
const timer = setTimeout(() => {
|
|
438245
|
+
onBack();
|
|
438246
|
+
}, AUTO_BACK_DELAY_MS);
|
|
438247
|
+
return () => clearTimeout(timer);
|
|
438248
|
+
}, [authState, onBack]);
|
|
439229
438249
|
useKeypress(
|
|
439230
438250
|
(key) => {
|
|
439231
438251
|
if (key.name === "escape") {
|
|
@@ -439245,13 +438265,16 @@ var AuthenticateStep = /* @__PURE__ */ __name(({
|
|
|
439245
438265
|
] }) }),
|
|
439246
438266
|
messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Box_default, { flexDirection: "column", children: messages.map((msg, i3) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text3, { color: theme.text.secondary, children: msg }, i3)) }),
|
|
439247
438267
|
authState === "error" && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text3, { color: theme.status.error, children: errorMessage }) }),
|
|
439248
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.
|
|
438268
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Box_default, { children: [
|
|
438269
|
+
authState === "authenticating" && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text3, { color: theme.text.secondary, children: t4("Authenticating... Please complete the login in your browser.") }),
|
|
438270
|
+
authState === "success" && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text3, { color: theme.status.success, children: t4("Authentication successful.") })
|
|
438271
|
+
] })
|
|
439249
438272
|
] });
|
|
439250
438273
|
}, "AuthenticateStep");
|
|
439251
438274
|
|
|
439252
438275
|
// packages/cli/src/ui/components/mcp/MCPManagementDialog.tsx
|
|
439253
438276
|
var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
|
|
439254
|
-
var
|
|
438277
|
+
var debugLogger119 = createDebugLogger("MCP_DIALOG");
|
|
439255
438278
|
var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
439256
438279
|
onClose
|
|
439257
438280
|
}) => {
|
|
@@ -439300,6 +438323,13 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
439300
438323
|
const invalidToolCount = serverTools.filter(
|
|
439301
438324
|
(t5) => !t5.name || !t5.description
|
|
439302
438325
|
).length;
|
|
438326
|
+
let hasOAuthTokens = false;
|
|
438327
|
+
try {
|
|
438328
|
+
const tokenStorage = new MCPOAuthTokenStorage();
|
|
438329
|
+
const credentials = await tokenStorage.getCredentials(name3);
|
|
438330
|
+
hasOAuthTokens = credentials !== null;
|
|
438331
|
+
} catch {
|
|
438332
|
+
}
|
|
439303
438333
|
serverInfos.push({
|
|
439304
438334
|
name: name3,
|
|
439305
438335
|
status,
|
|
@@ -439308,7 +438338,8 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
439308
438338
|
toolCount: serverTools.length,
|
|
439309
438339
|
invalidToolCount,
|
|
439310
438340
|
promptCount: serverPrompts.length,
|
|
439311
|
-
isDisabled
|
|
438341
|
+
isDisabled,
|
|
438342
|
+
hasOAuthTokens
|
|
439312
438343
|
});
|
|
439313
438344
|
}
|
|
439314
438345
|
return serverInfos;
|
|
@@ -439320,7 +438351,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
439320
438351
|
const serverInfos = await fetchServerData();
|
|
439321
438352
|
setServers(serverInfos);
|
|
439322
438353
|
} catch (error40) {
|
|
439323
|
-
|
|
438354
|
+
debugLogger119.error("Error loading MCP servers:", error40);
|
|
439324
438355
|
} finally {
|
|
439325
438356
|
setIsLoading(false);
|
|
439326
438357
|
}
|
|
@@ -439401,11 +438432,34 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
439401
438432
|
const serverInfos = await fetchServerData();
|
|
439402
438433
|
setServers(serverInfos);
|
|
439403
438434
|
} catch (error40) {
|
|
439404
|
-
|
|
438435
|
+
debugLogger119.error("Error reloading MCP servers:", error40);
|
|
439405
438436
|
} finally {
|
|
439406
438437
|
setIsLoading(false);
|
|
439407
438438
|
}
|
|
439408
438439
|
}, [fetchServerData]);
|
|
438440
|
+
const handleClearAuth = (0, import_react96.useCallback)(async () => {
|
|
438441
|
+
if (!config2 || !selectedServer) return;
|
|
438442
|
+
try {
|
|
438443
|
+
setIsLoading(true);
|
|
438444
|
+
const tokenStorage = new MCPOAuthTokenStorage();
|
|
438445
|
+
await tokenStorage.deleteCredentials(selectedServer.name);
|
|
438446
|
+
debugLogger119.info(
|
|
438447
|
+
`Cleared OAuth tokens for server '${selectedServer.name}'`
|
|
438448
|
+
);
|
|
438449
|
+
const toolRegistry = config2.getToolRegistry();
|
|
438450
|
+
if (toolRegistry) {
|
|
438451
|
+
await toolRegistry.disconnectServer(selectedServer.name);
|
|
438452
|
+
}
|
|
438453
|
+
await reloadServers();
|
|
438454
|
+
} catch (error40) {
|
|
438455
|
+
debugLogger119.error(
|
|
438456
|
+
`Error clearing OAuth tokens for server '${selectedServer.name}':`,
|
|
438457
|
+
error40
|
|
438458
|
+
);
|
|
438459
|
+
} finally {
|
|
438460
|
+
setIsLoading(false);
|
|
438461
|
+
}
|
|
438462
|
+
}, [config2, selectedServer, reloadServers]);
|
|
439409
438463
|
const handleReconnect = (0, import_react96.useCallback)(async () => {
|
|
439410
438464
|
if (!config2 || !selectedServer) return;
|
|
439411
438465
|
try {
|
|
@@ -439416,7 +438470,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
439416
438470
|
}
|
|
439417
438471
|
await reloadServers();
|
|
439418
438472
|
} catch (error40) {
|
|
439419
|
-
|
|
438473
|
+
debugLogger119.error(
|
|
439420
438474
|
`Error reconnecting to server '${selectedServer.name}':`,
|
|
439421
438475
|
error40
|
|
439422
438476
|
);
|
|
@@ -439451,7 +438505,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
439451
438505
|
}
|
|
439452
438506
|
await reloadServers();
|
|
439453
438507
|
} catch (error40) {
|
|
439454
|
-
|
|
438508
|
+
debugLogger119.error(
|
|
439455
438509
|
`Error enabling server '${selectedServer.name}':`,
|
|
439456
438510
|
error40
|
|
439457
438511
|
);
|
|
@@ -439470,7 +438524,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
439470
438524
|
const settings = loadSettings();
|
|
439471
438525
|
let targetScope = "user";
|
|
439472
438526
|
if (server.source === "extension") {
|
|
439473
|
-
|
|
438527
|
+
debugLogger119.warn(
|
|
439474
438528
|
`Cannot disable extension MCP server '${server.name}'`
|
|
439475
438529
|
);
|
|
439476
438530
|
setIsLoading(false);
|
|
@@ -439496,7 +438550,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
439496
438550
|
}
|
|
439497
438551
|
await reloadServers();
|
|
439498
438552
|
} catch (error40) {
|
|
439499
|
-
|
|
438553
|
+
debugLogger119.error(
|
|
439500
438554
|
`Error disabling server '${selectedServer.name}':`,
|
|
439501
438555
|
error40
|
|
439502
438556
|
);
|
|
@@ -439531,7 +438585,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
439531
438585
|
await reloadServers();
|
|
439532
438586
|
handleNavigateBack();
|
|
439533
438587
|
} catch (error40) {
|
|
439534
|
-
|
|
438588
|
+
debugLogger119.error(
|
|
439535
438589
|
`Error disabling server '${selectedServer.name}':`,
|
|
439536
438590
|
error40
|
|
439537
438591
|
);
|
|
@@ -439607,6 +438661,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
439607
438661
|
onReconnect: handleReconnect,
|
|
439608
438662
|
onDisable: handleDisable2,
|
|
439609
438663
|
onAuthenticate: handleAuthenticate,
|
|
438664
|
+
onClearAuth: handleClearAuth,
|
|
439610
438665
|
onBack: handleNavigateBack
|
|
439611
438666
|
}
|
|
439612
438667
|
);
|
|
@@ -439636,10 +438691,10 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
439636
438691
|
AuthenticateStep,
|
|
439637
438692
|
{
|
|
439638
438693
|
server: selectedServer,
|
|
439639
|
-
|
|
438694
|
+
onBack: () => {
|
|
438695
|
+
handleNavigateBack();
|
|
439640
438696
|
void reloadServers();
|
|
439641
|
-
}
|
|
439642
|
-
onBack: handleNavigateBack
|
|
438697
|
+
}
|
|
439643
438698
|
}
|
|
439644
438699
|
);
|
|
439645
438700
|
default:
|
|
@@ -439656,6 +438711,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
|
|
|
439656
438711
|
handleReconnect,
|
|
439657
438712
|
handleDisable2,
|
|
439658
438713
|
handleAuthenticate,
|
|
438714
|
+
handleClearAuth,
|
|
439659
438715
|
handleNavigateBack,
|
|
439660
438716
|
handleSelectTool,
|
|
439661
438717
|
handleSelectDisableScope,
|
|
@@ -440653,7 +439709,7 @@ var import_react100 = __toESM(require_react(), 1);
|
|
|
440653
439709
|
import * as fs101 from "node:fs/promises";
|
|
440654
439710
|
import * as path110 from "node:path";
|
|
440655
439711
|
var MAX_HISTORY_LENGTH2 = 100;
|
|
440656
|
-
var
|
|
439712
|
+
var debugLogger120 = createDebugLogger("SHELL_HISTORY");
|
|
440657
439713
|
async function getHistoryFilePath(projectRoot, configStorage) {
|
|
440658
439714
|
const storage = configStorage ?? new Storage(projectRoot);
|
|
440659
439715
|
return storage.getHistoryFilePath();
|
|
@@ -440679,7 +439735,7 @@ async function readHistoryFile(filePath) {
|
|
|
440679
439735
|
return result;
|
|
440680
439736
|
} catch (err) {
|
|
440681
439737
|
if (isNodeError(err) && err.code === "ENOENT") return [];
|
|
440682
|
-
|
|
439738
|
+
debugLogger120.error("Error reading history:", err);
|
|
440683
439739
|
return [];
|
|
440684
439740
|
}
|
|
440685
439741
|
}
|
|
@@ -440689,7 +439745,7 @@ async function writeHistoryFile(filePath, history) {
|
|
|
440689
439745
|
await fs101.mkdir(path110.dirname(filePath), { recursive: true });
|
|
440690
439746
|
await fs101.writeFile(filePath, history.join("\n"));
|
|
440691
439747
|
} catch (error40) {
|
|
440692
|
-
|
|
439748
|
+
debugLogger120.error("Error writing shell history:", error40);
|
|
440693
439749
|
}
|
|
440694
439750
|
}
|
|
440695
439751
|
__name(writeHistoryFile, "writeHistoryFile");
|
|
@@ -441107,12 +440163,12 @@ __name(useAtCompletion, "useAtCompletion");
|
|
|
441107
440163
|
init_esbuild_shims();
|
|
441108
440164
|
var import_react104 = __toESM(require_react(), 1);
|
|
441109
440165
|
init_fzf_es();
|
|
441110
|
-
var
|
|
440166
|
+
var debugLogger121 = createDebugLogger("SLASH_COMPLETION");
|
|
441111
440167
|
function logErrorSafely(error40, context2) {
|
|
441112
440168
|
if (error40 instanceof Error) {
|
|
441113
|
-
|
|
440169
|
+
debugLogger121.error(`[${context2}]`, error40);
|
|
441114
440170
|
} else {
|
|
441115
|
-
|
|
440171
|
+
debugLogger121.error(`[${context2}] Non-error thrown:`, error40);
|
|
441116
440172
|
}
|
|
441117
440173
|
}
|
|
441118
440174
|
__name(logErrorSafely, "logErrorSafely");
|
|
@@ -441207,7 +440263,7 @@ function useCommandSuggestions(parserResult, commandContext, getFzfForCommands,
|
|
|
441207
440263
|
const fetchAndSetSuggestions = /* @__PURE__ */ __name(async () => {
|
|
441208
440264
|
if (signal.aborted) return;
|
|
441209
440265
|
if (!leafCommand?.completion) {
|
|
441210
|
-
|
|
440266
|
+
debugLogger121.warn(
|
|
441211
440267
|
"Attempted argument completion without completion function"
|
|
441212
440268
|
);
|
|
441213
440269
|
return;
|
|
@@ -441812,7 +440868,7 @@ var FeedbackDialog = /* @__PURE__ */ __name(() => {
|
|
|
441812
440868
|
|
|
441813
440869
|
// packages/cli/src/ui/components/InputPrompt.tsx
|
|
441814
440870
|
var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
|
|
441815
|
-
var
|
|
440871
|
+
var debugLogger122 = createDebugLogger("INPUT_PROMPT");
|
|
441816
440872
|
var calculatePromptWidths = /* @__PURE__ */ __name((terminalWidth) => {
|
|
441817
440873
|
const widthFraction = 0.9;
|
|
441818
440874
|
const FRAME_PADDING_AND_BORDER = 4;
|
|
@@ -442067,7 +441123,7 @@ ${finalValue.trim()}`;
|
|
|
442067
441123
|
}
|
|
442068
441124
|
}
|
|
442069
441125
|
} catch (error40) {
|
|
442070
|
-
|
|
441126
|
+
debugLogger122.error("Error handling clipboard image:", error40);
|
|
442071
441127
|
}
|
|
442072
441128
|
}, []);
|
|
442073
441129
|
const handleAttachmentDelete = (0, import_react107.useCallback)((index) => {
|
|
@@ -443471,7 +442527,7 @@ var FEEDBACK_SHOW_PROBABILITY = 0.25;
|
|
|
443471
442527
|
var MIN_TOOL_CALLS = 10;
|
|
443472
442528
|
var MIN_USER_MESSAGES = 5;
|
|
443473
442529
|
var FEEDBACK_COOLDOWN_HOURS = 24;
|
|
443474
|
-
var
|
|
442530
|
+
var debugLogger123 = createDebugLogger("FEEDBACK_DIALOG");
|
|
443475
442531
|
var lastMessageIsAIResponse = /* @__PURE__ */ __name((history) => history.length > 0 && history[history.length - 1].type === "gemini" /* GEMINI */, "lastMessageIsAIResponse");
|
|
443476
442532
|
var getFeedbackLastShownTimestampFromFile = /* @__PURE__ */ __name(() => {
|
|
443477
442533
|
try {
|
|
@@ -443482,7 +442538,7 @@ var getFeedbackLastShownTimestampFromFile = /* @__PURE__ */ __name(() => {
|
|
|
443482
442538
|
}
|
|
443483
442539
|
} catch (error40) {
|
|
443484
442540
|
if (isNodeError(error40) && error40.code !== "ENOENT") {
|
|
443485
|
-
|
|
442541
|
+
debugLogger123.warn(
|
|
443486
442542
|
"Failed to read feedbackLastShownTimestamp from settings file:",
|
|
443487
442543
|
error40
|
|
443488
442544
|
);
|
|
@@ -444805,7 +443861,7 @@ var McpPromptLoader = class {
|
|
|
444805
443861
|
};
|
|
444806
443862
|
|
|
444807
443863
|
// packages/cli/src/ui/hooks/slashCommandProcessor.ts
|
|
444808
|
-
var
|
|
443864
|
+
var debugLogger124 = createDebugLogger("SLASH_COMMAND_PROCESSOR");
|
|
444809
443865
|
function serializeHistoryItemForRecording(item) {
|
|
444810
443866
|
const clone4 = { ...item };
|
|
444811
443867
|
if ("timestamp" in clone4 && clone4["timestamp"] instanceof Date) {
|
|
@@ -445303,7 +444359,7 @@ ${commandToExecute.subCommands.map((sc) => ` - ${sc.name}: ${sc.description ||
|
|
|
445303
444359
|
});
|
|
445304
444360
|
}
|
|
445305
444361
|
} catch (recordError) {
|
|
445306
|
-
|
|
444362
|
+
debugLogger124.error(
|
|
445307
444363
|
"[slashCommand] Failed to record slash command:",
|
|
445308
444364
|
recordError
|
|
445309
444365
|
);
|
|
@@ -445390,7 +444446,7 @@ import os36 from "node:os";
|
|
|
445390
444446
|
import fs103 from "node:fs";
|
|
445391
444447
|
var OUTPUT_UPDATE_INTERVAL_MS2 = 1e3;
|
|
445392
444448
|
var MAX_OUTPUT_LENGTH2 = 1e4;
|
|
445393
|
-
var
|
|
444449
|
+
var debugLogger125 = createDebugLogger("SHELL_COMMAND_PROCESSOR");
|
|
445394
444450
|
function addShellCommandToGeminiHistory(geminiClient, rawQuery, resultText) {
|
|
445395
444451
|
const modelContent = resultText.length > MAX_OUTPUT_LENGTH2 ? resultText.substring(0, MAX_OUTPUT_LENGTH2) + "\n... (truncated)" : resultText;
|
|
445396
444452
|
geminiClient.addHistory({
|
|
@@ -445532,7 +444588,7 @@ var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPend
|
|
|
445532
444588
|
config2.getShouldUseNodePtyShell(),
|
|
445533
444589
|
shellExecutionConfig
|
|
445534
444590
|
);
|
|
445535
|
-
|
|
444591
|
+
debugLogger125.debug(terminalHeight, terminalWidth);
|
|
445536
444592
|
executionPid = pid;
|
|
445537
444593
|
if (pid) {
|
|
445538
444594
|
setActiveShellPtyId(pid);
|
|
@@ -445743,7 +444799,7 @@ var useStateAndRef = /* @__PURE__ */ __name((initialValue) => {
|
|
|
445743
444799
|
// packages/cli/src/ui/hooks/useReactToolScheduler.ts
|
|
445744
444800
|
init_esbuild_shims();
|
|
445745
444801
|
var import_react124 = __toESM(require_react(), 1);
|
|
445746
|
-
var
|
|
444802
|
+
var debugLogger126 = createDebugLogger("REACT_TOOL_SCHEDULER");
|
|
445747
444803
|
function useReactToolScheduler(onComplete, config2, getPreferredEditor, onEditorClose) {
|
|
445748
444804
|
const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react124.useState)([]);
|
|
445749
444805
|
const outputUpdateHandler = (0, import_react124.useCallback)(
|
|
@@ -445849,7 +444905,7 @@ function mapCoreStatusToDisplayStatus(coreStatus) {
|
|
|
445849
444905
|
return "Pending" /* Pending */;
|
|
445850
444906
|
default: {
|
|
445851
444907
|
const exhaustiveCheck = coreStatus;
|
|
445852
|
-
|
|
444908
|
+
debugLogger126.warn(`Unknown core status encountered: ${exhaustiveCheck}`);
|
|
445853
444909
|
return "Error" /* Error */;
|
|
445854
444910
|
}
|
|
445855
444911
|
}
|
|
@@ -445948,7 +445004,7 @@ __name(mapToDisplay, "mapToDisplay");
|
|
|
445948
445004
|
// packages/cli/src/ui/hooks/useGeminiStream.ts
|
|
445949
445005
|
import { promises as fs104 } from "node:fs";
|
|
445950
445006
|
import path114 from "node:path";
|
|
445951
|
-
var
|
|
445007
|
+
var debugLogger127 = createDebugLogger("GEMINI_STREAM");
|
|
445952
445008
|
function checkImageFormatsSupport(parts) {
|
|
445953
445009
|
const unsupportedMimeTypes = [];
|
|
445954
445010
|
let hasImages = false;
|
|
@@ -446657,7 +445713,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
446657
445713
|
}
|
|
446658
445714
|
if (event.retryInfo) {
|
|
446659
445715
|
startRetryCountdown(event.retryInfo);
|
|
446660
|
-
} else
|
|
445716
|
+
} else {
|
|
446661
445717
|
clearRetryCountdown();
|
|
446662
445718
|
}
|
|
446663
445719
|
break;
|
|
@@ -446694,8 +445750,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
446694
445750
|
clearRetryCountdown,
|
|
446695
445751
|
setThought,
|
|
446696
445752
|
pendingHistoryItemRef,
|
|
446697
|
-
setPendingHistoryItem
|
|
446698
|
-
pendingRetryCountdownItemRef
|
|
445753
|
+
setPendingHistoryItem
|
|
446699
445754
|
]
|
|
446700
445755
|
);
|
|
446701
445756
|
const submitQuery = (0, import_react125.useCallback)(
|
|
@@ -446846,22 +445901,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
446846
445901
|
);
|
|
446847
445902
|
return;
|
|
446848
445903
|
}
|
|
446849
|
-
const errorItem = pendingRetryErrorItemRef.current;
|
|
446850
|
-
if (errorItem) {
|
|
446851
|
-
addItem({ type: errorItem.type, text: errorItem.text }, Date.now());
|
|
446852
|
-
}
|
|
446853
445904
|
clearRetryCountdown();
|
|
446854
445905
|
await submitQuery(lastPrompt, {
|
|
446855
445906
|
isContinuation: false,
|
|
446856
445907
|
skipPreparation: true
|
|
446857
445908
|
});
|
|
446858
|
-
}, [
|
|
446859
|
-
streamingState,
|
|
446860
|
-
addItem,
|
|
446861
|
-
clearRetryCountdown,
|
|
446862
|
-
submitQuery,
|
|
446863
|
-
pendingRetryErrorItemRef
|
|
446864
|
-
]);
|
|
445909
|
+
}, [streamingState, addItem, clearRetryCountdown, submitQuery]);
|
|
446865
445910
|
const handleApprovalModeChange = (0, import_react125.useCallback)(
|
|
446866
445911
|
async (newApprovalMode) => {
|
|
446867
445912
|
if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
|
|
@@ -446880,7 +445925,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
|
|
|
446880
445925
|
ToolConfirmationOutcome.ProceedOnce
|
|
446881
445926
|
);
|
|
446882
445927
|
} catch (error40) {
|
|
446883
|
-
|
|
445928
|
+
debugLogger127.error(
|
|
446884
445929
|
`Failed to auto-approve tool call ${call.request.callId}:`,
|
|
446885
445930
|
error40
|
|
446886
445931
|
);
|
|
@@ -447114,7 +446159,7 @@ var import_react126 = __toESM(require_react(), 1);
|
|
|
447114
446159
|
var DIGIT_MULTIPLIER = 10;
|
|
447115
446160
|
var DEFAULT_COUNT = 1;
|
|
447116
446161
|
var DIGIT_1_TO_9 = /^[1-9]$/;
|
|
447117
|
-
var
|
|
446162
|
+
var debugLogger128 = createDebugLogger("VIM_MODE");
|
|
447118
446163
|
var CMD_TYPES = {
|
|
447119
446164
|
DELETE_WORD_FORWARD: "dw",
|
|
447120
446165
|
DELETE_WORD_BACKWARD: "db",
|
|
@@ -447364,7 +446409,7 @@ function useVim(buffer, onSubmit) {
|
|
|
447364
446409
|
try {
|
|
447365
446410
|
normalizedKey = normalizeKey(key);
|
|
447366
446411
|
} catch (error40) {
|
|
447367
|
-
|
|
446412
|
+
debugLogger128.warn("Malformed key input in vim mode:", key, error40);
|
|
447368
446413
|
return false;
|
|
447369
446414
|
}
|
|
447370
446415
|
if (state.mode === "INSERT") {
|
|
@@ -450752,7 +449797,7 @@ __name(updateNotifier, "updateNotifier");
|
|
|
450752
449797
|
|
|
450753
449798
|
// packages/cli/src/ui/utils/updateCheck.ts
|
|
450754
449799
|
var import_semver3 = __toESM(require_semver3(), 1);
|
|
450755
|
-
var
|
|
449800
|
+
var debugLogger129 = createDebugLogger("UPDATE_CHECK");
|
|
450756
449801
|
function getBestAvailableUpdate(nightly, stable) {
|
|
450757
449802
|
if (!nightly) return stable || null;
|
|
450758
449803
|
if (!stable) return nightly || null;
|
|
@@ -450812,7 +449857,7 @@ async function checkForUpdates() {
|
|
|
450812
449857
|
}
|
|
450813
449858
|
return null;
|
|
450814
449859
|
} catch (e4) {
|
|
450815
|
-
|
|
449860
|
+
debugLogger129.warn("Failed to check for updates: " + e4);
|
|
450816
449861
|
return null;
|
|
450817
449862
|
}
|
|
450818
449863
|
}
|
|
@@ -450826,7 +449871,7 @@ init_esbuild_shims();
|
|
|
450826
449871
|
import * as fs110 from "node:fs";
|
|
450827
449872
|
import * as path124 from "node:path";
|
|
450828
449873
|
import * as childProcess2 from "node:child_process";
|
|
450829
|
-
var
|
|
449874
|
+
var debugLogger130 = createDebugLogger("INSTALLATION_INFO");
|
|
450830
449875
|
function getInstallationInfo(projectRoot, isAutoUpdateEnabled) {
|
|
450831
449876
|
const cliPath = process.argv[1];
|
|
450832
449877
|
if (!cliPath) {
|
|
@@ -450928,7 +449973,7 @@ function getInstallationInfo(projectRoot, isAutoUpdateEnabled) {
|
|
|
450928
449973
|
updateMessage: isAutoUpdateEnabled ? "Installed with npm. Attempting to automatically update now..." : `Please run ${updateCommand2} to update`
|
|
450929
449974
|
};
|
|
450930
449975
|
} catch (error40) {
|
|
450931
|
-
|
|
449976
|
+
debugLogger130.error("Failed to detect installation info:", error40);
|
|
450932
449977
|
return { packageManager: "unknown" /* UNKNOWN */, isGlobal: false };
|
|
450933
449978
|
}
|
|
450934
449979
|
}
|
|
@@ -451660,7 +450705,7 @@ var import_react144 = __toESM(require_react(), 1);
|
|
|
451660
450705
|
init_esbuild_shims();
|
|
451661
450706
|
import process48 from "node:process";
|
|
451662
450707
|
var TERMINAL_BELL = "\x07";
|
|
451663
|
-
var
|
|
450708
|
+
var debugLogger131 = createDebugLogger("ATTENTION_NOTIFICATION");
|
|
451664
450709
|
function notifyTerminalAttention(_reason, options2 = {}) {
|
|
451665
450710
|
if (options2.enabled === false) {
|
|
451666
450711
|
return false;
|
|
@@ -451673,7 +450718,7 @@ function notifyTerminalAttention(_reason, options2 = {}) {
|
|
|
451673
450718
|
stream2.write(TERMINAL_BELL);
|
|
451674
450719
|
return true;
|
|
451675
450720
|
} catch (error40) {
|
|
451676
|
-
|
|
450721
|
+
debugLogger131.warn("Failed to send terminal bell:", error40);
|
|
451677
450722
|
return false;
|
|
451678
450723
|
}
|
|
451679
450724
|
}
|
|
@@ -451722,7 +450767,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
451722
450767
|
// packages/cli/src/ui/AppContainer.tsx
|
|
451723
450768
|
var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
|
|
451724
450769
|
var CTRL_EXIT_PROMPT_DURATION_MS = 1e3;
|
|
451725
|
-
var
|
|
450770
|
+
var debugLogger132 = createDebugLogger("APP_CONTAINER");
|
|
451726
450771
|
function isToolExecuting(pendingHistoryItems) {
|
|
451727
450772
|
return pendingHistoryItems.some((item) => {
|
|
451728
450773
|
if (item && item.type === "tool_group") {
|
|
@@ -452108,7 +451153,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
452108
451153
|
},
|
|
452109
451154
|
Date.now()
|
|
452110
451155
|
);
|
|
452111
|
-
|
|
451156
|
+
debugLogger132.debug(
|
|
452112
451157
|
`[DEBUG] Refreshed memory content in config: ${memoryContent.substring(
|
|
452113
451158
|
0,
|
|
452114
451159
|
200
|
|
@@ -452123,7 +451168,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
452123
451168
|
},
|
|
452124
451169
|
Date.now()
|
|
452125
451170
|
);
|
|
452126
|
-
|
|
451171
|
+
debugLogger132.error("Error refreshing memory:", error40);
|
|
452127
451172
|
}
|
|
452128
451173
|
}, [config2, historyManager, settings.merged]);
|
|
452129
451174
|
const cancelHandlerRef = (0, import_react145.useRef)(() => {
|
|
@@ -452490,7 +451535,7 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
452490
451535
|
const handleGlobalKeypress = (0, import_react145.useCallback)(
|
|
452491
451536
|
(key) => {
|
|
452492
451537
|
if (settings.merged.general?.debugKeystrokeLogging) {
|
|
452493
|
-
|
|
451538
|
+
debugLogger132.debug("[DEBUG] Keystroke:", JSON.stringify(key));
|
|
452494
451539
|
}
|
|
452495
451540
|
if (keyMatchers["quit" /* QUIT */](key)) {
|
|
452496
451541
|
if (isAuthenticating) {
|
|
@@ -455519,6 +454564,24 @@ __name(buildAuthMethods, "buildAuthMethods");
|
|
|
455519
454564
|
// packages/cli/src/acp-integration/service/filesystem.ts
|
|
455520
454565
|
init_esbuild_shims();
|
|
455521
454566
|
var RESOURCE_NOT_FOUND_CODE = -32002;
|
|
454567
|
+
function getErrorCode3(error40) {
|
|
454568
|
+
if (error40 instanceof RequestError) {
|
|
454569
|
+
return error40.code;
|
|
454570
|
+
}
|
|
454571
|
+
if (typeof error40 === "object" && error40 !== null && "code" in error40) {
|
|
454572
|
+
return error40.code;
|
|
454573
|
+
}
|
|
454574
|
+
return void 0;
|
|
454575
|
+
}
|
|
454576
|
+
__name(getErrorCode3, "getErrorCode");
|
|
454577
|
+
function createEnoentError(filePath) {
|
|
454578
|
+
const err = new Error(`File not found: ${filePath}`);
|
|
454579
|
+
err.code = "ENOENT";
|
|
454580
|
+
err.errno = -2;
|
|
454581
|
+
err.path = filePath;
|
|
454582
|
+
return err;
|
|
454583
|
+
}
|
|
454584
|
+
__name(createEnoentError, "createEnoentError");
|
|
455522
454585
|
var AcpFileSystemService = class {
|
|
455523
454586
|
constructor(connection, sessionId, capabilities, fallback) {
|
|
455524
454587
|
this.connection = connection;
|
|
@@ -455540,22 +454603,38 @@ var AcpFileSystemService = class {
|
|
|
455540
454603
|
sessionId: this.sessionId
|
|
455541
454604
|
});
|
|
455542
454605
|
} catch (error40) {
|
|
455543
|
-
const errorCode = error40
|
|
454606
|
+
const errorCode = getErrorCode3(error40);
|
|
455544
454607
|
if (errorCode === RESOURCE_NOT_FOUND_CODE) {
|
|
455545
|
-
|
|
455546
|
-
`File not found: ${filePath}`
|
|
455547
|
-
);
|
|
455548
|
-
err.code = "ENOENT";
|
|
455549
|
-
err.errno = -2;
|
|
455550
|
-
err.path = filePath;
|
|
455551
|
-
throw err;
|
|
454608
|
+
throw createEnoentError(filePath);
|
|
455552
454609
|
}
|
|
455553
454610
|
throw error40;
|
|
455554
454611
|
}
|
|
455555
454612
|
return response.content;
|
|
455556
454613
|
}
|
|
455557
454614
|
async readTextFileWithInfo(filePath) {
|
|
455558
|
-
|
|
454615
|
+
if (!this.capabilities.readTextFile) {
|
|
454616
|
+
return this.fallback.readTextFileWithInfo(filePath);
|
|
454617
|
+
}
|
|
454618
|
+
let response;
|
|
454619
|
+
try {
|
|
454620
|
+
response = await this.connection.readTextFile({
|
|
454621
|
+
path: filePath,
|
|
454622
|
+
sessionId: this.sessionId
|
|
454623
|
+
});
|
|
454624
|
+
} catch (error40) {
|
|
454625
|
+
const errorCode = getErrorCode3(error40);
|
|
454626
|
+
if (errorCode === RESOURCE_NOT_FOUND_CODE) {
|
|
454627
|
+
throw createEnoentError(filePath);
|
|
454628
|
+
}
|
|
454629
|
+
throw error40;
|
|
454630
|
+
}
|
|
454631
|
+
const hasUtf8Bom = response.content.length > 0 && response.content.codePointAt(0) === 65279;
|
|
454632
|
+
return {
|
|
454633
|
+
content: hasUtf8Bom ? response.content.slice(1) : response.content,
|
|
454634
|
+
// ACP protocol currently returns text only and does not expose source encoding.
|
|
454635
|
+
encoding: "utf-8",
|
|
454636
|
+
bom: hasUtf8Bom
|
|
454637
|
+
};
|
|
455559
454638
|
}
|
|
455560
454639
|
async writeTextFile(filePath, content, options2) {
|
|
455561
454640
|
if (!this.capabilities.writeTextFile) {
|
|
@@ -455621,7 +454700,7 @@ __name(parseAcpModelOption, "parseAcpModelOption");
|
|
|
455621
454700
|
// packages/cli/src/acp-integration/session/SubAgentTracker.ts
|
|
455622
454701
|
init_esbuild_shims();
|
|
455623
454702
|
init_zod();
|
|
455624
|
-
var
|
|
454703
|
+
var debugLogger133 = createDebugLogger("ACP_SUBAGENT_TRACKER");
|
|
455625
454704
|
var basicPermissionOptions = [
|
|
455626
454705
|
{
|
|
455627
454706
|
optionId: ToolConfirmationOutcome.ProceedOnce,
|
|
@@ -455701,7 +454780,7 @@ var SubAgentTracker = class {
|
|
|
455701
454780
|
try {
|
|
455702
454781
|
invocation = tool.build(event.args);
|
|
455703
454782
|
} catch (e4) {
|
|
455704
|
-
|
|
454783
|
+
debugLogger133.warn(`Failed to build subagent tool ${event.name}:`, e4);
|
|
455705
454784
|
}
|
|
455706
454785
|
}
|
|
455707
454786
|
this.toolStates.set(event.callId, {
|
|
@@ -455779,7 +454858,7 @@ var SubAgentTracker = class {
|
|
|
455779
454858
|
const outcome = output.outcome.outcome === "cancelled" ? ToolConfirmationOutcome.Cancel : external_exports.nativeEnum(ToolConfirmationOutcome).parse(output.outcome.optionId);
|
|
455780
454859
|
await event.respond(outcome);
|
|
455781
454860
|
} catch (error40) {
|
|
455782
|
-
|
|
454861
|
+
debugLogger133.error(
|
|
455783
454862
|
`Permission request failed for subagent tool ${event.name}:`,
|
|
455784
454863
|
error40
|
|
455785
454864
|
);
|
|
@@ -455880,7 +454959,7 @@ var SubAgentTracker = class {
|
|
|
455880
454959
|
};
|
|
455881
454960
|
|
|
455882
454961
|
// packages/cli/src/acp-integration/session/Session.ts
|
|
455883
|
-
var
|
|
454962
|
+
var debugLogger134 = createDebugLogger("SESSION");
|
|
455884
454963
|
var Session3 = class {
|
|
455885
454964
|
constructor(id, chat, config2, client, settings) {
|
|
455886
454965
|
this.chat = chat;
|
|
@@ -456060,7 +455139,7 @@ var Session3 = class {
|
|
|
456060
455139
|
};
|
|
456061
455140
|
await this.sendUpdate(update2);
|
|
456062
455141
|
} catch (error40) {
|
|
456063
|
-
|
|
455142
|
+
debugLogger134.error("Error sending available commands update:", error40);
|
|
456064
455143
|
}
|
|
456065
455144
|
}
|
|
456066
455145
|
/**
|
|
@@ -456504,7 +455583,7 @@ ${contextPart.text}`
|
|
|
456504
455583
|
}
|
|
456505
455584
|
debug(msg) {
|
|
456506
455585
|
if (this.config.getDebugMode()) {
|
|
456507
|
-
|
|
455586
|
+
debugLogger134.warn(msg);
|
|
456508
455587
|
}
|
|
456509
455588
|
}
|
|
456510
455589
|
};
|
|
@@ -456603,7 +455682,7 @@ function toPermissionOptions(confirmation) {
|
|
|
456603
455682
|
__name(toPermissionOptions, "toPermissionOptions");
|
|
456604
455683
|
|
|
456605
455684
|
// packages/cli/src/acp-integration/acpAgent.ts
|
|
456606
|
-
var
|
|
455685
|
+
var debugLogger135 = createDebugLogger("ACP_AGENT");
|
|
456607
455686
|
async function runAcpAgent(config2, settings, argv) {
|
|
456608
455687
|
const stdout = Writable2.toWeb(process.stdout);
|
|
456609
455688
|
const stdin = Readable5.toWeb(process.stdin);
|
|
@@ -456640,7 +455719,7 @@ var QwenAgent = class {
|
|
|
456640
455719
|
async initialize(args) {
|
|
456641
455720
|
this.clientCapabilities = args.clientCapabilities;
|
|
456642
455721
|
const authMethods = buildAuthMethods();
|
|
456643
|
-
const version2 = "0.12.
|
|
455722
|
+
const version2 = "0.12.2-nightly.20260313.46d57afb";
|
|
456644
455723
|
return {
|
|
456645
455724
|
protocolVersion: PROTOCOL_VERSION,
|
|
456646
455725
|
agentInfo: {
|
|
@@ -456867,7 +455946,7 @@ var QwenAgent = class {
|
|
|
456867
455946
|
try {
|
|
456868
455947
|
await config2.refreshAuth(selectedType, true);
|
|
456869
455948
|
} catch (e4) {
|
|
456870
|
-
|
|
455949
|
+
debugLogger135.error(`Authentication failed: ${e4}`);
|
|
456871
455950
|
throw RequestError.authRequired(
|
|
456872
455951
|
{
|
|
456873
455952
|
authMethods: this.pickAuthMethodsForAuthRequired(selectedType, e4)
|
|
@@ -457020,7 +456099,7 @@ var QwenAgent = class {
|
|
|
457020
456099
|
|
|
457021
456100
|
// packages/cli/src/gemini.tsx
|
|
457022
456101
|
var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
|
|
457023
|
-
var
|
|
456102
|
+
var debugLogger136 = createDebugLogger("STARTUP");
|
|
457024
456103
|
function validateDnsResolutionOrder(order) {
|
|
457025
456104
|
const defaultValue = "ipv4first";
|
|
457026
456105
|
if (order === void 0) {
|
|
@@ -457116,7 +456195,7 @@ async function startInteractiveUI(config2, settings, startupWarnings, workspaceR
|
|
|
457116
456195
|
checkForUpdates().then((info) => {
|
|
457117
456196
|
handleAutoUpdate(info, settings, config2.getProjectRoot());
|
|
457118
456197
|
}).catch((err) => {
|
|
457119
|
-
|
|
456198
|
+
debugLogger136.warn(`Update check failed: ${err}`);
|
|
457120
456199
|
});
|
|
457121
456200
|
}
|
|
457122
456201
|
registerCleanup(() => instance.unmount());
|
|
@@ -457309,7 +456388,7 @@ ${input}`;
|
|
|
457309
456388
|
auth_type: config2.getContentGeneratorConfig()?.authType,
|
|
457310
456389
|
prompt_length: input.length
|
|
457311
456390
|
});
|
|
457312
|
-
|
|
456391
|
+
debugLogger136.debug(`Session ID: ${config2.getSessionId()}`);
|
|
457313
456392
|
await runNonInteractive(nonInteractiveConfig, settings, input, prompt_id);
|
|
457314
456393
|
await runExitCleanup();
|
|
457315
456394
|
process.exit(0);
|