mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-12 15:30:53 +02:00
show other tokens on the expanded row
This commit is contained in:
+8
-2
@@ -3412,9 +3412,15 @@
|
|||||||
"aiSessionLogTruncated": "This session was truncated before storage and may be incomplete.",
|
"aiSessionLogTruncated": "This session was truncated before storage and may be incomplete.",
|
||||||
"aiSessionViewRaw": "View Raw JSON",
|
"aiSessionViewRaw": "View Raw JSON",
|
||||||
"aiSessionViewChat": "View Chat",
|
"aiSessionViewChat": "View Chat",
|
||||||
"tokens": "Tokens",
|
|
||||||
"cost": "Cost",
|
"cost": "Cost",
|
||||||
"estimated": "estimated",
|
"estimated": "Estimated",
|
||||||
|
"tokenUsage": "Token Usage",
|
||||||
|
"promptTokens": "Prompt Tokens",
|
||||||
|
"cacheReadTokens": "Cache Read Tokens",
|
||||||
|
"cacheWriteTokens": "Cache Write Tokens",
|
||||||
|
"completionTokens": "Completion Tokens",
|
||||||
|
"reasoningTokens": "Reasoning Tokens",
|
||||||
|
"totalTokens": "Total Tokens",
|
||||||
"requestAnalyticsDescription": "View detailed request analytics for resources in this organization",
|
"requestAnalyticsDescription": "View detailed request analytics for resources in this organization",
|
||||||
"logRetentionRequestLabel": "HTTP Request Log Retention",
|
"logRetentionRequestLabel": "HTTP Request Log Retention",
|
||||||
"logRetentionRequestDescription": "How long to retain request logs",
|
"logRetentionRequestDescription": "How long to retain request logs",
|
||||||
|
|||||||
@@ -472,18 +472,6 @@ export default function AiSessionLogsPage() {
|
|||||||
{row.statusCode ?? "N/A"}
|
{row.statusCode ?? "N/A"}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<strong>{t("tokens")}</strong>
|
|
||||||
<p className="text-muted-foreground mt-1">
|
|
||||||
{row.usage
|
|
||||||
? `${row.usage.totalTokens.toLocaleString()}${
|
|
||||||
row.usage.estimated
|
|
||||||
? ` (${t("estimated")})`
|
|
||||||
: ""
|
|
||||||
}`
|
|
||||||
: "N/A"}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<strong>{t("cost")}</strong>
|
<strong>{t("cost")}</strong>
|
||||||
<p className="text-muted-foreground mt-1">
|
<p className="text-muted-foreground mt-1">
|
||||||
@@ -492,7 +480,62 @@ export default function AiSessionLogsPage() {
|
|||||||
: "N/A"}
|
: "N/A"}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>{t("estimated")}</strong>
|
||||||
|
<p className="text-muted-foreground mt-1">
|
||||||
|
{row.usage
|
||||||
|
? row.usage.estimated
|
||||||
|
? t("yes")
|
||||||
|
: t("no")
|
||||||
|
: "N/A"}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{row.usage && (
|
||||||
|
<div>
|
||||||
|
<div className="text-xs font-medium mb-2">
|
||||||
|
{t("tokenUsage")}
|
||||||
|
</div>
|
||||||
|
<div className="grid grid-cols-3 sm:grid-cols-6 gap-4 text-xs">
|
||||||
|
<div>
|
||||||
|
<strong>{t("promptTokens")}</strong>
|
||||||
|
<p className="text-muted-foreground mt-1">
|
||||||
|
{row.usage.promptTokens.toLocaleString()}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>{t("cacheReadTokens")}</strong>
|
||||||
|
<p className="text-muted-foreground mt-1">
|
||||||
|
{row.usage.cacheReadTokens.toLocaleString()}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>{t("cacheWriteTokens")}</strong>
|
||||||
|
<p className="text-muted-foreground mt-1">
|
||||||
|
{row.usage.cacheWriteTokens.toLocaleString()}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>{t("completionTokens")}</strong>
|
||||||
|
<p className="text-muted-foreground mt-1">
|
||||||
|
{row.usage.completionTokens.toLocaleString()}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>{t("reasoningTokens")}</strong>
|
||||||
|
<p className="text-muted-foreground mt-1">
|
||||||
|
{row.usage.reasoningTokens.toLocaleString()}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>{t("totalTokens")}</strong>
|
||||||
|
<p className="text-muted-foreground mt-1">
|
||||||
|
{row.usage.totalTokens.toLocaleString()}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<AiSessionChatView
|
<AiSessionChatView
|
||||||
normalizedRequest={row.normalizedRequest}
|
normalizedRequest={row.normalizedRequest}
|
||||||
normalizedResponse={row.normalizedResponse}
|
normalizedResponse={row.normalizedResponse}
|
||||||
|
|||||||
Reference in New Issue
Block a user