mirror of
				https://github.com/Yidadaa/ChatGPT-Next-Web.git
				synced 2025-11-04 08:26:12 +08:00 
			
		
		
		
	Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web
This commit is contained in:
		@@ -245,11 +245,11 @@ function useSubmitHandler() {
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export type RenderPompt = Pick<Prompt, "title" | "content">;
 | 
			
		||||
export type RenderPrompt = Pick<Prompt, "title" | "content">;
 | 
			
		||||
 | 
			
		||||
export function PromptHints(props: {
 | 
			
		||||
  prompts: RenderPompt[];
 | 
			
		||||
  onPromptSelect: (prompt: RenderPompt) => void;
 | 
			
		||||
  prompts: RenderPrompt[];
 | 
			
		||||
  onPromptSelect: (prompt: RenderPrompt) => void;
 | 
			
		||||
}) {
 | 
			
		||||
  const noPrompts = props.prompts.length === 0;
 | 
			
		||||
  const [selectIndex, setSelectIndex] = useState(0);
 | 
			
		||||
@@ -727,7 +727,7 @@ function _Chat() {
 | 
			
		||||
 | 
			
		||||
  // prompt hints
 | 
			
		||||
  const promptStore = usePromptStore();
 | 
			
		||||
  const [promptHints, setPromptHints] = useState<RenderPompt[]>([]);
 | 
			
		||||
  const [promptHints, setPromptHints] = useState<RenderPrompt[]>([]);
 | 
			
		||||
  const onSearch = useDebouncedCallback(
 | 
			
		||||
    (text: string) => {
 | 
			
		||||
      const matchedPrompts = promptStore.search(text);
 | 
			
		||||
@@ -812,7 +812,7 @@ function _Chat() {
 | 
			
		||||
    setAutoScroll(true);
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  const onPromptSelect = (prompt: RenderPompt) => {
 | 
			
		||||
  const onPromptSelect = (prompt: RenderPrompt) => {
 | 
			
		||||
    setTimeout(() => {
 | 
			
		||||
      setPromptHints([]);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user