瀏覽代碼

fix: bug #1662

ShengYan, Zhang 1 年之前
父節點
當前提交
23f6c2e8c9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/components/chat.tsx

+ 1 - 1
app/components/chat.tsx

@@ -271,7 +271,7 @@ export function PromptHints(props: {
 
     return () => window.removeEventListener("keydown", onKeyDown);
     // eslint-disable-next-line react-hooks/exhaustive-deps
-  }, [noPrompts, selectIndex]);
+  }, [props.prompts.length, selectIndex]);
 
   if (noPrompts) return null;
   return (