opencode
opencode copied to clipboard
Desktop file encoding issue
Issue with the display of some file types in the desktop app.
The shouldEncode() function treated all files with MIME type application/octet-stream as binary. Bun's MIME detection returns this type for many text-based programming languages, causing them to be unnecessarily encoded.
Added extension-based fallback checking before encoding application/octet-stream files. The function now checks if the file extension indicates a text file (.py, .go, .rb, .swift, .kt, etc.) and skips base64 encoding for these files.