refactor: Improve all git operations, add stash support, add improved pull request flow, add worktree file copy options, address code review comments, add cherry pick options

This commit is contained in:
gsxdsm
2026-02-17 22:02:58 -08:00
parent f4e87d4c25
commit 9af63bc1ef
89 changed files with 6811 additions and 351 deletions

View File

@@ -34,13 +34,18 @@ function formatResetTime(unixTimestamp: number, isMilliseconds = false): string
const now = new Date();
const diff = date.getTime() - now.getTime();
// Guard against past timestamps: clamp negative diffs to a friendly fallback
if (diff <= 0) {
return 'Resets now';
}
if (diff < 3600000) {
const mins = Math.ceil(diff / 60000);
const mins = Math.max(0, Math.ceil(diff / 60000));
return `Resets in ${mins}m`;
}
if (diff < 86400000) {
const hours = Math.floor(diff / 3600000);
const mins = Math.ceil((diff % 3600000) / 60000);
const hours = Math.max(0, Math.floor(diff / 3600000));
const mins = Math.max(0, Math.ceil((diff % 3600000) / 60000));
return `Resets in ${hours}h ${mins > 0 ? `${mins}m` : ''}`;
}
return `Resets ${date.toLocaleDateString()} at ${date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}`;