opencode-pollinations-plugin 6.1.0-beta.1 → 6.1.0-beta.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/dist/server/commands.js +8 -7
- package/dist/server/config.js +19 -1
- package/package.json +1 -1
package/dist/server/commands.js
CHANGED
|
@@ -445,16 +445,17 @@ function handleConfigCommand(args) {
|
|
|
445
445
|
}
|
|
446
446
|
function handleHelpCommand() {
|
|
447
447
|
const help = `
|
|
448
|
-
### 🌸 Pollinations Plugin - Commandes
|
|
448
|
+
### 🌸 Pollinations Plugin - Commandes V6 (Economy/Pro)
|
|
449
449
|
|
|
450
|
-
- **\`/pollinations mode [mode]\`**: Change le mode (
|
|
450
|
+
- **\`/pollinations mode [mode]\`**: Change le mode (economy, pro, manual).
|
|
451
451
|
- **\`/pollinations usage [full]\`**: Affiche le dashboard (full = détail).
|
|
452
|
-
- **\`/pollinations fallback
|
|
452
|
+
- **\`/pollinations fallback [mode] [model]\`**: Configure le Safety Net pour economy/pro.
|
|
453
453
|
- **\`/pollinations config [key] [value]\`**:
|
|
454
|
-
- \`
|
|
455
|
-
- \`
|
|
456
|
-
- \`
|
|
457
|
-
- \`
|
|
454
|
+
- \`threshold_tier\`: 0-100 (% Alerte Tier).
|
|
455
|
+
- \`threshold_wallet_warn\`: 0-100 (% Alerte Wallet Session).
|
|
456
|
+
- \`threshold_wallet_stop\`: Montage absolu $ (Stop Wallet).
|
|
457
|
+
- \`status_gui\`: none, alert, all.
|
|
458
|
+
- \`logs_gui\`: none, error, verbose.
|
|
458
459
|
- \`status_bar\`: true/false (Widget).
|
|
459
460
|
`.trim();
|
|
460
461
|
return { handled: true, response: help };
|
package/dist/server/config.js
CHANGED
|
@@ -53,10 +53,20 @@ function migrateConfig(config) {
|
|
|
53
53
|
}
|
|
54
54
|
// Migrate old fallbacks structure
|
|
55
55
|
if (config.fallbacks?.free?.main) {
|
|
56
|
+
if (!config.fallbacks)
|
|
57
|
+
config.fallbacks = {};
|
|
56
58
|
config.fallbacks.economy = config.fallbacks.free.main.replace('free/', '');
|
|
57
59
|
delete config.fallbacks.free;
|
|
58
60
|
logConfig('[Migration] fallbacks.free → fallbacks.economy');
|
|
59
61
|
}
|
|
62
|
+
// Migrate old wallet threshold
|
|
63
|
+
if (config.thresholds?.wallet) {
|
|
64
|
+
if (!config.thresholds.wallet_warn) {
|
|
65
|
+
config.thresholds.wallet_warn = config.thresholds.wallet;
|
|
66
|
+
}
|
|
67
|
+
delete config.thresholds.wallet;
|
|
68
|
+
logConfig('[Migration] thresholds.wallet → thresholds.wallet_warn');
|
|
69
|
+
}
|
|
60
70
|
return config;
|
|
61
71
|
}
|
|
62
72
|
// SIMPLE LOAD (Direct Disk Read - No Caching, No Watchers)
|
|
@@ -85,7 +95,15 @@ function readConfigFromDisk() {
|
|
|
85
95
|
try {
|
|
86
96
|
const raw = fs.readFileSync(CONFIG_FILE, 'utf-8');
|
|
87
97
|
const custom = JSON.parse(raw);
|
|
88
|
-
|
|
98
|
+
const migrated = migrateConfig(custom);
|
|
99
|
+
// DEEP MERGE for nested objects to preserve defaults vs overrides
|
|
100
|
+
config = {
|
|
101
|
+
...config,
|
|
102
|
+
...migrated,
|
|
103
|
+
thresholds: { ...config.thresholds, ...(migrated.thresholds || {}) },
|
|
104
|
+
fallbacks: { ...config.fallbacks, ...(migrated.fallbacks || {}) },
|
|
105
|
+
gui: { ...config.gui, ...(migrated.gui || {}) }
|
|
106
|
+
};
|
|
89
107
|
if (custom.apiKey && custom.apiKey.length > 5)
|
|
90
108
|
configKey = custom.apiKey;
|
|
91
109
|
}
|
package/package.json
CHANGED