feat: structure view in dashboard and settings persistence

- Add GET /api/claude/sessions/{session_id}/builder API for structure view
- Load builder session tags and snippets by Claude session ID
- Implement structure view in dashboard: shows tag selections and snippet details
- Add LoadSettings to persist LLM config changes across restarts
- Settings are now loaded from database on startup

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-26 15:14:10 +08:00
parent e53113db55
commit 173d857dbb
4 changed files with 164 additions and 3 deletions
+4
View File
@@ -41,6 +41,9 @@ func main() {
// Ensure prompts table exists for dev environments
db.EnsurePromptsTable()
// Load persisted settings from database
db.LoadSettings(cfg)
// Setup routes
mux := http.NewServeMux()
@@ -89,6 +92,7 @@ func main() {
apiMux.HandleFunc("GET /api/claude/sessions", handlers.GetClaudeSessions)
apiMux.HandleFunc("GET /api/claude/sessions/{session_id}/prompts", handlers.GetClaudePrompts)
apiMux.HandleFunc("GET /api/claude/sessions/{session_id}/builder", handlers.GetBuilderSessionByClaudeSession)
apiMux.HandleFunc("GET /api/dashboard/projects", handlers.GetDashboardProjects)
apiMux.HandleFunc("GET /api/dashboard/projects/{name}/sessions", handlers.GetDashboardSessions)