main #53

Merged
sageTheDm merged 6 commits from React-Group/interstellar_ai:main into main 2024-10-11 09:10:13 +02:00
2 changed files with 9 additions and 9 deletions
Showing only changes of commit f9bce3b22a - Show all commits

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

@ -46,7 +46,7 @@ const History: React.FC = () => {
copyChats.chats = [...chatHistory.chats]
// Remove the chat at the specified index
copyChats.chats.splice(index,1)
copyChats.chats.splice(index,1)
// Determine new selectedIndex
let newSelectedIndex = currentIndex;