diff --git a/site/src/pages/AIGovernancePage/RequestLogsPage/RequestLogsRow/RequestLogsRow.tsx b/site/src/pages/AIGovernancePage/RequestLogsPage/RequestLogsRow/RequestLogsRow.tsx index 06f821ef88..4bdd2013a8 100644 --- a/site/src/pages/AIGovernancePage/RequestLogsPage/RequestLogsRow/RequestLogsRow.tsx +++ b/site/src/pages/AIGovernancePage/RequestLogsPage/RequestLogsRow/RequestLogsRow.tsx @@ -15,6 +15,7 @@ import { } from "lucide-react"; import { type FC, Fragment, useState } from "react"; import { cn } from "utils/cn"; +import { humanDuration } from "utils/time"; type RequestLogsRowProps = { interception: AIBridgeInterception; @@ -34,6 +35,13 @@ export const RequestLogsRow: FC = ({ interception }) => { 0, ); const toolCalls = interception.tool_usages.length; + const duration = + interception.ended_at && + Math.max( + 0, + new Date(interception.ended_at).getTime() - + new Date(interception.started_at).getTime(), + ); return ( <> @@ -123,6 +131,15 @@ export const RequestLogsRow: FC = ({ interception }) => { )} + {(duration || duration === 0) && ( + <> +
Duration:
+
+ {humanDuration(duration)} +
+ + )} +
Initiator:
{interception.initiator.username}