Merge pull request 'main' (#53) from React-Group/interstellar_ai:main into main

Reviewed-on: https://interstellardevelopment.org/code/code/sageTheDm/interstellar_ai/pulls/53
This commit is contained in:
sageTheDm 2024-10-11 09:10:12 +02:00
commit 35151b2c53
4 changed files with 10 additions and 12 deletions

View file

@ -317,20 +317,20 @@ const InputOutputBackend: React.FC = () => {
}
const handleResendClick = () => {
const temporary_message = messages[messages.length - 2]['content']
const updatedMessages = messages.slice(0, -2)
setMessages(updatedMessages)
const msg = chatHistory.chats[chatHistory.selectedIndex].messages
const lastUserMessage = msg[msg.length-2].content
msg.splice(msg.length-2,2)
endGetWorker()
getNewToken()
setInputDisabled(false)
handleSendClick(temporary_message, true)
handleSendClick(lastUserMessage, true)
}
const handleEditClick = () => {
const newestMessage = messages[messages.length - 2].content
setInputMessage(newestMessage)
const updatedMessages = messages.slice(0, messages.length - 2)
setMessages(updatedMessages)
const msg = chatHistory.chats[chatHistory.selectedIndex].messages
const lastUserMessage = msg[msg.length-2].content
setInputMessage(lastUserMessage)
msg.splice(msg.length-2,2)
endGetWorker()
getNewToken()
setInputDisabled(false)

View file

@ -12,11 +12,9 @@ import PrivacySettings from './PrivacySettings';
import FontSizeSetting from './FontSize';
import OpenSourceModeToggle from './OpenSourceToggle';
import {
changeHistory,
changeSettings,
createAccount,
deleteAccount,
getHistory,
} from '../../backend/database';
import ThemeDropdown from './DropDownTheme';

View file

@ -6,4 +6,4 @@ cd ..
cd ..
cd py
python api.py
py api.py