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
@@ -133,7 +133,7 @@ const styles = StyleSheet.create((theme) => ({
borderWidth: theme.borderWidth[1], borderWidth: theme.borderWidth[1],
borderColor: theme.colors.surface2, borderColor: theme.colors.surface2,
backgroundColor: theme.colors.surface1, backgroundColor: theme.colors.surface1,
paddingHorizontal: theme.spacing[5], paddingHorizontal: theme.spacing[4],
paddingVertical: theme.spacing[4], paddingVertical: theme.spacing[4],
gap: theme.spacing[3], gap: theme.spacing[3],
}, },
+4
View File
@@ -148,6 +148,10 @@ export function parseRepoShortNameFromRemoteUrl(
* Extracts the project name from a path (last segment). * Extracts the project name from a path (last segment).
*/ */
export function deriveProjectName(projectKey: string): string { 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); const segments = projectKey.split("/").filter(Boolean);
return segments[segments.length - 1] || projectKey; return segments[segments.length - 1] || projectKey;
} }