We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a0bfa7 commit f4a9fe2Copy full SHA for f4a9fe2
1 file changed
packages/app/src/components/prompt-input.tsx
@@ -1241,6 +1241,20 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
1241
1242
// Note: Shift+Enter is handled earlier, before IME check
1243
if (event.key === "Enter" && !event.shiftKey) {
1244
+ event.preventDefault()
1245
+ if (event.repeat) return
1246
+ if (
1247
+ working() &&
1248
+ prompt
1249
+ .current()
1250
+ .map((part) => ("content" in part ? part.content : ""))
1251
+ .join("")
1252
+ .trim().length === 0 &&
1253
+ imageAttachments().length === 0 &&
1254
+ commentCount() === 0
1255
+ ) {
1256
+ return
1257
+ }
1258
handleSubmit(event)
1259
}
1260
0 commit comments