@andrebuzeli/git-mcp 15.1.5 → 15.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/tools/git-remote.js +15 -0
package/package.json
CHANGED
package/src/tools/git-remote.js
CHANGED
|
@@ -112,11 +112,26 @@ QUANDO USAR:
|
|
|
112
112
|
try {
|
|
113
113
|
if (action === "list") {
|
|
114
114
|
const remotes = await git.listRemotes(projectPath);
|
|
115
|
+
|
|
116
|
+
// Debug info: calculate what URLs should be
|
|
117
|
+
let repoName = getRepoNameFromPath(projectPath);
|
|
118
|
+
if (repoName === "GIT_MCP") repoName = "git-mcp";
|
|
119
|
+
const calculated = await pm.getRemoteUrls(repoName);
|
|
120
|
+
|
|
115
121
|
return asToolResult({
|
|
116
122
|
remotes,
|
|
117
123
|
configured: remotes.length > 0,
|
|
118
124
|
hasGithub: remotes.some(r => r.remote === "github"),
|
|
119
125
|
hasGitea: remotes.some(r => r.remote === "gitea"),
|
|
126
|
+
debug: {
|
|
127
|
+
repoName,
|
|
128
|
+
calculatedUrls: calculated,
|
|
129
|
+
env: {
|
|
130
|
+
hasGithubToken: !!pm.githubToken,
|
|
131
|
+
hasGiteaToken: !!pm.giteaToken,
|
|
132
|
+
giteaUrl: pm.giteaUrl
|
|
133
|
+
}
|
|
134
|
+
},
|
|
120
135
|
message: remotes.length === 0 ? "Nenhum remote configurado. Use action='ensure' para configurar." : undefined
|
|
121
136
|
});
|
|
122
137
|
}
|