diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 41b05ac0..66ba6235 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -13,6 +13,7 @@ import Navigation from './Navigation';
import PageNotFound from './PageNotFound';
import Setting from './settings';
import Agents from './agents';
+import ActionButtons from './components/ActionButtons';
function AuthWrapper({ children }: { children: React.ReactNode }) {
const { isAuthLoading } = useTokenAuth();
@@ -34,6 +35,7 @@ function MainLayout() {
return (
+
();
+ const conversationId = useSelector(selectConversationId);
+ const [isShareModalOpen, setShareModalState] = useState
(false);
+
+ const newChat = () => {
+ dispatch(setConversation([]));
+ dispatch(
+ updateConversationId({
+ query: { conversationId: null },
+ }),
+ );
+ };
+
+ return (
+
+
+ {showNewChat && (
+
+ )}
+
+ {showShare && conversationId && (
+ <>
+
+ {isShareModalOpen && (
+
setShareModalState(false)}
+ conversationId={conversationId}
+ />
+ )}
+ >
+ )}
+ {/* */}
+
+
+ );
+}
diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx
index 21fc3a1f..bbe96d9c 100644
--- a/frontend/src/conversation/Conversation.tsx
+++ b/frontend/src/conversation/Conversation.tsx
@@ -4,11 +4,8 @@ import { useTranslation } from 'react-i18next';
import { useDispatch, useSelector } from 'react-redux';
import DragFileUpload from '../assets/DragFileUpload.svg';
-import newChatIcon from '../assets/openNewChat.svg';
-import ShareIcon from '../assets/share.svg';
import MessageInput from '../components/MessageInput';
import { useMediaQuery } from '../hooks';
-import { ShareConversationModal } from '../modals/ShareConversationModal';
import { ActiveState } from '../models/misc';
import {
selectConversationId,
@@ -184,10 +181,6 @@ export default function Conversation() {
);
};
- const newChat = () => {
- if (queries && queries.length > 0) resetConversation();
- };
-
useEffect(() => {
if (queries.length) {
queries[queries.length - 1].error && setLastQueryReturnedErr(true);
@@ -196,50 +189,6 @@ export default function Conversation() {
}, [queries[queries.length - 1]]);
return (
- {conversationId && queries.length > 0 && (
-
-
- {isMobile && queries.length > 0 && (
-
- )}
-
-
-
- {isShareModalOpen && (
-
{
- setShareModalState(false);
- }}
- conversationId={conversationId}
- />
- )}
-
- )}
-