mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-04 19:55:00 +00:00
better in chat commands table
This commit is contained in:
parent
2a506d4d15
commit
9ab36b565d
3 changed files with 31 additions and 23 deletions
|
@ -680,17 +680,21 @@ class Commands:
|
|||
def get_help_md(self):
|
||||
"Show help about all commands in markdown"
|
||||
|
||||
res = ""
|
||||
res = """
|
||||
|Command|Description|
|
||||
|:------|:----------|
|
||||
"""
|
||||
commands = sorted(self.get_commands())
|
||||
for cmd in commands:
|
||||
cmd_method_name = f"cmd_{cmd[1:]}"
|
||||
cmd_method = getattr(self, cmd_method_name, None)
|
||||
if cmd_method:
|
||||
description = cmd_method.__doc__
|
||||
res += f"- **{cmd}** {description}\n"
|
||||
res += f"| **{cmd}** | {description} |\n"
|
||||
else:
|
||||
res += f"- **{cmd}**\n"
|
||||
res += f"| **{cmd}** | |\n"
|
||||
|
||||
res += "\n"
|
||||
return res
|
||||
|
||||
def cmd_voice(self, args):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue