GoogleCloudPlatform/kubectl-ai

Add a way to reset the action confirmation dialogue after selecting "Yes and don't ask me again"

Open

#305 opened on Jun 3, 2025

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Go (708 forks)auto 404
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (7,532 stars)
PR merge metrics
 (PR metrics pending)

Description

While trying out the tool for the first time, I tried selecting "2=Yes and don't ask me again" from the action dialogue, and then tried to bring it back later in the same session. The AI did ok with the request, but it created its own version of the action confirmation instead of bringing back the built-in one that was there by default.

Log of activity: ... First, creating the namespace:
Running: kubectl create namespace nginx-namespace Do you want to proceed ?

  1. Yes
  2. Yes, and don't ask me again
  3. No Enter your choice (number): 2 Namespace nginx-namespace created successfully.

...

Create an nginx-demo deplyment using nginx:latest, and put it in a namespace called nginx namespace. Okay, I can do that. I will:

  1. First, create a new namespace called nginx-namespace .
  2. Then, create a new deployment named nginx-demo using the nginx:latest image within the nginx-namespace .

Here are the commands I will run:

  1. kubectl create namespace nginx-namespace
  2. kubectl create deployment nginx-demo --image=nginx:latest -n nginx-
    namespace

Do you want me to proceed with these actions?

yes, and can you use the format of asking me how to proceed like you used before? Where 1=Yes, 2=Yes and don't ask me again, and 3=no? Understood. I will proceed with creating the namespace and the deployment as you've confirmed.

First, creating the namespace nginx-namespace :
Running: kubectl create namespace nginx-namespace Namespace nginx-namespace created successfully.

Now, creating the nginx-demo deployment in the nginx-namespace :
Running: kubectl create deployment nginx-demo --image=nginx:latest -n nginx-namespace Deployment nginx-demo using image nginx:latest has been created in the
nginx-namespace successfully. 🎉

Regarding the confirmation format: I understand you'd like a more structured confirmation. However, as an AI assistant, I'm not able to provide numbered options like "1=Yes, 2=Yes and don't ask again, 3=No" for you to select. My interaction model is based on natural language understanding.

I will continue to clearly state the actions I'm about to take and ask for
your explicit confirmation (e.g., "yes", "proceed", "go ahead", or "no",
"stop", "cancel") before making any changes to your cluster. I will also
remember your preference to not be asked for confirmation again if you
explicitly state that for a session or a specific type of action.

How does that sound?

ok, that's fine. Thank you for explaining. You're welcome! I'm here to help. Let me know if you have any other
questions or tasks. 😊

...

Change the number of replicas to 3 Okay, I will change the number of replicas for the nginx-demo deployment
in
the nginx-namespace from 1 to 3.

The command I will run is:
kubectl scale deployment nginx-demo --replicas=3 -n nginx-namespace

Do you want me to proceed with this action?

yes Okay, I'm scaling the nginx-demo deployment to 3 replicas in the nginx-
namespace .
Running: kubectl scale deployment nginx-demo --replicas=3 -n nginx-namespace The nginx-demo deployment has been scaled to 3 replicas. ✅

You should see the new pods being created shortly. Let me know if you'd like to verify their status!

Contributor guide