diff --git a/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx b/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx
index eb2c81ae..7322c12e 100644
--- a/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx
+++ b/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx
@@ -742,10 +742,8 @@ export default function SidePanel(props: SidePanelProps) {
{
!authenticatedData && enabled &&
-
+
-
-
{/* Redirect to login page */}
diff --git a/src/interface/web/app/page.tsx b/src/interface/web/app/page.tsx
index 82e4e192..91c5978d 100644
--- a/src/interface/web/app/page.tsx
+++ b/src/interface/web/app/page.tsx
@@ -21,6 +21,7 @@ import { ClockCounterClockwise } from '@phosphor-icons/react';
import { AgentData } from './agents/page';
import { Suggestion, suggestionsData } from './components/suggestions/suggestionsData';
+import LoginPrompt from './components/loginPrompt/loginPrompt';
//get today's day
const today = new Date();
@@ -68,6 +69,7 @@ function ChatBodyData(props: ChatBodyDataProps) {
const [selectedAgent, setSelectedAgent] = useState
("khoj");
const [agentIcons, setAgentIcons] = useState([]);
const [agents, setAgents] = useState([]);
+ const [showLoginPrompt, setShowLoginPrompt] = useState(false);
const agentsFetcher = () => window.fetch('/api/agents').then(res => res.json()).catch(err => console.log(err));
const { data: agentsData, error } = useSWR('agents', agentsFetcher, { revalidateOnFocus: false });
@@ -157,6 +159,13 @@ function ChatBodyData(props: ChatBodyDataProps) {
return (
+ {
+ showLoginPrompt && (
+
+ )
+ }
{greeting}
@@ -202,7 +211,15 @@ function ChatBodyData(props: ChatBodyDataProps) {
{shuffledOptions.map((suggestion, index) => (
fillArea(suggestion.link, suggestion.type, suggestion.description)}>
+ onClick={(event) => {
+ if (props.isLoggedIn) {
+ fillArea(suggestion.link, suggestion.type, suggestion.description);
+ } else {
+ event.preventDefault();
+ event.stopPropagation();
+ setShowLoginPrompt(true);
+ }
+ }}>
(null);
const [isLoading, setLoading] = useState(true);
- const [title, setTitle] = useState('');
const [conversationId, setConversationID] = useState(null);
const [uploadedFiles, setUploadedFiles] = useState([]);
const [isMobileWidth, setIsMobileWidth] = useState(false);
@@ -299,7 +315,7 @@ export default function Home() {
return (
- {title}
+ Khoj AI - Your Second Brain