Skip to content

Replay your coding agent sessions as a map and a timeline

1.4 KB
Raw Blame
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="color-scheme" content="light dark" />
    <link rel="icon" type="image/svg+xml" href="./entelligence-logo.svg" />
    <title>Agentplay Viewer</title>
    <script>
      // Theme before first paint: ?theme=light|dark, then a remembered choice,
      // then the OS preference (followed live while no choice is pinned).
      (function () {
        var root = document.documentElement;
        var mq = window.matchMedia('(prefers-color-scheme: dark)');
        function pinned() {
          var q = new URLSearchParams(location.search).get('theme');
          if (q === 'light' || q === 'dark') return q;
          try {
            var s = localStorage.getItem('agentplay.theme');
            if (s === 'light' || s === 'dark') return s;
          } catch (e) {}
          return null;
        }
        function apply() {
          var t = pinned() || (mq.matches ? 'dark' : 'light');
          root.classList.toggle('dark', t === 'dark');
          root.dataset.theme = t;
        }
        apply();
        mq.addEventListener('change', apply);
        window.__agentplayApplyTheme = apply;
      })();
    </script>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.tsx"></script>
  </body>
</html>