Skip to content

Commit 63ac02b

Browse files
fix: normalization
1 parent ca9224a commit 63ac02b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

extensions/vscode/src/extension/VsCodeMessenger.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,14 @@ export class VsCodeMessenger {
443443
);
444444
}
445445

446+
// Convert SSH protocol to HTTPS: ssh://git@github.com/owner/repo.git -> https://github.com/owner/repo
447+
// Also handles: ssh://git@github.com:owner/repo.git (less common)
448+
if (normalized.startsWith("ssh://git@github.com")) {
449+
normalized = normalized
450+
.replace("ssh://git@github.com/", "https://github.com/")
451+
.replace("ssh://git@github.com:", "https://github.com/");
452+
}
453+
446454
// Convert shorthand owner/repo to full URL
447455
if (
448456
normalized.includes("/") &&

gui/src/components/BackgroundMode/AgentsList.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ const normalizeRepoUrl = (url: string | undefined | null): string => {
3232
normalized = normalized.replace("git@github.com:", "https://github.com/");
3333
}
3434

35+
// Convert SSH protocol to HTTPS: ssh://git@github.com/owner/repo.git -> https://github.com/owner/repo
36+
// Also handles: ssh://git@github.com:owner/repo.git (less common)
37+
if (normalized.startsWith("ssh://git@github.com")) {
38+
normalized = normalized
39+
.replace("ssh://git@github.com/", "https://github.com/")
40+
.replace("ssh://git@github.com:", "https://github.com/");
41+
}
42+
3543
// Convert shorthand owner/repo to full URL
3644
if (
3745
normalized.includes("/") &&

0 commit comments

Comments
 (0)