Skip to content

Commit 1183caa

Browse files
committed
fix(chat): ignore empty or newline-only prompts in chat input #101
The chat input now correctly handles empty and newline-only messages, preventing unnecessary processing and potential errors.
1 parent beb6f81 commit 1183caa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/cc/unitmesh/devti/gui/chat/ChatCodingPanel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class ChatCodingPanel(private val chatCodingService: ChatCodingService, val disp
9191
val prompt = component.text
9292
component.text = ""
9393

94-
if (prompt.isEmpty()) {
94+
if (prompt.isEmpty() || prompt == "\n") {
9595
return
9696
}
9797

0 commit comments

Comments
 (0)