Phase 2 of Smart Actions Roadmap: - Create lib/embeddings.ts: embedText(), cosineSimilarity(), stripHtmlForEmbedding() - Add embedding + summaryArtifactId fields to NoteDoc - Create lib/note-hooks.ts: runPostSaveHooks() for background AI enrichment - backgroundEmbed: compute and store note embedding vectors - backgroundAutoSummarize: generate summary artifact for notes > 300 words - Both gated behind feature flags (notelett_auto_embed_enabled, notelett_auto_summarize_enabled) - Add intelligence endpoints to note-prompts routes: - POST /api/notes/:id/suggest-tags (F5) — LLM-generated tag suggestions - POST /api/notes/:id/check-duplicates (F8) — cosine similarity duplicate detection - POST /api/notes/:id/suggest-links (F9) — related note suggestions - POST /api/workspaces/:wsId/knowledge-gaps (F12) — workspace gap analysis - POST /api/notes/compare (F14) — multi-note comparison - POST /api/notes/merge (F13) — multi-note merge - Add 4 feature flags for intelligence features - 9 new tests in embeddings.test.ts (cosine similarity, HTML stripping, embedText) |
||
|---|---|---|
| .. | ||
| src | ||
| .env.example | ||
| Dockerfile | ||
| eslint.config.js | ||
| package.json | ||
| tsconfig.json | ||
| vitest.config.ts | ||