forked from React-Group/interstellar_ai
show selected chat
This commit is contained in:
parent
44b34ba9c6
commit
416dcb17ef
3 changed files with 4 additions and 21 deletions
|
@ -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[]
|
||||
} */
|
||||
|
||||
|
||||
|
|
@ -35,7 +35,10 @@ const History: React.FC = () => {
|
|||
{/* Populate with history items */}
|
||||
{chatHistory.chats.map((chats, index) => (
|
||||
<li key={index}>
|
||||
<a href="#" onClick={() => handleHistoryClick(index)}>
|
||||
<a href="#" onClick={() => handleHistoryClick(index)} style={{
|
||||
backgroundColor: chatHistory.selectedIndex == index ? "var(--input-button-color)" : "",
|
||||
borderRadius:"5px"
|
||||
}}>
|
||||
{chatHistory.chats[index].name}
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue