Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Aug 15, 2025

Important

Adds ResumeTask command to IPC interface for resuming tasks by ID, with schema updates and tests.

  • Behavior:
    • Adds ResumeTask command to IPC interface in api.ts to resume tasks by ID.
    • Handles errors gracefully if task ID not found, logging errors without crashing.
  • Schema and Validation:
    • Updates TaskCommandName enum and taskCommandSchema in ipc.ts to include ResumeTask.
    • Adds tests in ipc.test.ts to validate ResumeTask command, including error handling for non-existent task IDs.
  • Documentation:
    • Adds README.md in ipc package to document ResumeTask command and usage examples.

This description was created by Ellipsis for d58afb0. You can customize this summary. It will automatically update as commits are pushed.

@mrubens mrubens requested review from cte and jr as code owners August 15, 2025 15:49
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Documentation Improvements or additions to documentation Enhancement New feature or request labels Aug 15, 2025
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I've reviewed the changes and the implementation successfully adds the ResumeTask command to the IPC interface. The changes are well-structured with proper type definitions and test coverage for the schema validation.

break
case TaskCommandName.ResumeTask:
this.log(`[API] ResumeTask -> ${data}`)
await this.resumeTask(data)
Copy link
Contributor

Choose a reason for hiding this comment

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

Good addition! The IPC handler correctly calls the existing resumeTask method. However, could we consider adding error handling here to catch any exceptions from resumeTask? This would prevent the IPC server from crashing if an invalid task ID is provided:

Suggested change
await this.resumeTask(data)
case TaskCommandName.ResumeTask:
this.log(`[API] ResumeTask -> ${data}`)
try {
await this.resumeTask(data)
} catch (error) {
this.log(`[API] ResumeTask failed: ${error instanceof Error ? error.message : String(error)}`)
throw error
}
break


**Parameters:**

- `data`: Task ID to resume (string)
Copy link
Contributor

Choose a reason for hiding this comment

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

Excellent documentation! The ResumeTask command is clearly documented with its parameters and usage example. This makes it easy for external applications to understand how to use this new functionality.

})

describe("taskCommandSchema", () => {
it("should validate ResumeTask command with taskId", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Good test coverage for the schema validation! These tests ensure the ResumeTask command is properly validated. Could we also consider adding an integration test that verifies the actual task resumption flow works end-to-end?

StartNewTask = "StartNewTask",
CancelTask = "CancelTask",
CloseTask = "CloseTask",
ResumeTask = "ResumeTask",
Copy link
Contributor

Choose a reason for hiding this comment

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

Clean addition to the enum and schema! The ResumeTask command follows the same pattern as the other task commands, maintaining consistency in the API design.

@mrubens mrubens merged commit 9a734d0 into main Aug 15, 2025
9 checks passed
@mrubens mrubens deleted the resume_task_api branch August 15, 2025 16:04
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Aug 15, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 15, 2025
fxcl added a commit to Anabaai/Roo-Cline that referenced this pull request Aug 16, 2025
* main: (70 commits)
  fix: use native Ollama API instead of OpenAI compatibility layer (RooCodeInc#7137)
  feat: add support for OpenAI gpt-5-chat-latest model (RooCodeInc#7058)
  Make enhance with task history default to true (RooCodeInc#7140)
  Bump cloud version to 0.16.0 (RooCodeInc#7135)
  Release: v1.51.0 (RooCodeInc#7130)
  Add an API for resuming tasks by ID (RooCodeInc#7122)
  Add support for task page event population (RooCodeInc#7117)
  fix: add type check before calling .match() on diffItem.content (RooCodeInc#6905) (RooCodeInc#6906)
  Fix: Enable save button for provider dropdown and checkbox changes (RooCodeInc#7113)
  fix: Use cline.cwd as primary source for workspace path in codebaseSearchTool (RooCodeInc#6902)
  Hotfix multiple folder workspace checkpoint (RooCodeInc#6903)
  fix: prevent XML entity decoding in diff tools (RooCodeInc#7107) (RooCodeInc#7108)
  Refactor task execution system: improve call stack management (RooCodeInc#7035)
  Changeset version bump (RooCodeInc#7104)
  feat(web): fill missing SEO-related values (RooCodeInc#7096)
  Update contributors list (RooCodeInc#6883)
  Release v3.25.15 (RooCodeInc#7103)
  fix: add /evals page to sitemap generation (RooCodeInc#7102)
  feat: implement sitemap generation in TypeScript and remove XML file (RooCodeInc#6206)
  fix: reset condensing state when switching tasks (RooCodeInc#6922)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation Enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants