KI-Chat: interaktiver Bewerbungs-Assistent (Ollama-Streaming)

Eigenes Chat-Interface mit SSE-Streaming gegen das hinterlegte Ollama-Modell,
gegroundet in den Bewerbungs-/E-Mail-/Termindaten des Nutzers.

- lib/chat.js: streamChat (Ollama stream:true, NDJSON-Token) + buildContextPrompt
- chat_threads/chat_messages Tabellen (CASCADE, Index)
- Routen: GET /chat, Thread-CRUD, POST /messages (SSE, AbortController)
- views/chat.ejs + public/js/chat.js + Floating-Button im Footer
- hasApiKey-Gating (503 ohne OLLAMA_API_KEY)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-07 14:07:38 +00:00
co-authored by Claude
parent 17df46cb6c
commit ead70efa49
5 changed files with 697 additions and 0 deletions
+10
View File
@@ -6,3 +6,13 @@
</p>
</div>
</footer>
<!-- Floating button: open the KI chat assistant -->
<a href="/chat"
class="fixed bottom-5 right-5 z-40 flex items-center gap-2 rounded-full bg-blue-600 hover:bg-blue-700 text-white shadow-lg px-4 py-3 text-sm font-medium transition-colors"
title="KI-Bewerbungs-Assistent öffnen">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 10h8M8 14h5m4 7a8 8 0 100-16 8 8 0 000 16z"></path>
</svg>
<span class="hidden sm:inline">KI-Chat</span>
</a>