                '<div class="plugin-item">No plugin usage data available yet</div>';
            }
        }

        // Check immediately and then every 3 seconds
        checkStatus();
        setInterval(checkStatus, 3000);
        
        // Fetch updated stats every 30 seconds when connected
        setInterval(() => {
            if (!document.getElementById('success-container').classList.contains('hidden')) {
                fetchAiStats();
            }
        }, 30000);
    </script>
</body>
</ht