              output.style.display = 'none';
                        output.innerHTML = '';
                    });
                }
            } catch (error) {
                console.error('Failed to restart kernel:', error);
            }
        }
        
        async function interruptKernel() {
            try {
                const response = await fetch('/api/kernel/interrupt', { method: 'POST' });
                if (response.ok) {
                    console.log('Kernel interrupted');
      