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
refactor(knowledges): trim performSave doc-comment to the load-bearing invariant
Sergey Kozyrenko4472daa0d147
diff --git a/frontend/src/features/knowledges/knowledge-form.tsx b/frontend/src/features/knowledges/knowledge-form.tsxindex e6489cbd..9c79fee9 100644--- a/frontend/src/features/knowledges/knowledge-form.tsx+++ b/frontend/src/features/knowledges/knowledge-form.tsx@@ -229,11 +229,9 @@ export function KnowledgeForm({ initialValues, isNew, knowledge, onSubmit }: Knoconst { control, formState, handleSubmit, reset } = form;const { isDirty, isValid } = formState;- // Saves and resets the form; returns the page's submit result (with an- // optional `redirectTo`) so the *caller* owns navigation. Keeping navigation- // out of here lets `onSaveFromDialog` feed the guard without depending on- // `guard.skipNextBlock` — which would otherwise form a real cycle- // (guard ← onSaveFromDialog ← performSave ← guard.skipNextBlock).+ // Navigation is the caller's job — it reads `redirectTo` off the returned result.+ // Pulling it in here would make onSaveFromDialog depend on guard.skipNextBlock and+ // form a real cycle (guard ← onSaveFromDialog ← performSave ← guard.skipNextBlock).const performSave = useCallback(async (values: FormValues): Promise<null | SubmitResult> => {try {