From f9af9eec008f48757980914494821b64a038b611 Mon Sep 17 00:00:00 2001 From: Luiz Kowalski Date: Fri, 1 Dec 2023 18:53:15 -0300 Subject: [PATCH] Jetpack AI: Include usage panel on block settings sidebar [PoC] (#34341) * Add the Usage Panel on the block settings sidebar * Add changelog file * Remove the heading of the panel --- ...tpack-ai-include-usage-panel-on-block-settings-sidebar | 4 ++++ .../jetpack/extensions/blocks/ai-assistant/edit.js | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 projects/plugins/jetpack/changelog/poc-jetpack-ai-include-usage-panel-on-block-settings-sidebar diff --git a/projects/plugins/jetpack/changelog/poc-jetpack-ai-include-usage-panel-on-block-settings-sidebar b/projects/plugins/jetpack/changelog/poc-jetpack-ai-include-usage-panel-on-block-settings-sidebar new file mode 100644 index 0000000000000..e7f928d93e085 --- /dev/null +++ b/projects/plugins/jetpack/changelog/poc-jetpack-ai-include-usage-panel-on-block-settings-sidebar @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Jetpack AI: Add Usage Panel to the block settings sidebar. diff --git a/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js b/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js index 228bb0193f883..21b288d0ef02a 100644 --- a/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js +++ b/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js @@ -27,6 +27,7 @@ import { useEffect, useRef } from 'react'; /** * Internal dependencies */ +import UsagePanel from '../../plugins/ai-assistant-plugin/components/usage-panel'; import ConnectPrompt from './components/connect-prompt'; import ImageWithSelect from './components/image-with-select'; import { promptTemplates } from './components/prompt-templates-control'; @@ -446,6 +447,13 @@ export default function AIAssistantEdit( { attributes, setAttributes, clientId, { ...innerBlocks } /> ) } + + + + + + + { isPlaygroundVisible && (