MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / execute_command

Function execute_command

claw-code/src/commands.py:75–80  ·  view source on GitHub ↗
(name: str, prompt: str = '')

Source from the content-addressed store, hash-verified

73
74
75def execute_command(name: str, prompt: str = '') -> CommandExecution:
76 module = get_command(name)
77 if module is None:
78 return CommandExecution(name=name, source_hint='', prompt=prompt, handled=False, message=f'Unknown mirrored command: {name}')
79 action = f"Mirrored command '{module.name}' from {module.source_hint} would handle prompt {prompt!r}."
80 return CommandExecution(name=module.name, source_hint=module.source_hint, prompt=prompt, handled=True, message=action)
81
82
83def render_command_index(limit: int = 20, query: str | None = None) -> str:

Callers 2

executeMethod · 0.85
mainFunction · 0.85

Calls 2

get_commandFunction · 0.85
CommandExecutionClass · 0.85

Tested by

no test coverage detected