v2.18.1
Added
- Dark/light theme toggle — The Memory Explorer now has a sun/moon toggle button in the header. Click to switch between light and dark themes; preference is saved to
localStorageand persists across sessions. First visit with no saved preference follows the OS system setting via@media (prefers-color-scheme: dark). An inline script in<head>applies the saved theme before first paint to prevent FOUC. Dark theme remaps all CSS custom property tokens: canvas becomes#1a1818, ink inverts to#fdfcfc, accent brightens to#0a84fffor dark contrast.
Fixed
- Transcript previews showed only
...placeholders — TherenderTranscripts()function looked form.contentas a string, but the actual OpenCode session message format stores content inm.parts[].text. Every transcript card showed only...because the content check always failed. Now extracts text fromparts[], shows tool calls as[tool: name], and displays 3 messages instead of 2. - Radar chart labels truncated and not theme-aware — The behavioral dimensions radar chart had 28px padding on a 300px chart with 9 axes, causing labels like "Tool Pr" and "LLM Provid" to be clipped. Enlarged to 360px with 70px padding. All hardcoded hex colors (
#9a9898,#646262,#007aff) replaced with CSS custom properties so the chart adapts to dark/light theme. Added a description explaining what the chart represents.
Performance
- Deferred head scripts — All 5 vendored scripts in
<head>now havedefer, letting the browser render the HTML shell immediately while ~124 KB gzip of JS parses in the background. - Parallelized init API calls —
loadStats()andcheckMigrationStatus()now run concurrently viaPromise.all. Internally, each function also parallelizes its own sub-calls. Cuts 4-6 sequential API round-trips to 2. - Favicon shrunk 99.5% — From 165 KB (200×200 32-bit ICO) to 820 bytes (32×32 ICO).
- Eliminated RegExp allocation in i18n — Replaced
new RegExp()per translated parameter withstring.split().join(), removing object allocation in the translation hot path.
Full Changelog: v2.18.0...v2.18.1