axb 9 месяцев назад
Родитель
Сommit
8917ab7591
1 измененных файлов с 7 добавлено и 6 удалено
  1. 7 6
      src/core/Cline.ts

+ 7 - 6
src/core/Cline.ts

@@ -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