mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
if the user mentions a file, add it to the chat
This commit is contained in:
parent
090b46983c
commit
dbb4870021
1 changed files with 5 additions and 1 deletions
|
@ -20,9 +20,11 @@ from aider import prompts
|
||||||
from aider.commands import Commands
|
from aider.commands import Commands
|
||||||
from aider.repomap import RepoMap
|
from aider.repomap import RepoMap
|
||||||
|
|
||||||
|
|
||||||
class MissingAPIKeyError(ValueError):
|
class MissingAPIKeyError(ValueError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Coder:
|
class Coder:
|
||||||
abs_fnames = None
|
abs_fnames = None
|
||||||
repo = None
|
repo = None
|
||||||
|
@ -46,7 +48,7 @@ class Coder:
|
||||||
if openai_api_key:
|
if openai_api_key:
|
||||||
openai.api_key = openai_api_key
|
openai.api_key = openai_api_key
|
||||||
else:
|
else:
|
||||||
raise MissingAPIKeyError('No OpenAI API key provided.')
|
raise MissingAPIKeyError("No OpenAI API key provided.")
|
||||||
|
|
||||||
self.verbose = verbose
|
self.verbose = verbose
|
||||||
self.abs_fnames = set()
|
self.abs_fnames = set()
|
||||||
|
@ -260,6 +262,8 @@ class Coder:
|
||||||
if self.commands.is_command(inp):
|
if self.commands.is_command(inp):
|
||||||
return self.commands.run(inp)
|
return self.commands.run(inp)
|
||||||
|
|
||||||
|
self.check_for_file_mentions(inp)
|
||||||
|
|
||||||
return self.send_new_user_message(inp)
|
return self.send_new_user_message(inp)
|
||||||
|
|
||||||
def send_new_user_message(self, inp):
|
def send_new_user_message(self, inp):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue