Compare commits
No commits in common. "f9bce3b22a0a9dc0542723e3c8efd6552d38742f" and "088aa0170cdb4e8e336e929a30f121e1fc4e5ff7" have entirely different histories.
f9bce3b22a
...
088aa0170c
2 changed files with 9 additions and 9 deletions
|
@ -317,20 +317,20 @@ const InputOutputBackend: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleResendClick = () => {
|
const handleResendClick = () => {
|
||||||
const msg = chatHistory.chats[chatHistory.selectedIndex].messages
|
const temporary_message = messages[messages.length - 2]['content']
|
||||||
const lastUserMessage = msg[msg.length-2].content
|
const updatedMessages = messages.slice(0, -2)
|
||||||
msg.splice(msg.length-2,2)
|
setMessages(updatedMessages)
|
||||||
endGetWorker()
|
endGetWorker()
|
||||||
getNewToken()
|
getNewToken()
|
||||||
setInputDisabled(false)
|
setInputDisabled(false)
|
||||||
handleSendClick(lastUserMessage, true)
|
handleSendClick(temporary_message, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEditClick = () => {
|
const handleEditClick = () => {
|
||||||
const msg = chatHistory.chats[chatHistory.selectedIndex].messages
|
const newestMessage = messages[messages.length - 2].content
|
||||||
const lastUserMessage = msg[msg.length-2].content
|
setInputMessage(newestMessage)
|
||||||
setInputMessage(lastUserMessage)
|
const updatedMessages = messages.slice(0, messages.length - 2)
|
||||||
msg.splice(msg.length-2,2)
|
setMessages(updatedMessages)
|
||||||
endGetWorker()
|
endGetWorker()
|
||||||
getNewToken()
|
getNewToken()
|
||||||
setInputDisabled(false)
|
setInputDisabled(false)
|
||||||
|
|
|
@ -46,7 +46,7 @@ const History: React.FC = () => {
|
||||||
copyChats.chats = [...chatHistory.chats]
|
copyChats.chats = [...chatHistory.chats]
|
||||||
|
|
||||||
// Remove the chat at the specified index
|
// Remove the chat at the specified index
|
||||||
copyChats.chats.splice(index,1)
|
copyChats.chats.splice(index,1)
|
||||||
|
|
||||||
// Determine new selectedIndex
|
// Determine new selectedIndex
|
||||||
let newSelectedIndex = currentIndex;
|
let newSelectedIndex = currentIndex;
|
||||||
|
|
Loading…
Reference in a new issue