fix: Fix the problem of multiple line breaks in Q&A (#1573)

This commit is contained in:
wangzhichao
2024-05-28 17:34:43 +08:00
committed by GitHub
parent ac18363f2d
commit 6f66da4d5e

View File

@@ -60,6 +60,7 @@ function CompletionInput({ children, loading, onSubmit, handleFinish, ...props }
if (!userInput.trim()) return;
if (e.keyCode === 13) {
if (e.shiftKey) {
e.preventDefault()
setUserInput((state) => state + '\n');
return;
}