fix: use getTagsProvider for all auto-labeling paths, allow suggestions without notebook
- app/api/ai/tags/route.ts: getAIProvider → getTagsProvider (was using embedding model instead of tags model for legacy tag generation) - lib/ai/services/auto-label-creation.service.ts: same fix - hooks/use-auto-tagging.ts: remove notebookId gate that blocked all suggestions in "General Notes" — the API has a legacy path for this - app/actions/admin-settings.ts: revalidateTag → updateTag (Next.js 16 requires 2 args for revalidateTag) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import prisma from '@/lib/prisma'
|
||||
import { auth } from '@/auth'
|
||||
import { sendEmail } from '@/lib/mail'
|
||||
import { revalidateTag } from 'next/cache'
|
||||
import { updateTag } from 'next/cache'
|
||||
|
||||
async function checkAdmin() {
|
||||
const session = await auth()
|
||||
@@ -63,7 +63,7 @@ export async function updateSystemConfig(data: Record<string, string>) {
|
||||
await prisma.$transaction(operations)
|
||||
|
||||
// Invalidate cache after update
|
||||
revalidateTag('system-config')
|
||||
updateTag('system-config')
|
||||
|
||||
return { success: true }
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user