Quick chat FAB, active session indicators, memory tab counts, improved new session

This commit is contained in:
Hermes
2026-04-09 21:36:02 -05:00
parent 2550f4c4a7
commit d86cbea6a5
5 changed files with 51 additions and 25 deletions
+21 -17
View File
@@ -6,10 +6,7 @@ import { useMemory, useAddMemory, usePatchMemory, useDeleteMemory } from "@/lib/
import { MemoryEntry } from "@/components/MemoryEntry";
import { useToast } from "@/components/Toast";
const TABS = [
{ id: "memory", label: "Agent" },
{ id: "user", label: "User" },
] as const;
const TAB_IDS = ["memory", "user"] as const;
export default function MemoryPage() {
const [tab, setTab] = useState<"memory" | "user">("memory");
@@ -63,19 +60,26 @@ export default function MemoryPage() {
</div>
<div className="flex gap-1 p-1 rounded-xl" style={{ background: "var(--bg-raised)" }}>
{TABS.map((t) => (
<button
key={t.id}
onClick={() => setTab(t.id)}
className="flex-1 py-2 rounded-lg text-sm font-medium transition-all"
style={{
background: tab === t.id ? "var(--bg-hover)" : "transparent",
color: tab === t.id ? "var(--text-1)" : "var(--text-3)",
}}
>
{t.label}
</button>
))}
{TAB_IDS.map((id) => {
const t = data?.targets?.find((x) => x.target === id);
const label = id === "memory" ? "Agent" : "User";
return (
<button
key={id}
onClick={() => setTab(id)}
className="flex-1 py-2 rounded-lg text-sm font-medium transition-all flex items-center justify-center gap-1.5"
style={{
background: tab === id ? "var(--bg-hover)" : "transparent",
color: tab === id ? "var(--text-1)" : "var(--text-3)",
}}
>
{label}
{t && (
<span className="text-[10px] opacity-50">{t.entry_count}</span>
)}
</button>
);
})}
</div>
{usage && (