From 3e2a4dacc54bf8b0827dd0cffe5cff37c7b8db85 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Wed, 6 May 2026 15:03:20 -0700 Subject: [PATCH] feat(ui/agents): add SessionList sidebar Vertical list of SessionRow under the active agent with a + New action pinned to the header. Shared by /agents/{aid} and the three-pane view. --- .../agents/components/session-list.tsx | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 ui/litellm-dashboard/src/app/(dashboard)/agents/components/session-list.tsx diff --git a/ui/litellm-dashboard/src/app/(dashboard)/agents/components/session-list.tsx b/ui/litellm-dashboard/src/app/(dashboard)/agents/components/session-list.tsx new file mode 100644 index 00000000000..492714f484b --- /dev/null +++ b/ui/litellm-dashboard/src/app/(dashboard)/agents/components/session-list.tsx @@ -0,0 +1,45 @@ +"use client"; + +/** + * SessionList — left sidebar showing all sessions belonging to the active + * Agent. Used in both the per-agent landing page and the three-pane view. + * + * Rendered as a vertical list of SessionRow with a "+ New Session" action + * pinned at the top. + */ +import { Button, Empty, Spin, Typography } from "antd"; +import SessionRow from "@/app/(dashboard)/agents/components/session-row"; +import type { CloudAgentSession } from "@/types/cloud-agents"; + +const { Text } = Typography; + +interface SessionListProps { + sessions: CloudAgentSession[]; + loading: boolean; + activeSessionId?: string | null; + onNewSession: () => void; +} + +export default function SessionList({ sessions, loading, activeSessionId, onNewSession }: SessionListProps) { + return ( +
+
+ Sessions + +
+
+ {loading ? ( +
+ +
+ ) : sessions.length === 0 ? ( + + ) : ( + sessions.map((s) => ) + )} +
+
+ ); +}