From f4ab85a2bbe8fd01d4049f55e37e38208fb0f23d Mon Sep 17 00:00:00 2001 From: Siddhant Rai Date: Tue, 18 Mar 2025 18:56:02 +0530 Subject: [PATCH] feat: minor fixes after merge --- application/api/answer/routes.py | 1 + frontend/src/conversation/SharedConversation.tsx | 16 +++++----------- frontend/src/modals/JWTModal.tsx | 2 +- frontend/src/settings/Tools.tsx | 4 ++-- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/application/api/answer/routes.py b/application/api/answer/routes.py index 16d2c481..faab9e08 100644 --- a/application/api/answer/routes.py +++ b/application/api/answer/routes.py @@ -589,6 +589,7 @@ class Answer(Resource): retriever=retriever, conversation_id=conversation_id, user_api_key=user_api_key, + decoded_token=decoded_token, isNoneDoc=data.get("isNoneDoc"), index=None, should_save_conversation=False, diff --git a/frontend/src/conversation/SharedConversation.tsx b/frontend/src/conversation/SharedConversation.tsx index 28ce9773..be822805 100644 --- a/frontend/src/conversation/SharedConversation.tsx +++ b/frontend/src/conversation/SharedConversation.tsx @@ -1,20 +1,15 @@ -import { Fragment, useEffect, useRef, useState } from 'react'; +import { useEffect, useState } from 'react'; import { Helmet } from 'react-helmet'; - import { useTranslation } from 'react-i18next'; import { useDispatch, useSelector } from 'react-redux'; import { useNavigate, useParams } from 'react-router-dom'; -import ConversationMessages from './ConversationMessages'; -import MessageInput from '../components/MessageInput'; -import conversationService from '../api/services/conversationService'; -import Send from '../assets/send.svg'; -import Spinner from '../assets/spinner.svg'; +import conversationService from '../api/services/conversationService'; +import MessageInput from '../components/MessageInput'; import { selectToken } from '../preferences/preferenceSlice'; import { AppDispatch } from '../store'; -import ConversationBubble from './ConversationBubble'; -import { Query } from './conversationModels'; - +import { formatDate } from '../utils/dateTimeUtils'; +import ConversationMessages from './ConversationMessages'; import { addQuery, fetchSharedAnswer, @@ -28,7 +23,6 @@ import { setIdentifier, updateQuery, } from './sharedConversationSlice'; -import { formatDate } from '../utils/dateTimeUtils'; export const SharedConversation = () => { const navigate = useNavigate(); diff --git a/frontend/src/modals/JWTModal.tsx b/frontend/src/modals/JWTModal.tsx index 1cab145e..5f25b217 100644 --- a/frontend/src/modals/JWTModal.tsx +++ b/frontend/src/modals/JWTModal.tsx @@ -27,10 +27,10 @@ export default function JWTModal({
setJwtToken(e.target.value)} borderVariant="thin" /> diff --git a/frontend/src/settings/Tools.tsx b/frontend/src/settings/Tools.tsx index 9d22180b..b42195ed 100644 --- a/frontend/src/settings/Tools.tsx +++ b/frontend/src/settings/Tools.tsx @@ -6,17 +6,17 @@ import userService from '../api/services/userService'; import CogwheelIcon from '../assets/cogwheel.svg'; import Input from '../components/Input'; import Spinner from '../components/Spinner'; +import ToggleSwitch from '../components/ToggleSwitch'; import AddToolModal from '../modals/AddToolModal'; import { ActiveState } from '../models/misc'; import { selectToken } from '../preferences/preferenceSlice'; import ToolConfig from './ToolConfig'; import { APIToolType, UserToolType } from './types'; -import ToggleSwitch from '../components/ToggleSwitch'; export default function Tools() { const { t } = useTranslation(); const token = useSelector(selectToken); - const [isDarkTheme] = useDarkTheme(); + const [searchTerm, setSearchTerm] = React.useState(''); const [addToolModalState, setAddToolModalState] = React.useState('INACTIVE');