opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Desktop file encoding issue

Open crob19 opened this issue 1 month ago • 0 comments

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.

crob19 avatar Dec 13 '25 18:12 crob19