Jeffser / Alpaca

🦙 An Ollama client made with GTK4 and Adwaita
https://jeffser.com/alpaca
GNU General Public License v3.0
459 stars 45 forks source link

Allow attaching more code filetypes, include bespoke symbolic icon for code attachments #382

Closed helpvisa closed 2 days ago

helpvisa commented 5 days ago

I've wanted to analyze code snippets relating to more languages than just Python or JavaScript (i.e. C, shell, etc.) and was frustrated I had to copy and rename files in order to attach them.

I've created a new "code" file_type and added a new symbolic icon to go along with it and modified the code to work with some common filetypes in my fork of the project here.

To add to this, it may possibly be a good idea to create a dialogue prompting the user if they'd like to add the file anyway (possibly make attach_file define file_type = "unknown" instead of returning so it can be handled elsewhere with a toast popup or similar), or break filetypes out into a bespoke json / xml file that can be queried.

For now, I'm asking if I can open a pull request to get the current changes merged! I'm attaching a screenshot of the update in action.

Screenshot From 2024-11-24 15-46-15