diff --git a/dist/index.mjs b/dist/index.mjs index 8f4cfc5..4ecc512 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -2511,6 +2511,9 @@ var OpenCodeIntercomPlugin = async ({ client, directory, serverUrl }) => { return { value: error }; } async function logResult(step, result, details = {}) { + if (!debugInject) { + return; + } const responseBody = result.response ? await result.response.clone().text().catch(() => void 0) : void 0; logInject(step, { ...details, diff --git a/dist/plugin.mjs b/dist/plugin.mjs index f3e897e..bf6c2e4 100644 --- a/dist/plugin.mjs +++ b/dist/plugin.mjs @@ -2511,6 +2511,9 @@ var OpenCodeIntercomPlugin = async ({ client, directory, serverUrl }) => { return { value: error }; } async function logResult(step, result, details = {}) { + if (!debugInject) { + return; + } const responseBody = result.response ? await result.response.clone().text().catch(() => void 0) : void 0; logInject(step, { ...details, diff --git a/opencode/plugin.ts b/opencode/plugin.ts index 801f5e0..ce8b373 100644 --- a/opencode/plugin.ts +++ b/opencode/plugin.ts @@ -73,6 +73,9 @@ const OpenCodeIntercomPlugin: Plugin = async ({ client, directory, serverUrl }) error?: unknown; response?: Response; }, details: Record = {}): Promise { + if (!debugInject) { + return; + } const responseBody = result.response ? await result.response.clone().text().catch(() => undefined) : undefined;