mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: use askApproval wrapper in insert_content and search_and_replace tools (#7649)
Fixes issue where isWriteProtected was incorrectly passed as the partial flag to task.ask(), causing "Current ask promise was ignored (#1)" error. Both tools now use the askApproval wrapper function which correctly handles the parameter ordering, passing undefined for progressStatus and isWriteProtected as the fourth parameter. Fixes #7648 Co-authored-by: Roo Code <roomote@roocode.com>
This commit is contained in:
parent
0126c5dd46
commit
e7f599bfb9
2 changed files with 2 additions and 6 deletions
|
|
@ -153,9 +153,7 @@ export async function insertContentTool(
|
|||
}
|
||||
|
||||
// Ask for approval (same for both flows)
|
||||
const didApprove = await cline
|
||||
.ask("tool", completeMessage, isWriteProtected)
|
||||
.then((response) => response.response === "yesButtonClicked")
|
||||
const didApprove = await askApproval("tool", completeMessage, undefined, isWriteProtected)
|
||||
|
||||
if (!didApprove) {
|
||||
// Revert changes if diff view was shown
|
||||
|
|
|
|||
|
|
@ -223,9 +223,7 @@ export async function searchAndReplaceTool(
|
|||
cline.diffViewProvider.scrollToFirstDiff()
|
||||
}
|
||||
|
||||
const didApprove = await cline
|
||||
.ask("tool", completeMessage, isWriteProtected)
|
||||
.then((response) => response.response === "yesButtonClicked")
|
||||
const didApprove = await askApproval("tool", completeMessage, undefined, isWriteProtected)
|
||||
|
||||
if (!didApprove) {
|
||||
// Revert changes if diff view was shown
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue