diff --git a/frontend/assets/images/icons/copilot.svg b/frontend/assets/images/icons/copilot.svg new file mode 100644 index 0000000000..1d675333cb --- /dev/null +++ b/frontend/assets/images/icons/copilot.svg @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/frontend/assets/images/icons/flash.svg b/frontend/assets/images/icons/flash.svg new file mode 100644 index 0000000000..43c6d949ad --- /dev/null +++ b/frontend/assets/images/icons/flash.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/frontend/assets/images/icons/padlock2.svg b/frontend/assets/images/icons/padlock2.svg new file mode 100644 index 0000000000..7f69c86803 --- /dev/null +++ b/frontend/assets/images/icons/padlock2.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/frontend/assets/images/icons/portal-close.svg b/frontend/assets/images/icons/portal-close.svg index cf6d2a465e..bf3cba1f41 100644 --- a/frontend/assets/images/icons/portal-close.svg +++ b/frontend/assets/images/icons/portal-close.svg @@ -1,14 +1,3 @@ - - + \ No newline at end of file diff --git a/frontend/assets/images/icons/portal-open.svg b/frontend/assets/images/icons/portal-open.svg index 3a13b0397e..88acba83ad 100644 --- a/frontend/assets/images/icons/portal-open.svg +++ b/frontend/assets/images/icons/portal-open.svg @@ -1,14 +1,3 @@ - - + \ No newline at end of file diff --git a/frontend/src/CopilotSettings/ApiKeyContainer.jsx b/frontend/src/CopilotSettings/ApiKeyContainer.jsx new file mode 100644 index 0000000000..6e8032e4d6 --- /dev/null +++ b/frontend/src/CopilotSettings/ApiKeyContainer.jsx @@ -0,0 +1,77 @@ +import React, { useEffect, useState } from 'react'; +import { Button } from '@/_ui/LeftSidebar'; +import { Alert } from '@/_ui/Alert/'; + +export const ApiKeyContainer = ({ + copilotApiKey = '', + handleOnSave, + isLoading = false, + darkMode, + isCopilotEnabled, +}) => { + const [inputValue, setInputValue] = useState(copilotApiKey); + + const handleOnchange = (e) => { + setInputValue(e.target.value); + }; + + useEffect(() => { + setInputValue(copilotApiKey); + }, [copilotApiKey]); + + return ( +
+ AI copilot helps you write your queries + faster. It uses OpenAI's GPT-3.5 to suggest queries based on your data. +
+ + ++ AI copilot helps you write your queries + faster. It uses OpenAI's GPT-3.5 to suggest queries based on your data. +
+ +{componentName ?? 'Editor'}
+
+ {componentName ?? 'Editor'}
+