MCPcopy Create free account
hub / github.com/AI45Lab/Code / registry

Function registry

core/src/agent_api/session_commands.rs:12–17  ·  view source on GitHub ↗
(session: &AgentSession)

Source from the content-addressed store, hash-verified

10use std::sync::{Arc, MutexGuard};
11
12pub(super) fn registry(session: &AgentSession) -> MutexGuard<'_, CommandRegistry> {
13 session
14 .command_registry
15 .lock()
16 .expect("command_registry lock poisoned")
17}
18
19pub(super) fn register(session: &AgentSession, cmd: Arc<dyn SlashCommand>) {
20 registry(session).register(cmd);

Callers 4

command_registryMethod · 0.85
initMethod · 0.85
registerFunction · 0.85
dispatchFunction · 0.85

Calls 1

expectMethod · 0.80

Tested by

no test coverage detected