From f8735a82ca2674171d66b4153cdf7d3a00df5914 Mon Sep 17 00:00:00 2001 From: Seri Date: Mon, 12 Jan 2026 04:37:06 +0800 Subject: [PATCH] Add opencode support --- dev/opencode.json | 30 ++++++++++++++++++++++++++++++ dev/opencode.png | Bin 0 -> 126 bytes pinokio.js | 8 ++++++++ 3 files changed, 38 insertions(+) create mode 100644 dev/opencode.json create mode 100644 dev/opencode.png diff --git a/dev/opencode.json b/dev/opencode.json new file mode 100644 index 0000000..8812c58 --- /dev/null +++ b/dev/opencode.json @@ -0,0 +1,30 @@ +{ + "run": [{ + "when": "{{platform === 'win32'}}", + "id": "run", + "method": "shell.run", + "params": { + "shell": "{{kernel.path('bin/miniconda/Library/bin/bash.exe')}}", + "conda": { + "skip": true + }, + "env": { + "OPENCODE_GIT_BASH_PATH": "{{kernel.path('bin/miniconda/Library/bin/bash.exe')}}" + }, + "message": "npx -y opencode@latest {{args.prompt ? JSON.stringify(args.prompt) : ''}}", + "path": "{{args.cwd}}", + "input": true, + "buffer": 1024 + } + }, { + "when": "{{platform !== 'win32'}}", + "id": "run", + "method": "shell.run", + "params": { + "message": "npx -y opencode@latest {{args.prompt ? JSON.stringify(args.prompt) : ''}}", + "path": "{{args.cwd}}", + "input": true, + "buffer": 1024 + } + }] +} \ No newline at end of file diff --git a/dev/opencode.png b/dev/opencode.png new file mode 100644 index 0000000000000000000000000000000000000000..8f14a059aeb4b132a07f23729a700fbc9376a92a GIT binary patch literal 126 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDD3?#L31Vw-pXMj(LtFVB;|NsA^A|krQzuo}~ zGUgZgg)p99R6YyHQTB9k4AD5BoFJhfz{M8wn8mED literal 0 HcmV?d00001 diff --git a/pinokio.js b/pinokio.js index 3aa8750..9963047 100644 --- a/pinokio.js +++ b/pinokio.js @@ -54,6 +54,14 @@ module.exports = { cwd: info.cwd() }, }, + { + image: "/asset/plugin/dev/opencode.png", + text: "OpenCode", + href: "/run/plugin/dev/opencode.json", + params: { + cwd: info.cwd() + }, + }, { image: "/asset/plugin/dev/crush.png", text: "Crush",