mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
move history file into Coder
This commit is contained in:
parent
81b8d193bc
commit
fed71fef4c
1 changed files with 7 additions and 12 deletions
19
coder.py
19
coder.py
|
@ -26,25 +26,20 @@ from dump import dump
|
||||||
|
|
||||||
import prompts
|
import prompts
|
||||||
|
|
||||||
class Coder:
|
|
||||||
history_file = ".coder.history"
|
|
||||||
|
|
||||||
def __init__(self, main_model, files, pretty):
|
|
||||||
# ...
|
|
||||||
try:
|
|
||||||
readline.read_history_file(self.history_file)
|
|
||||||
except FileNotFoundError:
|
|
||||||
pass
|
|
||||||
# ...
|
|
||||||
openai.api_key = os.getenv("OPENAI_API_KEY")
|
openai.api_key = os.getenv("OPENAI_API_KEY")
|
||||||
|
|
||||||
|
|
||||||
class Coder:
|
class Coder:
|
||||||
fnames = dict()
|
fnames = dict()
|
||||||
last_modified = 0
|
last_modified = 0
|
||||||
repo = None
|
repo = None
|
||||||
|
history_file = ".coder.history"
|
||||||
|
|
||||||
def __init__(self, main_model, files, pretty):
|
def __init__(self, main_model, files, pretty):
|
||||||
|
try:
|
||||||
|
readline.read_history_file(self.history_file)
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
self.main_model = main_model
|
self.main_model = main_model
|
||||||
|
|
||||||
if pretty:
|
if pretty:
|
||||||
|
@ -634,4 +629,4 @@ def main():
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
status = main()
|
status = main()
|
||||||
sys.exit(status)
|
sys.exit(status)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue