From b333600245406e3e9b42e0a7befcb25349ebf993 Mon Sep 17 00:00:00 2001 From: sp mac bookpro 2605 Date: Sat, 6 Jun 2026 14:35:55 +0800 Subject: [PATCH] ui: replace session sidebar emoji icons with antd icons --- src/components/SessionSidebar.tsx | 63 ++++++++++++++++++------------- 1 file changed, 37 insertions(+), 26 deletions(-) diff --git a/src/components/SessionSidebar.tsx b/src/components/SessionSidebar.tsx index f243473..10f436d 100644 --- a/src/components/SessionSidebar.tsx +++ b/src/components/SessionSidebar.tsx @@ -1,5 +1,6 @@ import { useEffect, useState } from 'react'; import { Button, List, Popconfirm, Input, App as AntApp, Tooltip, Empty, Segmented, Tag, Spin, Dropdown, Modal } from 'antd'; +import { DeleteOutlined, DownloadOutlined, InboxOutlined, EditOutlined, MessageOutlined, RollbackOutlined, ShareAltOutlined } from '@ant-design/icons'; import dayjs from 'dayjs'; import { ChatSession, SearchHit, SessionAPI } from '../api'; @@ -9,10 +10,10 @@ interface Props { onChange: (sessionId: string, options?: { highlightMessageId?: string }) => void; refreshTick?: number; theme?: 'light' | 'dark'; - showNewButton?: boolean; + showNewButton?: boolean; } -export default function SessionSidebar({ agentId, activeSessionId, onChange, refreshTick, theme = 'light', showNewButton = true }: Props) { +export default function SessionSidebar({ agentId, activeSessionId, onChange, refreshTick, theme = 'light', showNewButton = true }: Props) { const { message } = AntApp.useApp(); const [tab, setTab] = useState<'active' | 'archived'>('active'); const [active, setActive] = useState([]); @@ -218,25 +219,27 @@ export default function SessionSidebar({ agentId, activeSessionId, onChange, ref + /> - + + + + - )} + {showNewButton && ( + + )} setTab(v as any)} options={[ - { value: 'active', label: `💬 活跃 (${active.length})` }, - { value: 'archived', label: `📦 归档 (${archived.length})` } + { + value: 'active', + label: ( + + 活跃 ({active.length}) + + ) + }, + { + value: 'archived', + label: ( + + 归档 ({archived.length}) + + ) + } ]} style={{ marginBottom: 8 }} />