Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(agent-vault): keep service form when re-picking the same template

Devin AI3f77a251c365
diff --git a/frontend/src/components/agent-vault/service-sheet/ServiceSheet.tsx b/frontend/src/components/agent-vault/service-sheet/ServiceSheet.tsx
index 5e98236b9e..67f9afff4d 100644
--- a/frontend/src/components/agent-vault/service-sheet/ServiceSheet.tsx
+++ b/frontend/src/components/agent-vault/service-sheet/ServiceSheet.tsx
@@ -308,6 +308,10 @@ export const ServiceSheet = ({
}, [isOpen, service, isUpdate, prefillHost, reset, setStep]);
const handleTemplatePicked = (picked: AgentVaultTemplate | null) => {
+ if (isDirty && picked?.key === template?.key) {
+ setStep(1);
+ return;
+ }
setTemplate(picked);
reset(
picked