kubectl-ai icon indicating copy to clipboard operation
kubectl-ai copied to clipboard

session persistence should filter out meta query related request/response messages

Open droot opened this issue 5 months ago • 1 comments

While hacking on https://github.com/GoogleCloudPlatform/kubectl-ai/pull/485 I realized session persistence logic need to be aware of (request/response) messages related to meta queries. They are fine to display in the UI layer, but probably not ok to send it to the LLM.

I don't think it is a big issue, but, may become important from context hygiene perspective. At the very least, we need to ensure we have some metadata stored for each message so that we can filter out such messages if need be.

/cc @noahlwest

droot avatar Aug 14 '25 05:08 droot

Just wanted to add my two bits to this discussion, I have noticed the following while using Cursor

Cursor's UI allows me to store previous chats:

Image

Another feature which might be related is that allows me to "Duplicate Chat" and this helps when I have asked something in the Conversation which I don't want to delete in the context of the conversation, and so I can go a request behind in the conversation and "Duplicate Chat"

Image

Sounds like the data that needs to be cached sounds like Session -> Request / Response (One to Many) and the data that might need to be persisted in future might be User -> Conversation -> Prompts (from Request) / Answer (from Response)

nisranjan avatar Aug 18 '25 05:08 nisranjan