Skip to content

Commit 2a96ef6

Browse files
committed
refactor(observer): trim globalBuffer and handle empty case in ExternalTaskAgentObserver #259
1 parent 64199c9 commit 2a96ef6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/main/kotlin/cc/unitmesh/devti/observer/ExternalTaskAgentObserver.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ class ExternalTaskAgentObserver : AgentObserver, Disposable {
4343
handler: ProcessHandler,
4444
exitCode: Int
4545
) {
46-
val globalBuffer = globalBuffer.toString()
46+
val globalBuffer = globalBuffer.toString().trim()
47+
if (globalBuffer.isEmpty()) {
48+
return
49+
}
50+
4751
if (exitCode != 0) {
4852
val prompt = "Help Me fix follow build issue:\n```bash\n$globalBuffer\n```\n"
4953
sendErrorNotification(project, prompt)

0 commit comments

Comments
 (0)