Describe your feature request
Currently, dropping a TypeScript file into the chat results in a "Some file type not supported" error. It would be beneficial to include common source code MIME types in the TEXT_MIME_ALLOWLIST (src/lib/constants/mime.ts), so that these files can be processed as text.
Implementation idea
Making TEXT_MIME_ALLOWLIST configurable via an environment variable for local deployment would suffice, but for a more sophisticated approach there're some options:
- Filter out large files.
- Check for common file headers, if found, then the file is probably binary.
- Check if the first few KiB of a file contain mostly ASCII, otherwise it's binary.
Describe your feature request
Currently, dropping a TypeScript file into the chat results in a "Some file type not supported" error. It would be beneficial to include common source code MIME types in the TEXT_MIME_ALLOWLIST (src/lib/constants/mime.ts), so that these files can be processed as text.
Implementation idea
Making TEXT_MIME_ALLOWLIST configurable via an environment variable for local deployment would suffice, but for a more sophisticated approach there're some options: