Skip to content

Commit a52e4fc

Browse files
committed
refactor(task): remove dead isPaused field (RSK-12)
1 parent a077066 commit a52e4fc

4 files changed

Lines changed: 3 additions & 10 deletions

File tree

‎src/__tests__/new-task-delegation.spec.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ describe("Task.startSubtask() metadata-driven delegation", () => {
3131
})
3232
expect(child.taskId).toBe("child-1")
3333

34-
// Parent should not be paused and no paused/unpaused events should be emitted
35-
expect((parent as any).isPaused).not.toBe(true)
34+
// No paused/unpaused events should be emitted
3635
expect((parent as any).childTaskId).toBeUndefined()
3736
const emittedEvents = (parent.emit as any).mock.calls.map((c: any[]) => c[0])
3837
expect(emittedEvents).not.toContain(RooCodeEventName.TaskPaused)

‎src/core/task/Task.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
350350
abandoned = false
351351
abortReason?: ClineApiReqCancelReason
352352
isInitialized = false
353-
isPaused: boolean = false
354353

355354
// API
356355
apiConfiguration: ProviderSettings
@@ -4205,9 +4204,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
42054204
this.consecutiveNoToolUseCount = 0
42064205
}
42074206

4208-
// Push to stack if there's content OR if we're paused waiting for a subtask.
4209-
// When paused, we push an empty item so the loop continues to the pause check.
4210-
if (this.userMessageContent.length > 0 || this.isPaused) {
4207+
if (this.userMessageContent.length > 0) {
42114208
stack.push({
42124209
userContent: [...this.userMessageContent], // Create a copy to avoid mutation issues
42134210
includeFileDetails: false, // Subsequent iterations don't need file details

‎src/core/tools/__tests__/newTaskTool.spec.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ const mockCline = {
9191
emit: mockEmit,
9292
recordToolError: mockRecordToolError,
9393
consecutiveMistakeCount: 0,
94-
isPaused: false,
9594
pausedModeSlug: "ask",
9695
taskId: "mock-parent-task-id",
9796
enableCheckpoints: false,
@@ -135,7 +134,6 @@ describe("newTaskTool", () => {
135134
groups: ["command", "read", "edit"],
136135
}) // Default valid mode
137136
mockCline.consecutiveMistakeCount = 0
138-
mockCline.isPaused = false
139137
// Default: VSCode setting is disabled
140138
const mockGet = vi.fn().mockReturnValue(false)
141139
vi.mocked(vscode.workspace.getConfiguration).mockReturnValue({
@@ -593,7 +591,6 @@ describe("newTaskTool delegation flow", () => {
593591
emit: localEmit,
594592
recordToolError: mockRecordToolError,
595593
consecutiveMistakeCount: 0,
596-
isPaused: false,
597594
pausedModeSlug: "ask",
598595
taskId: "mock-parent-task-id",
599596
setPendingTaskAction: vi.fn(),

‎src/eslint-suppressions.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
},
4747
"__tests__/new-task-delegation.spec.ts": {
4848
"@typescript-eslint/no-explicit-any": {
49-
"count": 9
49+
"count": 8
5050
}
5151
},
5252
"activate/CodeActionProvider.ts": {

0 commit comments

Comments
 (0)