pumpkinai-config 1.5.1 → 1.5.2
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/claude-ide.js +6 -6
- package/package.json +1 -1
package/claude-ide.js
CHANGED
|
@@ -130,24 +130,24 @@ function configureIDESettings(settingsPath, ideName, apiKey) {
|
|
|
130
130
|
}
|
|
131
131
|
];
|
|
132
132
|
|
|
133
|
-
// 获取或创建
|
|
134
|
-
if (!settings['
|
|
135
|
-
settings['
|
|
133
|
+
// 获取或创建 claudeCode.environmentVariables 数组
|
|
134
|
+
if (!settings['claudeCode.environmentVariables']) {
|
|
135
|
+
settings['claudeCode.environmentVariables'] = [];
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
// 更新环境变量
|
|
139
139
|
for (const envVar of envVarsToAdd) {
|
|
140
|
-
const existingIndex = settings['
|
|
140
|
+
const existingIndex = settings['claudeCode.environmentVariables'].findIndex(
|
|
141
141
|
item => item.name === envVar.name
|
|
142
142
|
);
|
|
143
143
|
|
|
144
144
|
if (existingIndex >= 0) {
|
|
145
145
|
// 更新已存在的环境变量
|
|
146
|
-
settings['
|
|
146
|
+
settings['claudeCode.environmentVariables'][existingIndex] = envVar;
|
|
147
147
|
log(`[更新] ${envVar.name}`, 'yellow');
|
|
148
148
|
} else {
|
|
149
149
|
// 添加新的环境变量
|
|
150
|
-
settings['
|
|
150
|
+
settings['claudeCode.environmentVariables'].push(envVar);
|
|
151
151
|
log(`[添加] ${envVar.name}`, 'green');
|
|
152
152
|
}
|
|
153
153
|
}
|