feat: add channel/type icons to session list in sidebar

Show Discord, Telegram, WhatsApp, Signal, Slack brand icons,
clock icon for cron sessions, bot icon for sub-agents, and
globe icon for webchat sessions. Falls back to message bubble
for unknown channels.

Closes feedback #23
This commit is contained in:
Nicolas Varrot
2026-02-12 02:45:33 +00:00
parent 2a7f3d9c88
commit 73d9e5f6f2
4 changed files with 96 additions and 2 deletions

View File

@@ -1,7 +1,8 @@
import { useState, useMemo, useRef, useEffect } from 'react';
import { MessageSquare, X, Sparkles, Search } from 'lucide-react';
import { X, Sparkles, Search } from 'lucide-react';
import type { Session } from '../types';
import { useT } from '../hooks/useLocale';
import { SessionIcon } from './SessionIcon';
interface Props {
sessions: Session[];
@@ -103,7 +104,7 @@ export function Sidebar({ sessions, activeSession, onSwitch, open, onClose }: Pr
}`}
>
<div className="relative">
<MessageSquare size={15} className={isActive ? 'text-cyan-300/70' : s.isActive ? 'text-violet-400/70' : ''} />
<SessionIcon session={s} isActive={s.isActive} isCurrentSession={isActive} />
{s.isActive && (
<span className="absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-violet-400 shadow-[0_0_8px_rgba(168,85,247,0.7)] animate-pulse" />
)}