-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (28 loc) · 1.18 KB
/
main.py
File metadata and controls
33 lines (28 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import sys
from summarization import get_project_summaries
from main_helpers import parse_arguments, process_prompt, process_modifications, validate_project, update_file_summary
from config_manager import load_config, create_config
from notification import play_chime, show_notification
import llm
def main():
args = parse_arguments()
config = load_config(args.project)
if not config:
config = create_config(args.project)
refined = process_prompt(args.prompt, args.project, refactor=args.refactor, entry_file=args.entry)
mods = process_modifications(args.prompt, refined, args.project)
result = validate_project(args.prompt, args.entry, args.project, config)
llm.print_token_usage()
if "Success" in result:
# for fname in mods:
# update_file_summary(fname, args.project)
play_chime("/System/Library/Sounds/Funk.aiff")
if args.refactor:
show_notification("Finished refactor task successfully")
else:
show_notification("Finished coding task successfully")
else:
play_chime("/System/Library/Sounds/Sosumi.aiff")
print("Validation failed.")
if __name__ == "__main__":
main()