From e45237e44cadc9248f5248554c01e5e256b1a492 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 30 Sep 2025 01:43:45 -0700 Subject: style(gateway:aiModeration): Lint --- packages/gateway/src/listeners/moderationAgent/utilities.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/gateway/src/listeners/moderationAgent/utilities.ts b/packages/gateway/src/listeners/moderationAgent/utilities.ts index a5e6aec..0f9e2a8 100644 --- a/packages/gateway/src/listeners/moderationAgent/utilities.ts +++ b/packages/gateway/src/listeners/moderationAgent/utilities.ts @@ -362,7 +362,7 @@ Remember: Only enforce the exact rules provided. Do not make assumptions or inte .replace(/,\s*}/g, "}") .replace(/,\s*]/g, "]") .replace(/(\w+):/g, '"$1":'); - + if (jsonContent.includes("'") && !jsonContent.includes('"')) { jsonContent = jsonContent.replace(/'/g, '"'); } else if (jsonContent.includes("'") && jsonContent.includes('"')) { @@ -376,7 +376,7 @@ Remember: Only enforce the exact rules provided. Do not make assumptions or inte try { let fallbackContent = content; - + if (fallbackContent.includes("```json")) { const match = fallbackContent.match(/```json\s*([\s\S]*?)\s*```/); @@ -386,7 +386,7 @@ Remember: Only enforce the exact rules provided. Do not make assumptions or inte if (match) fallbackContent = match[1].trim(); } - + const jsonMatch = fallbackContent.match(/\{[\s\S]*\}/); if (jsonMatch) fallbackContent = jsonMatch[0]; -- cgit v1.2.3