diff --git a/gradle.properties b/gradle.properties index 33fe7ffa93..0a26c96b6f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ pluginGroup = com.phodal.autodev pluginName = AutoDev pluginRepositoryUrl = https://github.com/unit-mesh/auto-dev # SemVer format -> https://semver.org -pluginVersion = 1.2.2 +pluginVersion = 1.2.3 # Supported IDEs: idea, pycharm baseIDE=idea diff --git a/src/main/kotlin/cc/unitmesh/devti/gui/chat/ChatCodingPanel.kt b/src/main/kotlin/cc/unitmesh/devti/gui/chat/ChatCodingPanel.kt index a9abcd7b13..fc2d9d0d05 100644 --- a/src/main/kotlin/cc/unitmesh/devti/gui/chat/ChatCodingPanel.kt +++ b/src/main/kotlin/cc/unitmesh/devti/gui/chat/ChatCodingPanel.kt @@ -208,15 +208,15 @@ class ChatCodingPanel(private val chatCodingService: ChatCodingService, val disp } } - val elapsedTime = System.currentTimeMillis() - startTime - - // waiting for the last message to be rendered, like sleep 5 ms? - // 此处的 20s 出自 openAI 免费账户访问 3/min - withContext(Dispatchers.IO) { - - val delaySec = delaySeconds.toLong() ?: 20L - val remainingTime = maxOf(delaySec * 1000 - elapsedTime, 0) - delay(remainingTime) + if (delaySeconds.isNotEmpty()) { + val elapsedTime = System.currentTimeMillis() - startTime + // waiting for the last message to be rendered, like sleep 5 ms? + // 此处的 20s 出自 openAI 免费账户访问 3/min + withContext(Dispatchers.IO) { + val delaySec = delaySeconds.toLong() ?: 20L + val remainingTime = maxOf(delaySec * 1000 - elapsedTime, 0) + delay(remainingTime) + } } messageView.reRenderAssistantOutput()