File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ while $running; do
292292 response_data=$( echo $response | jq -r ' .choices[].message.content' )
293293
294294 if [[ " $prompt " =~ ^command: ]]; then
295- echo -e " ${CHATGPT_CYAN_LABEL} ${response_data} \n "
295+ echo -e " ${CHATGPT_CYAN_LABEL} ${response_data} " | fold -s -w $COLUMNS
296296 dangerous_commands=(" rm" " >" " mv" " mkfs" " :(){:|:&};" " dd" " chmod" " wget" " curl" )
297297
298298 for dangerous_command in " ${dangerous_commands[@]} " ; do
@@ -324,7 +324,7 @@ while $running; do
324324 handle_error " $response "
325325 response_data=$( echo " $response " | jq -r ' .choices[].message.content' )
326326
327- echo -e " ${CHATGPT_CYAN_LABEL}${response_data} "
327+ echo -e " ${CHATGPT_CYAN_LABEL}${response_data} " | fold -s -w $COLUMNS
328328
329329 escaped_response_data=$( echo " $response_data " | sed ' s/"/\\"/g' )
330330 add_assistant_response_to_chat_message " $chat_message " " $escaped_response_data "
@@ -344,7 +344,7 @@ while $running; do
344344 request_to_completions " $request_prompt "
345345 handle_error " $response "
346346 response_data=$( echo " $response " | jq -r ' .choices[].text' | sed ' 1,2d; s/^A://g' )
347- echo -e " ${CHATGPT_CYAN_LABEL}${response_data} "
347+ echo -e " ${CHATGPT_CYAN_LABEL}${response_data} " | fold -s -w $COLUMNS
348348
349349 if [ " $CONTEXT " = true ]; then
350350 escaped_response_data=$( echo " $response_data " | sed ' s/"/\\"/g' )
You can’t perform that action at this time.
0 commit comments