diff --git a/electron/index.cjs b/electron/index.cjs index 03a2d2e..9374fb8 100644 --- a/electron/index.cjs +++ b/electron/index.cjs @@ -18,6 +18,7 @@ function createWindow() { autoUpdater.checkForUpdatesAndNotify(); const win = new BrowserWindow({ + autoHideMenuBar: true, show: false, icon: iconPath, }); diff --git a/public/locales/en-US/main.json b/public/locales/en-US/main.json index a27cebb..3b7f25c 100644 --- a/public/locales/en-US/main.json +++ b/public/locales/en-US/main.json @@ -6,7 +6,7 @@ "warning": "Warning", "clearMessageWarning": "Please be advised that by submitting this message, all subsequent messages will be deleted!", "clearConversationWarning": "Please be advised that by confirming this action, all messages will be deleted!", - "clearConversation": "Clear Conversation", + "clearConversation": "Clear Conversation History", "import": "Import", "export": "Export", "author": "Made by Jing Hua", diff --git a/public/locales/en/main.json b/public/locales/en/main.json index a27cebb..3b7f25c 100644 --- a/public/locales/en/main.json +++ b/public/locales/en/main.json @@ -6,7 +6,7 @@ "warning": "Warning", "clearMessageWarning": "Please be advised that by submitting this message, all subsequent messages will be deleted!", "clearConversationWarning": "Please be advised that by confirming this action, all messages will be deleted!", - "clearConversation": "Clear Conversation", + "clearConversation": "Clear Conversation History", "import": "Import", "export": "Export", "author": "Made by Jing Hua", diff --git a/src/components/Chat/ChatContent/Message/CommandPrompt/CommandPrompt.tsx b/src/components/Chat/ChatContent/Message/CommandPrompt/CommandPrompt.tsx index e4c67e6..3ea628f 100644 --- a/src/components/Chat/ChatContent/Message/CommandPrompt/CommandPrompt.tsx +++ b/src/components/Chat/ChatContent/Message/CommandPrompt/CommandPrompt.tsx @@ -16,9 +16,18 @@ const CommandPrompt = ({ const prompts = useStore((state) => state.prompts); const [_prompts, _setPrompts] = useState(prompts); const [input, setInput] = useState(''); + const inputRef = useRef(null); const [dropDown, setDropDown, dropDownRef] = useHideOnOutsideClick(); + + useEffect(() => { + if (dropDown && inputRef.current) { + // When dropdown is visible, focus the input + inputRef.current.focus(); + } + }, [dropDown]); + useEffect(() => { const filteredPrompts = matchSorter(useStore.getState().prompts, input, { keys: ['name'], @@ -46,6 +55,7 @@ const CommandPrompt = ({ >
{t('promptLibrary')}
{ return ( <> - { setIsModalOpen(true); }} > {t('clearConversation')} - + {isModalOpen && ( { {countTotalTokens && } {googleClientId && } - diff --git a/src/components/SettingsMenu/SettingsMenu.tsx b/src/components/SettingsMenu/SettingsMenu.tsx index e11209f..b4431db 100644 --- a/src/components/SettingsMenu/SettingsMenu.tsx +++ b/src/components/SettingsMenu/SettingsMenu.tsx @@ -15,6 +15,7 @@ import PromptLibraryMenu from '@components/PromptLibraryMenu'; import ChatConfigMenu from '@components/ChatConfigMenu'; import EnterToSubmitToggle from './EnterToSubmitToggle'; import TotalTokenCost, { TotalTokenCostToggle } from './TotalTokenCost'; +import ClearConversation from '@components/Menu/MenuOptions/ClearConversation'; const SettingsMenu = () => { const { t } = useTranslation(); @@ -51,6 +52,7 @@ const SettingsMenu = () => { +