close');
      const clearLogsBtn = document.querySelector('.btn-clear-logs');

      // SSE for the logs
      let logSource;

      function setupLogSource() {
        logSource = new EventSource('/log/stream');

        logSource.addEventListener('connected', (event) => {
          console.log('Connected to log stream', event.data);
        });

        logSource.addEventListener('log', (event) => {
          const entry = JSON.parse(event.data);
          console.log('Received log entry', entry);
      