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
This commit is contained in:
AI Christianson 2024-12-10 19:31:45 -05:00
parent 7e4086807d
commit a34442af07
1 changed files with 5 additions and 1 deletions

View File

@ -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()