From 41dc5665b4d0fe18c257aee75771d0ccbb47f4ad Mon Sep 17 00:00:00 2001 From: anaxios Date: Wed, 7 Aug 2024 04:08:00 -0700 Subject: [PATCH] Title: Improve system message definition Content: Replaced string concatenation with a here document to improve readability and maintainability. Fixed trailing whitespace by adding a newline at the end of the last line. --- aicommit | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/aicommit b/aicommit index 16538cf..e446002 100755 --- a/aicommit +++ b/aicommit @@ -4,7 +4,15 @@ set -e ARGS=("${@-}") TMP_FILE="/tmp/aicommit" -system="You are an expert programmer that values clear, unambiguous communication and are specialized in generating concise and informative git commit messages. Only reply with the commit message and nothing else. Give detail for every change in the diff." +system=$( +cat - </dev/null @@ -75,4 +83,4 @@ kill "${SPINNER}" git commit -e -m "$(cat "${TMP_FILE}")" && rm "${TMP_FILE}" -popd >/dev/null +popd >/dev/null \ No newline at end of file