Home

mweinbach / agent-coworker

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

Add CodeFilePreview and integrate in modal

6 months ago

af1f7ab
Authored
Max Weinbach4/20/2026, 5:47:37 PM
Introduce a new CodeFilePreview component that wraps raw file text in a fenced code block, auto-detects language by extension, renders with Streamdown (plugins for code, math, mermaid, cjk) and shows line numbers. Import and use CodeFilePreview in FilePreviewModal for plain text/unknown/markdown fallbacks instead of raw <pre> blocks. Also adjust FilePreviewModal layout and styling for PDFs (use full height embed and conditional container classes) and tweak container overflow/padding behavior when previewing PDFs.

Parent2ce86b5

2 files changed
  • apps/desktop/src/ui/CodeFilePreview.tsx+108−0
  • apps/desktop/src/ui/FilePreviewModal.tsx+7−5