mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
feat: add get_read_only_files_content function
This commit is contained in:
parent
f72e3b3a9b
commit
9bb2fdf65c
1 changed files with 13 additions and 0 deletions
|
@ -492,6 +492,19 @@ class Coder:
|
||||||
|
|
||||||
return prompt
|
return prompt
|
||||||
|
|
||||||
|
def get_read_only_files_content(self):
|
||||||
|
prompt = ""
|
||||||
|
for fname in self.abs_read_only_fnames:
|
||||||
|
content = self.io.read_text(fname)
|
||||||
|
if content is not None and not is_image_file(fname):
|
||||||
|
relative_fname = self.get_rel_fname(fname)
|
||||||
|
prompt += "\n"
|
||||||
|
prompt += relative_fname
|
||||||
|
prompt += f"\n{self.fence[0]}\n"
|
||||||
|
prompt += content
|
||||||
|
prompt += f"{self.fence[1]}\n"
|
||||||
|
return prompt
|
||||||
|
|
||||||
def get_cur_message_text(self):
|
def get_cur_message_text(self):
|
||||||
text = ""
|
text = ""
|
||||||
for msg in self.cur_messages:
|
for msg in self.cur_messages:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue