This commit is contained in:
Paul Gauthier 2023-05-09 00:16:17 -07:00
parent 3c1681942a
commit 1b57a6a703
2 changed files with 5 additions and 3 deletions

View file

@ -1,10 +1,10 @@
import os
import sys
import argparse
from pathlib import Path
from dotenv import load_dotenv
from coder import Coder
def main():
load_dotenv()
env_prefix = "CODER_"
@ -19,7 +19,7 @@ def main():
"--history-file",
metavar="HISTORY_FILE",
default=os.environ.get("CODER_HISTORY_FILE", ".coder.history"),
help="Specify the history file (default: .coder.history or value from CODER_HISTORY_FILE environment variable)",
help="Specify the history file (default: .coder.history)",
)
parser.add_argument(
"--model",
@ -75,6 +75,7 @@ def main():
coder.run()
if __name__ == "__main__":
status = main()
sys.exit(status)

View file

@ -52,6 +52,7 @@ def quoted_file(fname):
prompt += "\n```\n"
return prompt
def strip_quoted_wrapping(res, fname=None):
if not res:
return res