feat: chat UX overhaul — GLM local model, icons, layout modes, instant bubbles

- Add GLM-4.7-Flash as default Ollama model (replaces Mistral)
- Fix WRITE_TIMEOUT (15s→120s) and HTMX timeout (5s→120s) for local LLM
- Auto-warmup model on startup in development mode
- Add /api/chat/status endpoint for model readiness polling
- Show "Initializing AI model..." indicator while model loads
- Add user avatar (mdi:account) on chat messages
- Inject company/project/course sprite icons inline in chat responses
- Replace cramped header icons with 4 icon buttons + tooltips
  (Compact, Side panel, Floating, Full screen)
- Add floating/draggable chat mode with smooth drag support
- Chip questions show user bubble instantly and clear input
- Help modal prefills input instead of auto-sending
- User bubble rendered client-side for immediate feedback
This commit is contained in:
juanatsap
2026-04-09 10:54:23 +01:00
parent d5c90248cc
commit 8e029d1363
6 changed files with 394 additions and 80 deletions
+2 -1
View File
@@ -23,7 +23,8 @@ func Setup(cvHandler *handlers.CVHandler, healthHandler *handlers.HealthHandler,
// Chat endpoint with rate limiting (30 requests/hour per IP)
chatRateLimiter := middleware.NewRateLimiter(c.RateLimitChatRequests, c.RateLimitChatWindow)
mux.Handle("/api/chat", chatRateLimiter.Middleware(http.HandlerFunc(chatHandler.HandleChat)))
mux.HandleFunc("/api/chat/warmup", chatHandler.HandleWarmup) // Pre-load model on chat open
mux.HandleFunc("/api/chat/warmup", chatHandler.HandleWarmup) // Pre-load model on chat open
mux.HandleFunc("/api/chat/status", chatHandler.HandleStatus) // Model readiness check
// Public routes
mux.HandleFunc("/", cvHandler.Home)