diff --git a/.gitignore b/.gitignore index 81fad8f7..a06c1377 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ out.jsonl pi-*.html out.html packages/coding-agent/binaries/ +todo.md diff --git a/packages/coding-agent/src/main.ts b/packages/coding-agent/src/main.ts index 7182d92b..61244988 100644 --- a/packages/coding-agent/src/main.ts +++ b/packages/coding-agent/src/main.ts @@ -88,7 +88,12 @@ function normalizeExtensionSource(source: string): { type: "npm" | "git" | "loca } if (source.startsWith("git:")) { const repo = source.slice("git:".length).trim().split("@")[0] ?? ""; - return { type: "git", key: repo.replace(/^https?:\/\//, "") }; + return { type: "git", key: repo.replace(/^https?:\/\//, "").replace(/\.git$/, "") }; + } + // Raw git URLs + if (source.startsWith("https://") || source.startsWith("http://")) { + const repo = source.split("@")[0] ?? ""; + return { type: "git", key: repo.replace(/^https?:\/\//, "").replace(/\.git$/, "") }; } return { type: "local", key: source }; }