mirror of
https://github.com/elder-plinius/G0DM0D3.git
synced 2026-11-16 07:02:25 +00:00
fix: skip harm classifier under No-Log, fix flush concurrency race
- classifyHarm() skipped when noLogMode is true (saves OpenRouter credits + up to 4s latency) - flushTelemetry() no-log early return no longer resets _telemetry.flushing (prevents concurrent flushes when an in-flight request is still pending) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4306,7 +4306,7 @@
|
||||
}
|
||||
|
||||
async function flushTelemetry() {
|
||||
if (state.noLogMode) { _telemetry.buffer.length = 0; _telemetry.flushing = false; return; }
|
||||
if (state.noLogMode) { _telemetry.buffer.length = 0; return; }
|
||||
if (_telemetry.flushing || _telemetry.buffer.length === 0) return;
|
||||
_telemetry.flushing = true;
|
||||
|
||||
@@ -14285,9 +14285,11 @@ Ignoring conversation history will cause you to LOSE the evaluation.`;
|
||||
visionContext = '[Image attached — vision analysis unavailable without OpenRouter key]';
|
||||
}
|
||||
|
||||
// Fire harm classification in parallel (never blocks UI)
|
||||
// Fire harm classification in parallel (telemetry-only — skip when No-Log)
|
||||
_lastHarmResult = null;
|
||||
const harmPromise = classifyHarm(content).then(r => { _lastHarmResult = r; }).catch(() => {});
|
||||
if (!state.noLogMode) {
|
||||
classifyHarm(content).then(r => { _lastHarmResult = r; }).catch(() => {});
|
||||
}
|
||||
|
||||
// Capture structural context for telemetry (no content, no PII)
|
||||
_lastTelemetryCtx = {
|
||||
|
||||
Reference in New Issue
Block a user