mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +08:00 
			
		
		
		
	@@ -545,7 +545,7 @@ export function Chat() {
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  const findLastUesrIndex = (messageId: number) => {
 | 
			
		||||
  const findLastUserIndex = (messageId: number) => {
 | 
			
		||||
    // find last user input message and resend
 | 
			
		||||
    let lastUserMessageIndex: number | null = null;
 | 
			
		||||
    for (let i = 0; i < session.messages.length; i += 1) {
 | 
			
		||||
@@ -568,14 +568,14 @@ export function Chat() {
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  const onDelete = (botMessageId: number) => {
 | 
			
		||||
    const userIndex = findLastUesrIndex(botMessageId);
 | 
			
		||||
    const userIndex = findLastUserIndex(botMessageId);
 | 
			
		||||
    if (userIndex === null) return;
 | 
			
		||||
    deleteMessage(userIndex);
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  const onResend = (botMessageId: number) => {
 | 
			
		||||
    // find last user input message and resend
 | 
			
		||||
    const userIndex = findLastUesrIndex(botMessageId);
 | 
			
		||||
    const userIndex = findLastUserIndex(botMessageId);
 | 
			
		||||
    if (userIndex === null) return;
 | 
			
		||||
 | 
			
		||||
    setIsLoading(true);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user