chat-mermaid
v0.1.1
Published
This plugin detects Mermaid blocks in chat responses and renders previews with environment-aware behavior.
Readme
Mermaid Preview Plugin
This plugin detects Mermaid blocks in chat responses and renders previews with environment-aware behavior.
Key behavior
- TUI auto-preview: Mermaid blocks in responses are detected and rendered automatically in TUI.
- Web/Desktop toggle: in chat, use the bottom-of-message toggle to switch between Web and Desktop rendering paths.
- Fallback raw block + warning: if rendering is unavailable, the plugin shows the original Mermaid block and a warning.
Manual verification
Run docs tests for this README.
npm test -- tests/docs/readme.test.tsExpected outcome:
- The test passes.
- Output confirms README includes key behavior notes and manual verification instructions.
Build distributable output.
npm run buildExpected outcome:
- TypeScript compilation succeeds.
- A
dist/directory is produced with compiled JavaScript output forsrc/.
Run full test suite.
npm testExpected outcome:
- All tests pass.
- No failing docs or behavior assertions.
