fix: address LLM square bracket mapping format and resolve Biome import formatting

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
MythEclipseandClaude Opus 4.7 committed 2026-05-18 04:40:54 +07:00
1 parent cc2c247311
commit 1085d7909c
14 files changed
+46 -24

No files matched your search

+4 -1
View File
@@ -101,7 +101,10 @@ export function parseModerationResponse(
throw new Error("Result missing 'message_id'");
}
let finalId = String(message_id);
let finalId = String(message_id).trim();
if (finalId.startsWith("[") && finalId.endsWith("]")) {
finalId = finalId.slice(1, -1).trim();
}
// Precision loss fix: If the ID from LLM is not found,
// try to find the closest match in targets if it looks rounded (ends in 000)