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

Method register_command

core/src/agent_api.rs:627–629  ·  view source on GitHub ↗

Register a custom slash command. Takes `&self` so it can be called on a shared `Arc `.

(&self, cmd: Arc<dyn crate::commands::SlashCommand>)

Source from the content-addressed store, hash-verified

625 ///
626 /// Takes `&self` so it can be called on a shared `Arc<AgentSession>`.
627 pub fn register_command(&self, cmd: Arc<dyn crate::commands::SlashCommand>) {
628 session_commands::register(self, cmd);
629 }
630
631 /// Return whether [`close`](Self::close) has been called on this session.
632 ///

Callers

nothing calls this directly

Calls 1

registerFunction · 0.85

Tested by

no test coverage detected