|
1 | 1 | import React, { useState, useRef, useEffect } from 'react';
|
2 | 2 | import { Conversation } from '../../types/chat';
|
3 |
| -import { PlusCircle, MessageSquare, MoreVertical, Edit, Trash2, ChevronLeft, ChevronRight, AlertTriangle } from 'lucide-react'; |
| 3 | +import { MessageSquare, MoreVertical, Edit, Trash2, ChevronLeft, ChevronRight, AlertTriangle, MessageSquarePlus, FolderPlus } from 'lucide-react'; |
4 | 4 | import ContextMenu, { ContextMenuItem } from '../ui/ContextMenu';
|
5 | 5 | import ConfirmDialog from '../ui/ConfirmDialog';
|
6 | 6 |
|
@@ -251,24 +251,22 @@ export const ChatHistoryList: React.FC<ChatHistoryListProps> = ({
|
251 | 251 | {isCollapsed ? <ChevronRight size={16} /> : <ChevronLeft size={16} />}
|
252 | 252 | </button>
|
253 | 253 |
|
254 |
| - <div className={`p-4 border-b border-gray-200 ${isCollapsed ? 'flex justify-center opacity-0 pointer-events-none' : ''}`}> |
255 |
| - {isCollapsed ? ( |
256 |
| - <button |
257 |
| - onClick={onCreateNewChat} |
258 |
| - className="w-0 p-0 transition-colors bg-white border border-gray-300 rounded-full hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500" |
259 |
| - title="New Chat" |
260 |
| - aria-label="Create new chat" |
261 |
| - > |
262 |
| - </button> |
263 |
| - ) : ( |
264 |
| - <button |
265 |
| - onClick={onCreateNewChat} |
266 |
| - className="flex items-center justify-center w-full p-2 text-sm font-medium text-gray-700 transition-colors bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500" |
267 |
| - > |
268 |
| - <PlusCircle size={16} className="mr-2" /> |
269 |
| - New Chat |
270 |
| - </button> |
271 |
| - )} |
| 254 | + <div className={`p-2 border-b border-gray-200 ${isCollapsed ? 'opacity-0 pointer-events-none' : 'flex justify-between items-center'}`}> |
| 255 | + <button |
| 256 | + onClick={onCreateNewChat} |
| 257 | + className="flex items-center justify-center p-2 text-sm font-medium text-gray-700 transition-colors bg-white border border-gray-300 rounded-md aspect-square hover:bg-gray-50 checked:outline-none checked:ring-2 checked:ring-blue-500" |
| 258 | + > |
| 259 | + <FolderPlus size={16}/> |
| 260 | + </button> |
| 261 | + |
| 262 | + <button |
| 263 | + onClick={onCreateNewChat} |
| 264 | + className="flex items-center justify-center gap-1 p-2 text-sm font-medium text-gray-700 transition-colors bg-white border border-gray-300 rounded-md hover:bg-gray-50 checked:outline-none checked:ring-2 checked:ring-blue-500" |
| 265 | + > |
| 266 | + <MessageSquarePlus size={16}/> |
| 267 | + <span className="text-sm">New Chat</span> |
| 268 | + </button> |
| 269 | + |
272 | 270 | </div>
|
273 | 271 |
|
274 | 272 | <div className="flex-1 overflow-y-auto">
|
|
0 commit comments