fix: make No-Log Mode functional — gate telemetry collection, clear buffer on enable

- trackEvent() returns early when state.noLogMode is true (no events buffered or sent)
- Toggling No-Log on immediately clears pending buffer
- Remove dead no_log field from telemetry context
- Update UI description to accurately state it disables G0DM0D3 telemetry

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
faber
2026-07-13 08:59:31 -04:00
parent ca70d4c9d4
commit 466d489a2f

View File

@@ -3666,7 +3666,7 @@
<input type="checkbox" id="noLogMode" checked>
<label for="noLogMode" style="margin: 0;">No-Log Mode</label>
</div>
<small style="color: #888; display: block; margin-top: 4px;">Privacy preference — recorded in local telemetry metadata only. Does not change provider-side logging.</small>
<small style="color: #888; display: block; margin-top: 4px;">Disables G0DM0D3 usage telemetry. Does not affect provider-side (OpenRouter/Venice) logging.</small>
</div>
</div>
<div class="settings-section">
@@ -4283,6 +4283,8 @@
};
function trackEvent(type, data) {
if (state.noLogMode) return;
const event = {
type,
timestamp: Date.now(),
@@ -14286,7 +14288,6 @@ Ignoring conversation history will cause you to LOSE the evaluation.`;
persona: conv.persona || state.persona || 'godmode',
prompt_length: content.length,
conversation_depth: conv.messages.length,
no_log: !!state.noLogMode,
has_image: !!attachedImage,
};
@@ -16502,6 +16503,7 @@ Ignoring conversation history will cause you to LOSE the evaluation.`;
state.customSystemPrompt = document.getElementById('customSystemPromptInput').value;
updateSystemPromptUI();
state.noLogMode = document.getElementById('noLogMode').checked;
if (state.noLogMode) { _telemetry.buffer.length = 0; }
state.showMagic = document.getElementById('showMagic').checked;
state.waitingGame = document.getElementById('waitingGameSelect').value;
state.autoRetry = document.getElementById('autoRetry').checked;