-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix issues with subtasks attempting completion along with commands #3156
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
Changes from all commits
4a36340
0cb3e23
9fb83ba
1f103b7
7c9943d
82dee38
6e86438
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "roo-cline": patch | ||
| --- | ||
|
|
||
| Fix auto-approvals |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,13 +76,13 @@ export async function attemptCompletionTool( | |
| } | ||
|
|
||
| // Complete command message. | ||
| const executionId = Date.now().toString() | ||
| const didApprove = await askApproval("command", command, { id: executionId }) | ||
| const didApprove = await askApproval("command", command) | ||
|
|
||
| if (!didApprove) { | ||
| return | ||
| } | ||
|
|
||
| const executionId = cline.lastMessageTs?.toString() ?? Date.now().toString() | ||
| const options: ExecuteCommandOptions = { executionId, command } | ||
| const [userRejected, execCommandResult] = await executeCommand(cline, options) | ||
|
|
||
|
|
@@ -108,7 +108,7 @@ export async function attemptCompletionTool( | |
| } | ||
|
|
||
| // tell the provider to remove the current subtask and resume the previous task in the stack | ||
| await cline.providerRef.deref()?.finishSubTask(lastMessage?.text ?? "") | ||
| await cline.providerRef.deref()?.finishSubTask(result) | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to make a lot more sense - hopefully not missing any obvious reason to use the lastMessage text
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is only the
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes exactly. Seems like that's what we want to return to the parent task. |
||
| return | ||
| } | ||
|
|
||
|
|
||
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.
This is a better value for
executionIdsince it will get passed asmessage.tsfor thecommandmessage. I was noticing issues with existing method for passing anexecutionId.