Compare commits

...
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
fix: task cancellation during thinking stream would result in 'Cline aborted stream' error
+4 -1
View File
@@ -3451,7 +3451,10 @@ export class Task {
case "reasoning":
// reasoning will always come before assistant message
reasoningMessage += chunk.reasoning
await this.say("reasoning", reasoningMessage, undefined, true)
// fixes bug where cancelling task > aborts task > for loop may be in middle of streaming reasoning > say function throws error before we get a chance to properly clean up and cancel the task.
if (!this.abort) {
await this.say("reasoning", reasoningMessage, undefined, true)
}
break
case "text":
if (reasoningMessage && assistantMessage.length === 0) {