From d89f6e08ce58d4c38189b1787363269d91147dcc Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 22 Jan 2026 14:19:04 +0100 Subject: [PATCH] fix(coding-agent): normalize raw git URLs in extension source matching - Handle https://github.com/... URLs as git sources (not local) - Strip .git suffix for consistent matching --- .gitignore | 1 + packages/coding-agent/src/main.ts | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 }; }