Jelajahi Sumber

fix: js plugin support as per documentation (#1896)

Aiden Cline 1 tahun lalu
induk
melakukan
0c4fe73cbf
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      packages/opencode/src/config/config.ts

+ 2 - 2
packages/opencode/src/config/config.ts

@@ -105,8 +105,8 @@ export namespace Config {
     result.plugin = result.plugin || []
     result.plugin = result.plugin || []
     result.plugin.push(
     result.plugin.push(
       ...[
       ...[
-        ...(await Filesystem.globUp("plugin/*.ts", Global.Path.config, Global.Path.config)),
-        ...(await Filesystem.globUp(".opencode/plugin/*.ts", app.path.cwd, app.path.root)),
+        ...(await Filesystem.globUp("plugin/*.{ts,js}", Global.Path.config, Global.Path.config)),
+        ...(await Filesystem.globUp(".opencode/plugin/*.{ts,js}", app.path.cwd, app.path.root)),
       ].map((x) => "file://" + x),
       ].map((x) => "file://" + x),
     )
     )