document.addEventListener('DOMContentLoaded', () => { // Simulate terminal typing effect const terminal = document.querySelector('.terminal'); if (terminal) { setTimeout(() => { const cursor = document.createElement('span'); cursor.className = 'terminal-cursor'; terminal.appendChild(cursor); }, 1000); } // Handle AI panel interactions const aiInput = document.querySelector('.ai-input'); if (aiInput) { aiInput.addEventListener('keypress', (e) => { if (e.key === 'Enter') { const message = e.target.value.trim(); if (message) { // In a real app, this would send to an API console.log('AI query:', message); e.target.value = ''; } } }); } // File explorer click handler const fileItems = document.querySelectorAll('.file-item'); fileItems.forEach(item => { item.addEventListener('click', () => { // In a real app, this would open the file in the editor console.log('Opening file:', item.textContent.trim()); }); }); });