feat: 新增MCP Server功能,支持文档全局检索工具 (#1010)
Some checks failed
Go / Ubuntu Latest GCC (push) Has been cancelled
Go / Windows Latest MSVC (push) Has been cancelled

* feat: i18n国际化语言支持完全可配置,并新增俄语支持

* feat: 新增MCP Server功能,支持文档全局检索工具
This commit is contained in:
nl8590687
2025-09-22 17:57:05 +08:00
committed by GitHub
parent b9f13815e8
commit df09353563
9 changed files with 177 additions and 6 deletions

View File

@@ -7,7 +7,9 @@ import (
"github.com/beego/beego/v2/server/web"
"github.com/beego/beego/v2/server/web/context"
"github.com/mindoc-org/mindoc/conf"
"github.com/mindoc-org/mindoc/mcp"
"github.com/mindoc-org/mindoc/models"
)
@@ -38,6 +40,7 @@ func init() {
web.InsertFilter("/book/*", web.BeforeRouter, FilterUser)
web.InsertFilter("/api/*", web.BeforeRouter, FilterUser)
web.InsertFilter("/manage/*", web.BeforeRouter, FilterUser)
web.InsertFilter("/mcp/*", web.BeforeRouter, mcp.AuthMiddleware)
var FinishRouter = func(ctx *context.Context) {
ctx.ResponseWriter.Header().Add("MinDoc-Version", conf.VERSION)