mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 20:03:05 +00:00
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
This commit is contained in:
parent
d99b7057ca
commit
d89f6e08ce
2 changed files with 7 additions and 1 deletions
|
|
@ -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 };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue