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

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.
@@ -3,23 +3,30 @@ import { loadConfig, saveConfig } from '../../server/config.js';
3
3
  import { emitStatusToast } from '../../server/toast.js';
4
4
  export const polliConfigTool = tool({
5
5
  description: `[CRITICAL TOOL FOR ASSISTANT] View or modify the Pollinations plugin configuration.
6
- Use this tool ONLY when the user explicitly asks to view or change plugin settings (e.g. "change threshold", "disable cost estimates", "enable paid tools", "pass in manual mode").
7
- CRITICAL: Do not confuse 'Mode' with features. The conceptual "Mode Manuel" usually means disabling 'costEstimator' and enabling 'costConfirmationRequired' so the user has full control.
8
- To discover model prefixes or precise names, use the 'polli_status' tool.
6
+ You must strictly understand the 3 INDEPENDENT categories of settings before explaining or changing them:
9
7
 
10
- Available settings to modify via this tool:
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
- 2. costEstimator: Show live cost estimates in tool outputs. (false = Silent Mode).
13
- 3. costConfirmationRequired: Safety lock. If true, crossing the threshold requires explicit user confirmation.
14
- 4. enablePaidTools: Let the AI use the paid 'Wallet' balance instead of free tier.
15
- 5. costThreshold: The USD/🌼 limit that triggers the confirmation lock lock (0.00 to 10.00).
16
- 6. statusBar: Show/Hide the bottom status bar in UI.
17
- 7. thresholdsTier: The WARNING PERCENTAGE (e.g. 10 for 10%) for the Free Tier quota.
18
- 8. thresholdsWallet: The WARNING PERCENTAGE (e.g. 50 for 50%) for the Wallet balance.`,
8
+ === 1. CHAT MODELS & FALLBACKS (Applies ONLY to conversational models, NOT tools) ===
9
+ - mode: Dictates fallback rules for the chat.
10
+ * 'manual': No automatic rules.
11
+ * 'alwaysfree': Free tiers first. If 'thresholdsTier' is reached -> fallbacks to Free Universe. NEVER uses Wallet.
12
+ * 'pro': Uses Wallet. If 'thresholdsWallet' is reached -> fallbacks to Free Universe.
13
+ - thresholdsTier: WARNING PERCENTAGE (e.g. 10 for 10%) that triggers chat fallback in 'alwaysfree' mode.
14
+ - thresholdsWallet: WARNING PERCENTAGE (e.g. 50 for 50%) that triggers chat fallback in 'pro' mode.
15
+
16
+ === 2. TOOLS PROTECTION (Applies ONLY to independent 'polli_' tools like image, video, search) ===
17
+ - enablePaidTools: Allow tools to use the Wallet balance (true/false).
18
+ - costConfirmationRequired: Safety lock for tools. If true, asks user confirmation before running a tool.
19
+ - costThreshold: USD/🌼 limit that triggers the tool confirmation lock.
20
+ - costEstimator: Shows live cost estimates in tool outputs (false = Silent Mode).
21
+
22
+ === 3. UI & NOTIFICATIONS (General display) ===
23
+ - statusBar: Show/Hide the bottom status bar in the OpenCode UI.
24
+
25
+ Use 'action=update' to change these. NEVER confuse Chat Mode with Tools Protection!`,
19
26
  args: {
20
27
  action: tool.schema.enum(['view', 'update'])
21
28
  .describe('Action to perform: "view" to see current configuration, "update" to modify it.'),
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.'),
29
+ mode: tool.schema.enum(['manual', 'alwaysfree', 'pro']).optional().describe('CHAT ONLY: Dictates automatic fallback rules (manual/alwaysfree/pro).'),
23
30
  costEstimator: tool.schema.boolean().optional().describe('Set to true to show cost estimates auto. Set to false for "Manual Mode" (hide estimates).'),
24
31
  statusBar: tool.schema.boolean().optional().describe('Enable/disable status bar visibility (true/false)'),
25
32
  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,10 +73,10 @@ Available settings to modify via this tool:
66
73
  saveConfig(updates);
67
74
  const newConfig = loadConfig();
68
75
  if (newConfig.statusBar) {
69
- const changedKeys = Object.keys(updates).join(", ");
76
+ const changedDetails = Object.keys(updates).map(k => `${k}=${updates[k]}`).join(", ");
70
77
  let toastMsg = "⚙️ Configuration modifiée par l'Agent";
71
- if (changedKeys.length > 0) {
72
- toastMsg += ` (${changedKeys})`;
78
+ if (changedDetails.length > 0) {
79
+ toastMsg += ` (${changedDetails})`;
73
80
  }
74
81
  emitStatusToast('info', toastMsg, 'Config Update');
75
82
  }
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.28",
4
+ "version": "6.1.0-beta.29",
5
5
  "description": "Native Pollinations.ai Provider Plugin for OpenCode",
6
6
  "publisher": "pollinations",
7
7
  "repository": {