MCPcopy
hub / github.com/Aider-AI/aider / run

Method run

aider/commands.py:312–332  ·  view source on GitHub ↗
(self, inp)

Source from the content-addressed store, hash-verified

310 return matching_commands, first_word, rest_inp
311
312 def run(self, inp):
313 if inp.startswith("!"):
314 self.coder.event("command_run")
315 return self.do_run("run", inp[1:])
316
317 res = self.matching_commands(inp)
318 if res is None:
319 return
320 matching_commands, first_word, rest_inp = res
321 if len(matching_commands) == 1:
322 command = matching_commands[0][1:]
323 self.coder.event(f"command_{command}")
324 return self.do_run(command, rest_inp)
325 elif first_word in matching_commands:
326 command = first_word[1:]
327 self.coder.event(f"command_{command}")
328 return self.do_run(command, rest_inp)
329 elif len(matching_commands) > 1:
330 self.io.tool_error(f"Ambiguous command: {', '.join(matching_commands)}")
331 else:
332 self.io.tool_error(f"Invalid command: {first_word}")
333
334 # any method called cmd_xxx becomes a command automatically.
335 # each one must take an args param.

Callers 15

cmd_loadMethod · 0.95
run_test_realFunction · 0.45
run_unit_testsFunction · 0.45
runFunction · 0.45
ring_bellMethod · 0.45
cmd_lintMethod · 0.45
cmd_gitMethod · 0.45
cmd_helpMethod · 0.45
_generic_chat_commandMethod · 0.45
run_installFunction · 0.45
flake8_lintMethod · 0.45
mainFunction · 0.45

Calls 4

do_runMethod · 0.95
matching_commandsMethod · 0.95
eventMethod · 0.45
tool_errorMethod · 0.45