opencode-studio-server 1.12.12 → 1.12.13
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/index.js +14 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -291,8 +291,8 @@ function loadStudioConfig() {
|
|
|
291
291
|
availableGooglePlugins: [],
|
|
292
292
|
presets: [],
|
|
293
293
|
cooldownRules: [
|
|
294
|
-
{ name: "Opus
|
|
295
|
-
{ name: "Gemini 3 Pro (
|
|
294
|
+
{ name: "Antigravity Claude Opus (4h)", duration: 4 * 60 * 60 * 1000 },
|
|
295
|
+
{ name: "Antigravity Gemini 3 Pro (24h)", duration: 24 * 60 * 60 * 1000 }
|
|
296
296
|
],
|
|
297
297
|
pluginModels: {
|
|
298
298
|
gemini: {
|
|
@@ -427,7 +427,18 @@ function loadStudioConfig() {
|
|
|
427
427
|
if (!fs.existsSync(STUDIO_CONFIG_PATH)) return defaultConfig;
|
|
428
428
|
try {
|
|
429
429
|
const config = JSON.parse(fs.readFileSync(STUDIO_CONFIG_PATH, 'utf8'));
|
|
430
|
-
|
|
430
|
+
const merged = { ...defaultConfig, ...config };
|
|
431
|
+
|
|
432
|
+
if (config.cooldownRules) {
|
|
433
|
+
defaultConfig.cooldownRules.forEach(defaultRule => {
|
|
434
|
+
const existing = config.cooldownRules.find(r => r.name === defaultRule.name);
|
|
435
|
+
if (!existing) {
|
|
436
|
+
merged.cooldownRules.push(defaultRule);
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
return merged;
|
|
431
442
|
} catch {
|
|
432
443
|
return defaultConfig;
|
|
433
444
|
}
|