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