From 2940a60b3ced5ff9bd19251a093a7c9c159e7b6c Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Mon, 24 Mar 2025 17:16:24 +0530 Subject: [PATCH] (faet:input) tools pop-up --- frontend/src/assets/redirect.svg | 3 + frontend/src/components/MessageInput.tsx | 33 +++- frontend/src/components/ToolsPopup.tsx | 200 +++++++++++++++++++++++ 3 files changed, 230 insertions(+), 6 deletions(-) create mode 100644 frontend/src/assets/redirect.svg create mode 100644 frontend/src/components/ToolsPopup.tsx diff --git a/frontend/src/assets/redirect.svg b/frontend/src/assets/redirect.svg new file mode 100644 index 00000000..38432950 --- /dev/null +++ b/frontend/src/assets/redirect.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/components/MessageInput.tsx b/frontend/src/components/MessageInput.tsx index 10eeda64..46106d85 100644 --- a/frontend/src/components/MessageInput.tsx +++ b/frontend/src/components/MessageInput.tsx @@ -4,9 +4,11 @@ import { useDarkTheme } from '../hooks'; import { useSelector } from 'react-redux'; import PaperPlane from '../assets/paper_plane.svg'; import SourceIcon from '../assets/source.svg'; +import ToolIcon from '../assets/tool.svg'; import SpinnerDark from '../assets/spinner-dark.svg'; import Spinner from '../assets/spinner.svg'; import SourcesPopup from './SourcesPopup'; +import ToolsPopup from './ToolsPopup'; import { selectSelectedDocs } from '../preferences/preferenceSlice'; import { ActiveState } from '../models/misc'; import Upload from '../upload/Upload'; @@ -29,7 +31,9 @@ export default function MessageInput({ const [isDarkTheme] = useDarkTheme(); const inputRef = useRef(null); const sourceButtonRef = useRef(null); + const toolButtonRef = useRef(null); const [isSourcesPopupOpen, setIsSourcesPopupOpen] = useState(false); + const [isToolsPopupOpen, setIsToolsPopupOpen] = useState(false); const [uploadModalState, setUploadModalState] = useState('INACTIVE'); @@ -68,7 +72,7 @@ export default function MessageInput({ return (
-
+