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

Function trigger

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

Convenience: trigger a hook event on the global plugin system. Errors from individual hooks are logged but do not propagate.

(context: HookContext)

Source from the content-addressed store, hash-verified

302/// Convenience: trigger a hook event on the global plugin system.
303/// Errors from individual hooks are logged but do not propagate.
304pub async fn trigger(context: HookContext) {
305 let system = global();
306 let results = system.trigger(context).await;
307 for result in results {
308 if let Err(e) = result {
309 tracing::warn!("Plugin hook error: {}", e);
310 }
311 }
312}
313
314/// Convenience: trigger a hook event and collect successful outputs.
315/// Errors from individual hooks are logged but do not propagate.

Callers 7

trigger_eventFunction · 0.85
trigger_session_eventFunction · 0.85
createMethod · 0.85
deleteMethod · 0.85
processMethod · 0.85
executeMethod · 0.85

Calls 2

globalFunction · 0.85
triggerMethod · 0.80

Tested by

no test coverage detected