🎨 清理多余文件,修改项目model

This commit is contained in:
2026-04-10 15:38:58 +08:00
parent 6a80fcc388
commit f106960342
221 changed files with 686 additions and 2801 deletions

View File

@@ -6,9 +6,9 @@ import (
"errors"
"fmt"
commonReq "github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
systemReq "github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
commonReq "git.echol.cn/loser/Go-Web-Template/server/model/common/request"
"git.echol.cn/loser/Go-Web-Template/server/model/system"
systemReq "git.echol.cn/loser/Go-Web-Template/server/model/system/request"
"github.com/mark3labs/mcp-go/mcp"
)

View File

@@ -3,8 +3,8 @@ package mcpTool
import (
"context"
"github.com/flipped-aurora/gin-vue-admin/server/global"
systemRes "github.com/flipped-aurora/gin-vue-admin/server/model/system/response"
"git.echol.cn/loser/Go-Web-Template/server/global"
systemRes "git.echol.cn/loser/Go-Web-Template/server/model/system/response"
"github.com/mark3labs/mcp-go/mcp"
)

View File

@@ -4,19 +4,29 @@ import (
"context"
"fmt"
"github.com/mark3labs/mcp-go/mcp"
"os"
"testing"
)
func requireMCPIntegration(t *testing.T) {
t.Helper()
if os.Getenv("RUN_MCP_INTEGRATION") == "" {
t.Skip("set RUN_MCP_INTEGRATION=1 to run MCP integration tests")
}
}
// 测试 MCP 客户端连接
func TestMcpClientConnection(t *testing.T) {
requireMCPIntegration(t)
c, err := NewClient("http://localhost:8888/sse", "test-client", "1.0.0", "gin-vue-admin MCP服务")
defer c.Close()
if err != nil {
t.Fatalf(err.Error())
t.Fatalf("create client failed: %v", err)
}
}
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服务")
defer c.Close()
@@ -91,6 +101,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服务")
defer c.Close()
if err != nil {

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strings"
"github.com/flipped-aurora/gin-vue-admin/server/global"
"git.echol.cn/loser/Go-Web-Template/server/global"
)
type mcpContextKey string

View File

@@ -6,7 +6,7 @@ import (
"errors"
"fmt"
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
"git.echol.cn/loser/Go-Web-Template/server/model/system"
"github.com/mark3labs/mcp-go/mcp"
)

View File

@@ -5,8 +5,8 @@ import (
"net/url"
"strconv"
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
"github.com/flipped-aurora/gin-vue-admin/server/utils"
"git.echol.cn/loser/Go-Web-Template/server/model/system"
"git.echol.cn/loser/Go-Web-Template/server/utils"
)
type exportedDictionary struct {

View File

@@ -3,7 +3,7 @@ package mcpTool
import (
"context"
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
"git.echol.cn/loser/Go-Web-Template/server/model/system"
"github.com/mark3labs/mcp-go/mcp"
)

View File

@@ -12,7 +12,7 @@ import (
"strings"
"time"
"github.com/flipped-aurora/gin-vue-admin/server/global"
"git.echol.cn/loser/Go-Web-Template/server/global"
)
type upstreamEnvelope[T any] struct {

View File

@@ -6,7 +6,7 @@ import (
"errors"
"fmt"
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
"git.echol.cn/loser/Go-Web-Template/server/model/system"
"github.com/mark3labs/mcp-go/mcp"
)

View File

@@ -3,7 +3,7 @@ package mcpTool
import (
"context"
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
"git.echol.cn/loser/Go-Web-Template/server/model/system"
"github.com/mark3labs/mcp-go/mcp"
)

View File

@@ -4,7 +4,7 @@ import (
"net/http"
"strings"
"github.com/flipped-aurora/gin-vue-admin/server/global"
"git.echol.cn/loser/Go-Web-Template/server/global"
mcpServer "github.com/mark3labs/mcp-go/server"
)

View File

@@ -14,7 +14,7 @@ import (
"strings"
"time"
"github.com/flipped-aurora/gin-vue-admin/server/global"
"git.echol.cn/loser/Go-Web-Template/server/global"
)
const (