mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 06:44:59 +00:00
restored basic help
This commit is contained in:
parent
f80df3b5c5
commit
ca6fcc42c8
2 changed files with 24 additions and 1 deletions
|
@ -623,8 +623,28 @@ class Commands:
|
||||||
for file in chat_files:
|
for file in chat_files:
|
||||||
self.io.tool_output(f" {file}")
|
self.io.tool_output(f" {file}")
|
||||||
|
|
||||||
|
def basic_help(self):
|
||||||
|
commands = sorted(self.get_commands())
|
||||||
|
pad = max(len(cmd) for cmd in commands)
|
||||||
|
pad = "{cmd:" + str(pad) + "}"
|
||||||
|
for cmd in commands:
|
||||||
|
cmd_method_name = f"cmd_{cmd[1:]}"
|
||||||
|
cmd_method = getattr(self, cmd_method_name, None)
|
||||||
|
cmd = pad.format(cmd=cmd)
|
||||||
|
if cmd_method:
|
||||||
|
description = cmd_method.__doc__
|
||||||
|
self.io.tool_output(f"{cmd} {description}")
|
||||||
|
else:
|
||||||
|
self.io.tool_output(f"{cmd} No description available.")
|
||||||
|
self.io.tool_output()
|
||||||
|
self.io.tool_output("Use `/help <question>` to ask questions about how to use aider.")
|
||||||
|
|
||||||
def cmd_help(self, args):
|
def cmd_help(self, args):
|
||||||
"Show help about all commands"
|
"Ask questions about aider"
|
||||||
|
|
||||||
|
if not args.strip():
|
||||||
|
self.basic_help()
|
||||||
|
return
|
||||||
|
|
||||||
from aider.coders import Coder
|
from aider.coders import Coder
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,9 @@ def fname_to_url(filepath):
|
||||||
docid = ""
|
docid = ""
|
||||||
if filepath.startswith("website/_includes/"):
|
if filepath.startswith("website/_includes/"):
|
||||||
pass
|
pass
|
||||||
|
elif "HISTORY.html" in filepath:
|
||||||
|
# too much stale info
|
||||||
|
pass
|
||||||
elif filepath.startswith(website):
|
elif filepath.startswith(website):
|
||||||
docid = filepath[len(website) :]
|
docid = filepath[len(website) :]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue