Skip to content

Commit 2dfcc58

Browse files
committed
refactor(core): conditionally notify on non-empty reasoner output #271
Prevent unnecessary notifications by ensuring `AutoDevNotifications.notify` is only called when `reasonerOutput` is not empty.
1 parent a18681b commit 2dfcc58

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/main/kotlin/cc/unitmesh/devti/llms/custom/CustomSSEProcessor.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ open class CustomSSEProcessor(private val project: Project) {
147147

148148
if (output.isNotEmpty()) {
149149
messages += Message(ChatRole.Assistant.roleName(), output)
150-
AutoDevNotifications.notify(project, reasonerOutput)
150+
if (reasonerOutput.isNotEmpty()) {
151+
AutoDevNotifications.notify(project, reasonerOutput)
152+
}
151153
}
152154

153155
recording.write(RecordingInstruction(promptText, output))

0 commit comments

Comments
 (0)