fix: Simplify get_help_md function in commands.py

This commit is contained in:
Paul Gauthier 2024-09-11 14:38:23 -07:00 committed by Paul Gauthier (aider)
parent 05b3b3df88
commit 36fa773376
2 changed files with 5 additions and 5 deletions

View file

@ -1187,11 +1187,7 @@ def parse_quoted_filenames(args):
def get_help_md():
from aider.coders import Coder
from aider.models import Model
coder = Coder(Model("gpt-3.5-turbo"), None)
md = coder.commands.get_help_md()
md = Commands(None, None).get_help_md()
return md

View file

@ -300,6 +300,10 @@ def sanity_check_repo(repo, io):
if not repo:
return True
if not repo.repo.working_tree_dir:
io.tool_error("The git repo does not seem to have a working tree?")
return False
try:
repo.get_tracked_files()
if not repo.git_repo_error: