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