Skip to content

Markdown link renderer and Thread View Mention links - #48074

Closed
pkondzior wants to merge 4 commits into
zed-industries:mainfrom
pkondzior:markdown-link-renderer
Closed

Markdown link renderer and Thread View Mention links #48074
pkondzior wants to merge 4 commits into
zed-industries:mainfrom
pkondzior:markdown-link-renderer

Conversation

@pkondzior

@pkondzior pkondzior commented Jan 31, 2026

Copy link
Copy Markdown
Contributor

This PR adds native-looking Mentions in the Agent Panel Thread view by introducing a custom inline Markdown link renderer.

Dependency

  • This work depends heavily on Introduce GPUI inline element #48057, because Mentions require the new inline layout system that can wrap arbitrary UI elements inside flowing text.
  • Because that dependency does not live in the Zed repo, I can’t reasonably open this PR with a base branch outside of zed-industries/zed

Demo:

Mentions.Demo.1.mp4

Also included

  • This PR also includes Make mention creases actionable #48054. I extracted the MentionCrease changes into this MVP PR.
  • The MentionCrease changes are independent: they do not depend on the Markdown link renderer or the gpui inline layout work.

List of changes:

  • Added a custom markdown link rendering pipeline via LinkRenderer and LinkRenderContext, allowing callers to render links as arbitrary elements instead of plain inline text.
  • Introduced LinkLabel to preserve mixed inline content (text + child elements) inside links, so custom renderers can reproduce the full link label.
  • Reworked the markdown inline builder to track nested inline content using PendingInline/PendingItem and a link_stack, then render links at close time via pop_link.
  • MarkdownElement::link_renderer(...) now lets the Agent thread view provide a custom renderer; mention links are rendered as MentionCrease with active/selected styling.
  • AcpThreadView::link_renderer(...) parses links into MentionUri and renders mentions as clickable buttons; non‑mention links fall back to the default link element.

Related #37563

Release Notes:

  • Improved Agent Thread mention links render as Zed-style clickable buttons with tooltips, powered by a custom markdown link renderer for more consistent visuals and smoother navigation.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jan 31, 2026
@pkondzior
pkondzior marked this pull request as ready for review January 31, 2026 08:46
@SomeoneToIgnore SomeoneToIgnore added the area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features label Jan 31, 2026
@pkondzior
pkondzior force-pushed the markdown-link-renderer branch from 2c3c7f4 to bf43521 Compare February 2, 2026 10:55
@benbrandt

Copy link
Copy Markdown
Member

Thanks for this, but given the state of things and this PR's dependencies, going to close for now

@benbrandt benbrandt closed this Feb 12, 2026
@xyt-dev

xyt-dev commented Jun 18, 2026

Copy link
Copy Markdown

This is a very useful feature. Looking forward to seeing it implemented soon!

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

Labels

area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants