diff --git a/client/package.json b/client/package.json
index 4389315ad7..c8ecef2048 100644
--- a/client/package.json
+++ b/client/package.json
@@ -31,6 +31,7 @@
"axios": "^1.3.4",
"class-variance-authority": "^0.4.0",
"clsx": "^1.2.1",
+ "copy-to-clipboard": "^3.3.3",
"crypto-browserify": "^3.12.0",
"lodash": "^4.17.21",
"lucide-react": "^0.113.0",
diff --git a/client/src/components/Input/BingAIOptions/index.jsx b/client/src/components/Input/BingAIOptions/index.jsx
new file mode 100644
index 0000000000..c17a125334
--- /dev/null
+++ b/client/src/components/Input/BingAIOptions/index.jsx
@@ -0,0 +1,102 @@
+import React, { useState, useEffect, forwardRef } from 'react';
+import { useRecoilValue, useRecoilState } from 'recoil';
+import { cn } from '~/utils';
+import { Button } from '../../ui/Button.tsx';
+import { Tabs, TabsList, TabsTrigger } from '../../ui/Tabs.tsx';
+
+import store from '~/store';
+
+// function BingStyles(props, ref) {
+// const [conversation, setConversation] = useRecoilState(store.conversation) || {};
+// const { endpoint, conversationId, jailbreak, toneStyle } = conversation;
+// const messages = useRecoilValue(store.messages);
+
+// const isBing = endpoint === 'bingAI';
+
+// const show = isBing && (!conversationId || messages?.length === 0 || props.show);
+// const defaultClasses =
+// 'p-2 rounded-md min-w-[75px] font-normal bg-white/[.60] dark:bg-gray-700 text-black text-xs';
+// const defaultSelected = cn(defaultClasses, 'font-medium data-[state=active]:text-white text-xs text-white');
+
+// const selectedClass = val => val + '-tab ' + defaultSelected;
+
+// const changeHandler = value => {
+// setConversation(prevState => ({ ...prevState, toneStyle: value }));
+// };
+
+function BingAIOptions({ ref }) {
+ const [conversation, setConversation] = useRecoilState(store.conversation) || {};
+ const messages = useRecoilValue(store.messages);
+ const { endpoint, conversationId } = conversation;
+
+ if (endpoint !== 'bingAI') return null;
+
+ const isBing = endpoint === 'bingAI';
+ const show = isBing && (!conversationId || messages?.length === 0);
+
+ const changeHandler = value => {
+ setConversation(prevState => ({ ...prevState, toneStyle: value }));
+ };
+
+ const { toneStyle } = conversation;
+
+ const cardStyle =
+ 'shadow-md rounded-md min-w-[75px] font-normal bg-white border-black/10 border dark:bg-gray-700 text-black dark:text-white';
+ const defaultClasses =
+ 'p-2 rounded-md min-w-[75px] font-normal bg-white/[.60] dark:bg-gray-700 text-black text-xs';
+ const defaultSelected = cn(defaultClasses, 'font-medium data-[state=active]:text-white text-xs text-white');
+ const selectedClass = val => val + '-tab ' + defaultSelected;
+
+ //
+ return (
+
+
+
+
+ {'Creative'}
+
+
+ {'Fast'}
+
+
+ {'Balanced'}
+
+
+ {'Precise'}
+
+
+
+
+ );
+}
+
+export default BingAIOptions;
diff --git a/client/src/components/Input/OpenAIOptions/index.jsx b/client/src/components/Input/OpenAIOptions/index.jsx
index cbc9b1f15d..bce4b5fc33 100644
--- a/client/src/components/Input/OpenAIOptions/index.jsx
+++ b/client/src/components/Input/OpenAIOptions/index.jsx
@@ -1,14 +1,14 @@
import React, { useEffect, useState } from 'react';
-import { useSetRecoilState } from 'recoil';
+import { useRecoilState } from 'recoil';
import ModelSelect from './ModelSelect';
import { Button } from '../../ui/Button.tsx';
import store from '~/store';
-function OpenAIOptions({ conversation = {} }) {
- const { endpoint } = conversation;
+function OpenAIOptions() {
const [advancedMode, setAdvancedMode] = useState(false);
- const setConversation = useSetRecoilState(store.conversation);
+ const [conversation, setConversation] = useRecoilState(store.conversation) || {};
+ const { endpoint } = conversation;
const triggerAdvancedMode = () => setAdvancedMode(prev => !prev);
diff --git a/client/src/components/Input/SubmitButton.jsx b/client/src/components/Input/SubmitButton.jsx
index a2d65574ca..1198a4eee2 100644
--- a/client/src/components/Input/SubmitButton.jsx
+++ b/client/src/components/Input/SubmitButton.jsx
@@ -1,65 +1,78 @@
import React from 'react';
+import StopGeneratingIcon from '../svg/StopGeneratingIcon';
-export default function SubmitButton({ submitMessage, disabled, isSubmitting }) {
+export default function SubmitButton({ submitMessage, handleStopGenerating, disabled, isSubmitting }) {
const clickHandler = e => {
e.preventDefault();
submitMessage();
};
- if (isSubmitting) {
+ if (isSubmitting)
return (