🎨 移除多余模块
This commit is contained in:
@@ -353,21 +353,13 @@ func ensureManagedBinary(serverRoot string) (string, error) {
|
||||
}
|
||||
|
||||
func resolveMCPServerRoot() string {
|
||||
root := strings.TrimSpace(global.GVA_CONFIG.AutoCode.Root)
|
||||
serverDir := strings.TrimSpace(global.GVA_CONFIG.AutoCode.Server)
|
||||
if serverDir == "" {
|
||||
serverDir = "server"
|
||||
}
|
||||
|
||||
candidates := []string{}
|
||||
if root != "" {
|
||||
candidates = append(candidates, filepath.Join(root, filepath.FromSlash(serverDir)))
|
||||
candidates = append(candidates, root)
|
||||
}
|
||||
|
||||
if cwd, err := os.Getwd(); err == nil {
|
||||
candidates = append(candidates, cwd)
|
||||
candidates = append(candidates, filepath.Join(cwd, "server"))
|
||||
if filepath.Base(cwd) == "server" {
|
||||
candidates = append(candidates, filepath.Dir(cwd))
|
||||
}
|
||||
}
|
||||
|
||||
for _, candidate := range candidates {
|
||||
@@ -407,11 +399,6 @@ func ensureMCPRuntimeDir() (string, error) {
|
||||
}
|
||||
|
||||
func resolveMCPProjectRoot() string {
|
||||
root := strings.TrimSpace(global.GVA_CONFIG.AutoCode.Root)
|
||||
if root != "" {
|
||||
return root
|
||||
}
|
||||
|
||||
serverRoot := resolveMCPServerRoot()
|
||||
if serverRoot == "" {
|
||||
return "."
|
||||
|
||||
Reference in New Issue
Block a user