Fully autonomous AI Agents system capable of performing complex penetration testing tasks
Go ai-agentsai-security-toolanthropicautonomous-agentsgolanggptgraphqlmulti-agent-systemoffensive-securityopen-sourceopenaipenetration-testingpenetration-testing-toolsreactsecurity-automationsecurity-testingsecurity-toolsself-hosted
fix(settings/prompt): keep the other tab's unsaved edits on save (keepDirtyValues)
Sergey Kozyrenko67b6521f9fde
diff --git a/frontend/src/pages/settings/settings-prompt.tsx b/frontend/src/pages/settings/settings-prompt.tsxindex 81d886c8..a966cfae 100644--- a/frontend/src/pages/settings/settings-prompt.tsx+++ b/frontend/src/pages/settings/settings-prompt.tsx@@ -526,6 +526,7 @@ function SettingsPrompt() {template: '',},mode: 'onTouched',+ resetOptions: { keepDirtyValues: true },resolver: zodResolver(systemFormSchema),});@@ -534,6 +535,7 @@ function SettingsPrompt() {template: '',},mode: 'onTouched',+ resetOptions: { keepDirtyValues: true },resolver: zodResolver(humanFormSchema),});@@ -642,6 +644,9 @@ function SettingsPrompt() {[activeTab, variablesData, systemForm, humanForm, handleVariableClick],);+ // Re-sync both tabs to the server prompt. A Save refetches settingsPrompts → promptInfo gets a new+ // identity → this fires; keepDirtyValues (on both form configs) preserves the OTHER tab's unsaved edits,+ // which an unguarded reset would silently wipe.useEffect(() => {if (promptInfo) {systemForm.reset({