Spaces:
Paused
Paused
Soham Waghmare
commited on
Commit
·
8c8c2f9
1
Parent(s):
780df80
fix: ui placement
Browse files
frontend/src/app/layout.tsx
CHANGED
|
@@ -3,8 +3,8 @@ import type { Metadata } from "next";
|
|
| 3 |
import "./globals.css";
|
| 4 |
|
| 5 |
export const metadata: Metadata = {
|
| 6 |
-
title: "Research
|
| 7 |
-
description: "
|
| 8 |
};
|
| 9 |
|
| 10 |
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
|
|
| 3 |
import "./globals.css";
|
| 4 |
|
| 5 |
export const metadata: Metadata = {
|
| 6 |
+
title: "KNet: Deep Research",
|
| 7 |
+
description: "KNet is a deep research tool that uses AI to help you find answers to your questions.",
|
| 8 |
};
|
| 9 |
|
| 10 |
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
frontend/src/components/ChatHistory.tsx
CHANGED
|
@@ -23,7 +23,7 @@ const ChatHistory: React.FC<ChatHistoryProps> = ({ messages, isLoading }) => {
|
|
| 23 |
{messages.length === 0 ? (
|
| 24 |
<div className="h-full flex flex-col items-center justify-center p-8 text-center">
|
| 25 |
<div className="max-w-md space-y-2">
|
| 26 |
-
<h2 className="text-2xl font-bold">Welcome to
|
| 27 |
<p className="text-muted-foreground">Ask any research question to get started. The assistant will provide detailed answers backed by research and sources.</p>
|
| 28 |
</div>
|
| 29 |
</div>
|
|
@@ -39,8 +39,8 @@ const ChatHistory: React.FC<ChatHistoryProps> = ({ messages, isLoading }) => {
|
|
| 39 |
</div>
|
| 40 |
<div className="flex-1">
|
| 41 |
<div className="flex items-center gap-2 mb-1">
|
|
|
|
| 42 |
<div className="text-xs text-muted-foreground">Just now</div>
|
| 43 |
-
<div className="font-medium">Research Assistant</div>
|
| 44 |
</div>
|
| 45 |
<div className="mt-1 bg-muted/50 p-3 rounded-2xl rounded-tl-sm">
|
| 46 |
<div className="flex space-x-2">
|
|
|
|
| 23 |
{messages.length === 0 ? (
|
| 24 |
<div className="h-full flex flex-col items-center justify-center p-8 text-center">
|
| 25 |
<div className="max-w-md space-y-2">
|
| 26 |
+
<h2 className="text-2xl font-bold">Welcome to the KNet demo</h2>
|
| 27 |
<p className="text-muted-foreground">Ask any research question to get started. The assistant will provide detailed answers backed by research and sources.</p>
|
| 28 |
</div>
|
| 29 |
</div>
|
|
|
|
| 39 |
</div>
|
| 40 |
<div className="flex-1">
|
| 41 |
<div className="flex items-center gap-2 mb-1">
|
| 42 |
+
<div className="font-medium">KNet</div>
|
| 43 |
<div className="text-xs text-muted-foreground">Just now</div>
|
|
|
|
| 44 |
</div>
|
| 45 |
<div className="mt-1 bg-muted/50 p-3 rounded-2xl rounded-tl-sm">
|
| 46 |
<div className="flex space-x-2">
|
frontend/src/components/Message.tsx
CHANGED
|
@@ -51,8 +51,9 @@ const Message: React.FC<MessageProps> = ({ message }) => {
|
|
| 51 |
|
| 52 |
<div className={`flex-1 ${isUser ? "items-end" : "items-start"}`}>
|
| 53 |
<div className={`flex items-center gap-2 mb-1 ${isUser ? "justify-end" : "justify-start"}`}>
|
| 54 |
-
<div className="text-xs text-muted-foreground">{new Date(message.timestamp).toLocaleTimeString()}</div>
|
| 55 |
-
<div className="font-medium">{isUser ? "You" : "
|
|
|
|
| 56 |
|
| 57 |
{!isUser && (
|
| 58 |
<div className="ml-auto flex items-center gap-2">
|
|
|
|
| 51 |
|
| 52 |
<div className={`flex-1 ${isUser ? "items-end" : "items-start"}`}>
|
| 53 |
<div className={`flex items-center gap-2 mb-1 ${isUser ? "justify-end" : "justify-start"}`}>
|
| 54 |
+
{isUser && <div className="text-xs text-muted-foreground">{new Date(message.timestamp).toLocaleTimeString()}</div>}
|
| 55 |
+
<div className="font-medium">{isUser ? "You" : "KNet"}</div>
|
| 56 |
+
{!isUser && <div className="text-xs text-muted-foreground">{new Date(message.timestamp).toLocaleTimeString()}</div>}
|
| 57 |
|
| 58 |
{!isUser && (
|
| 59 |
<div className="ml-auto flex items-center gap-2">
|
frontend/src/components/ui/ChatLayout.tsx
CHANGED
|
@@ -18,7 +18,7 @@ const ChatLayout: React.FC<ChatLayoutProps> = ({ sidebar, mainContent, settingsP
|
|
| 18 |
return (
|
| 19 |
<div className="h-screen flex flex-col">
|
| 20 |
<header className="border-b-2 h-14 flex items-center px-6">
|
| 21 |
-
<h1 className="text-xl font-semibold">Deep Research
|
| 22 |
<div className="flex-1" />
|
| 23 |
<ThemeToggle />
|
| 24 |
<Sheet>
|
|
|
|
| 18 |
return (
|
| 19 |
<div className="h-screen flex flex-col">
|
| 20 |
<header className="border-b-2 h-14 flex items-center px-6">
|
| 21 |
+
<h1 className="text-xl font-semibold">KnowledgeNet: Deep Research</h1>
|
| 22 |
<div className="flex-1" />
|
| 23 |
<ThemeToggle />
|
| 24 |
<Sheet>
|
frontend/src/components/ui/ConversationList.tsx
CHANGED
|
@@ -26,7 +26,7 @@ const ConversationList: React.FC<ConversationListProps> = ({ conversations, onNe
|
|
| 26 |
<div className="px-4 py-2">
|
| 27 |
<Button onClick={onNewConversation} className="w-full justify-start" variant="outline">
|
| 28 |
<PlusCircle className="mr-2 h-4 w-4" />
|
| 29 |
-
New
|
| 30 |
</Button>
|
| 31 |
</div>
|
| 32 |
|
|
|
|
| 26 |
<div className="px-4 py-2">
|
| 27 |
<Button onClick={onNewConversation} className="w-full justify-start" variant="outline">
|
| 28 |
<PlusCircle className="mr-2 h-4 w-4" />
|
| 29 |
+
New Chat
|
| 30 |
</Button>
|
| 31 |
</div>
|
| 32 |
|