diff --git a/src/extensions/core/electronAdapter.ts b/src/extensions/core/electronAdapter.ts index 50c58d3d2..79454a080 100644 --- a/src/extensions/core/electronAdapter.ts +++ b/src/extensions/core/electronAdapter.ts @@ -22,6 +22,21 @@ import { electronAPI as getElectronAPI, isElectron } from '@/utils/envUtil' ) } } + }, + { + id: 'Comfy-Desktop.SendStatistics', + category: ['Comfy-Desktop', 'General', 'Send Statistics'], + name: 'Send anonymous usage statistics', + type: 'boolean', + defaultValue: true, + onChange(newValue, oldValue) { + if (oldValue !== undefined && newValue !== oldValue) { + electronAPI.restartApp( + 'Restart ComfyUI to apply changes.', + 1500 // add delay to allow changes to take effect before restarting. + ) + } + } } ],