- Add formatMarkdown() - Pure markdown-to-HTML conversion with consistent options
- Add formatStatsText() - Builds stats string array from API response data
- Add createPopoverContent() - Generates HTML for option tooltips
- Add formatErrorMessage() - Smart error formatting (handles Error objects, strings, objects with message/error properties, falls back to JSON)
- Update ExplainView to use utility functions, removing duplicate logic
- Add comprehensive tests (42 tests total) with edge cases covered
- Clean up test terminology (fake objects instead of mock objects)
- Fix edge case: Cost display now works correctly with $0.00 costs
- Better error messages for debugging (JSON stringify objects instead of [object Object])
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>