The open source coding agent.
TypeScript
docs: fix bad example (#1913)
Aiden Clinebb4b24a05fed
diff --git a/packages/web/src/content/docs/docs/plugins.mdx b/packages/web/src/content/docs/docs/plugins.mdxindex 08c697a62c3..22c78b0b39d 100644--- a/packages/web/src/content/docs/docs/plugins.mdx+++ b/packages/web/src/content/docs/docs/plugins.mdx@@ -93,13 +93,9 @@ Prevent opencode from reading `.env` files:```javascript title=".opencode/plugin/env-protection.js"export const EnvProtection = async ({ client, $ }) => {return {- tool: {- execute: {- before: async (input, output) => {- if (input.tool === "read" && output.args.filePath.includes(".env")) {- throw new Error("Do not read .env files")- }- }+ "tool.execute.before": async (input, output) => {+ if (input.tool === "read" && output.args.filePath.includes(".env")) {+ throw new Error("Do not read .env files")}}}