feat(ai): implement intelligent auto-tagging system

- Added multi-provider AI infrastructure (OpenAI/Ollama)
- Implemented real-time tag suggestions with debounced analysis
- Created AI diagnostics and database maintenance tools in Settings
- Added automated garbage collection for orphan labels
- Refined UX with deterministic color hashing and interactive ghost tags
This commit is contained in:
2026-01-08 22:59:52 +01:00
parent 6f4d758e5c
commit 3c4b9d6176
27 changed files with 1336 additions and 138 deletions

View File

@@ -13,6 +13,7 @@ import { LabelBadge } from './label-badge'
import { NoteImages } from './note-images'
import { NoteChecklist } from './note-checklist'
import { NoteActions } from './note-actions'
import { useLabels } from '@/context/LabelContext'
interface NoteCardProps {
note: Note
@@ -22,6 +23,7 @@ interface NoteCardProps {
}
export function NoteCard({ note, onEdit, isDragging, isDragOver }: NoteCardProps) {
const { refreshLabels } = useLabels()
const [isDeleting, setIsDeleting] = useState(false)
const colorClasses = NOTE_COLORS[note.color as NoteColor] || NOTE_COLORS.default
@@ -30,6 +32,8 @@ export function NoteCard({ note, onEdit, isDragging, isDragOver }: NoteCardProps
setIsDeleting(true)
try {
await deleteNote(note.id)
// Refresh global labels to reflect garbage collection
await refreshLabels()
} catch (error) {
console.error('Failed to delete note:', error)
setIsDeleting(false)