Home

mweinbach / agent-coworker

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

feat(desktop): in-app file preview modal for workspace files

6 months ago

d522efb
Authored
Cursor Agent4/15/2026, 6:55:46 PM
- Add readFileForPreview IPC returning base64 bytes with size cap
- Open preview on file selection; Streamdown markdown, PDF/image embeds
- DOCX via mammoth, XLSX via SheetJS with row/col caps
- Fallback for legacy Office and unknown binary; composer disabled while open

Co-authored-by: Max Weinbach <mweinbach@users.noreply.github.com>

Parent0b722a5

17 files changed
  • apps/desktop/bun.lock+60−8
  • apps/desktop/electron/ipc/files.ts+29−0
  • apps/desktop/electron/preload.ts+11−0
  • apps/desktop/package.json+2−0
  • apps/desktop/src/App.tsx+2−0
  • apps/desktop/src/app/store.actions/explorer.ts+23−1
  • apps/desktop/src/app/store.helpers.ts+4−0
  • apps/desktop/src/app/store.ts+1−0
  • apps/desktop/src/lib/desktopApi.ts
+13
−0
  • apps/desktop/src/lib/desktopCommands.ts+8−0
  • apps/desktop/src/lib/desktopSchemas.ts+7−0
  • apps/desktop/src/lib/filePreviewKind.ts+93−0
  • apps/desktop/src/ui/ChatView.tsx+2−1
  • apps/desktop/src/ui/FilePreviewModal.tsx+330−0
  • apps/desktop/src/ui/file-explorer/WorkspaceFileExplorer.tsx+4−3
  • apps/desktop/test/filePreviewKind.test.ts+25−0
  • apps/desktop/test/helpers/mockDesktopCommands.ts+1−0