|
|
@@ -1085,35 +1085,23 @@ export class Cline {
|
|
|
const askApproval = async (type: ClineAsk, partialMessage?: string) => {
|
|
|
const { response, text, images } = await this.ask(type, partialMessage, false)
|
|
|
if (response !== "yesButtonClicked") {
|
|
|
- if (response === "messageResponse") {
|
|
|
+ // Handle both messageResponse and noButtonClicked with text
|
|
|
+ if (text) {
|
|
|
await this.say("user_feedback", text, images)
|
|
|
pushToolResult(
|
|
|
formatResponse.toolResult(formatResponse.toolDeniedWithFeedback(text), images),
|
|
|
)
|
|
|
- // this.userMessageContent.push({
|
|
|
- // type: "text",
|
|
|
- // text: `${toolDescription()}`,
|
|
|
- // })
|
|
|
- // this.toolResults.push({
|
|
|
- // type: "tool_result",
|
|
|
- // tool_use_id: toolUseId,
|
|
|
- // content: this.formatToolResponseWithImages(
|
|
|
- // await this.formatToolDeniedFeedback(text),
|
|
|
- // images
|
|
|
- // ),
|
|
|
- // })
|
|
|
- this.didRejectTool = true
|
|
|
- return false
|
|
|
+ } else {
|
|
|
+ pushToolResult(formatResponse.toolDenied())
|
|
|
}
|
|
|
- pushToolResult(formatResponse.toolDenied())
|
|
|
- // this.toolResults.push({
|
|
|
- // type: "tool_result",
|
|
|
- // tool_use_id: toolUseId,
|
|
|
- // content: await this.formatToolDenied(),
|
|
|
- // })
|
|
|
this.didRejectTool = true
|
|
|
return false
|
|
|
}
|
|
|
+ // Handle yesButtonClicked with text
|
|
|
+ if (text) {
|
|
|
+ await this.say("user_feedback", text, images)
|
|
|
+ pushToolResult(formatResponse.toolResult(formatResponse.toolApprovedWithFeedback(text), images))
|
|
|
+ }
|
|
|
return true
|
|
|
}
|
|
|
|