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

Function addPluginEntry

packages/opencode/src/plugin/tui/runtime.ts:653–665  ·  view source on GitHub ↗
(state: RuntimeState, plugin: PluginEntry)

Source from the content-addressed store, hash-verified

651}
652
653function addPluginEntry(state: RuntimeState, plugin: PluginEntry) {
654 if (state.plugins_by_id.has(plugin.id)) {
655 fail("duplicate tui plugin id", {
656 id: plugin.id,
657 path: plugin.load.spec,
658 })
659 return false
660 }
661
662 state.plugins_by_id.set(plugin.id, plugin)
663 state.plugins.push(plugin)
664 return true
665}
666
667function applyInitialPluginEnabledState(state: RuntimeState, config: TuiConfig.Resolved) {
668 const map = pluginEnabledState(state, config)

Callers 2

addExternalPluginEntriesFunction · 0.85
loadFunction · 0.85

Calls 3

pushMethod · 0.80
failFunction · 0.70
setMethod · 0.45

Tested by

no test coverage detected