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

Method register

core/src/commands.rs:144–146  ·  view source on GitHub ↗

Register a custom command.

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

Source from the content-addressed store, hash-verified

142
143 /// Register a custom command.
144 pub fn register(&mut self, cmd: Arc<dyn SlashCommand>) {
145 self.commands.insert(cmd.name().to_string(), cmd);
146 }
147
148 /// Unregister a command by name.
149 pub fn unregister(&mut self, name: &str) -> Option<Arc<dyn SlashCommand>> {

Callers 2

newMethod · 0.45
test_custom_commandFunction · 0.45

Calls 2

insertMethod · 0.45
nameMethod · 0.45

Tested by 1

test_custom_commandFunction · 0.36