Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/types/npm/package.metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@roo-code/types",
"version": "1.50.0",
"version": "1.51.0",
"description": "TypeScript type definitions for Roo Code.",
"publishConfig": {
"access": "public",
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface TaskProviderLike {
createTask(text?: string, images?: string[], parentTask?: TaskLike): Promise<TaskLike>
cancelTask(): Promise<void>
clearTask(): Promise<void>
resumeTask(taskId: string): void

getState(): Promise<TaskProviderState>
postStateToWebview(): Promise<void>
Expand Down
7 changes: 7 additions & 0 deletions src/core/webview/ClineProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,13 @@ export class ClineProvider
await this.removeClineFromStack()
}

resumeTask(taskId: string): void {
// Use the existing showTaskWithId method which handles both current and historical tasks
this.showTaskWithId(taskId).catch((error) => {
this.log(`Failed to resume task ${taskId}: ${error.message}`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new resumeTask() method correctly reuses showTaskWithId to resume tasks. Consider checking if the caught error is an instance of Error (e.g., using error instanceof Error ? error.message : String(error)) for more robust error logging.

Suggested change
this.log(`Failed to resume task ${taskId}: ${error.message}`)
this.log(`Failed to resume task ${taskId}: ${error instanceof Error ? error.message : String(error)}`)

})
}

getRecentTasks(): string[] {
if (this.recentTasksCache) {
return this.recentTasksCache
Expand Down
Loading