feat: ditch triplit, move to postgresql + drizzle orm

This commit is contained in:
Zoe
2026-04-08 17:03:07 -05:00
parent c341c96798
commit e2e3ac6e86
121 changed files with 6680 additions and 4373 deletions
+7
View File
@@ -50,6 +50,8 @@ import {
LogoAionLabs,
LogoMicrosoft,
LogoInflection,
LogoVllm,
LogoClosedRouter,
} from '#components';
import { markRaw } from 'vue';
@@ -186,6 +188,7 @@ const MODEL_MAPPINGS: ModelConfig[] = [
/magistral/,
/devstral/,
/voxtral/,
/leanstral/,
],
},
{
@@ -325,6 +328,10 @@ export const providerIcons: Record<string, any | null> = {
openrouter: markRaw(LogoOpenrouter),
cerebras: markRaw(LogoCerebras),
longcat: markRaw(LogoLongCat),
inception: markRaw(LogoInception),
mistral: markRaw(LogoMistral),
vllm: markRaw(LogoVllm),
closedrouter: markRaw(LogoClosedRouter),
};
export function getModelConfig(modelId: string) {
-19
View File
@@ -1,19 +0,0 @@
export const initSettings = async (userId: string) => {
const triplit = useTriplitClient();
const settings = await triplit.fetchOne(triplit.query('settings').Where('userId', '=', userId));
if (!settings) {
console.log('no settings');
await triplit.insert('settings', {
userId: userId,
systemAssistants: {
rename: {
enabled: false,
prompt: null,
modelId: null,
}
}
});
}
}
+2
View File
@@ -1,4 +1,6 @@
export const sortByReleaseDate = (a: { releasedAt?: Date | null } & Record<string, unknown>, b: { releasedAt?: Date | null } & Record<string, unknown>) => {
if (typeof a.releasedAt === 'string') a.releasedAt = new Date(a.releasedAt);
if (typeof b.releasedAt === 'string') b.releasedAt = new Date(b.releasedAt);
if (!a.releasedAt && !b.releasedAt) return 0;
if (!a.releasedAt) return 1;
if (!b.releasedAt) return -1;