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
|
-
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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('
|
|
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
|
|
76
|
+
const changedDetails = Object.keys(updates).map(k => `${k}=${updates[k]}`).join(", ");
|
|
70
77
|
let toastMsg = "⚙️ Configuration modifiée par l'Agent";
|
|
71
|
-
if (
|
|
72
|
-
toastMsg += ` (${
|
|
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.
|
|
4
|
+
"version": "6.1.0-beta.29",
|
|
5
5
|
"description": "Native Pollinations.ai Provider Plugin for OpenCode",
|
|
6
6
|
"publisher": "pollinations",
|
|
7
7
|
"repository": {
|