Merge branch 'main' of interstellardevelopment.org:React-Group/interstellar_ai
This commit is contained in:
		
						commit
						90af1ae147
					
				
					 5 changed files with 19 additions and 7 deletions
				
			
		|  | @ -14,6 +14,7 @@ function addMessageToHistory(name: string, message: any): void { | ||||||
|     }; |     }; | ||||||
|     chatHistory.push(newMessage); |     chatHistory.push(newMessage); | ||||||
|     console.log(`Added message from ${name}: ${message}`); |     console.log(`Added message from ${name}: ${message}`); | ||||||
|  |     chatHistory.sort((a,b) => b.timestamp - a.timestamp) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function removeMessageFromHistory(timestamp: number): void { | function removeMessageFromHistory(timestamp: number): void { | ||||||
|  |  | ||||||
|  | @ -47,10 +47,8 @@ const InputOutputBackend: React.FC = () => { | ||||||
|       The currency is ${preferredCurrency}.  |       The currency is ${preferredCurrency}.  | ||||||
|       Communicate in the language specified by the user (country code: ${preferredLanguage}), and only in this language. |       Communicate in the language specified by the user (country code: ${preferredLanguage}), and only in this language. | ||||||
|       You are only able to change language if the user specifically states you must.  |       You are only able to change language if the user specifically states you must.  | ||||||
|       Do not answer in multiple languages or multiple measurement systems under any circumstances other than the user requesting it. |       Do not answer in multiple languages or multiple measurement systems under any circumstances other than the user requesting it.` | ||||||
|       You try to use html tags as often as possible in your responses. For images, links and tables you use markdown.` |       : `You are a helpful assistant`; | ||||||
|       : `You are a helpful assistant
 |  | ||||||
|       You try to use html tags as often as possible in your responses. For images, links and tables you use markdown. You cannot use both at the same time.`;
 |  | ||||||
|     setMessages([ |     setMessages([ | ||||||
|       { role: "system", content: systemMessage }, |       { role: "system", content: systemMessage }, | ||||||
|       { role: "assistant", content: "Hello! How may I help you?" }, |       { role: "assistant", content: "Hello! How may I help you?" }, | ||||||
|  |  | ||||||
|  | @ -516,6 +516,19 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = ( | ||||||
|                   setValue={setBasicTextColor} |                   setValue={setBasicTextColor} | ||||||
|                   cssVariable="" |                   cssVariable="" | ||||||
|                 /> |                 /> | ||||||
|  |                 <FontSizeSetting | ||||||
|  |                   fontSize={fontSize} | ||||||
|  |                   setFontSize={setFontSize} | ||||||
|  |                 /> | ||||||
|  |                 <DropdownSetting | ||||||
|  |                   label="Font Family" | ||||||
|  |                   value={fontFamily} | ||||||
|  |                   setValue={(newFont) => { | ||||||
|  |                     setFontFamily(newFont); | ||||||
|  |                     document.documentElement.style.setProperty('--font-family', newFont); | ||||||
|  |                   }} | ||||||
|  |                   options={fontOptions} | ||||||
|  |                 /> | ||||||
|               </> |               </> | ||||||
|             )} |             )} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -247,8 +247,8 @@ export const applyBasicCustomTheme = ( | ||||||
|   document.documentElement.style.setProperty('--popup-background-color', accentColor); |   document.documentElement.style.setProperty('--popup-background-color', accentColor); | ||||||
|   document.documentElement.style.setProperty('--pop-up-text', lightenColor(textColor, 80)); |   document.documentElement.style.setProperty('--pop-up-text', lightenColor(textColor, 80)); | ||||||
|   document.documentElement.style.setProperty('--input-border-color', primaryColor); |   document.documentElement.style.setProperty('--input-border-color', primaryColor); | ||||||
|   document.documentElement.style.setProperty('--font-family', "'Poppins', 'sans-serif'"); |   document.documentElement.style.setProperty('--font-family', localStorage.getItem("fontFamily") || "'Poppins', 'sans-serif'"); | ||||||
|   document.documentElement.style.setProperty('--font-size', '16px'); |   document.documentElement.style.setProperty('--font-size', localStorage.getItem("fontSize") || '16px'); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| // Helper function to darken a color (returns a darker version of the provided color)
 | // Helper function to darken a color (returns a darker version of the provided color)
 | ||||||
|  |  | ||||||
|  | @ -84,7 +84,7 @@ | ||||||
| 
 | 
 | ||||||
| .ai-message code{ | .ai-message code{ | ||||||
|     width: 100%; |     width: 100%; | ||||||
|     overflow-wrap: break-word; |     overflow: scroll; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* Button Container */ | /* Button Container */ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Patrick_Pluto
						Patrick_Pluto