-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
21 lines (17 loc) · 672 Bytes
/
main.py
File metadata and controls
21 lines (17 loc) · 672 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from cli import parse_args
from git_utils import get_staged_files
from commit_logic import create_commit_prompt
from helper.ollama_client_direct import generate_commit_direct
def main():
args = parse_args()
repo_type = "yadm" if args.yadm else "git"
files = get_staged_files(repo_type)
if not files:
print("No changes to commit.")
return
use_content = args.smallchange or (len(files) <= 2 and not args.bigchange)
prompt = create_commit_prompt(files, use_content, repo_type, args.experimentalSum)
message = generate_commit_message(prompt, args.model, args.temperature)
print(message)
if __name__ == "__main__":
main()