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 0000000..8f14a05 Binary files /dev/null and b/dev/opencode.png differ 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",