(worktreePath: string)
| 33 | } |
| 34 | |
| 35 | export function formatWorktreePathForDisplay(worktreePath: string): string { |
| 36 | const trimmed = worktreePath.trim(); |
| 37 | if (!trimmed) { |
| 38 | return worktreePath; |
| 39 | } |
| 40 | |
| 41 | const normalized = trimmed.replace(/\\/g, "/").replace(/\/+$/, ""); |
| 42 | const parts = normalized.split("/"); |
| 43 | const lastPart = parts[parts.length - 1]?.trim() ?? ""; |
| 44 | return lastPart.length > 0 ? lastPart : trimmed; |
| 45 | } |
no outgoing calls
no test coverage detected