Title: Think

Content: AI is thinking.
This commit is contained in:
ilguappo 2024-08-07 03:34:15 -07:00
parent cd5ee84da7
commit 78b72c3e36

View File

@ -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