(resetsAt: number)
| 686 | } |
| 687 | |
| 688 | function formatAnthropicTimeRemaining(resetsAt: number): string { |
| 689 | const now = Date.now() |
| 690 | const resetTime = resetsAt * 1000 |
| 691 | const diff = resetTime - now |
| 692 | |
| 693 | if (diff <= 0) return "resetting soon" |
| 694 | |
| 695 | const totalMinutes = Math.floor(diff / 60000) |
| 696 | const hours = Math.floor(totalMinutes / 60) |
| 697 | const minutes = totalMinutes % 60 |
| 698 | const days = Math.floor(hours / 24) |
| 699 | const hoursInDay = hours % 24 |
| 700 | |
| 701 | if (days > 0) return `${days}d ${hoursInDay}h left` |
| 702 | if (hours > 0) return `${hours}h ${minutes}m left` |
| 703 | return `${minutes}m left` |
| 704 | } |
| 705 | |
| 706 | function getTimeFilter(period: TimePeriod, now: number): (timestamp: number) => boolean { |
| 707 | switch (period) { |
no outgoing calls
no test coverage detected