-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add an API for resuming tasks by ID #7122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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.
src/extension/api.ts
Outdated
| break | ||
| case TaskCommandName.ResumeTask: | ||
| this.log(`[API] ResumeTask -> ${data}`) | ||
| await this.resumeTask(data) |
There was a problem hiding this comment.
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:
| 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) |
There was a problem hiding this comment.
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", () => { |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
* 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) ...
Important
Adds
ResumeTaskcommand to IPC interface for resuming tasks by ID, with schema updates and tests.ResumeTaskcommand to IPC interface inapi.tsto resume tasks by ID.TaskCommandNameenum andtaskCommandSchemainipc.tsto includeResumeTask.ipc.test.tsto validateResumeTaskcommand, including error handling for non-existent task IDs.README.mdinipcpackage to documentResumeTaskcommand and usage examples.This description was created by
for d58afb0. You can customize this summary. It will automatically update as commits are pushed.