feat: init sproutclaw-web — Go+Gin backend + React frontend

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-13 20:16:09 +08:00
commit c33b143176
109 changed files with 18773 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package handlers
import (
"net/http"
"github.com/gin-gonic/gin"
"sproutclaw-web/internal/config"
"sproutclaw-web/internal/models"
"sproutclaw-web/internal/services"
)
// RegisterCommands registers the slash commands list route.
func RegisterCommands(r *gin.RouterGroup, cfg *config.Config) {
r.GET("/commands", func(c *gin.Context) {
cmds := services.ListSlashCommands(cfg.AgentDir)
c.JSON(http.StatusOK, models.CommandsResponse{Commands: cmds})
})
}