opencode-gpt-imagegen 0.1.7 → 0.1.9

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
@@ -36,7 +36,7 @@ OpenCode auto-installs the package via Bun on next launch — no separate `npm i
36
36
 
37
37
  Just ask your agent in natural language and `gpt_imagegen` will be picked up.
38
38
 
39
- The three examples below are the **actual outputs of this repo's e2e test suite** — see [`tests/e2e.test.ts`](./tests/e2e.test.ts) for the exact prompts and assertions.
39
+ The three examples below are the **actual outputs of this repo's e2e test suite** — see [`tests/e2e/subscription.test.ts`](./tests/e2e/subscription.test.ts) for the exact prompts and assertions.
40
40
 
41
41
  ### Example A — generate
42
42
 
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ async function parseImageGenerationResultFromSSE(stream) {
39
39
  continue;
40
40
  try {
41
41
  const json = JSON.parse(event.data);
42
- if (json.type === "response.output_item.done" && json.item?.type === "image_generation_call" && typeof json.item.result === "string") {
42
+ if (json.type === "response.output_item.done" && json.item?.type === "image_generation_call" && typeof json.item.result === "string" && json.item.result.length > 0) {
43
43
  return json.item.result;
44
44
  }
45
45
  } catch {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-gpt-imagegen",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "OpenCode plugin for GPT Image 2 generation through your ChatGPT subscription, with reference images and safe PNG output.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -19,8 +19,8 @@
19
19
  "check": "biome check --write .",
20
20
  "prebuild": "rm -rf dist",
21
21
  "build": "bun build ./src/index.ts --outdir ./dist --target node --format esm --packages external",
22
- "test": "bun test",
23
- "test:e2e": "OPENCODE_MODEL=openai/gpt-5.5 RUN_E2E=1 bun test",
22
+ "test": "bun test tests/unit",
23
+ "test:e2e_subscription": "OPENCODE_MODEL=openai/gpt-5.5 bun test tests/e2e/subscription.test.ts",
24
24
  "prepublishOnly": "bun run build",
25
25
  "release:patch": "bash scripts/prepare-release.sh patch && git push --follow-tags",
26
26
  "release:minor": "bash scripts/prepare-release.sh minor && git push --follow-tags",
@@ -56,7 +56,7 @@
56
56
  "@opencode-ai/plugin": "^1.14.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@biomejs/biome": "2.4.15",
59
+ "@biomejs/biome": "2.5.2",
60
60
  "@opencode-ai/plugin": "^1.14.41",
61
61
  "@tsconfig/node22": "^22.0.2",
62
62
  "@types/bun": "^1.3.14",