AI chat panel with Edit/Chat modes + verify dropdown

- AI chat panel at bottom of editor (all 3 modes)
- Edit mode: AI modifies document directly (no explanations)
- Chat mode: AI answers questions about the document
- Verify dropdown: Spec Review, Grammar & Spelling, Summary
- Enter sends, Shift+Enter for newline
- /api/ai/chat endpoint with edit/chat system prompts
- Grammar and spec verify actions added to /api/ai/generate
This commit is contained in:
2026-05-27 10:44:56 +02:00
parent f46f57eded
commit 8223e72fe3
3 changed files with 221 additions and 2 deletions
+1
View File
@@ -65,6 +65,7 @@ func NewRouter(db *sql.DB, dataDir, secret string) http.Handler {
// AI
mux.HandleFunc("POST /api/ai/verify", s.requireAuth(s.handleAIVerify))
mux.HandleFunc("POST /api/ai/generate", s.requireAuth(s.handleAIGenerate))
mux.HandleFunc("POST /api/ai/chat", s.requireAuth(s.handleAIChat))
// Build jobs
mux.HandleFunc("POST /api/build/submit", s.requireAuth(s.handleBuildSubmit))