MCPcopy Create free account
hub / github.com/FIND-Lab/AgentWard / truncateForSemanticDetection

Function truncateForSemanticDetection

layers/foundation-scan.ts:275–278  ·  view source on GitHub ↗
(text: string, maxLength: number)

Source from the content-addressed store, hash-verified

273}
274
275function truncateForSemanticDetection(text: string, maxLength: number): string {
276 if (text.length <= maxLength) return text;
277 return `${text.slice(0, maxLength)}\n...[truncated]`;
278}
279
280async function callSemanticDetectionApi(
281 systemPrompt: string,

Callers 1

detectSkillContentRiskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected