mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
fix duplicate ask
This commit is contained in:
parent
621fc0e867
commit
8917ab7591
1 changed files with 7 additions and 6 deletions
|
|
@ -1402,8 +1402,12 @@ export class Cline {
|
|||
isCheckpointPossible = true
|
||||
}
|
||||
|
||||
const askApproval = async (type: ClineAsk, partialMessage?: string) => {
|
||||
const { response, text, images } = await this.ask(type, partialMessage, false)
|
||||
const askApproval = async (
|
||||
type: ClineAsk,
|
||||
partialMessage?: string,
|
||||
progressStatus?: ToolProgressStatus,
|
||||
) => {
|
||||
const { response, text, images } = await this.ask(type, partialMessage, false, progressStatus)
|
||||
if (response !== "yesButtonClicked") {
|
||||
// Handle both messageResponse and noButtonClicked with text
|
||||
if (text) {
|
||||
|
|
@ -1819,11 +1823,8 @@ export class Cline {
|
|||
if (this.diffStrategy && this.diffStrategy.getProgressStatus) {
|
||||
toolProgressStatus = this.diffStrategy.getProgressStatus(block, diffResult)
|
||||
}
|
||||
await this.ask("tool", completeMessage, block.partial, toolProgressStatus).catch(
|
||||
() => {},
|
||||
)
|
||||
|
||||
const didApprove = await askApproval("tool", completeMessage)
|
||||
const didApprove = await askApproval("tool", completeMessage, toolProgressStatus)
|
||||
if (!didApprove) {
|
||||
await this.diffViewProvider.revertChanges() // This likely handles closing the diff view
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue