Tweak agent details padding and handle github remote project keys
This commit is contained in:
@@ -133,7 +133,7 @@ const styles = StyleSheet.create((theme) => ({
|
||||
borderWidth: theme.borderWidth[1],
|
||||
borderColor: theme.colors.surface2,
|
||||
backgroundColor: theme.colors.surface1,
|
||||
paddingHorizontal: theme.spacing[5],
|
||||
paddingHorizontal: theme.spacing[4],
|
||||
paddingVertical: theme.spacing[4],
|
||||
gap: theme.spacing[3],
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user