Skip to content

wp-agentic-admin/revision-cleanup dry-run dry_run giving false danger output #96

Description

@wpbullet

What happened?

User: wp-agentic-admin/revision-cleanup dry-run

Shows a warning that it will be destructive which dry runs by default are not.

Image

Thought Process

Okay, the user is asking to run the wp-agentic-admin/revision-cleanup tool with the dry-run option. Let me think about how to approach this.

First, I need to recall what the revision-cleanup tool does. From the previous interactions, I know that this tool deletes old post revisions to free up database space. The dry-run option means it will simulate the deletion without actually removing any data. The user wants to know if this action will be taken, so the tool should return whether it's successful or not.

The user has previously asked about the number of users and posts, and I've informed them that the tools aren't available. Now they're specifically asking about the revision cleanup. The tool might return a message indicating that the dry-run was successful, or if there were no revisions to delete. 

I should check if the tool is available. The user mentioned "wp-agentic-admin/revision-cleanup dry-run," so the tool is supposed to be accessible. However, in the previous response, when the user asked about the tool, I said it wasn't found. But now they're using it with a dry-run. 

Wait, maybe the tool is actually available, and the previous response was a mistake. Let me verify. The user is using the tool, so the tool must be present. The assistant's previous response said the tool wasn't found, but now the user is invoking it. So, the tool is available, and the assistant needs to call it with the dry-run argument.

The tool's response would be something like "Number of revisions deleted: 0" or similar. The assistant needs to format this as a JSON object with the action and content. The user might be testing if the tool works, or they want to know if the dry-run is successful. 

So, the correct action is to call the tool with the dry-run parameter, and the response would be the tool's output. The assistant should then present that in the JSON format as per the instructions.

Tried this prompt before the above: "how many post revisions are there to clean?"
Agent: "The tool "revision-cleanup" was not found. Please use the correct tool for checking post revisions."

Thought Process

Okay, the user is asking how many post revisions there are to clean. Let me think about the tools available.

Looking back, the user has previously asked about the number of users and posts, and now they're specifically asking about post revisions. The tools listed include "revision-cleanup," which is meant to delete old post revisions. 

The user's question is straightforward, but I need to check if the tool can provide the necessary information. The tool "revision-cleanup" would delete old revisions, but does it count how many are deleted? The tool's description says it "deletes old post revisions to free database space. Dry-runs first showing revision count and space savings, then requires confirmation." 

So, the tool first shows how many revisions would be deleted and the space saved, then asks for confirmation. The user's question is about the number of revisions to clean, which would be the count shown during the dry run. However, the user might not know that the tool requires confirmation. 

But the user is asking for the number, not the action. Since the tool can provide that count, but the user might not know that the tool needs confirmation, I should respond with the count from the tool's output. However, the user might not have the tool available, but in this case, the tool is available. 

Wait, the user is asking for the number, and the tool would return that count. But the assistant's response must be in JSON, and the tool's result is to be summarized. So, the assistant would call the tool, get the count, and then present it. 

But in the previous interactions, the assistant has been calling tools and then providing the answer. So, the correct action here is to call the "revision-cleanup" tool, which would first show the count and space saved, then ask for confirmation. The user is asking for the count, so the tool's response would include that. 

Therefore, the assistant should call the "revision-cleanup" tool, and the response would be the count, which the user is looking for. The user might not know that the tool requires confirmation, but the tool's output would include that information. 

So, the final answer would be the count from the tool's output, which the assistant would then present.

Asked again "wp-agentic-admin/revision-cleanup dry-run"
Clicked Confirm and then it said "User cancelled the action."

Asked again "wp-agentic-admin/revision-cleanup dry-run"
Agent: "The dry-run mode is enabled. No revisions will be deleted."

What did you expect?

Not a warning dialog that it is destructive, just the output of the command that shows the number of revisions that will be deleted.

Instead of "The AI wants to execute: Clean up revisions" show "The AI wants to execute: Clean up revisions dry-run"

Confirm button should be blue instead of red.

Browser

Chrome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions