Open ThijsZijdel opened 2 weeks ago
This was in TODO from a long time, glad that you picked it up.
For storage, Ideally we should use something like SQLite, it's doable with rust, If you want I can set up a basic SQLite storage to build on top of. Finding/searching with SQLite will be cheaper than storing text in json. If you want to take a stab at it, that's fine by me.
(I don't mind existing tauri-plugin-store
, but it was meant for storing small data like settings or config, and it doesn't provide any way to group/search/find etc, if store grows it will be costly, plus storing string inside JSON will need managing escape sequences etc. It's better to avoid it instead)
@Sparkenstein could u take a look at the db setup within main.rs having trouble getting the migrations to spin up 🤷🏼
Sorry for the delay, weekdays are busy always. will take a look around Friday.
Sorry for the delay x2, migrations are running fine I checked by adding one more up migration, it creates db and modifies it correctly. the database.ts file is wrong, can you point out any specific issue you are facing?
in terms of setup everything looks good to me otherwise
Context:
As a developer, I often find myself reusing code snippets/ commands across various projects and environments. Having an efficient and organized way to store and retrieve these snippets within devtools-x would greatly enhance productivity and ensure consistency.
Proposed scope:
[ ] Snippet Creation: Ability to create and save code snippets within the app. This includes support for multiple languages, syntax highlighting, and formatting options. (Our monaco editor)
[ ] Organization: Allow users to organize snippets into folders, tags, or categories for easy navigation. Option to add descriptive titles and notes to each snippet.
[ ] Search & Filter: Implement a powerful search functionality that enables users to quickly find snippets based on keywords, tags, or language. Will combine this with a more advanced keywords based search hook for all the modules aswell
[ ] ❓ Snippet Sharing : Option to share snippets with team members or export them in various formats (e.g., JSON, plain text).
Questions: @Sparkenstein What is your preferred way of storing files/snippets? Also, are there any additional features you'd like to see in the snippet storage system?
Edit: Perhaps wrap the db file storage used on the "JSON Tools" module?
await db.get<any>("snippets/group/file");
Additional note/ idea: Would love to make this system reusable for eg. AI prompts, currently using a combination of notes, snippetsLab en notion.