Skip to content

refactor(cmdg): decouple rendering engine and use standalone cmdg-image-render tool#151

Open
kurokirasama wants to merge 1 commit into
ThomasHabets:masterfrom
kurokirasama:master
Open

refactor(cmdg): decouple rendering engine and use standalone cmdg-image-render tool#151
kurokirasama wants to merge 1 commit into
ThomasHabets:masterfrom
kurokirasama:master

Conversation

@kurokirasama

Copy link
Copy Markdown
Contributor

This PR refactors the cmdg terminal client to use a standalone, external rendering tool for HTML and inline images, as suggested by the maintainer.

Major Changes:

  1. Decoupled Architecture: Removed all C-based HTML rendering logic and MacOS Swift code from the core repository.
  2. External Renderer Support: cmdg now interfaces with a standalone binary named cmdg-image-render (available at kurokirasama/cmdg-image-render) via standard I/O and a clean JSON protocol.
  3. Graceful Fallback: Implemented a robust fallback mechanism to plain-text when the renderer is missing.
  4. Performance: Refactored the UI event loop to be non-blocking.
  5. Quality: Resolved over 40 lint issues and improved error handling.

This shift reduces code liability while preserving all features.

@kurokirasama

Copy link
Copy Markdown
Contributor Author

working on the issues...

@kurokirasama kurokirasama force-pushed the master branch 3 times, most recently from 06cddcc to 1502c7b Compare May 27, 2026 21:58
…ng UI

- Removed internal C-based HTML renderer and MacOS Swift integrations.
- Integrated external 'cmdg-image-render' tool via JSON-based stdout protocol.
- Implemented robust fallback to plain-text when the renderer is missing.
- Refactored message loading to be non-blocking with parallel image resolution.
- Optimized UI responsiveness and fixed multiple upstream linting issues.
- Added support for Kitty and iTerm2 terminal image protocols.
@kurokirasama

Copy link
Copy Markdown
Contributor Author

seems to be ok now, this is the repo for the renderer: https://github.com/kurokirasama/cmdg-image-render

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant