Step 163: add telemetry and crash logging

This commit is contained in:
Bill
2026-02-09 19:56:55 -07:00
parent d5b11c4904
commit caa7c7fe42
8 changed files with 165 additions and 1 deletions

View File

@@ -866,6 +866,16 @@ int main(int, char**) {
settingsChanged = true;
}
bool telemetryOptIn = state.settings.getTelemetryOptIn();
if (ImGui::Checkbox("Telemetry (opt-in)", &telemetryOptIn)) {
state.settings.setTelemetryOptIn(telemetryOptIn);
state.telemetry.setOptIn(telemetryOptIn);
if (telemetryOptIn) {
state.telemetry.recordEvent("telemetry_opt_in", json::object());
}
settingsChanged = true;
}
int autoSave = state.settings.getAutoSaveSeconds();
if (ImGui::InputInt("Auto-save (sec)", &autoSave)) {
autoSave = std::max(0, autoSave);