fix: remove unused AnimatePresence import and sessions variable
This commit is contained in:
parent
1b5e9799eb
commit
9ec6bce9c9
@ -14,7 +14,7 @@ import {
|
||||
Bot,
|
||||
} from "lucide-react";
|
||||
import { useState, useEffect, useCallback } from "react";
|
||||
import { motion, AnimatePresence } from "motion/react";
|
||||
import { motion } from "motion/react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import NavShell from "./rail";
|
||||
import { workspaceColor, workspaceInitial } from "./shared";
|
||||
@ -111,7 +111,7 @@ function AgentChatSidebar() {
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
const conversationId = location.pathname.split("/me/chat/")[1] || "";
|
||||
const { sessions, loading: sessionsLoading, sessionsRef, personalSessionIds } = usePersonalSessions();
|
||||
const { loading: sessionsLoading, sessionsRef, personalSessionIds } = usePersonalSessions();
|
||||
|
||||
const [conversations, setConversations] = useState<ConversationWithSessionResponse[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
@ -174,11 +174,10 @@ function AgentChatSidebar() {
|
||||
|
||||
return (
|
||||
<div className="flex flex-col">
|
||||
{/* Header */}
|
||||
<div className="mb-2 flex items-center justify-between px-0.5 py-1">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-xs font-semibold uppercase tracking-[0.06em] text-muted-foreground">
|
||||
AI Chats
|
||||
Chats
|
||||
</span>
|
||||
</div>
|
||||
<motion.button
|
||||
@ -192,8 +191,6 @@ function AgentChatSidebar() {
|
||||
<Plus className="size-3" aria-hidden="true" />
|
||||
</motion.button>
|
||||
</div>
|
||||
|
||||
{/* Conversation list */}
|
||||
{loading ? (
|
||||
<div className="space-y-1">
|
||||
{Array.from({ length: SKELETON_COUNT }).map((_, i) => (
|
||||
@ -300,8 +297,8 @@ function PersonalSidebar() {
|
||||
];
|
||||
|
||||
return (
|
||||
<aside className="flex h-full w-[248px] shrink-0 flex-col overflow-hidden bg-card">
|
||||
<header className="flex h-14 shrink-0 items-center gap-3 border-b border-border px-4 shadow-sm">
|
||||
<aside className="flex h-full w-[240px] shrink-0 flex-col overflow-hidden border-r border-border bg-sidebar">
|
||||
<header className="flex h-[48px] shrink-0 items-center gap-3 border-b border-border px-4">
|
||||
<PersonalAvatar />
|
||||
<button className="flex min-w-0 flex-1 items-center gap-2 text-left text-base font-semibold text-foreground">
|
||||
<span className="truncate">{me?.display_name || me?.username || "User"}</span>
|
||||
@ -365,7 +362,7 @@ export function PersonalShell() {
|
||||
<div className="flex h-full overflow-hidden">
|
||||
<PersonalSidebar />
|
||||
<main className="flex min-w-0 flex-1 flex-col overflow-hidden bg-background">
|
||||
<div className="flex h-14 shrink-0 items-center border-b border-border px-6" />
|
||||
<div className="flex h-[48px] shrink-0 items-center border-b border-border px-6" />
|
||||
<div className="min-h-0 flex-1 overflow-y-auto overscroll-contain">
|
||||
<Outlet />
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user