diff --git a/main.py b/main.py index 7be62510e..030c993c4 100644 --- a/main.py +++ b/main.py @@ -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) diff --git a/utils.py b/utils.py index c110a8295..13a486415 100644 --- a/utils.py +++ b/utils.py @@ -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 @@ -68,4 +69,4 @@ def strip_quoted_wrapping(res, fname=None): if res and res[-1] != "\n": res += "\n" - return res \ No newline at end of file + return res