更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -7,23 +7,20 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// McpMarketItem MCP 市场条目
|
||||
type McpMarketItem struct {
|
||||
Key string `json:"key"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Provider string `json:"provider"`
|
||||
Transport string `json:"transport"` // stdio/http/sse
|
||||
Transport string `json:"transport"`
|
||||
Command string `json:"command"`
|
||||
Args []string `json:"args"`
|
||||
Env []string `json:"env"`
|
||||
URL string `json:"url"`
|
||||
Tags []string `json:"tags"`
|
||||
BuiltIn bool `json:"built_in"` // 是否为项目内置(演示)服务
|
||||
BuiltIn bool `json:"built_in"`
|
||||
}
|
||||
|
||||
// demoMcpPath 解析内置演示 MCP 服务可执行文件路径
|
||||
// 优先级:1) 服务器工作目录下 bin/demo-mcp 2) go run ./cmd/demo-mcp 兜底
|
||||
func demoMcpPath() (string, []string) {
|
||||
ext := ""
|
||||
if runtime.GOOS == "windows" {
|
||||
@@ -41,11 +38,9 @@ func demoMcpPath() (string, []string) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 兜底:go run ./cmd/demo-mcp(需要 Go 工具链)
|
||||
return "go", []string{"run", "./cmd/demo-mcp"}
|
||||
}
|
||||
|
||||
// GetMcpMarket 返回 MCP 市场服务列表
|
||||
func GetMcpMarket() []McpMarketItem {
|
||||
cmd, args := demoMcpPath()
|
||||
list := []McpMarketItem{
|
||||
@@ -109,7 +104,6 @@ func GetMcpMarket() []McpMarketItem {
|
||||
return list
|
||||
}
|
||||
|
||||
// FindMarketItem 按 key 查找市场条目
|
||||
func FindMarketItem(key string) (McpMarketItem, bool) {
|
||||
for _, item := range GetMcpMarket() {
|
||||
if strings.EqualFold(item.Key, key) {
|
||||
|
||||
Reference in new issue
Block a user