Skip to content

Add the missing plain-text code extensions #57

Description

@Phantom-VK

Problem

The supported set is .pdf .pptx .docx .txt .md .py .json. Python and JSON are in, but not JavaScript, TypeScript, Go, Rust, Java, C, C++, HTML, CSS, YAML, TOML or XML. There is no technical reason for the split: _read_text already handles all of them, so this is adding entries to a set.

Counting tokens in a codebase before feeding it to a model is a mainstream use case this currently refuses.

Where

  • parsing.py:11 -> SUPPORTED_EXTENSIONS = {...}

What to add

.js .ts .tsx .jsx .go .rs .java .c .cpp .h .hpp .html .css .yaml .yml .toml .xml .sql .sh .bash

Scope

  1. Extend SUPPORTED_EXTENSIONS
  2. Add tests to test_parsing.py
  3. Update the file-picker filter in api.py:pick_files
  4. Update the website format list

Perfect first PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:parsingcore/parsing.py — PDF/PPTX/DOCX/TXT extractionenhancementNew feature or requestgood first issueGood for newcomers

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions