Mintplex-Labs / anything-llm

The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, and more.
https://anythingllm.com
MIT License
27.45k stars 2.76k forks source link

[FEAT]: hpp (header for a C++ code file) MIME addition #2647

Closed grantcarthew closed 1 day ago

grantcarthew commented 3 days ago

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

In the "My Documents" management window, I'm trying to upload a .hpp file and I get the following error:

"File extension .hpp not supported for parsing and cannot be assumed a text file"

Code reference: https://github.com/Mintplex-Labs/anything-llm/blob/727d8027796785555f1c8308a37272a6ec0de34e/collector/processSingleFile/index.js#L60

I've raised a PR for the upstream project mime:

https://github.com/broofa/mime/pull/318

If this doesn't get merged, then we could add hpp to the setOverrides list:

https://github.com/Mintplex-Labs/anything-llm/blob/727d8027796785555f1c8308a37272a6ec0de34e/collector/utils/files/mime.js#L19

Are there known steps to reproduce?

No response

timothycarambat commented 2 days ago

Related to #2638