Add files via upload

This commit is contained in:
公明
2026-02-08 21:28:20 +08:00
committed by GitHub
parent 06bfed508a
commit 0be6746794
4 changed files with 18 additions and 2 deletions
+5 -1
View File
@@ -746,7 +746,11 @@ func setupRoutes(
// 前端页面
router.GET("/", func(c *gin.Context) {
c.HTML(http.StatusOK, "index.html", nil)
version := app.config.Version
if version == "" {
version = "v1.0.0"
}
c.HTML(http.StatusOK, "index.html", gin.H{"Version": version})
})
}
+1
View File
@@ -13,6 +13,7 @@ import (
)
type Config struct {
Version string `yaml:"version,omitempty" json:"version,omitempty"` // 前端显示的版本号,如 v1.3.3
Server ServerConfig `yaml:"server"`
Log LogConfig `yaml:"log"`
MCP MCPConfig `yaml:"mcp"`