Compare commits
No commits in common. "871e31119a345729c815dabbbcb0b503a49b682c" and "c0f95dc37e765c7cbafdc5f32725d33b4dbded8c" have entirely different histories.
871e31119a
...
c0f95dc37e
3 changed files with 21 additions and 4 deletions
19
app/backend/ProcessMemory.ts
Normal file
19
app/backend/ProcessMemory.ts
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
/* import { Settings } from 'electron'
|
||||||
|
|
||||||
|
type Message = {
|
||||||
|
role: string
|
||||||
|
content: string
|
||||||
|
}
|
||||||
|
|
||||||
|
type Chat = {
|
||||||
|
name: string
|
||||||
|
messages: Message[]
|
||||||
|
}
|
||||||
|
|
||||||
|
type Data = {
|
||||||
|
chats: Chat[]
|
||||||
|
settings: Settings[]
|
||||||
|
} */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,10 +35,7 @@ const History: React.FC = () => {
|
||||||
{/* Populate with history items */}
|
{/* Populate with history items */}
|
||||||
{chatHistory.chats.map((chats, index) => (
|
{chatHistory.chats.map((chats, index) => (
|
||||||
<li key={index}>
|
<li key={index}>
|
||||||
<a href="#" onClick={() => handleHistoryClick(index)} style={{
|
<a href="#" onClick={() => handleHistoryClick(index)}>
|
||||||
backgroundColor: chatHistory.selectedIndex == index ? "var(--input-button-color)" : "",
|
|
||||||
borderRadius:"5px"
|
|
||||||
}}>
|
|
||||||
{chatHistory.chats[index].name}
|
{chatHistory.chats[index].name}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -45,6 +45,7 @@ export const sendToDatabase = async () => {
|
||||||
if (useName && usePassword) {
|
if (useName && usePassword) {
|
||||||
const result = await changeSettings(useName, usePassword, JSON.parse(exportSettings()))
|
const result = await changeSettings(useName, usePassword, JSON.parse(exportSettings()))
|
||||||
if (result == true) {
|
if (result == true) {
|
||||||
|
alert('Data has been transferred')
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue