mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +08:00 
			
		
		
		
	fix: a few typos
This commit is contained in:
		@@ -75,7 +75,7 @@ export function MessageSelector(props: {
 | 
				
			|||||||
  const isValid = (m: ChatMessage) => m.content && !m.isError && !m.streaming;
 | 
					  const isValid = (m: ChatMessage) => m.content && !m.isError && !m.streaming;
 | 
				
			||||||
  const messages = session.messages.filter(
 | 
					  const messages = session.messages.filter(
 | 
				
			||||||
    (m, i) =>
 | 
					    (m, i) =>
 | 
				
			||||||
      m.id && // messsage must has id
 | 
					      m.id && // message must have id
 | 
				
			||||||
      isValid(m) &&
 | 
					      isValid(m) &&
 | 
				
			||||||
      (i >= session.messages.length - 1 || isValid(session.messages[i + 1])),
 | 
					      (i >= session.messages.length - 1 || isValid(session.messages[i + 1])),
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
@@ -88,13 +88,13 @@ export function MessageSelector(props: {
 | 
				
			|||||||
    return searchInput.length === 0 || searchIds.has(id);
 | 
					    return searchInput.length === 0 || searchIds.has(id);
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  const doSearch = (text: string) => {
 | 
					  const doSearch = (text: string) => {
 | 
				
			||||||
    const searchResuts = new Set<number>();
 | 
					    const searchResults = new Set<number>();
 | 
				
			||||||
    if (text.length > 0) {
 | 
					    if (text.length > 0) {
 | 
				
			||||||
      messages.forEach((m) =>
 | 
					      messages.forEach((m) =>
 | 
				
			||||||
        m.content.includes(text) ? searchResuts.add(m.id!) : null,
 | 
					        m.content.includes(text) ? searchResults.add(m.id!) : null,
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    setSearchIds(searchResuts);
 | 
					    setSearchIds(searchResults);
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // for range selection
 | 
					  // for range selection
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user