From 28afb4942dc7b9de5ae350247d3e416324fb3a75 Mon Sep 17 00:00:00 2001 From: Triston Armstrong Date: Sun, 12 Jan 2025 13:10:43 -0500 Subject: [PATCH] "feat(commit_handler): Update commit handler to generate commit message based on diff changes." --- src/commit_handler.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/commit_handler.rs b/src/commit_handler.rs index 5d46159..07b516c 100644 --- a/src/commit_handler.rs +++ b/src/commit_handler.rs @@ -4,7 +4,17 @@ pub struct CommitHandler {} impl CommitHandler { pub fn new() -> Option<(String, String)> { - let dirs = String::from("create a short commit message from this diff, with format Task(): . only respond with the commit message"); - Some((dirs, GitGrabber::get_diff())) + let dirs = String::from(format!(" + + change_type: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert + + create a short commit message from this entire diff, with format (): . + the commit message should vaguely describe the changes present unless a small change is made that can be + precisely described withtin a short commit message + + Only respond with the commit message. + ")); + let prompt = GitGrabber::get_diff(); + Some((dirs, prompt)) } }