Skip to content

Commit bb50b15

Browse files
authored
feat: supports Shift + Enter input box line feeds (#472)
1 parent a092354 commit bb50b15

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/Search/InputBox.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ export default function ChatInput({
276276
setIsDeepThinkActive();
277277
};
278278

279-
const source = currentAssistant?._source
279+
const source = currentAssistant?._source;
280280

281281
return (
282282
<div className={`w-full relative`}>
@@ -302,7 +302,9 @@ export default function ChatInput({
302302
}}
303303
connected={connected}
304304
handleKeyDown={(e: React.KeyboardEvent<HTMLTextAreaElement>) => {
305-
if (e.key !== "Enter") return;
305+
const { key, shiftKey } = e;
306+
307+
if (key !== "Enter" || shiftKey) return;
306308

307309
e.preventDefault();
308310
handleSubmit();

0 commit comments

Comments
 (0)