Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

Commit f73226a

Browse files
committed
Add confirmation
1 parent f323e95 commit f73226a

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

pages/3-Memory_Management.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,15 @@
4646
value=0,
4747
)
4848
if st.button("Wipe Agent Memories"):
49-
res = ApiClient.wipe_agent_memories(
50-
agent_name=agent_name, collection_number=collection_number
49+
confirm = st.checkbox(
50+
f"Are you sure you want to wipe {agent_name}'s memories in collection {collection_number}? This action cannot be undone."
5151
)
52-
st.write(res)
52+
if confirm:
53+
res = ApiClient.wipe_agent_memories(
54+
agent_name=agent_name, collection_number=collection_number
55+
)
56+
if res:
57+
st.success("Memories wiped successfully.")
5358
else:
5459
collection_number = 0
5560
limit = 10

0 commit comments

Comments
 (0)