Skip to content

Commit 4030d25

Browse files
committed
feat(plugin): load SkyCode plugin from environment variable for desktop app integration
1 parent 10eda39 commit 4030d25

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/opencode/src/plugin/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ export namespace Plugin {
2727
$: Bun.$,
2828
}
2929
const plugins = [...(config.plugin ?? [])]
30+
31+
// SkyCode: Load plugin from environment variable if set (for bundled OpenCode)
32+
// This allows SkyCode desktop app to inject its plugin without requiring config files
33+
const skycodePluginPath = process.env.SKYCODE_PLUGIN_PATH
34+
if (skycodePluginPath) {
35+
log.info("loading SkyCode plugin from environment", { path: skycodePluginPath })
36+
plugins.push(skycodePluginPath)
37+
}
38+
3039
if (!Flag.OPENCODE_DISABLE_DEFAULT_PLUGINS) {
3140
plugins.push("[email protected]")
3241
plugins.push("[email protected]")

0 commit comments

Comments
 (0)