|
|
@@ -44,12 +44,15 @@ export namespace Plugin {
|
|
|
hooks.push(init)
|
|
|
}
|
|
|
|
|
|
- const plugins: string[] = []
|
|
|
+ const plugins = []
|
|
|
if (!Flag.OPENCODE_DISABLE_DEFAULT_PLUGINS) {
|
|
|
plugins.push(...BUILTIN)
|
|
|
}
|
|
|
- plugins.push(...(config.plugin ?? []))
|
|
|
- if (plugins.length) await Config.waitForDependencies()
|
|
|
+ if (config.plugin) {
|
|
|
+ plugins.push(...config.plugin)
|
|
|
+ }
|
|
|
+ const wait = Flag.OPENCODE_DISABLE_DEFAULT_PLUGINS ? plugins.length : plugins.length > BUILTIN.length
|
|
|
+ if (wait) await Config.waitForDependencies()
|
|
|
|
|
|
for (let plugin of plugins) {
|
|
|
// ignore old codex plugin since it is supported first party now
|