🎨 精简完善系统
This commit is contained in:
@@ -18,7 +18,7 @@ func requireMCPIntegration(t *testing.T) {
|
||||
// 测试 MCP 客户端连接
|
||||
func TestMcpClientConnection(t *testing.T) {
|
||||
requireMCPIntegration(t)
|
||||
c, err := NewClient("http://localhost:8888/sse", "test-client", "1.0.0", "gin-vue-admin MCP服务")
|
||||
c, err := NewClient("http://localhost:8888/sse", "test-client", "1.0.0", "gin-react-admin MCP服务")
|
||||
defer c.Close()
|
||||
if err != nil {
|
||||
t.Fatalf("create client failed: %v", err)
|
||||
@@ -28,7 +28,7 @@ func TestMcpClientConnection(t *testing.T) {
|
||||
func TestTools(t *testing.T) {
|
||||
requireMCPIntegration(t)
|
||||
t.Run("currentTime", func(t *testing.T) {
|
||||
c, err := NewClient("http://localhost:8888/sse", "test-client", "1.0.0", "gin-vue-admin MCP服务")
|
||||
c, err := NewClient("http://localhost:8888/sse", "test-client", "1.0.0", "gin-react-admin MCP服务")
|
||||
defer c.Close()
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create client: %v", err)
|
||||
@@ -58,7 +58,7 @@ func TestTools(t *testing.T) {
|
||||
|
||||
t.Run("getNickname", func(t *testing.T) {
|
||||
|
||||
c, err := NewClient("http://localhost:8888/sse", "test-client", "1.0.0", "gin-vue-admin MCP服务")
|
||||
c, err := NewClient("http://localhost:8888/sse", "test-client", "1.0.0", "gin-react-admin MCP服务")
|
||||
defer c.Close()
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create client: %v", err)
|
||||
@@ -102,7 +102,7 @@ func TestTools(t *testing.T) {
|
||||
|
||||
func TestGetTools(t *testing.T) {
|
||||
requireMCPIntegration(t)
|
||||
c, err := NewClient("http://localhost:8888/sse", "test-client", "1.0.0", "gin-vue-admin MCP服务")
|
||||
c, err := NewClient("http://localhost:8888/sse", "test-client", "1.0.0", "gin-react-admin MCP服务")
|
||||
defer c.Close()
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create client: %v", err)
|
||||
|
||||
@@ -69,14 +69,14 @@ func (m *MenuCreator) New() mcp.Tool {
|
||||
),
|
||||
mcp.WithString("name",
|
||||
mcp.Required(),
|
||||
mcp.Description("路由name,用于Vue Router,如:userList"),
|
||||
mcp.Description("路由name,用于前端路由标识,如:userList"),
|
||||
),
|
||||
mcp.WithBoolean("hidden",
|
||||
mcp.Description("是否在菜单列表中隐藏"),
|
||||
),
|
||||
mcp.WithString("component",
|
||||
mcp.Required(),
|
||||
mcp.Description("对应的前端Vue组件路径,如:view/user/list.vue"),
|
||||
mcp.Description("对应的前端React组件路径,如:features/users/UserManagementPage"),
|
||||
),
|
||||
mcp.WithNumber("sort",
|
||||
mcp.Description("菜单排序号,数字越小越靠前"),
|
||||
|
||||
Reference in New Issue
Block a user