MCPcopy Create free account
hub / github.com/SethGammon/Citadel / hasLaterMatchingToolCall

Function hasLaterMatchingToolCall

scripts/dashboard.js:722–735  ·  view source on GitHub ↗
(entry, auditEntries = [])

Source from the content-addressed store, hash-verified

720
721function extractBlockedCommand(detail) {
722 const text = String(detail || '');
723 const match = text.match(/^[^:]+:\s+(.+)$/);
724 return (match ? match[1] : text).trim();
725}
726
727function normalizeCommandForMatch(command) {
728 return String(command || '')
729 .replace(/\s+/g, ' ')
730 .replace(/^git push -u /, 'git push ')
731 .trim();
732}
733
734function hasLaterMatchingToolCall(entry, auditEntries = []) {
735 const detail = entry.detail || entry.reason || entry.message || entry.error || '';
736 const command = normalizeCommandForMatch(extractBlockedCommand(detail));
737 if (!command) return false;
738

Callers 1

classifyHookProblemFunction · 0.85

Calls 3

normalizeCommandForMatchFunction · 0.85
extractBlockedCommandFunction · 0.85
eventTimestampFunction · 0.85

Tested by

no test coverage detected