Skip to content

Commit 48ea5d4

Browse files
fix(task): reset isStreaming state in abortTask to prevent UI lock after task switch
When a task switch occurs via abortTask() (e.g., removeClineFromStack, clearTask), the isStreaming flag was not being reset. This left the chat input locked in 'API Request...' state because ClineProvider checks getCurrentTask()!.isStreaming to determine if the UI should be enabled. Added isStreaming=false and isWaitingForFirstChunk=false reset in abortTask() alongside the existing abort=true flag, ensuring the UI unlocks immediately when a task is aborted or abandoned. Fixes #257
1 parent 82bd057 commit 48ea5d4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/core/task/Task.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2118,6 +2118,13 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
21182118

21192119
this.abort = true
21202120

2121+
// Reset streaming state so the UI unlocks immediately.
2122+
// Without this, task switches that call abortTask() without going
2123+
// through resumeAfterDelegation() leave isStreaming=true, causing
2124+
// the chat input to remain locked (issue #257).
2125+
this.isStreaming = false
2126+
this.isWaitingForFirstChunk = false
2127+
21212128
// Reset consecutive error counters on abort (manual intervention)
21222129
this.consecutiveNoToolUseCount = 0
21232130
this.consecutiveNoAssistantMessagesCount = 0

0 commit comments

Comments
 (0)