|
1 | 1 | import { memo, useState } from "react"; |
2 | 2 | import PropTypes from "prop-types"; |
3 | | -import { Button, Space, Typography } from "antd"; |
| 3 | +import { Button, Space, Tooltip, Typography } from "antd"; |
4 | 4 | import { |
5 | 5 | FileDoneOutlined, |
6 | | - HistoryOutlined, |
7 | 6 | CloseOutlined, |
8 | 7 | MinusOutlined, |
9 | 8 | PlusOutlined, |
@@ -61,59 +60,60 @@ const Header = memo(function Header({ |
61 | 60 | </div> |
62 | 61 | <div> |
63 | 62 | <Space> |
64 | | - <Button |
65 | | - type="text" |
66 | | - size="small" |
67 | | - icon={<PlusOutlined />} |
68 | | - disabled={isPromptRunning} |
69 | | - onClick={resetSelectedChatId} |
70 | | - /> |
71 | | - <Button |
72 | | - type="text" |
73 | | - size="small" |
74 | | - icon={<FileDoneOutlined />} |
75 | | - disabled={isPromptRunning} |
76 | | - onClick={handleSettingsClick} |
77 | | - title="Context & Rules Manager" |
78 | | - /> |
79 | | - <Button |
80 | | - type="text" |
81 | | - size="small" |
82 | | - icon={<HistoryOutlined />} |
83 | | - disabled={isPromptRunning} |
84 | | - onClick={resetSelectedChatId} |
85 | | - /> |
86 | | - {isOnboardingCompleted && ( |
| 63 | + <Tooltip title="New Chat"> |
| 64 | + <Button |
| 65 | + type="text" |
| 66 | + size="small" |
| 67 | + icon={<PlusOutlined />} |
| 68 | + disabled={isPromptRunning} |
| 69 | + onClick={resetSelectedChatId} |
| 70 | + /> |
| 71 | + </Tooltip> |
| 72 | + <Tooltip title="Context & Rules Manager"> |
87 | 73 | <Button |
88 | 74 | type="text" |
89 | 75 | size="small" |
90 | | - icon={<RocketOutlined />} |
| 76 | + icon={<FileDoneOutlined />} |
91 | 77 | disabled={isPromptRunning} |
92 | | - onClick={onResetOnboarding} |
93 | | - title="Reset Onboarding" |
94 | | - style={{ color: "#1890ff" }} |
| 78 | + onClick={handleSettingsClick} |
95 | 79 | /> |
| 80 | + </Tooltip> |
| 81 | + {isOnboardingCompleted && ( |
| 82 | + <Tooltip title="Reset Onboarding"> |
| 83 | + <Button |
| 84 | + type="text" |
| 85 | + size="small" |
| 86 | + icon={<RocketOutlined />} |
| 87 | + disabled={isPromptRunning} |
| 88 | + onClick={onResetOnboarding} |
| 89 | + style={{ color: "#1890ff" }} |
| 90 | + /> |
| 91 | + </Tooltip> |
96 | 92 | )} |
97 | | - <Button |
98 | | - type="text" |
99 | | - size="small" |
100 | | - icon={isFullWidth ? <CompressOutlined /> : <ExpandOutlined />} |
101 | | - onClick={toggleFullWidth} |
102 | | - title={isFullWidth ? "Restore" : "Full Width"} |
103 | | - /> |
104 | | - <Button |
105 | | - type="text" |
106 | | - size="small" |
107 | | - icon={<MinusOutlined />} |
108 | | - onClick={collapseDrawer} |
109 | | - title="Collapse" |
110 | | - /> |
111 | | - <Button |
112 | | - type="text" |
113 | | - size="small" |
114 | | - icon={<CloseOutlined />} |
115 | | - onClick={closeChatDrawer} |
116 | | - /> |
| 93 | + <Tooltip title={isFullWidth ? "Restore" : "Full Width"}> |
| 94 | + <Button |
| 95 | + type="text" |
| 96 | + size="small" |
| 97 | + icon={isFullWidth ? <CompressOutlined /> : <ExpandOutlined />} |
| 98 | + onClick={toggleFullWidth} |
| 99 | + /> |
| 100 | + </Tooltip> |
| 101 | + <Tooltip title="Collapse"> |
| 102 | + <Button |
| 103 | + type="text" |
| 104 | + size="small" |
| 105 | + icon={<MinusOutlined />} |
| 106 | + onClick={collapseDrawer} |
| 107 | + /> |
| 108 | + </Tooltip> |
| 109 | + <Tooltip title="Close"> |
| 110 | + <Button |
| 111 | + type="text" |
| 112 | + size="small" |
| 113 | + icon={<CloseOutlined />} |
| 114 | + onClick={closeChatDrawer} |
| 115 | + /> |
| 116 | + </Tooltip> |
117 | 117 | </Space> |
118 | 118 | </div> |
119 | 119 | </div> |
|
0 commit comments