forked from React-Group/interstellar_ai
		
	Merge pull request 'show selected chat' (#129) from YasinOnm08/interstellar_ai:main into main
Reviewed-on: https://interstellardevelopment.org/code/code/React-Group/interstellar_ai/pulls/129
This commit is contained in:
		
						commit
						871e31119a
					
				
					 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…
	
	Add table
		Add a link
		
	
		Reference in a new issue