opencode-pollinations-plugin 5.4.6 → 5.4.7

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # 🌸 Pollinations AI Plugin for OpenCode (v5.1)
1
+ # 🌸 Pollinations AI Plugin for OpenCode (v5.4.6)
2
2
 
3
3
  <div align="center">
4
4
  <img src="https://avatars.githubusercontent.com/u/88394740?s=400&v=4" alt="Pollinations.ai Logo" width="200">
@@ -10,7 +10,7 @@
10
10
 
11
11
  <div align="center">
12
12
 
13
- ![Version](https://img.shields.io/badge/version-5.1.3-blue.svg)
13
+ ![Version](https://img.shields.io/badge/version-5.4.6-blue.svg)
14
14
  ![License](https://img.shields.io/badge/license-MIT-green.svg)
15
15
  ![Status](https://img.shields.io/badge/status-Stable-success.svg)
16
16
 
@@ -69,14 +69,12 @@ You spend it to verify API calls on premium models.
69
69
 
70
70
  > 🎁 **Beta Bonus**: Buy one Pollen pack, get one free!
71
71
 
72
- ### 🐧 Platform Support & Port Management
72
+ ### 🐧 Platform Support & Dynamic Ports (v5.4.6+)
73
+ This plugin is **true Cross-Platform** (Windows, macOS, Linux).
74
+ - **Dynamic Port Allocation**: No more port conflicts! The plugin automatically finds an available port on startup.
75
+ - **Tools Support**: Using tools with Gemini (Free) triggers an **Automatic Intelligent Fallback** to OpenAI to ensure your workflow never breaks.
73
76
 
74
- This plugin is **Cross-Platform** (Windows, macOS, Linux).
75
-
76
- > **Note**: The **Automatic Port Zombie Killer** (which clears port 10001 on startup) is currently **Linux-optimized** (using `fuser -k`).
77
- > On **Windows/macOS**, if you encounter "Address in use", you may need to manually kill the process occupying port 10001 or reload the window.
78
-
79
- ## 📦 Installation & Ecology Only
77
+ > **Note**: Legacy static port (10001) logic has been replaced with system-assigned ports (0). This eliminates "Address in use" errors and effectively removes the need for Linux-specific `fuser` commands, making the plugin fully **Cross-Platform**.
80
78
 
81
79
  This plugin is part of the **OpenCode Ecosystem**.
82
80
 
@@ -613,8 +613,10 @@ export async function handleChatCompletion(req, res, bodyRaw) {
613
613
  if (isFallbackActive)
614
614
  modeLabel += " (FALLBACK)";
615
615
  const fullMsg = `${dashboardMsg} | ⚙️ ${modeLabel}`;
616
- // Only emit if not silenced (handled inside emitStatusToast)
617
- emitStatusToast('info', fullMsg, 'Pollinations Status');
616
+ // Only emit if not silenced AND only for Enterprise/Paid requests
617
+ if (isEnterprise) {
618
+ emitStatusToast('info', fullMsg, 'Pollinations Status');
619
+ }
618
620
  }
619
621
  res.end();
620
622
  }
@@ -1,3 +1 @@
1
- export declare function createStatusHooks(client: any): {
2
- 'session.idle': () => Promise<void>;
3
- };
1
+ export declare function createStatusHooks(client: any): {};
@@ -1,28 +1,7 @@
1
- import { loadConfig } from './config.js';
2
- import { getQuotaStatus } from './quota.js';
3
1
  export function createStatusHooks(client) {
4
2
  return {
5
- 'session.idle': async () => {
6
- const config = loadConfig();
7
- // Si la barre de statut est activée via 'status_bar' (bool)
8
- // L'utilisateur peut l'activer via /pollinations config status_bar true
9
- if (config.statusBar) {
10
- const quota = await getQuotaStatus(false);
11
- const statusText = formatStatus(quota);
12
- try {
13
- // ASTUCE: Toasts longue durée (30s) rafraîchis à chaque idle
14
- // Simule un widget persistent à droite.
15
- await client.tui.showToast({
16
- body: {
17
- message: statusText,
18
- variant: 'info',
19
- duration: 30000
20
- }
21
- });
22
- }
23
- catch (e) { }
24
- }
25
- }
3
+ // [DEPRECATED] Hook session.idle supprimé car il polluait les autres providers.
4
+ // Les notifications de statut sont désormais gérées par le proxy après chaque requête pollinations/enter.
26
5
  };
27
6
  }
28
7
  function formatStatus(quota) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opencode-pollinations-plugin",
3
3
  "displayName": "Pollinations AI (V5.1)",
4
- "version": "5.4.6",
4
+ "version": "5.4.7",
5
5
  "description": "Native Pollinations.ai Provider Plugin for OpenCode",
6
6
  "publisher": "pollinations",
7
7
  "repository": {