From d86cbea6a5fdbd72c044b8d5a7250c71d6508f6e Mon Sep 17 00:00:00 2001 From: Hermes Date: Thu, 9 Apr 2026 21:36:02 -0500 Subject: [PATCH] Quick chat FAB, active session indicators, memory tab counts, improved new session --- app/history/new/page.tsx | 20 ++++++++++++++++---- app/memory/page.tsx | 38 +++++++++++++++++++++----------------- app/page.tsx | 11 ++++++++++- components/SessionCard.tsx | 4 ++-- lib/utils.ts | 3 ++- 5 files changed, 51 insertions(+), 25 deletions(-) diff --git a/app/history/new/page.tsx b/app/history/new/page.tsx index 8098186..a6a2c8d 100644 --- a/app/history/new/page.tsx +++ b/app/history/new/page.tsx @@ -4,9 +4,11 @@ import { useState } from "react"; import { useRouter } from "next/navigation"; import { ArrowLeft, Send, Loader2 } from "lucide-react"; import Link from "next/link"; +import { useToast } from "@/components/Toast"; export default function NewSessionPage() { const router = useRouter(); + const { toast } = useToast(); const [message, setMessage] = useState(""); const [sending, setSending] = useState(false); @@ -14,7 +16,6 @@ export default function NewSessionPage() { if (!message.trim() || sending) return; setSending(true); try { - // Create session const res = await fetch("/api/sessions", { method: "POST", headers: { "Content-Type": "application/json" }, @@ -24,7 +25,6 @@ export default function NewSessionPage() { const sessionId = data.session?.id; if (!sessionId) throw new Error("No session ID"); - // Send first message await fetch("/api/sessions/" + sessionId + "/chat", { method: "POST", headers: { "Content-Type": "application/json" }, @@ -32,7 +32,8 @@ export default function NewSessionPage() { }); router.push("/history/" + sessionId); - } catch { + } catch (e) { + toast("Failed to create session", "error"); setSending(false); } }; @@ -46,11 +47,15 @@ export default function NewSessionPage() {

New Session

+

+ Creates a new web session and sends your first message. +

+