MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / global

Function global

crates/opencode-plugin/src/lib.rs:296–300  ·  view source on GitHub ↗

Get the global plugin system, creating a default one if not initialized.

()

Source from the content-addressed store, hash-verified

294
295/// Get the global plugin system, creating a default one if not initialized.
296pub fn global() -> Arc<PluginSystem> {
297 GLOBAL_PLUGIN_SYSTEM
298 .get_or_init(|| Arc::new(PluginSystem::new()))
299 .clone()
300}
301
302/// Convenience: trigger a hook event on the global plugin system.
303/// Errors from individual hooks are logged but do not propagate.

Callers 2

triggerFunction · 0.85
trigger_collectFunction · 0.85

Calls 2

newFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected