New session creation page, + button on History
- /history/new: compose first message, creates web session, sends, redirects - POST /api/sessions proxy route - History page gets + button in header
This commit is contained in:
+12
-2
@@ -1,7 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { Search, X } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { Search, X, Plus } from "lucide-react";
|
||||
import { useSessions, useSessionSearch } from "@/lib/hooks";
|
||||
import { SessionCard } from "@/components/SessionCard";
|
||||
|
||||
@@ -24,7 +25,16 @@ export default function HistoryPage() {
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<h1 className="text-xl font-semibold" style={{ color: "var(--text-1)" }}>History</h1>
|
||||
<div className="flex items-center justify-between">
|
||||
<h1 className="text-xl font-semibold" style={{ color: "var(--text-1)" }}>History</h1>
|
||||
<Link
|
||||
href="/history/new"
|
||||
className="p-2 rounded-xl active:scale-95 transition-all"
|
||||
style={{ background: "var(--accent-dim)", color: "var(--accent)" }}
|
||||
>
|
||||
<Plus size={18} />
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="relative">
|
||||
<Search size={16} className="absolute left-3 top-1/2 -translate-y-1/2" style={{ color: "var(--text-3)" }} />
|
||||
|
||||
Reference in New Issue
Block a user