feat: ditch triplit, move to postgresql + drizzle orm
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user