diff --git a/frontend/components/navigation.tsx b/frontend/components/navigation.tsx
index 4c4995e4..1311a550 100644
--- a/frontend/components/navigation.tsx
+++ b/frontend/components/navigation.tsx
@@ -2,7 +2,7 @@
import Link from "next/link"
import { usePathname } from "next/navigation"
-import { Search, Database, MessageCircle } from "lucide-react"
+import { Library, Database, MessageSquare, Settings2 } from "lucide-react"
import { cn } from "@/lib/utils"
export function Navigation() {
@@ -10,22 +10,22 @@ export function Navigation() {
const routes = [
{
- label: "Knowledge Sources",
- icon: Database,
- href: "/knowledge-sources",
- active: pathname === "/" || pathname === "/knowledge-sources",
+ label: "Chat",
+ icon: MessageSquare,
+ href: "/chat",
+ active: pathname === "/" || pathname === "/chat",
},
{
- label: "Search",
- icon: Search,
+ label: "Knowledge",
+ icon: Library,
href: "/search",
active: pathname === "/search",
},
{
- label: "Chat",
- icon: MessageCircle,
- href: "/chat",
- active: pathname === "/chat",
+ label: "Settings",
+ icon: Settings2,
+ href: "/knowledge-sources",
+ active: pathname === "/knowledge-sources",
},
]
@@ -33,22 +33,26 @@ export function Navigation() {
- {routes.map((route) => (
-
(
+
+
+
+
+ {route.label}
+
+
+ {route.label === "Settings" && (
+
)}
- >
-
-
- {route.label}
-
-
+
))}
diff --git a/frontend/src/app/chat/page.tsx b/frontend/src/app/chat/page.tsx
index 0fef0fca..e1d7568e 100644
--- a/frontend/src/app/chat/page.tsx
+++ b/frontend/src/app/chat/page.tsx
@@ -4,10 +4,12 @@ import { useState, useRef, useEffect } from "react"
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
import { Input } from "@/components/ui/input"
-import { MessageCircle, Send, Loader2, User, Bot, Zap, Settings, ChevronDown, ChevronRight, Upload } from "lucide-react"
+import { MessageCircle, Send, Loader2, User, Bot, Zap, Settings, ChevronDown, ChevronRight, Upload, AtSign, Plus } from "lucide-react"
import { ProtectedRoute } from "@/components/protected-route"
import { useTask } from "@/contexts/task-context"
import { useKnowledgeFilter } from "@/contexts/knowledge-filter-context"
+import { useAuth } from "@/contexts/auth-context"
+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
interface Message {
role: "user" | "assistant"
@@ -56,7 +58,15 @@ interface RequestBody {
}
function ChatPage() {
- const [messages, setMessages] = useState
([])
+ const isDebugMode = process.env.NODE_ENV === 'development' || process.env.NEXT_PUBLIC_OPENRAG_DEBUG === 'true'
+ const { user } = useAuth()
+ const [messages, setMessages] = useState([
+ {
+ role: "assistant",
+ content: "How can I assist?",
+ timestamp: new Date()
+ }
+ ])
const [input, setInput] = useState("")
const [loading, setLoading] = useState(false)
const [endpoint, setEndpoint] = useState("langflow")
@@ -1013,84 +1023,81 @@ function ChatPage() {
)
}
- return (
-
-
-
Chat Assistant
-
Ask questions about your documents and get AI-powered answers
-
+ const suggestionChips = [
+ "Show me this quarter's top 10 deals",
+ "Summarize recent client interactions",
+ "Search OpenSearch for mentions of our competitors"
+ ]
-
-
-
-
-
- Chat
- {selectedFilter && (
-
- Context: {selectedFilter.name}
-
- )}
-
-
- {/* Async Mode Toggle */}
-
-
-
-
- {/* Endpoint Toggle */}
-
-
-
-
-
-
-
- Chat with AI about your indexed documents using {endpoint === "chat" ? "Chat" : "Langflow"} endpoint
- {asyncMode ? " with real-time streaming" : ""}
+ const handleSuggestionClick = (suggestion: string) => {
+ setInput(suggestion)
+ inputRef.current?.focus()
+ }
+
+ return (
+
+ {/* Debug header - only show in debug mode */}
+ {isDebugMode && (
+
+
{selectedFilter && (
-
- Using knowledge filter: {selectedFilter.name}
+
+ Context: {selectedFilter.name}
)}
-
-
-
+
+
+ {/* Async Mode Toggle */}
+
+
+
+
+ {/* Endpoint Toggle */}
+
+
+
+
+
+
+ )}
+
+
+
{/* Messages Area */}
Processing your document...
This may take a few moments
>
- ) : (
- <>
-
-
Start a conversation by asking a question!
-
I can help you find information in your documents.
-
💡 Tip: Drag & drop a document here to add context
- >
- )}
+ ) : null}
) : (
@@ -1129,10 +1129,13 @@ function ChatPage() {
{message.role === "user" && (
-
-
-
-
User
+
+
+
+ {user?.name ? user.name.charAt(0).toUpperCase() : }
+
+
+
{user?.name || "User"}
{message.content}
@@ -1147,7 +1150,6 @@ function ChatPage() {
AI
-
gpt-4.1
@@ -1175,7 +1177,6 @@ function ChatPage() {
AI
-
gpt-4.1
@@ -1203,7 +1204,6 @@ function ChatPage() {
AI
-
gpt-4.1
@@ -1229,27 +1229,82 @@ function ChatPage() {
)}
+
- {/* Input Area */}
-
)
}
diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx
index 5d62961a..1768ec83 100644
--- a/frontend/src/app/page.tsx
+++ b/frontend/src/app/page.tsx
@@ -8,8 +8,8 @@ function HomePage() {
const router = useRouter()
useEffect(() => {
- // Redirect to knowledge sources page - the new home page
- router.replace("/knowledge-sources")
+ // Redirect to chat page - the new home page
+ router.replace("/chat")
}, [router])
return null