Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/core/tools/AttemptCompletionTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,21 @@ export class AttemptCompletionTool extends BaseTool<"attempt_completion"> {
}

const { response, text, images } = await task.ask("completion_result", "", false)

if (response === "yesButtonClicked") {
// Process any queued messages after task completion is accepted
task.processQueuedMessages()
return
}

// User provided feedback - push tool result to continue the conversation
await task.say("user_feedback", text ?? "", images)

const feedbackText = `The user has provided feedback on the results. Consider their input to continue the task, and then attempt completion again.\n<feedback>\n${text}\n</feedback>`
pushToolResult(formatResponse.toolResult(feedbackText, images))

// Process any queued messages after feedback is provided
task.processQueuedMessages()
} catch (error) {
await handleError("inspecting site", error as Error)
}
Expand Down
Loading