Download packages/core/test/plugin/fixtures/config-promise-plugin.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 337 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/core/test/plugin/fixtures/config-promise-plugin.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/core/test/plugin/fixtures/config-promise-plugin.ts
-
curl -L -o config-promise-plugin.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/core/test/plugin/fixtures/config-promise-plugin.ts
337 Bytes
| import { define } from "@opencode-ai/plugin/v2/promise" | |
| export default define({ | |
| id: "config-promise-plugin", | |
| setup: async (ctx) => { | |
| await ctx.agent.transform((agents) => { | |
| agents.update("configured", (agent) => { | |
| agent.description = ctx.options.description | |
| agent.mode = "subagent" | |
| }) | |
| }) | |
| }, | |
| }) | |