|
1 | | -import { useState, useCallback, useMemo } from "react"; |
| 1 | +import { useCallback, useMemo } from "react"; |
2 | 2 | import { Button } from "@/webview/components/ui/button"; |
3 | | -import SessionDropdown from "@/webview/components/SessionList"; |
4 | 3 | import type { SessionSummary } from "@/webview/types"; |
5 | | -import { PanelRight, Plus, Settings } from "lucide-react"; |
| 4 | +import { Plus, Settings } from "lucide-react"; |
6 | 5 | import { chatService } from "@/webview/services/chatService"; |
7 | 6 | import icon from "../../../assets/deepcoding_icon.png"; |
8 | | -import { |
9 | | - Drawer, |
10 | | - DrawerClose, |
11 | | - DrawerContent, |
12 | | - DrawerDescription, |
13 | | - DrawerFooter, |
14 | | - DrawerHeader, |
15 | | - DrawerTitle, |
16 | | - DrawerTrigger, |
17 | | -} from "@/webview/components/ui/drawer"; |
18 | 7 | import SessionList from "@/webview/components/SessionList"; |
| 8 | +import { Tooltip, TooltipContent, TooltipTrigger } from "@/webview/components/ui/tooltip"; |
19 | 9 |
|
20 | 10 | interface HeaderProps { |
21 | 11 | sessions: SessionSummary[]; |
@@ -49,24 +39,38 @@ export default function Header({ sessions, activeSessionId, onSelectSession, onC |
49 | 39 | </Button> |
50 | 40 |
|
51 | 41 | <div> |
52 | | - <Button |
53 | | - variant="ghost" |
54 | | - size="icon" |
55 | | - className="shrink-0 cursor-pointer" |
56 | | - onClick={onCreateNewSession} |
57 | | - title="New chat" |
58 | | - > |
59 | | - <Plus className="h-4 w-4" /> |
60 | | - </Button> |
61 | | - <Button |
62 | | - variant="ghost" |
63 | | - size="icon" |
64 | | - className="shrink-0 cursor-pointer" |
65 | | - onClick={() => chatService.openSettings()} |
66 | | - title="Open settings" |
67 | | - > |
68 | | - <Settings className="h-4 w-4" /> |
69 | | - </Button> |
| 42 | + <Tooltip> |
| 43 | + <TooltipTrigger asChild> |
| 44 | + <Button |
| 45 | + variant="ghost" |
| 46 | + size="icon" |
| 47 | + className="shrink-0 cursor-pointer" |
| 48 | + onClick={onCreateNewSession} |
| 49 | + title="New chat" |
| 50 | + > |
| 51 | + <Plus className="h-4 w-4" /> |
| 52 | + </Button> |
| 53 | + </TooltipTrigger> |
| 54 | + <TooltipContent> |
| 55 | + <p>New Chat</p> |
| 56 | + </TooltipContent> |
| 57 | + </Tooltip> |
| 58 | + <Tooltip> |
| 59 | + <TooltipTrigger asChild> |
| 60 | + <Button |
| 61 | + variant="ghost" |
| 62 | + size="icon" |
| 63 | + className="shrink-0 cursor-pointer" |
| 64 | + onClick={() => chatService.openSettings()} |
| 65 | + title="Open settings" |
| 66 | + > |
| 67 | + <Settings className="h-4 w-4" /> |
| 68 | + </Button> |
| 69 | + </TooltipTrigger> |
| 70 | + <TooltipContent> |
| 71 | + <p>Settings</p> |
| 72 | + </TooltipContent> |
| 73 | + </Tooltip> |
70 | 74 | <SessionList |
71 | 75 | sessions={sessions} |
72 | 76 | activeSessionId={activeSessionId} |
|
0 commit comments