From 899e4c719a173e6ea770ff516d238692598a0956 Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Thu, 10 Aug 2023 17:36:07 +0300 Subject: [PATCH] chore: add openai timeout request & ai block result padding --- inc/server/class-prompt-server.php | 1 + src/blocks/blocks/content-generator/editor.scss | 12 +++++++++--- src/blocks/components/prompt/editor.scss | 4 ---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/inc/server/class-prompt-server.php b/inc/server/class-prompt-server.php index 4494765c1..dfcff84b3 100644 --- a/inc/server/class-prompt-server.php +++ b/inc/server/class-prompt-server.php @@ -193,6 +193,7 @@ function ( $key ) { 'Content-Type' => 'application/json', ), 'body' => wp_json_encode( $body ), + 'timeout' => 2 * MINUTE_IN_SECONDS, ) ); diff --git a/src/blocks/blocks/content-generator/editor.scss b/src/blocks/blocks/content-generator/editor.scss index 204a1f9ce..b77904d10 100644 --- a/src/blocks/blocks/content-generator/editor.scss +++ b/src/blocks/blocks/content-generator/editor.scss @@ -10,9 +10,15 @@ border: 1px solid #1E1E1E; } - .prompt-result__content .wp-block-themeisle-blocks-form .wp-block-button { - display: none; - } + .prompt-result__content { + .wp-block-themeisle-blocks-form .wp-block-button { + display: none; + } + + &> div:not(.prompt-input__container):last-child { + padding: 10px; + } + } .o-actions { display: flex; diff --git a/src/blocks/components/prompt/editor.scss b/src/blocks/components/prompt/editor.scss index db5cdd24e..eefd7b374 100644 --- a/src/blocks/components/prompt/editor.scss +++ b/src/blocks/components/prompt/editor.scss @@ -42,10 +42,6 @@ align-items: center; justify-content: center; margin-top: 10px; - - :not(:last-child) { - margin-bottom: 10px; - } .prompt-input__input__container { display: flex;