Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf559e51

Browse files
authored
feat: addduration to the Request Logs details (#20756)
This pull-request simply implements a new field within our `RequestLog`s details view where-in we describe back to the user how long theirrequest took based on the `end_date - start_date` in a human-like way.Users can hover the value to see the `title=` for the true value.<img width="2358" height="936" alt="CleanShot 2025-11-13 at 11 51 56@2x"src="https://github.com/user-attachments/assets/f69c87cd-2735-4e03-9fc8-ae0f4d94b5d1"/>
1 parenta8f2a8a commitf559e51

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

‎site/src/pages/AIGovernancePage/RequestLogsPage/RequestLogsRow/RequestLogsRow.tsx‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
}from"lucide-react";
1616
import{typeFC,Fragment,useState}from"react";
1717
import{cn}from"utils/cn";
18+
import{humanDuration}from"utils/time";
1819

1920
typeRequestLogsRowProps={
2021
interception:AIBridgeInterception;
@@ -34,6 +35,13 @@ export const RequestLogsRow: FC<RequestLogsRowProps> = ({ interception }) => {
3435
0,
3536
);
3637
consttoolCalls=interception.tool_usages.length;
38+
constduration=
39+
interception.ended_at&&
40+
Math.max(
41+
0,
42+
newDate(interception.ended_at).getTime()-
43+
newDate(interception.started_at).getTime(),
44+
);
3745

3846
return(
3947
<>
@@ -123,6 +131,15 @@ export const RequestLogsRow: FC<RequestLogsRowProps> = ({ interception }) => {
123131
</>
124132
)}
125133

134+
{(duration||duration===0)&&(
135+
<>
136+
<dt>Duration:</dt>
137+
<ddtitle={duration.toString()}data-chromatic="ignore">
138+
{humanDuration(duration)}
139+
</dd>
140+
</>
141+
)}
142+
126143
<dt>Initiator:</dt>
127144
<dddata-chromatic="ignore">
128145
{interception.initiator.username}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp