4f5fde34a3
- New visual identity: solid dark cards, purple accent, iOS-like feel - Session replay: newest messages first, message input with send button - Chat proxy route for sending messages to sessions - systemd user service with deploy script - All pages restyled: Pulse, Memory, History, Skills, Cron, Soul, Config
39 lines
1.5 KiB
TypeScript
39 lines
1.5 KiB
TypeScript
"use client";
|
|
|
|
import Link from "next/link";
|
|
import { ChevronRight } from "lucide-react";
|
|
import { timeAgo, formatTokens, platformBadgeClass } from "@/lib/utils";
|
|
import type { Session } from "@/lib/types";
|
|
|
|
export function SessionCard({ session }: { session: Session }) {
|
|
const tokens = session.input_tokens + session.output_tokens;
|
|
const title = session.title || "Untitled session";
|
|
|
|
return (
|
|
<Link href={`/history/${session.id}`}>
|
|
<div className="flex items-center gap-3 py-3 px-1 border-b border-white/[0.04] active:bg-white/[0.02] transition-colors">
|
|
<div className="flex-1 min-w-0">
|
|
<div className="text-[14px] text-[var(--text-1)] truncate">{title}</div>
|
|
<div className="flex items-center gap-2 mt-0.5">
|
|
<span className={`badge ${platformBadgeClass(session.source)}`}>
|
|
{session.source}
|
|
</span>
|
|
<span className="text-[11px]" style={{ color: "var(--text-3)" }}>
|
|
{session.message_count} msgs
|
|
</span>
|
|
{tokens > 0 && (
|
|
<span className="text-[11px]" style={{ color: "var(--text-3)" }}>
|
|
{formatTokens(tokens)}
|
|
</span>
|
|
)}
|
|
<span className="text-[11px] ml-auto" style={{ color: "var(--text-3)" }}>
|
|
{timeAgo(session.started_at)}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<ChevronRight size={16} style={{ color: "var(--text-3)" }} />
|
|
</div>
|
|
</Link>
|
|
);
|
|
}
|