From 416dcb17ef9a5e5db1c04a1e735bfcbb607af384 Mon Sep 17 00:00:00 2001 From: YasinOnm08 Date: Wed, 9 Oct 2024 15:07:05 +0200 Subject: [PATCH] show selected chat --- app/backend/ProcessMemory.ts | 19 ------------------- app/components/History.tsx | 5 ++++- app/components/settings/settingUtils.ts | 1 - 3 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 app/backend/ProcessMemory.ts diff --git a/app/backend/ProcessMemory.ts b/app/backend/ProcessMemory.ts deleted file mode 100644 index 5765138..0000000 --- a/app/backend/ProcessMemory.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* import { Settings } from 'electron' - -type Message = { - role: string - content: string -} - -type Chat = { - name: string - messages: Message[] -} - -type Data = { - chats: Chat[] - settings: Settings[] -} */ - - - diff --git a/app/components/History.tsx b/app/components/History.tsx index 0aae50f..7e23d6b 100644 --- a/app/components/History.tsx +++ b/app/components/History.tsx @@ -35,7 +35,10 @@ const History: React.FC = () => { {/* Populate with history items */} {chatHistory.chats.map((chats, index) => (
  • - handleHistoryClick(index)}> + handleHistoryClick(index)} style={{ + backgroundColor: chatHistory.selectedIndex == index ? "var(--input-button-color)" : "", + borderRadius:"5px" + }}> {chatHistory.chats[index].name}
  • diff --git a/app/components/settings/settingUtils.ts b/app/components/settings/settingUtils.ts index de08012..f6cd00d 100644 --- a/app/components/settings/settingUtils.ts +++ b/app/components/settings/settingUtils.ts @@ -45,7 +45,6 @@ export const sendToDatabase = async () => { if (useName && usePassword) { const result = await changeSettings(useName, usePassword, JSON.parse(exportSettings())) if (result == true) { - alert('Data has been transferred') window.location.reload(); } } -- 2.39.5