MCPcopy Index your code
hub / github.com/anomalyco/opencode / resolveLoadedPlugins

Function resolveLoadedPlugins

packages/opencode/src/config/config.ts:101–109  ·  view source on GitHub ↗
(config: T, filepath: string)

Source from the content-addressed store, hash-verified

99}
100
101async function resolveLoadedPlugins<T extends { plugin?: ConfigPluginV1.Spec[] }>(config: T, filepath: string) {
102 if (!config.plugin) return config
103 for (let i = 0; i < config.plugin.length; i++) {
104 // Normalize path-like plugin specs while we still know which config file declared them.
105 // This prevents `./plugin.ts` from being reinterpreted relative to some later merge location.
106 config.plugin[i] = await ConfigPlugin.resolvePluginSpec(config.plugin[i], filepath)
107 }
108 return config
109}
110
111type Info = ConfigV1.Info & {
112 // plugin_origins is derived state, not a persisted config field. It keeps each winning plugin spec together

Callers 1

config.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected