MCPcopy Create free account
hub / github.com/winfunc/opcode / validateHooks

Function validateHooks

src/components/HooksEditor.tsx:441–451  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

439 };
440
441 const validateHooks = async () => {
442 if (!hooks) {
443 setValidationErrors([]);
444 setValidationWarnings([]);
445 return;
446 }
447
448 const result = await HooksManager.validateConfig(hooks);
449 setValidationErrors(result.errors.map(e => e.message));
450 setValidationWarnings(result.warnings.map(w => `${w.message} in command: ${(w.command || '').substring(0, 50)}...`));
451 };
452
453 useEffect(() => {
454 validateHooks();

Callers 1

HooksEditorFunction · 0.85

Calls 1

validateConfigMethod · 0.80

Tested by

no test coverage detected