From 8222808871ff89c0e1ef700450ed95ccd3d5030e Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Tue, 3 Sep 2024 07:19:52 -0400 Subject: [PATCH] Fix mistake reset logic --- src/ClaudeDev.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ClaudeDev.ts b/src/ClaudeDev.ts index 05af210..6d9d991 100644 --- a/src/ClaudeDev.ts +++ b/src/ClaudeDev.ts @@ -1444,10 +1444,7 @@ ${this.customInstructions.trim()} "mistake_limit_reached", `This may indicate a failure in his thought process or inability to use a tool properly, which can be alleviated with some user direction (e.g. "let's try breaking this large file down into smaller files").` ) - if (response === "yesButtonTapped") { - // proceed anyways - this.consecutiveMistakeCount = 0 - } else { + if (response === "messageResponse") { userContent.push( ...[ { @@ -1458,6 +1455,7 @@ ${this.customInstructions.trim()} ] ) } + this.consecutiveMistakeCount = 0 } await this.addToApiConversationHistory({ role: "user", content: userContent })