Upgrade: New Home Screen for Khoj (#860)

* V1 of the new automations page
Implemented:
- Shareable
- Editable
- Suggested Cards
- Create new cards
- added side panel new conversation button
- Implement mobile-friendly view for homepage
- Fix issue of new conversations being created when selected agent is changed
- Improve center of the homepage experience
- Fix showing agent during first chat experience
- dark mode gradient updates

---------

Co-authored-by: sabaimran <narmiabas@gmail.com>
This commit is contained in:
Raghav Tirumale
2024-07-24 03:46:19 -04:00
committed by GitHub
parent 9cf52bb7e4
commit 3e4325edab
23 changed files with 10964 additions and 1039 deletions

View File

@@ -71,8 +71,9 @@ async function openChat(slug: string, userData: UserProfile | null) {
}
const response = await fetch(`/api/chat/sessions?agent_slug=${slug}`, { method: "POST" });
const data = await response.json();
if (response.status == 200) {
window.location.href = `/chat`;
window.location.href = `/chat?conversationId=${data.conversation_id}`;
} else if (response.status == 403 || response.status == 401) {
window.location.href = unauthenticatedRedirectUrl;
} else {
@@ -294,7 +295,7 @@ export default function Agents() {
return (
<main className={styles.main}>
<div className={`${styles.titleBar} text-5xl`}>
Talk to a Specialized Agent
Agents
</div>
<div className={styles.agentList}>
Error loading agents
@@ -307,7 +308,7 @@ export default function Agents() {
return (
<main className={styles.main}>
<div className={`${styles.titleBar} text-5xl`}>
Talk to a Specialized Agent
Agents
</div>
<div className={styles.agentList}>
<InlineLoading /> booting up your agents