if the user mentions a file, add it to the chat

This commit is contained in:
Paul Gauthier 2023-05-27 08:11:41 -07:00
parent 090b46983c
commit dbb4870021

View file

@ -20,9 +20,11 @@ from aider import prompts
from aider.commands import Commands
from aider.repomap import RepoMap
class MissingAPIKeyError(ValueError):
pass
class Coder:
abs_fnames = None
repo = None
@ -46,7 +48,7 @@ class Coder:
if openai_api_key:
openai.api_key = openai_api_key
else:
raise MissingAPIKeyError('No OpenAI API key provided.')
raise MissingAPIKeyError("No OpenAI API key provided.")
self.verbose = verbose
self.abs_fnames = set()
@ -260,6 +262,8 @@ class Coder:
if self.commands.is_command(inp):
return self.commands.run(inp)
self.check_for_file_mentions(inp)
return self.send_new_user_message(inp)
def send_new_user_message(self, inp):