Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix(desktop): proper markdown link rendering and local file navigation in preview modal

6 months ago

8627064
Authored
Max Weinbach4/15/2026, 10:27:58 PM
Wire FilePreviewModal Streamdown with the same plugin stack as MessageResponse (code, math, mermaid, cjk, rehype-sanitize) and custom link handling so markdown renders clickable, styled anchor tags.

Add a remark plugin that resolves relative links against the previewed file directory, encoding them as cowork-file:// URIs. Local file links open in the same preview modal when the target is a previewable format, otherwise fall back to the native app. External URLs prompt for confirmation before opening in the default browser.

Made-with: Cursor

Parentd522efb

1 file changed
  • apps/desktop/src/ui/FilePreviewModal.tsx+273−4