aihezu 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/install.js +3 -2
- package/package.json +2 -2
- package/services/gemini.js +11 -8
package/commands/install.js
CHANGED
|
@@ -113,8 +113,9 @@ async function installCommand(service, args = []) {
|
|
|
113
113
|
console.log('API Key: ' + apiKey.substring(0, 5) + '...');
|
|
114
114
|
|
|
115
115
|
console.log('');
|
|
116
|
-
const confirm = await askQuestion(rl, '是否继续? (
|
|
117
|
-
|
|
116
|
+
const confirm = await askQuestion(rl, '是否继续? (Y/n, 默认回车确认): ');
|
|
117
|
+
// If user enters 'n' or 'no', cancel. Otherwise, proceed (including empty string for default Y).
|
|
118
|
+
if (confirm.toLowerCase() === 'n' || confirm.toLowerCase() === 'no') {
|
|
118
119
|
console.log('已取消。');
|
|
119
120
|
process.exit(0);
|
|
120
121
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aihezu",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "AI 开发环境配置工具 - 支持 Claude Code, Codex, Google Gemini 的本地化配置、代理设置与缓存清理",
|
|
5
5
|
"main": "bin/aihezu.js",
|
|
6
6
|
"bin": {
|
|
@@ -35,4 +35,4 @@
|
|
|
35
35
|
"url": "https://github.com/aihezu/npm-ccclear/issues"
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://github.com/aihezu/npm-ccclear#readme"
|
|
38
|
-
}
|
|
38
|
+
}
|
package/services/gemini.js
CHANGED
|
@@ -38,13 +38,16 @@ module.exports = {
|
|
|
38
38
|
|
|
39
39
|
fs.writeFileSync(envFilePath, envContent, 'utf8');
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
// We only store extra options here if any.
|
|
43
|
-
const settings = {
|
|
44
|
-
...options
|
|
45
|
-
};
|
|
46
|
-
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2), 'utf8');
|
|
41
|
+
const configFiles = [envFilePath];
|
|
47
42
|
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
// 2. Conditionally write settings.json only if options are provided
|
|
44
|
+
if (Object.keys(options).length > 0) {
|
|
45
|
+
const settings = {
|
|
46
|
+
...options
|
|
47
|
+
};
|
|
48
|
+
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2), 'utf8');
|
|
49
|
+
configFiles.push(settingsPath);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return configFiles; }
|
|
50
53
|
};
|