From 78b72c3e364b0038b1aa86b7aa0bffd60bee1d28 Mon Sep 17 00:00:00 2001 From: anaxios Date: Wed, 7 Aug 2024 03:34:15 -0700 Subject: [PATCH] Title: Think Content: AI is thinking. --- aicommit | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aicommit b/aicommit index b0af910..177dcaf 100755 --- a/aicommit +++ b/aicommit @@ -59,10 +59,13 @@ if $(hasFlag -r --reset); then kill "${SPINNER}" fi +spin "AI is thinking." & +SPINNER="$!" curl -s "https://infer.x64.world/chat" \ -X POST \ -H "Content-Type: application/json" \ -d "${message}" | jq -r '.content | gsub("\""; "")' >"${TMP_FILE}" +kill "${SPINNER}" # trunk-ignore(shellcheck/SC2181) if [[ 0 -ne $? ]]; then @@ -70,6 +73,7 @@ if [[ 0 -ne $? ]]; then exit 1 fi + git commit -e -m "$(cat "${TMP_FILE}")" && rm "${TMP_FILE}" popd >/dev/null