diff --git a/ui/src/components/CommentThread.tsx b/ui/src/components/CommentThread.tsx index f0adb0ca..4c5f3900 100644 --- a/ui/src/components/CommentThread.tsx +++ b/ui/src/components/CommentThread.tsx @@ -5,7 +5,7 @@ import type { IssueComment, Agent } from "@paperclip/shared"; import { Button } from "@/components/ui/button"; import { Identity } from "./Identity"; import { MarkdownEditor, type MarkdownEditorRef, type MentionOption } from "./MarkdownEditor"; -import { formatDate } from "../lib/utils"; +import { formatDateTime } from "../lib/utils"; interface CommentWithRunMeta extends IssueComment { runId?: string | null; @@ -79,7 +79,7 @@ export function CommentThread({ comments, onAdd, issueStatus, agentMap }: Commen size="sm" /> - {formatDate(comment.createdAt)} + {formatDateTime(comment.createdAt)}
diff --git a/ui/src/lib/utils.ts b/ui/src/lib/utils.ts index 51813350..c83ed1d2 100644 --- a/ui/src/lib/utils.ts +++ b/ui/src/lib/utils.ts @@ -17,6 +17,16 @@ export function formatDate(date: Date | string): string { }); } +export function formatDateTime(date: Date | string): string { + return new Date(date).toLocaleString("en-US", { + month: "short", + day: "numeric", + year: "numeric", + hour: "numeric", + minute: "2-digit", + }); +} + export function relativeTime(date: Date | string): string { const now = Date.now(); const then = new Date(date).getTime();