Files
GenericAgent/frontends
顾祎炜andYiwei Gu 4c8ec489e2 feat(chat): file preview routing — open vs reveal-in-finder (#12)
Click on a file attachment now picks behavior by extension: previewable
types (PDF, images, text, code, Office docs, audio/video) open in the
system default app; everything else (zip, binaries, unknown) reveals the
file in Finder/Explorer instead of opening it directly — avoids garbled
output for non-textual formats.

- frontend: PREVIEWABLE_EXTS whitelist + isPreviewableByName()
- bridge: /path/open accepts mode='reveal', uses 'open -R' (macOS),
  'explorer /select,' (Windows), parent-dir xdg-open (Linux fallback)
- pending thumb-strip chips also pass data-name for the same routing

Co-authored-by: Yiwei Gu <yiwei.gu@sap.com>
2026-05-24 17:09:54 +08:00
..