opencode
opencode copied to clipboard
Feat/image preview tabs
Summary
- Always call
list()for parent directory in file fetch (removes unnecessary conditional) - Add image preview support in file tabs
- SVG files get a toggle to switch between rendered image and source code
Changes
-
packages/app/src/context/local.tsx: Remove conditional check beforelist(parent) -
packages/app/src/pages/session.tsx: NewFileTabContentcomponent for rendering images and code with SVG toggle
Proof
Before:
https://github.com/user-attachments/assets/89f3ac56-2960-4450-81cf-ac8b24e2c0de
After:
https://github.com/user-attachments/assets/302b7b48-4856-4673-8b77-c97bc972873c