Skip to content

Make TEXT_MIME_ALLOWLIST configurable via an environment variable #2194

@dxspotxfinsxnity

Description

@dxspotxfinsxnity

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions