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:
Sepehr Ramezani
2026-04-21 21:18:40 +02:00
parent 5cd828c7d7
commit 3c8e347576
4 changed files with 6 additions and 13 deletions

View File

@@ -22,13 +22,6 @@ export function useAutoTagging({ content, notebookId, enabled = true }: UseAutoT
const previousNotebookId = useRef<string | null | undefined>(notebookId);
const analyzeContent = async (contentToAnalyze: string) => {
// CRITICAL: Don't suggest labels in "General Notes" (notebookId is null)
// Labels should ONLY appear within notebooks, not in the general notes section
if (!notebookId) {
setSuggestions([]);
return;
}
if (!contentToAnalyze || contentToAnalyze.length < 10) {
setSuggestions([]);
return;