opencode-avatar 0.3.7 → 0.3.8

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
@@ -15,6 +15,8 @@ A dynamic desktop avatar plugin for OpenCode that displays animated character re
15
15
  - **Toast Notifications**: Shows progress for avatar generation
16
16
  - **Customizable Prompts**: Optional prompt configuration for personalized avatar styles
17
17
 
18
+ > **Warning:** If you use a lot of varied tools (like from an MCP), it will generate a lot of images per tool usage, which may cost alot with Nano Banana Pro. Character images for a tool are only generated as used.
19
+
18
20
  ## Installation
19
21
 
20
22
  Then add to your OpenCode config:
@@ -194,8 +196,6 @@ The output shows:
194
196
  - Subsequent loads are instant (cached)
195
197
  - Reduce avatar size for faster generation
196
198
 
197
- > **Warning:** If you have a lot of tools (like from an MCP), it will generate a lot of images per tool, which may impact performance.
198
-
199
199
  ## Development
200
200
 
201
201
  ### Building
package/dist/electron.js CHANGED
@@ -419,7 +419,7 @@ function getConfig() {
419
419
  }
420
420
  var FAL_CDN_URL = "https://v3.fal.media";
421
421
  var FAL_REST_URL = "https://rest.alpha.fal.ai";
422
- var FAL_NANO_BANANA_URL = "https://fal.run/fal-ai/nano-banana-pro/edit";
422
+ var FAL_GROK_IMAGE_URL = "https://fal.run/xai/grok-imagine-image/edit";
423
423
  var __filename2 = fileURLToPath(import.meta.url);
424
424
  var __dirnameResolved = path.dirname(__filename2);
425
425
  var AVATAR_DIR = path.join(os.homedir(), ".config", "opencode");
@@ -595,7 +595,7 @@ async function uploadFile(filePath, falKey) {
595
595
  return result.access_url || result.url || "";
596
596
  }
597
597
  async function generateAvatarImage(imageUrl, prompt, falKey) {
598
- const response = await fetch(FAL_NANO_BANANA_URL, {
598
+ const response = await fetch(FAL_GROK_IMAGE_URL, {
599
599
  method: "POST",
600
600
  headers: {
601
601
  Authorization: `Key ${falKey}`,
@@ -603,7 +603,7 @@ async function generateAvatarImage(imageUrl, prompt, falKey) {
603
603
  },
604
604
  body: JSON.stringify({
605
605
  prompt,
606
- image_urls: [imageUrl]
606
+ image_url: imageUrl
607
607
  })
608
608
  });
609
609
  if (!response.ok) {
@@ -642,7 +642,7 @@ async function generateAvatarForPrompt(prompt) {
642
642
  }
643
643
  const sourceAvatar = path.join(AVATAR_DIR, "avatar.png");
644
644
  const uploadedUrl = await uploadFile(sourceAvatar, config.falKey);
645
- let fullPrompt = `make a character variant: ${prompt}. Keep the background as a solid green screen color. Do not let the green screen color appear in reflections or on the subject.`;
645
+ let fullPrompt = `make a character variant: ${prompt}, themed for Linux bash commands or MCP server services. Keep the background as a solid green screen color. Do not let the green screen color appear in reflections or on the subject.`;
646
646
  if (config.prompt) {
647
647
  fullPrompt += ` ${config.prompt}`;
648
648
  }
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import * as path from "path";
5
5
  import * as http from "http";
6
6
  import * as fs from "fs";
7
7
  import * as os from "os";
8
- var __dirname = "/var/home/wizard/av";
8
+ var __dirname = "/var/home/wizard/opencode-avatar";
9
9
  var PLUGIN_DIR = __dirname;
10
10
  var AVATAR_DIR = path.join(os.homedir(), ".config", "opencode");
11
11
  var DEFAULT_AVATAR = "avatar.png";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-avatar",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Dynamic desktop avatar plugin for OpenCode that reacts to your coding activities",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",