{"agent":"codex","input":"Add dark mode to this Chrome extension and open a pull request. Read public/manifest.json, public/popup.html, public/options.html, src/popup.tsx, src/options.tsx, src/background.ts, src/content_script.tsx, webpack/webpack.common.js, jest.config.js, tsconfig.json and package.json first. Write src/theme.ts with a Theme type of system, light and dark, a pure resolveTheme(preference, prefersDark), an applyTheme that sets data-theme on the document element, and loadTheme and saveTheme over chrome.storage.sync under a theme key. Write public/theme.css with colour custom properties, a dark override on [data-theme=dark] and a prefers-color-scheme media query for system, and link it from popup.html and options.html; the existing copy plugin ships it. Add a Theme select to the options page saved with the other options, apply the theme on mount in both pages, and have the popup follow chrome.storage.onChanged. Leave background.ts and the content script unchanged and say why. Add Jest tests for resolveTheme and applyTheme that need no DOM or chrome global. Run npm test and npm run build, list dist/, and paste the output in the pull request.","resources":[{"url":"https://github.com/your-org/your-app"}]}