From a34442af070e8ed6cc07cc3c5ff56ee57541572d Mon Sep 17 00:00:00 2001 From: AI Christianson Date: Tue, 10 Dec 2024 19:31:45 -0500 Subject: [PATCH] refactor: restructure main execution into proper entry point - Move main execution code into main() function - Update __main__.py to use main() as entry point - This enables the ra-aid command to work properly when installed --- ra_aid/__main__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ra_aid/__main__.py b/ra_aid/__main__.py index 19842e1..2effc47 100644 --- a/ra_aid/__main__.py +++ b/ra_aid/__main__.py @@ -230,7 +230,8 @@ def validate_environment(): print(f"- {error}", file=sys.stderr) sys.exit(1) -if __name__ == "__main__": +def main(): + """Main entry point for the ra-aid command line tool.""" validate_environment() args = parse_arguments() base_task = args.message @@ -301,3 +302,6 @@ Be very thorough in your research and emit lots of snippets, key facts. If you t get_memory_value('plan'), related_files ) + +if __name__ == "__main__": + main()