Tweak agent details padding and handle github remote project keys

This commit is contained in:
Mohamed Boudra
2026-01-25 09:45:29 +07:00
parent aa979f5230
commit d1a47c22f9
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -148,6 +148,10 @@ export function parseRepoShortNameFromRemoteUrl(
* Extracts the project name from a path (last segment).
*/
export function deriveProjectName(projectKey: string): string {
const githubRemotePrefix = "remote:github.com/";
if (projectKey.startsWith(githubRemotePrefix)) {
return projectKey.slice(githubRemotePrefix.length) || projectKey;
}
const segments = projectKey.split("/").filter(Boolean);
return segments[segments.length - 1] || projectKey;
}