Skip to content

Commit 95a0088

Browse files
committed
fix(core): prevent empty input processing in SketchInputListener
Add check to ignore empty or blank user input in `manualSend` method to avoid unnecessary processing.
1 parent 2cf870c commit 95a0088

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/kotlin/cc/unitmesh/devti/sketch/SketchInputListener.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ open class SketchInputListener(
5757
open fun getInitPrompt(): String = systemPrompt
5858

5959
override fun manualSend(userInput: String) {
60+
if (userInput.trim().isEmpty() || userInput.trim().isBlank()) return
61+
6062
ApplicationManager.getApplication().executeOnPooledThread {
6163
val devInProcessor = LanguageProcessor.devin()
6264
val compiledInput = runReadAction { devInProcessor?.compile(project, userInput) } ?: userInput

0 commit comments

Comments
 (0)