From 69d53ed911d48027360516bcf95f23dfdcbc35e3 Mon Sep 17 00:00:00 2001 From: YasinOnm08 Date: Fri, 4 Oct 2024 15:31:46 +0200 Subject: [PATCH 1/3] idk --- app/backend/ChatHistory.ts | 1 + app/backend/InputOutputHandler.tsx | 9 ++------- app/styles/output.css | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/backend/ChatHistory.ts b/app/backend/ChatHistory.ts index 8d768ed..81f818c 100644 --- a/app/backend/ChatHistory.ts +++ b/app/backend/ChatHistory.ts @@ -14,6 +14,7 @@ function addMessageToHistory(name: string, message: any): void { }; chatHistory.push(newMessage); console.log(`Added message from ${name}: ${message}`); + chatHistory.sort((a,b) => b.timestamp - a.timestamp) } function removeMessageFromHistory(timestamp: number): void { diff --git a/app/backend/InputOutputHandler.tsx b/app/backend/InputOutputHandler.tsx index aeb4e3b..e760b52 100644 --- a/app/backend/InputOutputHandler.tsx +++ b/app/backend/InputOutputHandler.tsx @@ -4,9 +4,6 @@ import ConversationFrontend from '../components/ConversationFrontend'; import InputFrontend from "../components/InputFrontend"; import { sendToVoiceRecognition } from "./voice_backend" import axios from "axios"; -import { resolve } from "path"; -import { FFmpeg } from "@ffmpeg/ffmpeg"; -import { fetchFile, toBlobURL } from "@ffmpeg/util" const InputOutputBackend: React.FC = () => { // # variables @@ -50,10 +47,8 @@ const InputOutputBackend: React.FC = () => { The currency is ${preferredCurrency}. 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. - 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 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.`; + Do not answer in multiple languages or multiple measurement systems under any circumstances other than the user requesting it.` + : `You are a helpful assistant`; setMessages([ { role: "system", content: systemMessage }, { role: "assistant", content: "Hello! How may I help you?" }, diff --git a/app/styles/output.css b/app/styles/output.css index 09e1f09..320b68b 100644 --- a/app/styles/output.css +++ b/app/styles/output.css @@ -84,7 +84,7 @@ .ai-message code{ width: 100%; - overflow-wrap: break-word; + overflow: scroll; } /* Button Container */ From c7fdfa15cbe9adc1cf8f4e78d1168c93abc49234 Mon Sep 17 00:00:00 2001 From: sageTheDM Date: Fri, 4 Oct 2024 18:21:57 +0200 Subject: [PATCH 2/3] Minor changes --- app/components/settings/Settings.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/components/settings/Settings.tsx b/app/components/settings/Settings.tsx index 0d77b0b..ad1c21e 100644 --- a/app/components/settings/Settings.tsx +++ b/app/components/settings/Settings.tsx @@ -516,6 +516,19 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = ( setValue={setBasicTextColor} cssVariable="" /> + + { + setFontFamily(newFont); + document.documentElement.style.setProperty('--font-family', newFont); + }} + options={fontOptions} + /> )} From 67b079c3e6b90105bc90a263a0f1896784bd55f7 Mon Sep 17 00:00:00 2001 From: sageTheDM Date: Mon, 7 Oct 2024 08:34:25 +0200 Subject: [PATCH 3/3] themes --- app/components/settings/theme.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/settings/theme.ts b/app/components/settings/theme.ts index 2cef5cc..75c1c40 100644 --- a/app/components/settings/theme.ts +++ b/app/components/settings/theme.ts @@ -247,8 +247,8 @@ export const applyBasicCustomTheme = ( document.documentElement.style.setProperty('--popup-background-color', accentColor); document.documentElement.style.setProperty('--pop-up-text', lightenColor(textColor, 80)); document.documentElement.style.setProperty('--input-border-color', primaryColor); - document.documentElement.style.setProperty('--font-family', "'Poppins', 'sans-serif'"); - document.documentElement.style.setProperty('--font-size', '16px'); + document.documentElement.style.setProperty('--font-family', localStorage.getItem("fontFamily") || "'Poppins', 'sans-serif'"); + document.documentElement.style.setProperty('--font-size', localStorage.getItem("fontSize") || '16px'); }; // Helper function to darken a color (returns a darker version of the provided color)