opencode-pollinations-plugin 6.1.0-beta.26 → 6.1.0-beta.28

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.
@@ -399,19 +399,20 @@ function handleConfigCommand(args) {
399
399
  if (!key) {
400
400
  const config = loadConfig();
401
401
  const k = config.apiKey ? (config.apiKey.length > 8 ? `${config.apiKey.substring(0, 5)}****${config.apiKey.substring(config.apiKey.length - 4)}` : '****') : 'Non configurée';
402
- const markdownResponse = `## ⚙️ Configuration Pollinations
402
+ const markdownResponse = `## ⚙️ Configuration Pollinations (v${config.version || 'inconnue'})
403
+ *Vous pouvez utiliser indifféremment \`/pollinations\` ou son alias court \`/poll\` pour toutes ces commandes.*
403
404
  Voici l'état actuel de votre configuration locale.
404
405
 
405
406
  | Paramètre | Valeur Actuelle | Rôle | Commande |
406
407
  |-----------|-----------------|------|----------|
407
- | **apiKey** | \`${k}\` | Votre clé API secrète (BYOK) | \`/pollinations connect <key>\` |
408
- | **mode** | \`${config.mode}\` | Mode d'accès | \`/pollinations mode <manual/pro/alwaysfree>\` |
408
+ | **apiKey** | \`${k}\` | Votre clé API secrète (BYOK) | \`/poll connect <key>\` |
409
+ | **mode** | \`${config.mode}\` | Mode d'accès | \`/poll mode <manual/pro/alwaysfree>\` |
409
410
  | **enablePaidTools**| \`${config.enablePaidTools ?? true}\` | Sécurité: Désactiver outils payants | \`/poll config enablePaidTools <true/false>\` |
410
- | **costConfirmationRequired**| \`${config.costConfirmationRequired ?? true}\` | Demande confirmation si le seuil d'alerte est dépassé | \`/poll config costConfirmation <true/false>\` |
411
+ | **costConfirmationRequired**| \`${config.costConfirmationRequired ?? true}\` | Demande confirmation si le seuil d'alerte est dépassé | \`/poll config costConfirmationRequired <true/false>\` |
411
412
  | **costThreshold**| \`${config.costThreshold ?? 0.15} 🌻\` | Seuil d'alerte coût Outils | \`/poll config costThreshold <X>\` |
412
413
  | **cost_estimator**| \`${config.costEstimator ?? true}\` | Afficher l'estimation de coût dans les Toasts | \`/poll config cost_estimator <true/false>\` |
413
- | **fallbacks.free.main** | \`${config.fallbacks?.free?.main || 'free/mistral'}\` | Modèle de repli Chat vers l'univers free legacy | \`/pollinations fallback <main> <agent>\` |
414
- | **fallbacks.free.agent** | \`${config.fallbacks?.free?.agent || 'free/openai-fast'}\`| Modèle de repli Agent vers l'univers free legacy | \`/pollinations fallback <main> <agent>\` |
414
+ | **fallbacks.free.main** | \`${config.fallbacks?.free?.main || 'free/mistral'}\` | Modèle de repli Chat vers l'univers free legacy | \`/poll fallback <main> <agent>\` |
415
+ | **fallbacks.free.agent** | \`${config.fallbacks?.free?.agent || 'free/openai-fast'}\`| Modèle de repli Agent vers l'univers free legacy | \`/poll fallback <main> <agent>\` |
415
416
  | **fallbacks.enter.agent** | \`${config.fallbacks?.enter?.agent || 'free/openai-fast'}\`| Modèle Agent principal (free/* ou enter/*) | *Géré automatiquement* |
416
417
  | **status_gui** | \`${config.gui?.status || 'all'}\` | Toasts de statut (all, alert, none) | \`/poll config status_gui <all/alert/none>\` |
417
418
  | **logs_gui** | \`${config.gui?.logs || 'error'}\` | Niveau de log (verbose, error) | \`/poll config logs_gui <verbose/error/none>\` |
@@ -493,7 +494,7 @@ Voici l'état actuel de votre configuration locale.
493
494
  saveConfig({ costThreshold: threshold });
494
495
  return { handled: true, response: `✅ costThreshold = ${threshold} 🌻` };
495
496
  }
496
- if (key === 'costConfirmation' && value) {
497
+ if (key === 'costConfirmationRequired' && value) {
497
498
  const enabled = value === 'true';
498
499
  saveConfig({ costConfirmationRequired: enabled });
499
500
  return { handled: true, response: `✅ costConfirmationRequired = ${enabled}` };
@@ -506,14 +507,15 @@ Voici l'état actuel de votre configuration locale.
506
507
  function handleHelpCommand() {
507
508
  const help = `
508
509
  ### 🌸 Pollinations Plugin - Commandes V6
510
+ *(L'alias \`/poll\` est géré et recommandé à la place de \`/pollinations\` !)*
509
511
 
510
512
  **Mode & Usage**
511
- - **\`/pollinations mode [mode]\`**: Change le mode (manual, alwaysfree, pro).
512
- - **\`/pollinations usage [full]\`**: Affiche le dashboard (full = détail).
513
- - **\`/pollinations fallback <main> [agent]\`**: Configure le Safety Net.
513
+ - **\`/poll mode [mode]\`**: Change le mode (manual, alwaysfree, pro).
514
+ - **\`/poll usage [full]\`**: Affiche le dashboard (full = détail).
515
+ - **\`/poll fallback <main> [agent]\`**: Configure le Safety Net.
514
516
 
515
517
  **Configuration**
516
- - **\`/pollinations config [key] [value]\`**:
518
+ - **\`/poll config [key] [value]\`**:
517
519
  - \`status_gui\`: none, alert, all
518
520
  - \`logs_gui\`: none, error, verbose
519
521
  - \`threshold_tier\` / \`threshold_wallet\`: 0-100
@@ -521,12 +523,12 @@ function handleHelpCommand() {
521
523
  - \`cost_estimator\`: true/false (show cost in outputs)
522
524
  - \`enablePaidTools\`: true/false (wallet protection)
523
525
  - \`costThreshold\`: seuil en pollen (défaut: 0.15)
524
- - \`costConfirmation\`: true/false (confirmation coût)
526
+ - \`costConfirmationRequired\`: true/false (confirmation coût)
525
527
 
526
528
  **Modèles & Pricing**
527
- - **\`/pollinations models [type]\`**: Liste des modèles (type: image, video, audio, text)
528
- - **\`/pollinations pricing\`**: Tableau de pricing détaillé
529
- - **\`/pollinations infos\`**: Explications sur les Tiers et le Pollen
529
+ - **\`/poll models [type]\`**: Liste des modèles (type: image, video, audio, text)
530
+ - **\`/poll pricing\`**: Tableau de pricing détaillé
531
+ - **\`/poll infos\`**: Explications sur les Tiers et le Pollen
530
532
 
531
533
  > 💡 **RMBG keys**: Use the \`rmbg_keys\` tool (works with any model).
532
534
  `.trim();
@@ -8,7 +8,7 @@ CRITICAL: Do not confuse 'Mode' with features. The conceptual "Mode Manuel" usua
8
8
  To discover model prefixes or precise names, use the 'polli_status' tool.
9
9
 
10
10
  Available settings to modify via this tool:
11
- 1. mode: The general operating mode of the plugin ("manual", "alwaysfree" or "pro").
11
+ 1. mode: Only the high-level tier ("manual", "alwaysfree" or "pro"). WARNING: Changing mode DOES NOT auto-enable paid tools or confirmations. You must change the other flags explicitly!
12
12
  2. costEstimator: Show live cost estimates in tool outputs. (false = Silent Mode).
13
13
  3. costConfirmationRequired: Safety lock. If true, crossing the threshold requires explicit user confirmation.
14
14
  4. enablePaidTools: Let the AI use the paid 'Wallet' balance instead of free tier.
@@ -19,7 +19,7 @@ Available settings to modify via this tool:
19
19
  args: {
20
20
  action: tool.schema.enum(['view', 'update'])
21
21
  .describe('Action to perform: "view" to see current configuration, "update" to modify it.'),
22
- mode: tool.schema.enum(['manual', 'alwaysfree', 'pro']).optional().describe('General Plugin Mode. PRO allows wallet deductions, MANUAL requires you to pass explicit flags (no auto-deduction). ALWAYSFREE forces free-tier.'),
22
+ mode: tool.schema.enum(['manual', 'alwaysfree', 'pro']).optional().describe('CRITICAL: Changing mode does NOT change your rights. To allow paid tools, change enablePaidTools. To enable confirmations, change costConfirmationRequired.'),
23
23
  costEstimator: tool.schema.boolean().optional().describe('Set to true to show cost estimates auto. Set to false for "Manual Mode" (hide estimates).'),
24
24
  statusBar: tool.schema.boolean().optional().describe('Enable/disable status bar visibility (true/false)'),
25
25
  costConfirmationRequired: tool.schema.boolean().optional().describe('Safety Lock: Set to true to ask user confirmation before spending money. Set to false to spend automatically.'),
@@ -66,7 +66,12 @@ Available settings to modify via this tool:
66
66
  saveConfig(updates);
67
67
  const newConfig = loadConfig();
68
68
  if (newConfig.statusBar) {
69
- emitStatusToast('info', "⚙️ Configuration du plugin mise à jour par l'Agent", 'Config Update');
69
+ const changedKeys = Object.keys(updates).join(", ");
70
+ let toastMsg = "⚙️ Configuration modifiée par l'Agent";
71
+ if (changedKeys.length > 0) {
72
+ toastMsg += ` (${changedKeys})`;
73
+ }
74
+ emitStatusToast('info', toastMsg, 'Config Update');
70
75
  }
71
76
  return `Configuration successfully updated.\nApplied changes:\n${JSON.stringify(updates, null, 2)}\n\n(Note: Verify with polli_status if you need to know model prefixes).`;
72
77
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opencode-pollinations-plugin",
3
3
  "displayName": "Pollinations AI (V5.9)",
4
- "version": "6.1.0-beta.26",
4
+ "version": "6.1.0-beta.28",
5
5
  "description": "Native Pollinations.ai Provider Plugin for OpenCode",
6
6
  "publisher": "pollinations",
7
7
  "repository": {