chore: copy tables from current mcp #1
Merged
+78
−75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've copied the tables from the current mcp (cc @khromov ) and ported them to drizzle+sqlite.
I've also added an
embeddings
field in bothcontent
anddistilled_content
and since it's nullable modified thedistance
function to make sure it can handleNULL
embeddings values.I'm not sure if we should stick to this structure/general workflow or if we want to do something different. The one issue I see with this is that the db needs to be constantly updated with the new content of the docs which is probably fine but I wonder if we can do better...maybe serve the chunked content from svelte.dev and just fetch the right thing? That wouldn't work with the distilled version but I wonder if that's enough of a boost to justify the need for a sync job etc.
That would also prevent the usage of embeddings unless we generate them on svelte.dev when deploying. And obviously that would also prevent the usage offline unless we come up with some wanky plan to switch to a db only locally when offline.
Regardless, just opening this up to start moving the weel.