Skip to content

feat: added markdown rendering - #76

Merged
justinwilkin merged 3 commits into
mainfrom
feat/md-rendering
Mar 11, 2026
Merged

feat: added markdown rendering#76
justinwilkin merged 3 commits into
mainfrom
feat/md-rendering

Conversation

@justinwilkin

Copy link
Copy Markdown
Member

No description provided.

Co-authored-by: Justin Wilkin <justin@entr.net.au>
Copilot AI review requested due to automatic review settings March 11, 2026 05:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds terminal markdown rendering for finalized agent output in the Forge TUI, using a new wrapper around charmbracelet/glamour and integrating it into the message commit path so rendered content reflows on resize.

Changes:

  • Introduces pkg/executor/tui/markdown renderer package (plus unit tests) to render markdown to ANSI with width-aware reflow.
  • Switches finalized agent messages (and loop-breaking full-inline tool results) to use markdown rendering via DisplayMessage.RenderFn.
  • Updates Go dependencies and adds product/ADR documentation for the feature.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/executor/tui/result_display.go Exposes loop-breaking tool classification for downstream rendering decisions.
pkg/executor/tui/model.go Adds mdRenderer to the TUI model.
pkg/executor/tui/messages.go Adds newMarkdownMsg helper for width-aware render closures.
pkg/executor/tui/markdown/markdown.go Implements markdown rendering (glamour) + code-block post-processing + render caching.
pkg/executor/tui/markdown/markdown_test.go Adds unit tests for renderer behavior and width fallback.
pkg/executor/tui/init.go Initializes mdRenderer in initialModel().
pkg/executor/tui/events.go Renders finalized agent messages (and loop-breaking tool results) using markdown renderer closures.
go.mod Bumps lipgloss and adds glamour + related indirect deps.
go.sum Updates sums for new/updated dependencies.
docs/product/features/tui-markdown-rendering.md Adds PRD-style documentation for markdown rendering feature.
docs/adr/0054-tui-markdown-rendering.md Adds ADR describing the markdown rendering approach.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/executor/tui/markdown/markdown.go
Comment thread pkg/executor/tui/markdown/markdown.go
Comment thread docs/product/features/tui-markdown-rendering.md
Comment thread docs/adr/0054-tui-markdown-rendering.md
entr-agent and others added 2 commits March 11, 2026 16:28
@justinwilkin
justinwilkin merged commit 0bff338 into main Mar 11, 2026
5 checks passed
@justinwilkin
justinwilkin deleted the feat/md-rendering branch March 11, 2026 05:39
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.

3 participants