@@ -1085,35 +1085,23 @@ export class Cline {
10851085 const askApproval = async ( type : ClineAsk , partialMessage ?: string ) => {
10861086 const { response, text, images } = await this . ask ( type , partialMessage , false )
10871087 if ( response !== "yesButtonClicked" ) {
1088- if ( response === "messageResponse" ) {
1088+ // Handle both messageResponse and noButtonClicked with text
1089+ if ( text ) {
10891090 await this . say ( "user_feedback" , text , images )
10901091 pushToolResult (
10911092 formatResponse . toolResult ( formatResponse . toolDeniedWithFeedback ( text ) , images ) ,
10921093 )
1093- // this.userMessageContent.push({
1094- // type: "text",
1095- // text: `${toolDescription()}`,
1096- // })
1097- // this.toolResults.push({
1098- // type: "tool_result",
1099- // tool_use_id: toolUseId,
1100- // content: this.formatToolResponseWithImages(
1101- // await this.formatToolDeniedFeedback(text),
1102- // images
1103- // ),
1104- // })
1105- this . didRejectTool = true
1106- return false
1094+ } else {
1095+ pushToolResult ( formatResponse . toolDenied ( ) )
11071096 }
1108- pushToolResult ( formatResponse . toolDenied ( ) )
1109- // this.toolResults.push({
1110- // type: "tool_result",
1111- // tool_use_id: toolUseId,
1112- // content: await this.formatToolDenied(),
1113- // })
11141097 this . didRejectTool = true
11151098 return false
11161099 }
1100+ // Handle yesButtonClicked with text
1101+ if ( text ) {
1102+ await this . say ( "user_feedback" , text , images )
1103+ pushToolResult ( formatResponse . toolResult ( formatResponse . toolApprovedWithFeedback ( text ) , images ) )
1104+ }
11171105 return true
11181106 }
11191107
0 commit comments