fix(consult): stop the consult-gate VedAstro wait and record step timing
Consult turns reuse a same-day official snapshot inside the rectification gate, or record deferred_in_consultation instead of starting another 4-second snapshot. Classification, step 0, step 1, and the time to the first answer character go into the existing usage metadata and a new admin usage column. BUG-1231, BUG-1232
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
import { useState } from "react";
|
||||
|
||||
import { adminRequestJson, type AdminIdentity } from "@/lib/admin/providers";
|
||||
import { formatUsageTiming, type UsageTimingView } from "@/lib/consultation-step-timing";
|
||||
import { formatAdminDate, ResourceTable } from "./resource-table";
|
||||
|
||||
const { Text } = Typography;
|
||||
@@ -416,6 +417,7 @@ type Usage = {
|
||||
costMicrousd: number;
|
||||
durationMs: number | null;
|
||||
cacheReadTokens: number | null;
|
||||
timing: UsageTimingView | null;
|
||||
createdAt: string;
|
||||
};
|
||||
|
||||
@@ -468,6 +470,13 @@ export function UsageResource() {
|
||||
dataIndex: "durationMs",
|
||||
render: (value) => (value == null ? "—" : `${value} ms`),
|
||||
},
|
||||
{
|
||||
title: "分段",
|
||||
dataIndex: "timing",
|
||||
render: (value: UsageTimingView | null) => (
|
||||
<Text style={{ whiteSpace: "pre-line" }}>{formatUsageTiming(value)}</Text>
|
||||
),
|
||||
},
|
||||
{ title: "时间", dataIndex: "createdAt", render: formatAdminDate },
|
||||
];
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user