snow-ai 0.4.23 → 0.4.25
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/bundle/cli.mjs +111 -40
- package/package.json +1 -1
- package/readme.md +22 -0
- package/scripts/postinstall.cjs +28 -0
package/bundle/cli.mjs
CHANGED
|
@@ -2505,12 +2505,12 @@ var init_base = __esm({
|
|
|
2505
2505
|
return false;
|
|
2506
2506
|
}
|
|
2507
2507
|
const parts = os.release().split(".");
|
|
2508
|
-
const
|
|
2508
|
+
const major2 = Number(parts[0]);
|
|
2509
2509
|
const build2 = Number(parts[2] ?? 0);
|
|
2510
|
-
if (
|
|
2510
|
+
if (major2 < 10) {
|
|
2511
2511
|
return true;
|
|
2512
2512
|
}
|
|
2513
|
-
if (
|
|
2513
|
+
if (major2 === 10 && build2 < 10586) {
|
|
2514
2514
|
return true;
|
|
2515
2515
|
}
|
|
2516
2516
|
return false;
|
|
@@ -36198,8 +36198,8 @@ var init_lib = __esm({
|
|
|
36198
36198
|
minNodeVersion = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12;
|
|
36199
36199
|
nodeVersion = (_b13 = (_a14 = process === null || process === void 0 ? void 0 : process.versions) === null || _a14 === void 0 ? void 0 : _a14.node) !== null && _b13 !== void 0 ? _b13 : (_c5 = process === null || process === void 0 ? void 0 : process.version) === null || _c5 === void 0 ? void 0 : _c5.slice(1);
|
|
36200
36200
|
if (nodeVersion) {
|
|
36201
|
-
const
|
|
36202
|
-
if (
|
|
36201
|
+
const major2 = Number(nodeVersion.match(/^([^.]+)/)[1]);
|
|
36202
|
+
if (major2 < minNodeVersion) {
|
|
36203
36203
|
throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
|
|
36204
36204
|
}
|
|
36205
36205
|
}
|
|
@@ -46816,7 +46816,7 @@ var init_en = __esm({
|
|
|
46816
46816
|
statusCompressing: "Compressing...",
|
|
46817
46817
|
statusConnecting: "Connecting to IDE...",
|
|
46818
46818
|
statusConnected: "IDE Connected",
|
|
46819
|
-
statusConnectionFailed: "Connection Failed - Make sure Snow CLI plugin is installed and active in your IDE",
|
|
46819
|
+
statusConnectionFailed: "Connection Failed (this will not affect any usage) - Make sure Snow CLI plugin is installed and active in your IDE",
|
|
46820
46820
|
// Tool execution
|
|
46821
46821
|
toolCall: "Tool call",
|
|
46822
46822
|
toolThinking: "Thinking",
|
|
@@ -46892,7 +46892,7 @@ var init_en = __esm({
|
|
|
46892
46892
|
ideConnecting: "Connecting to IDE...",
|
|
46893
46893
|
ideConnected: "IDE Connected",
|
|
46894
46894
|
ideDisconnected: "IDE Disconnected",
|
|
46895
|
-
ideError: "Connection Failed - Make sure Snow CLI plugin is installed and active in your IDE",
|
|
46895
|
+
ideError: "Connection Failed (this will not affect any usage) - Make sure Snow CLI plugin is installed and active in your IDE",
|
|
46896
46896
|
ideActiveFile: "| {file}",
|
|
46897
46897
|
ideSelectedText: "| {count} chars selected",
|
|
46898
46898
|
// Input
|
|
@@ -47348,7 +47348,7 @@ var init_zh = __esm({
|
|
|
47348
47348
|
statusCompressing: "\u538B\u7F29\u4E2D...",
|
|
47349
47349
|
statusConnecting: "\u8FDE\u63A5\u5230 IDE...",
|
|
47350
47350
|
statusConnected: "IDE \u5DF2\u8FDE\u63A5",
|
|
47351
|
-
statusConnectionFailed: "\u8FDE\u63A5\u5931\u8D25 - \u8BF7\u786E\u4FDD\u5728\u4F60\u7684 IDE \u4E2D\u5B89\u88C5\u5E76\u6FC0\u6D3B\u4E86 Snow CLI \u63D2\u4EF6",
|
|
47351
|
+
statusConnectionFailed: "\u8FDE\u63A5\u5931\u8D25(\u8FD9\u4E0D\u4F1A\u5F71\u54CD\u4EFB\u4F55\u4F7F\u7528) - \u8BF7\u786E\u4FDD\u5728\u4F60\u7684 IDE \u4E2D\u5B89\u88C5\u5E76\u6FC0\u6D3B\u4E86 Snow CLI \u63D2\u4EF6",
|
|
47352
47352
|
// Tool execution
|
|
47353
47353
|
toolCall: "\u5DE5\u5177\u8C03\u7528",
|
|
47354
47354
|
toolThinking: "\u601D\u8003",
|
|
@@ -47424,7 +47424,7 @@ var init_zh = __esm({
|
|
|
47424
47424
|
ideConnecting: "\u8FDE\u63A5\u5230 IDE...",
|
|
47425
47425
|
ideConnected: "IDE \u5DF2\u8FDE\u63A5",
|
|
47426
47426
|
ideDisconnected: "IDE \u5DF2\u65AD\u5F00",
|
|
47427
|
-
ideError: "\u8FDE\u63A5\u5931\u8D25 - \u8BF7\u786E\u4FDD\u5728\u4F60\u7684 IDE \u4E2D\u5B89\u88C5\u5E76\u6FC0\u6D3B\u4E86 Snow CLI \u63D2\u4EF6",
|
|
47427
|
+
ideError: "\u8FDE\u63A5\u5931\u8D25(\u8FD9\u4E0D\u4F1A\u5F71\u54CD\u4EFB\u4F55\u4F7F\u7528) - \u8BF7\u786E\u4FDD\u5728\u4F60\u7684 IDE \u4E2D\u5B89\u88C5\u5E76\u6FC0\u6D3B\u4E86 Snow CLI \u63D2\u4EF6",
|
|
47428
47428
|
ideActiveFile: "| {file}",
|
|
47429
47429
|
ideSelectedText: "| \u5DF2\u9009\u62E9 {count} \u4E2A\u5B57\u7B26",
|
|
47430
47430
|
// Input
|
|
@@ -47880,7 +47880,7 @@ var init_zh_TW = __esm({
|
|
|
47880
47880
|
statusCompressing: "\u58D3\u7E2E\u4E2D...",
|
|
47881
47881
|
statusConnecting: "\u9023\u7DDA\u5230 IDE...",
|
|
47882
47882
|
statusConnected: "IDE \u5DF2\u9023\u7DDA",
|
|
47883
|
-
statusConnectionFailed: "\u9023\u7DDA\u5931\u6557 - \u8ACB\u78BA\u4FDD\u5728\u4F60\u7684 IDE \u4E2D\u5B89\u88DD\u4E26\u555F\u7528\u4E86 Snow CLI \u5916\u639B",
|
|
47883
|
+
statusConnectionFailed: "\u9023\u7DDA\u5931\u6557\uFF08\u9019\u4E0D\u6703\u5F71\u97FF\u4EFB\u4F55\u4F7F\u7528\uFF09 - \u8ACB\u78BA\u4FDD\u5728\u4F60\u7684 IDE \u4E2D\u5B89\u88DD\u4E26\u555F\u7528\u4E86 Snow CLI \u5916\u639B",
|
|
47884
47884
|
// Tool execution
|
|
47885
47885
|
toolCall: "\u5DE5\u5177\u547C\u53EB",
|
|
47886
47886
|
toolThinking: "\u601D\u8003",
|
|
@@ -47956,7 +47956,7 @@ var init_zh_TW = __esm({
|
|
|
47956
47956
|
ideConnecting: "\u9023\u7DDA\u5230 IDE...",
|
|
47957
47957
|
ideConnected: "IDE \u5DF2\u9023\u7DDA",
|
|
47958
47958
|
ideDisconnected: "IDE \u5DF2\u65B7\u958B",
|
|
47959
|
-
ideError: "\u9023\u7DDA\u5931\u6557 - \u8ACB\u78BA\u4FDD\u5728\u4F60\u7684 IDE \u4E2D\u5B89\u88DD\u4E26\u555F\u7528\u4E86 Snow CLI \u5916\u639B",
|
|
47959
|
+
ideError: "\u9023\u7DDA\u5931\u6557\uFF08\u9019\u4E0D\u6703\u5F71\u97FF\u4EFB\u4F55\u4F7F\u7528\uFF09 - \u8ACB\u78BA\u4FDD\u5728\u4F60\u7684 IDE \u4E2D\u5B89\u88DD\u4E26\u555F\u7528\u4E86 Snow CLI \u5916\u639B",
|
|
47960
47960
|
ideActiveFile: "| {file}",
|
|
47961
47961
|
ideSelectedText: "| \u5DF2\u9078\u64C7 {count} \u500B\u5B57\u5143",
|
|
47962
47962
|
// Input
|
|
@@ -48412,7 +48412,7 @@ var init_ja = __esm({
|
|
|
48412
48412
|
statusCompressing: "\u5727\u7E2E\u4E2D...",
|
|
48413
48413
|
statusConnecting: "IDE\u306B\u63A5\u7D9A\u4E2D...",
|
|
48414
48414
|
statusConnected: "IDE\u63A5\u7D9A\u6E08\u307F",
|
|
48415
|
-
statusConnectionFailed: "\u63A5\u7D9A\u306B\u5931\u6557 - IDE\u306BSnow CLI\u30D7\u30E9\u30B0\u30A4\u30F3\u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
48415
|
+
statusConnectionFailed: "\u63A5\u7D9A\u306B\u5931\u6557\uFF08\u3053\u308C\u306F\u4F7F\u7528\u306B\u5F71\u97FF\u3057\u307E\u305B\u3093\uFF09 - IDE\u306BSnow CLI\u30D7\u30E9\u30B0\u30A4\u30F3\u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
48416
48416
|
// Tool execution
|
|
48417
48417
|
toolCall: "\u30C4\u30FC\u30EB\u547C\u3073\u51FA\u3057",
|
|
48418
48418
|
toolThinking: "\u601D\u8003",
|
|
@@ -48488,7 +48488,7 @@ var init_ja = __esm({
|
|
|
48488
48488
|
ideConnecting: "IDE\u306B\u63A5\u7D9A\u4E2D...",
|
|
48489
48489
|
ideConnected: "IDE\u63A5\u7D9A\u6E08\u307F",
|
|
48490
48490
|
ideDisconnected: "IDE\u5207\u65AD",
|
|
48491
|
-
ideError: "\u63A5\u7D9A\u306B\u5931\u6557 - IDE\u306BSnow CLI\u30D7\u30E9\u30B0\u30A4\u30F3\u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
48491
|
+
ideError: "\u63A5\u7D9A\u306B\u5931\u6557\uFF08\u3053\u308C\u306F\u4F7F\u7528\u306B\u5F71\u97FF\u3057\u307E\u305B\u3093\uFF09 - IDE\u306BSnow CLI\u30D7\u30E9\u30B0\u30A4\u30F3\u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
48492
48492
|
ideActiveFile: "| {file}",
|
|
48493
48493
|
ideSelectedText: "| {count}\u6587\u5B57\u9078\u629E\u6E08\u307F",
|
|
48494
48494
|
// Input
|
|
@@ -48944,7 +48944,7 @@ var init_ko = __esm({
|
|
|
48944
48944
|
statusCompressing: "\uC555\uCD95 \uC911...",
|
|
48945
48945
|
statusConnecting: "IDE\uC5D0 \uC5F0\uACB0 \uC911...",
|
|
48946
48946
|
statusConnected: "IDE \uC5F0\uACB0\uB428",
|
|
48947
|
-
statusConnectionFailed: "\uC5F0\uACB0 \uC2E4\uD328 - IDE\uC5D0 Snow CLI \uD50C\uB7EC\uADF8\uC778\uC774 \uC124\uCE58 \uBC0F \uD65C\uC131\uD654\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694",
|
|
48947
|
+
statusConnectionFailed: "\uC5F0\uACB0 \uC2E4\uD328 (\uC774\uAC83\uC740 \uC0AC\uC6A9\uC5D0 \uC601\uD5A5\uC744 \uBBF8\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4) - IDE\uC5D0 Snow CLI \uD50C\uB7EC\uADF8\uC778\uC774 \uC124\uCE58 \uBC0F \uD65C\uC131\uD654\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694",
|
|
48948
48948
|
// Tool execution
|
|
48949
48949
|
toolCall: "\uB3C4\uAD6C \uD638\uCD9C",
|
|
48950
48950
|
toolThinking: "\uC0DD\uAC01",
|
|
@@ -49020,7 +49020,7 @@ var init_ko = __esm({
|
|
|
49020
49020
|
ideConnecting: "IDE\uC5D0 \uC5F0\uACB0 \uC911...",
|
|
49021
49021
|
ideConnected: "IDE \uC5F0\uACB0\uB428",
|
|
49022
49022
|
ideDisconnected: "IDE \uC5F0\uACB0 \uB04A\uAE40",
|
|
49023
|
-
ideError: "\uC5F0\uACB0 \uC2E4\uD328 - IDE\uC5D0 Snow CLI \uD50C\uB7EC\uADF8\uC778\uC774 \uC124\uCE58 \uBC0F \uD65C\uC131\uD654\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694",
|
|
49023
|
+
ideError: "\uC5F0\uACB0 \uC2E4\uD328 (\uC774\uAC83\uC740 \uC0AC\uC6A9\uC5D0 \uC601\uD5A5\uC744 \uBBF8\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4) - IDE\uC5D0 Snow CLI \uD50C\uB7EC\uADF8\uC778\uC774 \uC124\uCE58 \uBC0F \uD65C\uC131\uD654\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694",
|
|
49024
49024
|
ideActiveFile: "| {file}",
|
|
49025
49025
|
ideSelectedText: "| {count}\uC790 \uC120\uD0DD\uB428",
|
|
49026
49026
|
// Input
|
|
@@ -49476,7 +49476,7 @@ var init_es = __esm({
|
|
|
49476
49476
|
statusCompressing: "Comprimiendo...",
|
|
49477
49477
|
statusConnecting: "Conectando al IDE...",
|
|
49478
49478
|
statusConnected: "IDE conectado",
|
|
49479
|
-
statusConnectionFailed: "Conexi\xF3n fallida - Por favor aseg\xFArate de que el plugin Snow CLI est\xE9 instalado y activado en tu IDE",
|
|
49479
|
+
statusConnectionFailed: "Conexi\xF3n fallida (esto no afectar\xE1 ning\xFAn uso) - Por favor aseg\xFArate de que el plugin Snow CLI est\xE9 instalado y activado en tu IDE",
|
|
49480
49480
|
// Tool execution
|
|
49481
49481
|
toolCall: "Llamada de Herramienta",
|
|
49482
49482
|
toolThinking: "Pensamiento",
|
|
@@ -49552,7 +49552,7 @@ var init_es = __esm({
|
|
|
49552
49552
|
ideConnecting: "Conectando al IDE...",
|
|
49553
49553
|
ideConnected: "IDE conectado",
|
|
49554
49554
|
ideDisconnected: "IDE desconectado",
|
|
49555
|
-
ideError: "Conexi\xF3n fallida - Por favor aseg\xFArate de que el plugin Snow CLI est\xE9 instalado y activado en tu IDE",
|
|
49555
|
+
ideError: "Conexi\xF3n fallida (esto no afectar\xE1 ning\xFAn uso) - Por favor aseg\xFArate de que el plugin Snow CLI est\xE9 instalado y activado en tu IDE",
|
|
49556
49556
|
ideActiveFile: "| {file}",
|
|
49557
49557
|
ideSelectedText: "| {count} caracteres seleccionados",
|
|
49558
49558
|
// Input
|
|
@@ -54623,6 +54623,14 @@ function updateProxyConfig(proxyConfig) {
|
|
|
54623
54623
|
const { openai, ...configWithoutOpenai } = fullConfig;
|
|
54624
54624
|
const configData = JSON.stringify(configWithoutOpenai, null, 2);
|
|
54625
54625
|
writeFileSync4(CONFIG_FILE, configData, "utf8");
|
|
54626
|
+
try {
|
|
54627
|
+
const { getActiveProfileName: getActiveProfileName2, saveProfile: saveProfile2 } = (init_configManager(), __toCommonJS(configManager_exports));
|
|
54628
|
+
const activeProfileName = getActiveProfileName2();
|
|
54629
|
+
if (activeProfileName) {
|
|
54630
|
+
saveProfile2(activeProfileName, fullConfig);
|
|
54631
|
+
}
|
|
54632
|
+
} catch {
|
|
54633
|
+
}
|
|
54626
54634
|
} catch (error) {
|
|
54627
54635
|
throw new Error(`Failed to save proxy configuration: ${error}`);
|
|
54628
54636
|
}
|
|
@@ -183598,7 +183606,7 @@ var require_prettier = __commonJS({
|
|
|
183598
183606
|
gte: require_gte2()
|
|
183599
183607
|
};
|
|
183600
183608
|
var arrayify = require_arrayify();
|
|
183601
|
-
var
|
|
183609
|
+
var currentVersion2 = require_package().version;
|
|
183602
183610
|
var coreOptions = require_core_options().options;
|
|
183603
183611
|
function getSupportInfo2({
|
|
183604
183612
|
plugins: plugins2 = [],
|
|
@@ -183606,7 +183614,7 @@ var require_prettier = __commonJS({
|
|
|
183606
183614
|
showDeprecated = false,
|
|
183607
183615
|
showInternal = false
|
|
183608
183616
|
} = {}) {
|
|
183609
|
-
const version22 =
|
|
183617
|
+
const version22 = currentVersion2.split("-", 1)[0];
|
|
183610
183618
|
const languages = plugins2.flatMap((plugin) => plugin.languages || []).filter(filterSince);
|
|
183611
183619
|
const options2 = arrayify(Object.assign({}, ...plugins2.map(({
|
|
183612
183620
|
options: options22
|
|
@@ -219187,8 +219195,14 @@ var init_vscodeConnection = __esm({
|
|
|
219187
219195
|
}
|
|
219188
219196
|
if (this.client) {
|
|
219189
219197
|
try {
|
|
219190
|
-
this.client.
|
|
219191
|
-
|
|
219198
|
+
this.client.on("error", () => {
|
|
219199
|
+
});
|
|
219200
|
+
this.client.removeAllListeners("open");
|
|
219201
|
+
this.client.removeAllListeners("message");
|
|
219202
|
+
this.client.removeAllListeners("close");
|
|
219203
|
+
if (this.client.readyState !== import_websocket.default.CLOSED && this.client.readyState !== import_websocket.default.CLOSING) {
|
|
219204
|
+
this.client.close();
|
|
219205
|
+
}
|
|
219192
219206
|
} catch (error) {
|
|
219193
219207
|
}
|
|
219194
219208
|
this.client = null;
|
|
@@ -361145,8 +361159,8 @@ var require_major = __commonJS({
|
|
|
361145
361159
|
"node_modules/semver/functions/major.js"(exports2, module2) {
|
|
361146
361160
|
"use strict";
|
|
361147
361161
|
var SemVer = require_semver();
|
|
361148
|
-
var
|
|
361149
|
-
module2.exports =
|
|
361162
|
+
var major2 = (a, loose) => new SemVer(a, loose).major;
|
|
361163
|
+
module2.exports = major2;
|
|
361150
361164
|
}
|
|
361151
361165
|
});
|
|
361152
361166
|
|
|
@@ -361392,12 +361406,12 @@ var require_coerce = __commonJS({
|
|
|
361392
361406
|
if (match === null) {
|
|
361393
361407
|
return null;
|
|
361394
361408
|
}
|
|
361395
|
-
const
|
|
361409
|
+
const major2 = match[2];
|
|
361396
361410
|
const minor = match[3] || "0";
|
|
361397
361411
|
const patch = match[4] || "0";
|
|
361398
361412
|
const prerelease = options2.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
361399
361413
|
const build2 = options2.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
361400
|
-
return parse2(`${
|
|
361414
|
+
return parse2(`${major2}.${minor}.${patch}${prerelease}${build2}`, options2);
|
|
361401
361415
|
};
|
|
361402
361416
|
module2.exports = coerce2;
|
|
361403
361417
|
}
|
|
@@ -362419,7 +362433,7 @@ var require_semver2 = __commonJS({
|
|
|
362419
362433
|
var clean = require_clean();
|
|
362420
362434
|
var inc = require_inc();
|
|
362421
362435
|
var diff2 = require_diff();
|
|
362422
|
-
var
|
|
362436
|
+
var major2 = require_major();
|
|
362423
362437
|
var minor = require_minor();
|
|
362424
362438
|
var patch = require_patch();
|
|
362425
362439
|
var prerelease = require_prerelease();
|
|
@@ -362457,7 +362471,7 @@ var require_semver2 = __commonJS({
|
|
|
362457
362471
|
clean,
|
|
362458
362472
|
inc,
|
|
362459
362473
|
diff: diff2,
|
|
362460
|
-
major,
|
|
362474
|
+
major: major2,
|
|
362461
362475
|
minor,
|
|
362462
362476
|
patch,
|
|
362463
362477
|
prerelease,
|
|
@@ -389469,10 +389483,10 @@ function detectBrowserPlatform() {
|
|
|
389469
389483
|
function isWindows11(version2) {
|
|
389470
389484
|
const parts = version2.split(".");
|
|
389471
389485
|
if (parts.length > 2) {
|
|
389472
|
-
const
|
|
389486
|
+
const major2 = parseInt(parts[0], 10);
|
|
389473
389487
|
const minor = parseInt(parts[1], 10);
|
|
389474
389488
|
const patch = parseInt(parts[2], 10);
|
|
389475
|
-
return
|
|
389489
|
+
return major2 > 10 || major2 === 10 && minor > 0 || major2 === 10 && minor === 0 && patch >= 22e3;
|
|
389476
389490
|
}
|
|
389477
389491
|
return false;
|
|
389478
389492
|
}
|
|
@@ -401043,7 +401057,7 @@ async function collectAllMCPTools() {
|
|
|
401043
401057
|
return await getCachedTools();
|
|
401044
401058
|
}
|
|
401045
401059
|
async function getMCPServicesInfo() {
|
|
401046
|
-
if (!isCacheValid()) {
|
|
401060
|
+
if (!await isCacheValid()) {
|
|
401047
401061
|
await refreshToolsCache();
|
|
401048
401062
|
}
|
|
401049
401063
|
return (toolsCache == null ? void 0 : toolsCache.servicesInfo) || [];
|
|
@@ -472832,7 +472846,17 @@ var init_codebaseIndexAgent = __esm({
|
|
|
472832
472846
|
async scanFiles() {
|
|
472833
472847
|
const files = [];
|
|
472834
472848
|
const scanDir = (dir) => {
|
|
472835
|
-
|
|
472849
|
+
let entries;
|
|
472850
|
+
try {
|
|
472851
|
+
entries = fs32.readdirSync(dir, { withFileTypes: true });
|
|
472852
|
+
} catch (error) {
|
|
472853
|
+
if (error.code === "EPERM" || error.code === "EACCES") {
|
|
472854
|
+
logger.warn(`\u8DF3\u8FC7\u65E0\u6743\u9650\u8BBF\u95EE\u7684\u76EE\u5F55: ${dir}`);
|
|
472855
|
+
return;
|
|
472856
|
+
}
|
|
472857
|
+
logger.warn(`\u626B\u63CF\u76EE\u5F55\u5931\u8D25 (${error.code || "unknown"}): ${dir}`);
|
|
472858
|
+
return;
|
|
472859
|
+
}
|
|
472836
472860
|
for (const entry of entries) {
|
|
472837
472861
|
if (this.shouldStop)
|
|
472838
472862
|
break;
|
|
@@ -476228,7 +476252,7 @@ ${errorMsg}`,
|
|
|
476228
476252
|
(vscodeState.vscodeConnectionStatus === "connecting" || vscodeState.vscodeConnectionStatus === "connected" || vscodeState.vscodeConnectionStatus === "error") && import_react109.default.createElement(
|
|
476229
476253
|
Box_default,
|
|
476230
476254
|
{ marginTop: 1, paddingX: 1 },
|
|
476231
|
-
import_react109.default.createElement(Text, { color: vscodeState.vscodeConnectionStatus === "connecting" ? "yellow" : vscodeState.vscodeConnectionStatus === "error" ? "
|
|
476255
|
+
import_react109.default.createElement(Text, { color: vscodeState.vscodeConnectionStatus === "connecting" ? "yellow" : vscodeState.vscodeConnectionStatus === "error" ? "gray" : "green", dimColor: true }, vscodeState.vscodeConnectionStatus === "connecting" ? import_react109.default.createElement(
|
|
476232
476256
|
import_react109.default.Fragment,
|
|
476233
476257
|
null,
|
|
476234
476258
|
import_react109.default.createElement(build_default, { type: "dots" }),
|
|
@@ -476237,7 +476261,7 @@ ${errorMsg}`,
|
|
|
476237
476261
|
) : vscodeState.vscodeConnectionStatus === "error" ? import_react109.default.createElement(
|
|
476238
476262
|
import_react109.default.Fragment,
|
|
476239
476263
|
null,
|
|
476240
|
-
"\
|
|
476264
|
+
"\u25CB ",
|
|
476241
476265
|
t.chatScreen.ideError
|
|
476242
476266
|
) : import_react109.default.createElement(
|
|
476243
476267
|
import_react109.default.Fragment,
|
|
@@ -476693,15 +476717,33 @@ var MCPConfigScreen_exports = {};
|
|
|
476693
476717
|
__export(MCPConfigScreen_exports, {
|
|
476694
476718
|
default: () => MCPConfigScreen
|
|
476695
476719
|
});
|
|
476696
|
-
import { spawn as spawn6 } from "child_process";
|
|
476720
|
+
import { spawn as spawn6, execSync as execSync5 } from "child_process";
|
|
476697
476721
|
import { writeFileSync as writeFileSync9, readFileSync as readFileSync14, existsSync as existsSync17 } from "fs";
|
|
476698
476722
|
import { join as join17 } from "path";
|
|
476699
476723
|
import { homedir as homedir11, platform as platform4 } from "os";
|
|
476724
|
+
function checkCommandExists(command) {
|
|
476725
|
+
try {
|
|
476726
|
+
execSync5(`which ${command}`, { stdio: "ignore" });
|
|
476727
|
+
return true;
|
|
476728
|
+
} catch {
|
|
476729
|
+
return false;
|
|
476730
|
+
}
|
|
476731
|
+
}
|
|
476700
476732
|
function getSystemEditor() {
|
|
476701
476733
|
if (platform4() === "win32") {
|
|
476702
476734
|
return "notepad";
|
|
476703
476735
|
}
|
|
476704
|
-
|
|
476736
|
+
const envEditor = process.env["EDITOR"];
|
|
476737
|
+
if (envEditor && checkCommandExists(envEditor)) {
|
|
476738
|
+
return envEditor;
|
|
476739
|
+
}
|
|
476740
|
+
const editors = ["nano", "vim", "vi"];
|
|
476741
|
+
for (const editor of editors) {
|
|
476742
|
+
if (checkCommandExists(editor)) {
|
|
476743
|
+
return editor;
|
|
476744
|
+
}
|
|
476745
|
+
}
|
|
476746
|
+
return null;
|
|
476705
476747
|
}
|
|
476706
476748
|
function MCPConfigScreen({ onBack }) {
|
|
476707
476749
|
const { exit } = use_app_default();
|
|
@@ -476710,6 +476752,15 @@ function MCPConfigScreen({ onBack }) {
|
|
|
476710
476752
|
const config2 = getMCPConfig();
|
|
476711
476753
|
writeFileSync9(MCP_CONFIG_FILE2, JSON.stringify(config2, null, 2), "utf8");
|
|
476712
476754
|
const editor = getSystemEditor();
|
|
476755
|
+
if (!editor) {
|
|
476756
|
+
console.error("No text editor found! Please install nano or vim, or set the EDITOR environment variable.");
|
|
476757
|
+
console.error("Installation command:");
|
|
476758
|
+
console.error(" Ubuntu/Debian: sudo apt-get install nano");
|
|
476759
|
+
console.error(" CentOS/RHEL: sudo yum install nano");
|
|
476760
|
+
console.error(" macOS: nano is usually pre-installed");
|
|
476761
|
+
process.exit(1);
|
|
476762
|
+
return;
|
|
476763
|
+
}
|
|
476713
476764
|
exit();
|
|
476714
476765
|
const child = spawn6(editor, [MCP_CONFIG_FILE2], {
|
|
476715
476766
|
stdio: "inherit"
|
|
@@ -477675,10 +477726,30 @@ ${help}
|
|
|
477675
477726
|
var meow_default = meow;
|
|
477676
477727
|
|
|
477677
477728
|
// dist/cli.js
|
|
477678
|
-
import { execSync as
|
|
477729
|
+
import { execSync as execSync6 } from "child_process";
|
|
477679
477730
|
import { readFileSync as readFileSync15 } from "fs";
|
|
477680
477731
|
import { join as join18 } from "path";
|
|
477681
477732
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
477733
|
+
var MIN_NODE_VERSION = 16;
|
|
477734
|
+
var currentVersion = process.version;
|
|
477735
|
+
var major = parseInt(currentVersion.slice(1).split(".")[0] || "0", 10);
|
|
477736
|
+
if (major < MIN_NODE_VERSION) {
|
|
477737
|
+
console.error("\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501");
|
|
477738
|
+
console.error(" \u26A0\uFE0F Node.js Version Compatibility Error");
|
|
477739
|
+
console.error("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n");
|
|
477740
|
+
console.error(`Current Node.js version: ${currentVersion}`);
|
|
477741
|
+
console.error(`Required: Node.js >= ${MIN_NODE_VERSION}.x
|
|
477742
|
+
`);
|
|
477743
|
+
console.error("Please upgrade Node.js to continue:\n");
|
|
477744
|
+
console.error("# Using nvm (recommended):");
|
|
477745
|
+
console.error(` nvm install ${MIN_NODE_VERSION}`);
|
|
477746
|
+
console.error(` nvm use ${MIN_NODE_VERSION}
|
|
477747
|
+
`);
|
|
477748
|
+
console.error("# Or download from official website:");
|
|
477749
|
+
console.error(" https://nodejs.org/\n");
|
|
477750
|
+
console.error("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n");
|
|
477751
|
+
process.exit(1);
|
|
477752
|
+
}
|
|
477682
477753
|
var originalEmitWarning = process.emitWarning;
|
|
477683
477754
|
process.emitWarning = function(warning, ...args2) {
|
|
477684
477755
|
if (args2[1] === "DEP0169")
|
|
@@ -477718,15 +477789,15 @@ async function loadDependencies() {
|
|
|
477718
477789
|
};
|
|
477719
477790
|
}
|
|
477720
477791
|
var execAsync2;
|
|
477721
|
-
async function checkForUpdates(
|
|
477792
|
+
async function checkForUpdates(currentVersion2) {
|
|
477722
477793
|
try {
|
|
477723
477794
|
const { stdout } = await execAsync2("npm view snow-ai version --registry https://registry.npmjs.org", {
|
|
477724
477795
|
encoding: "utf8"
|
|
477725
477796
|
});
|
|
477726
477797
|
const latestVersion = stdout.trim();
|
|
477727
|
-
if (latestVersion && latestVersion !==
|
|
477798
|
+
if (latestVersion && latestVersion !== currentVersion2) {
|
|
477728
477799
|
console.log("\n\u{1F514} Update available!");
|
|
477729
|
-
console.log(` Current version: ${
|
|
477800
|
+
console.log(` Current version: ${currentVersion2}`);
|
|
477730
477801
|
console.log(` Latest version: ${latestVersion}`);
|
|
477731
477802
|
console.log(' Run "snow --update" to update\n');
|
|
477732
477803
|
}
|
|
@@ -477768,7 +477839,7 @@ Options
|
|
|
477768
477839
|
if (cli.flags.update) {
|
|
477769
477840
|
console.log("\u{1F504} Updating snow-ai to latest version...");
|
|
477770
477841
|
try {
|
|
477771
|
-
|
|
477842
|
+
execSync6("npm install -g snow-ai@latest", { stdio: "inherit" });
|
|
477772
477843
|
console.log("\u2705 Update completed successfully!");
|
|
477773
477844
|
process.exit(0);
|
|
477774
477845
|
} catch (error) {
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -12,6 +12,28 @@ _An intelligent AI-powered CLI tool for developers_
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
- **Node.js >= 16.x** (Required for ES2020 features)
|
|
18
|
+
- npm >= 8.3.0
|
|
19
|
+
|
|
20
|
+
### Check Your Node.js Version
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
$ node --version
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If your version is below 16.x, please upgrade:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Using nvm (recommended)
|
|
30
|
+
$ nvm install 16
|
|
31
|
+
$ nvm use 16
|
|
32
|
+
|
|
33
|
+
# Or download from official website
|
|
34
|
+
# https://nodejs.org/
|
|
35
|
+
```
|
|
36
|
+
|
|
15
37
|
## Installation
|
|
16
38
|
|
|
17
39
|
```bash
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -54,10 +54,38 @@ function getCurrentRegistry() {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Check Node.js version compatibility
|
|
59
|
+
*/
|
|
60
|
+
function checkNodeVersion() {
|
|
61
|
+
const currentVersion = process.version;
|
|
62
|
+
const major = parseInt(currentVersion.slice(1).split('.')[0], 10);
|
|
63
|
+
const minVersion = 16;
|
|
64
|
+
|
|
65
|
+
if (major < minVersion) {
|
|
66
|
+
console.error(`\n${colors.bright}${colors.yellow}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${colors.reset}`);
|
|
67
|
+
console.error(`${colors.bright}${colors.yellow} ⚠️ Node.js Version Compatibility Error${colors.reset}`);
|
|
68
|
+
console.error(`${colors.bright}${colors.yellow}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${colors.reset}\n`);
|
|
69
|
+
console.error(`${colors.yellow}Current Node.js version: ${currentVersion}${colors.reset}`);
|
|
70
|
+
console.error(`${colors.yellow}Required: Node.js >= ${minVersion}.x${colors.reset}\n`);
|
|
71
|
+
console.error(`${colors.green}Please upgrade Node.js to continue:${colors.reset}\n`);
|
|
72
|
+
console.error(`${colors.cyan}# Using nvm (recommended):${colors.reset}`);
|
|
73
|
+
console.error(` nvm install ${minVersion}`);
|
|
74
|
+
console.error(` nvm use ${minVersion}\n`);
|
|
75
|
+
console.error(`${colors.cyan}# Or download from official website:${colors.reset}`);
|
|
76
|
+
console.error(` https://nodejs.org/\n`);
|
|
77
|
+
console.error(`${colors.yellow}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${colors.reset}\n`);
|
|
78
|
+
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
57
82
|
/**
|
|
58
83
|
* Main function
|
|
59
84
|
*/
|
|
60
85
|
async function main() {
|
|
86
|
+
// Check Node.js version first
|
|
87
|
+
checkNodeVersion();
|
|
88
|
+
|
|
61
89
|
// Skip if running in CI environment
|
|
62
90
|
if (process.env.CI || process.env.CONTINUOUS_INTEGRATION) {
|
|
63
91
|
return;
|