fix(coding-agent): stabilize pinned git parsing and model default test

This commit is contained in:
Mario Zechner 2026-02-05 21:43:27 +01:00
parent 5a30e16305
commit 61fe132946
2 changed files with 7 additions and 7 deletions

View file

@ -105,7 +105,7 @@ export function parseGitUrl(source: string): GitSource | null {
const url = source.startsWith("git:") ? source.slice(4).trim() : source;
const split = splitRef(url);
const hostedCandidates = [url, split.ref ? `${split.repo}#${split.ref}` : undefined].filter(
const hostedCandidates = [split.ref ? `${split.repo}#${split.ref}` : undefined, url].filter(
(value): value is string => Boolean(value),
);
for (const candidate of hostedCandidates) {
@ -127,7 +127,7 @@ export function parseGitUrl(source: string): GitSource | null {
}
}
const httpsCandidates = [`https://${url}`, split.ref ? `https://${split.repo}#${split.ref}` : undefined].filter(
const httpsCandidates = [split.ref ? `https://${split.repo}#${split.ref}` : undefined, `https://${url}`].filter(
(value): value is string => Boolean(value),
);
for (const candidate of httpsCandidates) {