Skip to content

A skill to stop your coding agent from burying the answer. ADHD-friendly output.

Fix #132: import OpenCode plugin via pathToFileURL for Windows

FekyBazdb0780f040cf
diff --git a/tests/opencode_plugin_driver.mjs b/tests/opencode_plugin_driver.mjs
index 2f19f28..943d286 100644
--- a/tests/opencode_plugin_driver.mjs
+++ b/tests/opencode_plugin_driver.mjs
@@ -2,8 +2,10 @@
// `experimental.chat.system.transform` hook against an empty system prompt, and
// prints the resulting system text so tests can assert on the injected banner.
// Nothing is printed when the hook injects nothing (always-on flag absent).
+import { pathToFileURL } from 'node:url';
+
const pluginPath = process.argv[2];
-const { default: init } = await import(pluginPath);
+const { default: init } = await import(pathToFileURL(pluginPath).href);
const hooks = await init();
const output = { system: [] };
await hooks['experimental.chat.system.transform']({}, output);