diff --git a/projects/plugins/jetpack/changelog/remove-ai-assistant-try-again b/projects/plugins/jetpack/changelog/remove-ai-assistant-try-again new file mode 100644 index 0000000000000..8f6da4118ea4b --- /dev/null +++ b/projects/plugins/jetpack/changelog/remove-ai-assistant-try-again @@ -0,0 +1,4 @@ +Significance: minor +Type: enhancement + +AI Assistant: remove "Try Again" toolbar button diff --git a/projects/plugins/jetpack/extensions/blocks/ai-assistant/components/toolbar-controls/index.js b/projects/plugins/jetpack/extensions/blocks/ai-assistant/components/toolbar-controls/index.js index dc13c790e58c2..cea0738ed0816 100644 --- a/projects/plugins/jetpack/extensions/blocks/ai-assistant/components/toolbar-controls/index.js +++ b/projects/plugins/jetpack/extensions/blocks/ai-assistant/components/toolbar-controls/index.js @@ -101,9 +101,9 @@ const ToolbarControls = ( { ) } - { ( showRetry || contentIsLoaded ) && ( + { ( showRetry || handleTryAgain ) && ( - { ! showRetry && contentIsLoaded && ( + { ! showRetry && contentIsLoaded && handleTryAgain && ( { __( 'Try Again', 'jetpack' ) } diff --git a/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js b/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js index c1ac647d9c93d..7354bf6c7aee2 100644 --- a/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js +++ b/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js @@ -525,7 +525,7 @@ export default function AIAssistantEdit( { attributes, setAttributes, clientId, handleAcceptTitle={ handleAcceptTitle } handleGetSuggestion={ handleGetSuggestion } handleImageRequest={ handleImageRequest } - handleTryAgain={ handleTryAgain } + handleTryAgain={ null } showRetry={ showRetry } contentBefore={ contentBefore } hasPostTitle={ !! postTitle?.length }