const fs = require('fs');
const js = fs.readFileSync('sidepanel.js', 'utf8');
const html = fs.readFileSync('sidepanel.html', 'utf8');

const checks = [
  'setup-overlay', 'app', 'setup-key', 'setup-save', 'settings-panel', 
  'settings-key', 'settings-save', 'settings-model', 'settings-image-model',
  'settings-base-url', 'settings-tavily-key', 'settings-saved-msg', 'backpack-panel',
  'backpack-files', 'btn-settings-sidebar', 'btn-settings', 'btn-tutorial-sidebar',
  'btn-tutorial', 'btn-sidebar-chat', 'btn-clear-sidebar', 'btn-clear', 'btn-send',
  'btn-mic', 'btn-mic-sidebar', 'btn-backpack-sidebar', 'btn-backpack',
  'chat-input', 'btn-vision', 'messages', 'status-text', 'setup-status',
  'btn-personas-sidebar', 'btn-personas', 'btn-providers-sidebar', 'btn-providers',
  'personas-panel', 'providers-panel', 'providers-saved-msg', 'settings-theme',
  'btn-save-preferences'
];

checks.forEach(id => {
  if (!html.includes(`id="${id}"`) && !html.includes(`id='${id}'`)) {
    console.log(`Missing ID in HTML: ${id}`);
  }
});
