(ts?: number)
| 71 | } |
| 72 | |
| 73 | function formatTime(ts?: number): string | null { |
| 74 | if (!ts) return null; |
| 75 | const d = new Date(ts); |
| 76 | const now = new Date(); |
| 77 | const isToday = d.getFullYear() === now.getFullYear() && |
| 78 | d.getMonth() === now.getMonth() && |
| 79 | d.getDate() === now.getDate(); |
| 80 | const time = d.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }); |
| 81 | if (isToday) return time; |
| 82 | const date = d.toLocaleDateString([], { month: "short", day: "numeric", year: d.getFullYear() !== now.getFullYear() ? "numeric" : undefined }); |
| 83 | return `${date} ${time}`; |
| 84 | } |
| 85 | |
| 86 | function haveSameRelevantToolResults( |
| 87 | message: AgentMessage, |
no outgoing calls
no test coverage detected