feat(database): add automatic migration on startup and enhance text analysis cache source

This commit is contained in:
MythEclipse
2026-05-31 23:01:38 +07:00
parent 96cd0cfc62
commit 7607282db2
13 changed files with 178 additions and 14 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ const logger = createChildLogger("text-cache-store");
export interface TextCacheEntry {
text: string;
flags: string[];
source: "local" | "nvidia" | "primary_ai" | "groq";
source: "local" | "nvidia" | "primary_ai" | "groq" | "vision_llm";
analyzed_at: number;
expires_at: number;
hit_count: number;
@@ -53,7 +53,7 @@ export async function getCachedText(
export async function upsertCachedText(
text: string,
flags: string[],
source: "local" | "nvidia" | "primary_ai" | "groq",
source: "local" | "nvidia" | "primary_ai" | "groq" | "vision_llm",
expiresAt: number,
): Promise<void> {
const now = Date.now();