Skip to content

Commit d72b052

Browse files
committed
add processing when sending request
1 parent 3f13f0a commit d72b052

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

chatgpt.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ COMMAND_GENERATION_PROMPT="Return a one-line bash command with the functionality
99

1010
CHATGPT_CYAN_LABEL="\n\033[36mchatgpt \033[0m"
1111

12+
PROCESSING_LABEL="\033[90mprocessing... \033[0m"
13+
1214
# error handling function
1315
# $1 should be the response body
1416
handle_error() {
@@ -236,6 +238,9 @@ while $running; do
236238
if [ -z "$pipe_mode_prompt" ]; then
237239
echo -e "\nEnter a prompt:"
238240
read -e prompt
241+
if [ "$prompt" != "exit" ] && [ "$prompt" != "q" ]; then
242+
echo -e $PROCESSING_LABEL
243+
fi
239244
else
240245
# set vars for pipe mode
241246
prompt=${pipe_mode_prompt}

0 commit comments

Comments
 (0)