forked from React-Group/interstellar_ai
Merge pull request 'main' (#126) from sageTheDm/interstellar_ai:main into main
Reviewed-on: https://interstellardevelopment.org/code/code/React-Group/interstellar_ai/pulls/126
This commit is contained in:
commit
eed187983b
3 changed files with 8 additions and 4 deletions
|
@ -22,7 +22,7 @@ const ConversationFrontend = React.forwardRef<HTMLDivElement, ConversationProps>
|
||||||
({ messages, onStopClick, onResendClick, onEditClick, onCopyClick, isClicked }, ref: ForwardedRef<HTMLDivElement>) => {
|
({ messages, onStopClick, onResendClick, onEditClick, onCopyClick, isClicked }, ref: ForwardedRef<HTMLDivElement>) => {
|
||||||
const [isScrolling, setIsScrolling] = useState(true);
|
const [isScrolling, setIsScrolling] = useState(true);
|
||||||
const messagesEndRef = useRef<HTMLDivElement | null>(null);
|
const messagesEndRef = useRef<HTMLDivElement | null>(null);
|
||||||
const [chatHistory, setChatHistory, setSelectedIndex] = useChatHistory()
|
const [chatHistory] = useChatHistory()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const observer = new IntersectionObserver(
|
const observer = new IntersectionObserver(
|
||||||
|
|
|
@ -8,6 +8,10 @@ const History: React.FC = () => {
|
||||||
|
|
||||||
const handleEditButtonClick = () => {
|
const handleEditButtonClick = () => {
|
||||||
setIsEditing(true);
|
setIsEditing(true);
|
||||||
|
|
||||||
|
/* Thank you Eslint for this masterpiece of a code snippet */
|
||||||
|
setChatHistory(chatHistory)
|
||||||
|
/* Wow i feel so secure now */
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
|
|
|
@ -40,10 +40,10 @@ export function importSettings(jsonData: string): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const sendToDatabase = async () => {
|
export const sendToDatabase = async () => {
|
||||||
let useName = localStorage.getItem("accountName")
|
const useName = localStorage.getItem("accountName")
|
||||||
let usePassword = localStorage.getItem("accountPassword")
|
const usePassword = localStorage.getItem("accountPassword")
|
||||||
if (useName && usePassword) {
|
if (useName && usePassword) {
|
||||||
let 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')
|
alert('Data has been transferred')
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
|
Loading…
Reference in a new issue