@tonyclaw/agent-inspector 2.1.14 → 2.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/CompareDrawer-BcEd6V-V.js +1 -0
- package/.output/public/assets/ProxyViewerContainer-h851qWNp.js +106 -0
- package/.output/public/assets/ReplayDialog-BNpC0548.js +1 -0
- package/.output/public/assets/{RequestAnatomy-BNahe83D.js → RequestAnatomy-Ds1uRLVB.js} +1 -1
- package/.output/public/assets/{ResponseView-DSOnGqi6.js → ResponseView-7KPVqKl5.js} +2 -2
- package/.output/public/assets/{StreamingChunkSequence-BEKTDklB.js → StreamingChunkSequence-BHQT261s.js} +1 -1
- package/.output/public/assets/_sessionId-DWePGjnS.js +1 -0
- package/.output/public/assets/index-CI1-G8ua.js +1 -0
- package/.output/public/assets/index-DdhFqPsI.css +1 -0
- package/.output/public/assets/{index-DWOkqdCa.js → index-DjKt8XKe.js} +1 -1
- package/.output/public/assets/{json-viewer-C2JpgcW0.js → json-viewer-CkCu-rka.js} +1 -1
- package/.output/public/assets/{main-CSONBwwn.js → main-DpD1N0S8.js} +2 -2
- package/.output/server/_libs/lucide-react.mjs +194 -200
- package/.output/server/{_sessionId-CPAa37n5.mjs → _sessionId-DF9Sy8cP.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-ceW5VxMo.mjs → CompareDrawer-BoxztaO7.mjs} +36 -15
- package/.output/server/_ssr/{ProxyViewerContainer-CDfEE_w-.mjs → ProxyViewerContainer-CRBkqFlJ.mjs} +362 -124
- package/.output/server/_ssr/{ReplayDialog-V0s_eEbR.mjs → ReplayDialog-Cc1dyDuK.mjs} +14 -7
- package/.output/server/_ssr/{RequestAnatomy-f1ccwR9d.mjs → RequestAnatomy-CMGSsz5Z.mjs} +2 -2
- package/.output/server/_ssr/{ResponseView-BIRrqG4H.mjs → ResponseView-Cp10DM1D.mjs} +3 -3
- package/.output/server/_ssr/{StreamingChunkSequence-V3JFjCgX.mjs → StreamingChunkSequence-B1VGxy3A.mjs} +2 -2
- package/.output/server/_ssr/{index-DsykulzS.mjs → index-47XVPghS.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-Dcnm0Ivf.mjs → json-viewer-zDE2rrmJ.mjs} +3 -3
- package/.output/server/_ssr/{router-4bdm6Mt2.mjs → router-DVeuZFqI.mjs} +10 -5
- package/.output/server/{_tanstack-start-manifest_v-Xp4CO64V.mjs → _tanstack-start-manifest_v-Bp8JxtPW.mjs} +1 -1
- package/.output/server/index.mjs +68 -68
- package/package.json +1 -1
- package/src/components/ProxyViewer.tsx +28 -2
- package/src/components/clients/ClientLogo.tsx +132 -0
- package/src/components/groups/GroupsDialog.tsx +18 -13
- package/src/components/proxy-viewer/AgentTraceSummary.tsx +56 -23
- package/src/components/proxy-viewer/CompareDrawer.tsx +38 -8
- package/src/components/proxy-viewer/ConversationHeader.tsx +33 -41
- package/src/components/proxy-viewer/LogEntry.tsx +10 -1
- package/src/components/proxy-viewer/LogEntryHeader.tsx +14 -14
- package/src/components/proxy-viewer/ProviderLogoStack.tsx +60 -0
- package/src/components/proxy-viewer/ReplayDialog.tsx +8 -2
- package/src/components/proxy-viewer/ThreadConnector.tsx +18 -7
- package/src/components/proxy-viewer/TurnGroup.tsx +14 -25
- package/src/components/proxy-viewer/viewerState.ts +5 -2
- package/src/lib/sessionInfoContract.ts +1 -0
- package/src/lib/stopReason.ts +48 -16
- package/src/proxy/sessionInfo.ts +5 -1
- package/.output/public/assets/CompareDrawer-DjgjIFx7.js +0 -1
- package/.output/public/assets/ProxyViewerContainer-CWUQZLYy.js +0 -106
- package/.output/public/assets/ReplayDialog-CU0Tbb2c.js +0 -1
- package/.output/public/assets/_sessionId-Cif8JZdn.js +0 -1
- package/.output/public/assets/index-D_WfwzUi.js +0 -1
- package/.output/public/assets/index-DtLuQrs0.css +0 -1
package/.output/server/_ssr/{ProxyViewerContainer-CDfEE_w-.mjs → ProxyViewerContainer-CRBkqFlJ.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports, a as React } from "../_libs/react.mjs";
|
|
2
|
-
import { I as InspectorGroupsListResponseSchema, C as CapturedLogSchema, D as DEFAULT_CAPTURE_MODE, a as DEFAULT_SLOW_RESPONSE_THRESHOLD_SECONDS, b as DEFAULT_PROVIDER_TEST_TIMEOUT_SECONDS, c as DEFAULT_TIME_DISPLAY_FORMAT, d as RuntimeConfigSchema, p as packageJson, P as ProviderConfigSchema, i as apiFormatForPath, n as GroupEvidenceExportResultSchema, o as DeleteInspectorGroupResponseSchema, v as createPendingProviderTestResults, w as ProviderTestResultsSchema, x as createFailedProviderTestResults, M as MAX_SLOW_RESPONSE_THRESHOLD_SECONDS, y as MAX_PROVIDER_TEST_TIMEOUT_SECONDS, T as TimeDisplayFormatSchema, j as getSessionPath, l as AlertSummarySchema, m as AlertListResponseSchema, G as GroupEvidenceReadResponseSchema, t as maskApiKey, q as providerHasContextMetadata, r as findProviderModelMetadata, s as safeGetOwnProperty, K as KnowledgeCandidateSchema, f as parseOpenAIResponse, g as parseOpenAIResponsesResponse, O as OpenAIRequestSchema, h as OpenAIResponsesRequestSchema, A as AnthropicResponseSchema$1, e as AnthropicRequestSchema, z as resolveProviderContextWindow, u as buildUpstreamUrl, k as stripClaudeCodeBillingHeader, L as LogBodyChunkSchema, B as isPlainRecord } from "./router-
|
|
2
|
+
import { I as InspectorGroupsListResponseSchema, C as CapturedLogSchema, D as DEFAULT_CAPTURE_MODE, a as DEFAULT_SLOW_RESPONSE_THRESHOLD_SECONDS, b as DEFAULT_PROVIDER_TEST_TIMEOUT_SECONDS, c as DEFAULT_TIME_DISPLAY_FORMAT, d as RuntimeConfigSchema, p as packageJson, P as ProviderConfigSchema, i as apiFormatForPath, n as GroupEvidenceExportResultSchema, o as DeleteInspectorGroupResponseSchema, v as createPendingProviderTestResults, w as ProviderTestResultsSchema, x as createFailedProviderTestResults, M as MAX_SLOW_RESPONSE_THRESHOLD_SECONDS, y as MAX_PROVIDER_TEST_TIMEOUT_SECONDS, T as TimeDisplayFormatSchema, j as getSessionPath, l as AlertSummarySchema, m as AlertListResponseSchema, G as GroupEvidenceReadResponseSchema, t as maskApiKey, q as providerHasContextMetadata, r as findProviderModelMetadata, s as safeGetOwnProperty, K as KnowledgeCandidateSchema, f as parseOpenAIResponse, g as parseOpenAIResponsesResponse, O as OpenAIRequestSchema, h as OpenAIResponsesRequestSchema, A as AnthropicResponseSchema$1, e as AnthropicRequestSchema, z as resolveProviderContextWindow, u as buildUpstreamUrl, k as stripClaudeCodeBillingHeader, L as LogBodyChunkSchema, B as isPlainRecord } from "./router-DVeuZFqI.mjs";
|
|
3
3
|
import { u as useSWR, a as useSWRConfig } from "../_libs/swr.mjs";
|
|
4
4
|
import { J as JSZip } from "../_libs/jszip.mjs";
|
|
5
5
|
import { c as clsx } from "../_libs/clsx.mjs";
|
|
@@ -9,7 +9,7 @@ import { c as cva } from "../_libs/class-variance-authority.mjs";
|
|
|
9
9
|
import { u as useWindowVirtualizer, a as useVirtualizer } from "../_libs/tanstack__react-virtual.mjs";
|
|
10
10
|
import { d as diffJson, a as diffLines } from "../_libs/diff.mjs";
|
|
11
11
|
import { R as Root2, T as Trigger, I as Icon, V as Value, P as Portal, C as Content2, a as Viewport, b as Item, c as ItemIndicator, d as ItemText, S as ScrollUpButton, e as ScrollDownButton } from "../_libs/radix-ui__react-select.mjs";
|
|
12
|
-
import { I as Info, C as ChevronDown, a as Check, X, U as Upload, D as Download, F as FileBraces, T as Trash2, P as Plus, A as ArrowLeft, b as ChevronUp, c as Copy, d as ChevronsLeft, e as ChevronLeft, f as ChevronRight, g as ChevronsRight, h as Clapperboard, S as Siren, G as Gauge, L as LoaderCircle, R as RefreshCw, i as Layers, j as Settings, k as Scan, l as CircleAlert, m as Terminal, n as ArrowUpRight, o as ArrowDownRight, p as
|
|
12
|
+
import { I as Info, C as ChevronDown, a as Check, X, U as Upload, D as Download, F as FileBraces, T as Trash2, P as Plus, A as ArrowLeft, b as ChevronUp, c as Copy, d as ChevronsLeft, e as ChevronLeft, f as ChevronRight, g as ChevronsRight, h as Clapperboard, S as Siren, G as Gauge, L as LoaderCircle, R as RefreshCw, i as Layers, j as Settings, k as Scan, l as CircleAlert, m as Terminal, n as ArrowUpRight, o as ArrowDownRight, p as Clock, M as MessageSquare, Z as Zap, E as ExternalLink, W as Wrench, q as TriangleAlert, B as Brain, r as Bell, s as Clock3, t as ShieldAlert, u as EyeOff, v as Eye, w as RotateCw, x as Pencil, y as CircleX, z as ShieldCheck, H as Save, J as FileSearch, K as CircleCheck, N as CloudUpload, O as Minus, Q as CircleCheckBig, V as CircleQuestionMark, Y as Server, _ as Lock, $ as Wifi, a0 as WifiOff, a1 as OctagonAlert, a2 as Radio, a3 as Globe, a4 as FileTerminal, a5 as ChevronsUp, a6 as ChevronsDown, a7 as FileDiff, a8 as History, a9 as RotateCcw, aa as Search, ab as GitCompareArrows, ac as ArrowUp, ad as ArrowDown, ae as Ellipsis, af as CodeXml, ag as Blocks, ah as MousePointerClick, ai as FileText, aj as Rows3, ak as Columns2 } from "../_libs/lucide-react.mjs";
|
|
13
13
|
import { u as union, d as object, a as array, l as literal, b as string, n as number, c as boolean, _ as _enum } from "../_libs/zod.mjs";
|
|
14
14
|
import { S as Slot } from "../_libs/radix-ui__react-slot.mjs";
|
|
15
15
|
import { R as Root2$1, L as List, T as Trigger$2, C as Content$1 } from "../_libs/radix-ui__react-tabs.mjs";
|
|
@@ -771,6 +771,111 @@ function ConfirmDialog({
|
|
|
771
771
|
] })
|
|
772
772
|
] }) });
|
|
773
773
|
}
|
|
774
|
+
const CLIENT_LABELS = {
|
|
775
|
+
codex: "Codex",
|
|
776
|
+
opencode: "OpenCode",
|
|
777
|
+
"mimo-code": "MiMo Code",
|
|
778
|
+
"claude-code": "Claude Code"
|
|
779
|
+
};
|
|
780
|
+
function normalize(value) {
|
|
781
|
+
return value?.toLowerCase() ?? "";
|
|
782
|
+
}
|
|
783
|
+
function matchesAny(value, candidates) {
|
|
784
|
+
for (const candidate of candidates) {
|
|
785
|
+
if (value.includes(candidate)) return true;
|
|
786
|
+
}
|
|
787
|
+
return false;
|
|
788
|
+
}
|
|
789
|
+
function detectClientApp(input) {
|
|
790
|
+
const haystack = [
|
|
791
|
+
normalize(input.userAgent),
|
|
792
|
+
normalize(input.conversationId),
|
|
793
|
+
normalize(input.clientProjectFolder)
|
|
794
|
+
].join(" ");
|
|
795
|
+
if (matchesAny(haystack, ["mimocode", "mimo-code", "mimo code"])) return "mimo-code";
|
|
796
|
+
if (matchesAny(haystack, ["opencode", "open-code", "open code"])) return "opencode";
|
|
797
|
+
if (matchesAny(haystack, ["claude-code", "claude code", "claudecode"])) return "claude-code";
|
|
798
|
+
if (matchesAny(haystack, ["codex desktop", "codex-cli", "openai-codex", "codex"])) {
|
|
799
|
+
return "codex";
|
|
800
|
+
}
|
|
801
|
+
return "unknown";
|
|
802
|
+
}
|
|
803
|
+
function clientAppLabel(client) {
|
|
804
|
+
switch (client) {
|
|
805
|
+
case "codex":
|
|
806
|
+
case "opencode":
|
|
807
|
+
case "mimo-code":
|
|
808
|
+
case "claude-code":
|
|
809
|
+
return CLIENT_LABELS[client];
|
|
810
|
+
case "unknown":
|
|
811
|
+
return null;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
function CodexMark() {
|
|
815
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", className: "size-full", "aria-hidden": "true", children: [
|
|
816
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "8", fill: "none", stroke: "currentColor", strokeWidth: "2.2" }),
|
|
817
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
818
|
+
"path",
|
|
819
|
+
{
|
|
820
|
+
d: "M14.8 8.6a4.8 4.8 0 1 0 0 6.8",
|
|
821
|
+
fill: "none",
|
|
822
|
+
stroke: "currentColor",
|
|
823
|
+
strokeLinecap: "round",
|
|
824
|
+
strokeWidth: "2.2"
|
|
825
|
+
}
|
|
826
|
+
)
|
|
827
|
+
] });
|
|
828
|
+
}
|
|
829
|
+
function OpenCodeMark() {
|
|
830
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", className: "size-full", "aria-hidden": "true", children: [
|
|
831
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M7 4h10v16H7z", fill: "none", stroke: "currentColor", strokeWidth: "2.2" }),
|
|
832
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M10 8h4M10 12h4M10 16h2", stroke: "currentColor", strokeLinecap: "round" })
|
|
833
|
+
] });
|
|
834
|
+
}
|
|
835
|
+
function MiMoCodeMark() {
|
|
836
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { viewBox: "0 0 24 24", className: "size-full", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
837
|
+
"path",
|
|
838
|
+
{
|
|
839
|
+
d: "M5 18V6h3.2l3.8 6.1L15.8 6H19v12h-3V11.3l-3.1 5h-1.8L8 11.3V18z",
|
|
840
|
+
fill: "currentColor"
|
|
841
|
+
}
|
|
842
|
+
) });
|
|
843
|
+
}
|
|
844
|
+
function ClaudeCodeMark() {
|
|
845
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { viewBox: "0 0 24 24", className: "size-full", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
846
|
+
"path",
|
|
847
|
+
{
|
|
848
|
+
fill: "currentColor",
|
|
849
|
+
fillRule: "evenodd",
|
|
850
|
+
clipRule: "evenodd",
|
|
851
|
+
d: "M21 10.95h3v3.1h-3v3.03h-1.49V20H18v-2.92h-1.49V20H15v-2.92H9V20H7.49v-2.92H6V20H4.49v-2.92H3v-3.03H0v-3.1h3V5h18v5.95zM6 10.95h1.49V8.1H6v2.85zm10.51 0H18V8.1h-1.49v2.85z"
|
|
852
|
+
}
|
|
853
|
+
) });
|
|
854
|
+
}
|
|
855
|
+
function ClientLogo({
|
|
856
|
+
client,
|
|
857
|
+
className
|
|
858
|
+
}) {
|
|
859
|
+
const label = clientAppLabel(client);
|
|
860
|
+
if (label === null) return null;
|
|
861
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
862
|
+
"span",
|
|
863
|
+
{
|
|
864
|
+
className: cn(
|
|
865
|
+
"inline-flex size-6 shrink-0 items-center justify-center rounded-md border border-white/10 bg-black/20 p-1 text-cyan-100 shadow-[inset_0_1px_0_rgba(255,255,255,0.05)]",
|
|
866
|
+
className
|
|
867
|
+
),
|
|
868
|
+
"aria-label": label,
|
|
869
|
+
title: label,
|
|
870
|
+
children: [
|
|
871
|
+
client === "codex" && /* @__PURE__ */ jsxRuntimeExports.jsx(CodexMark, {}),
|
|
872
|
+
client === "opencode" && /* @__PURE__ */ jsxRuntimeExports.jsx(OpenCodeMark, {}),
|
|
873
|
+
client === "mimo-code" && /* @__PURE__ */ jsxRuntimeExports.jsx(MiMoCodeMark, {}),
|
|
874
|
+
client === "claude-code" && /* @__PURE__ */ jsxRuntimeExports.jsx(ClaudeCodeMark, {})
|
|
875
|
+
]
|
|
876
|
+
}
|
|
877
|
+
);
|
|
878
|
+
}
|
|
774
879
|
const AnthropicLogoSvg = "data:image/svg+xml,%3csvg%20height='2500'%20viewBox='0%206.603%201192.672%201193.397'%20width='2500'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m233.96%20800.215%20234.684-131.678%203.947-11.436-3.947-6.363h-11.436l-39.221-2.416-134.094-3.624-116.296-4.832-112.67-6.04-28.35-6.04-26.577-35.035%202.738-17.477%2023.84-16.027%2034.147%202.98%2075.463%205.155%20113.235%207.812%2082.147%204.832%20121.692%2012.644h19.329l2.738-7.812-6.604-4.832-5.154-4.832-117.182-79.41-126.845-83.92-66.443-48.321-35.92-24.484-18.12-22.953-7.813-50.093%2032.618-35.92%2043.812%202.98%2011.195%202.98%2044.375%2034.147%2094.792%2073.37%20123.786%2091.167%2018.12%2015.06%207.249-5.154.886-3.624-8.135-13.61-67.329-121.692-71.838-123.785-31.974-51.302-8.456-30.765c-2.98-12.645-5.154-23.275-5.154-36.242l37.127-50.416%2020.537-6.604%2049.53%206.604%2020.86%2018.121%2030.765%2070.39%2049.852%20110.818%2077.315%20150.684%2022.631%2044.698%2012.08%2041.396%204.51%2012.645h7.813v-7.248l6.362-84.886%2011.759-104.215%2011.436-134.094%203.946-37.772%2018.685-45.262%2037.127-24.482%2028.994%2013.852%2023.839%2034.148-3.303%2022.067-14.174%2092.134-27.785%20144.323-18.121%2096.644h10.55l12.08-12.08%2048.887-64.913%2082.147-102.685%2036.242-40.752%2042.282-45.02%2027.14-21.423h51.303l37.772%2056.135-16.913%2057.986-52.832%2067.007-43.812%2056.779-62.82%2084.563-39.22%2067.651%203.623%205.396%209.343-.886%20141.906-30.201%2076.671-13.852%2091.49-15.705%2041.396%2019.329%204.51%2019.65-16.269%2040.189-97.852%2024.16-114.764%2022.954-170.9%2040.43-2.093%201.53%202.416%202.98%2076.993%207.248%2032.94%201.771h80.617l150.12%2011.195%2039.222%2025.933%2023.517%2031.732-3.946%2024.16-60.403%2030.766-81.503-19.33-190.228-45.26-65.235-16.27h-9.02v5.397l54.362%2053.154%2099.624%2089.96%20124.752%20115.973%206.362%2028.671-16.027%2022.63-16.912-2.415-109.611-82.47-42.282-37.127-95.758-80.618h-6.363v8.456l22.067%2032.296%20116.537%20175.167%206.04%2053.719-8.456%2017.476-30.201%2010.55-33.181-6.04-68.215-95.758-70.39-107.84-56.778-96.644-6.926%203.947-33.503%20360.886-15.705%2018.443-36.243%2013.852-30.201-22.953-16.027-37.127%2016.027-73.37%2019.329-95.758%2015.704-76.107%2014.175-94.55%208.456-31.41-.563-2.094-6.927.886-71.275%2097.852-108.402%20146.497-85.772%2091.812-20.537%208.134-35.597-18.443%203.301-32.94%2019.893-29.315%20118.712-151.007%2071.597-93.583%2046.228-54.04-.322-7.813h-2.738l-315.302%20204.725-56.135%207.248-24.16-22.63%202.98-37.128%2011.435-12.08%2094.792-65.236-.322.323z'%20fill='%23d97757'/%3e%3c/svg%3e";
|
|
775
880
|
const OpenAILogoSvg = "data:image/svg+xml,%3csvg%20height='2500'%20viewBox='-1%20-.1%20949.1%20959.8'%20width='2474'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m925.8%20456.3c10.4%2023.2%2017%2048%2019.7%2073.3%202.6%2025.3%201.3%2050.9-4.1%2075.8-5.3%2024.9-14.5%2048.8-27.3%2070.8-8.4%2014.7-18.3%2028.5-29.7%2041.2-11.3%2012.6-23.9%2024-37.6%2034-13.8%2010-28.5%2018.4-44.1%2025.3-15.5%206.8-31.7%2012-48.3%2015.4-7.8%2024.2-19.4%2047.1-34.4%2067.7-14.9%2020.6-33%2038.7-53.6%2053.6-20.6%2015-43.4%2026.6-67.6%2034.4-24.2%207.9-49.5%2011.8-75%2011.8-16.9.1-33.9-1.7-50.5-5.1-16.5-3.5-32.7-8.8-48.2-15.7s-30.2-15.5-43.9-25.5c-13.6-10-26.2-21.5-37.4-34.2-25%205.4-50.6%206.7-75.9%204.1-25.3-2.7-50.1-9.3-73.4-19.7-23.2-10.3-44.7-24.3-63.6-41.4s-35-37.1-47.7-59.1c-8.5-14.7-15.5-30.2-20.8-46.3s-8.8-32.7-10.6-49.6c-1.8-16.8-1.7-33.8.1-50.7%201.8-16.8%205.5-33.4%2010.8-49.5-17-18.9-31-40.4-41.4-63.6-10.3-23.3-17-48-19.6-73.3-2.7-25.3-1.3-50.9%204-75.8s14.5-48.8%2027.3-70.8c8.4-14.7%2018.3-28.6%2029.6-41.2s24-24%2037.7-34%2028.5-18.5%2044-25.3c15.6-6.9%2031.8-12%2048.4-15.4%207.8-24.3%2019.4-47.1%2034.3-67.7%2015-20.6%2033.1-38.7%2053.7-53.7%2020.6-14.9%2043.4-26.5%2067.6-34.4%2024.2-7.8%2049.5-11.8%2075-11.7%2016.9-.1%2033.9%201.6%2050.5%205.1s32.8%208.7%2048.3%2015.6c15.5%207%2030.2%2015.5%2043.9%2025.5%2013.7%2010.1%2026.3%2021.5%2037.5%2034.2%2024.9-5.3%2050.5-6.6%2075.8-4s50%209.3%2073.3%2019.6c23.2%2010.4%2044.7%2024.3%2063.6%2041.4%2018.9%2017%2035%2036.9%2047.7%2059%208.5%2014.6%2015.5%2030.1%2020.8%2046.3%205.3%2016.1%208.9%2032.7%2010.6%2049.6%201.8%2016.9%201.8%2033.9-.1%2050.8-1.8%2016.9-5.5%2033.5-10.8%2049.6%2017.1%2018.9%2031%2040.3%2041.4%2063.6zm-333.2%20426.9c21.8-9%2041.6-22.3%2058.3-39s30-36.5%2039-58.4c9-21.8%2013.7-45.2%2013.7-68.8v-223q-.1-.3-.2-.7-.1-.3-.3-.6-.2-.3-.5-.5-.3-.3-.6-.4l-80.7-46.6v269.4c0%202.7-.4%205.5-1.1%208.1-.7%202.7-1.7%205.2-3.1%207.6s-3%204.6-5%206.5a32.1%2032.1%200%200%201%20-6.5%205l-191.1%20110.3c-1.6%201-4.3%202.4-5.7%203.2%207.9%206.7%2016.5%2012.6%2025.5%2017.8%209.1%205.2%2018.5%209.6%2028.3%2013.2%209.8%203.5%2019.9%206.2%2030.1%208%2010.3%201.8%2020.7%202.7%2031.1%202.7%2023.6%200%2047-4.7%2068.8-13.8zm-455.1-151.4c11.9%2020.5%2027.6%2038.3%2046.3%2052.7%2018.8%2014.4%2040.1%2024.9%2062.9%2031s46.6%207.7%2070%204.6%2045.9-10.7%2066.4-22.5l193.2-111.5.5-.5q.2-.2.3-.6.2-.3.3-.6v-94l-233.2%20134.9c-2.4%201.4-4.9%202.4-7.5%203.2-2.7.7-5.4%201-8.2%201-2.7%200-5.4-.3-8.1-1-2.6-.8-5.2-1.8-7.6-3.2l-191.1-110.4c-1.7-1-4.2-2.5-5.6-3.4-1.8%2010.3-2.7%2020.7-2.7%2031.1s1%2020.8%202.8%2031.1c1.8%2010.2%204.6%2020.3%208.1%2030.1%203.6%209.8%208%2019.2%2013.2%2028.2zm-50.2-417c-11.8%2020.5-19.4%2043.1-22.5%2066.5s-1.5%2047.1%204.6%2070c6.1%2022.8%2016.6%2044.1%2031%2062.9%2014.4%2018.7%2032.3%2034.4%2052.7%2046.2l193.1%20111.6q.3.1.7.2h.7q.4%200%20.7-.2.3-.1.6-.3l81-46.8-233.2-134.6c-2.3-1.4-4.5-3.1-6.5-5a32.1%2032.1%200%200%201%20-5-6.5c-1.3-2.4-2.4-4.9-3.1-7.6-.7-2.6-1.1-5.3-1-8.1v-227.1c-9.8%203.6-19.3%208-28.3%2013.2-9%205.3-17.5%2011.3-25.5%2018-7.9%206.7-15.3%2014.1-22%2022.1-6.7%207.9-12.6%2016.5-17.8%2025.5zm663.3%20154.4c2.4%201.4%204.6%203%206.6%205%201.9%201.9%203.6%204.1%205%206.5%201.3%202.4%202.4%205%203.1%207.6.6%202.7%201%205.4.9%208.2v227.1c32.1-11.8%2060.1-32.5%2080.8-59.7%2020.8-27.2%2033.3-59.7%2036.2-93.7s-3.9-68.2-19.7-98.5-39.9-55.5-69.5-72.5l-193.1-111.6q-.3-.1-.7-.2h-.7q-.3.1-.7.2-.3.1-.6.3l-80.6%2046.6%20233.2%20134.7zm80.5-121h-.1v.1zm-.1-.1c5.8-33.6%201.9-68.2-11.3-99.7-13.1-31.5-35-58.6-63-78.2-28-19.5-61-30.7-95.1-32.2-34.2-1.4-68%206.9-97.6%2023.9l-193.1%20111.5q-.3.2-.5.5l-.4.6q-.1.3-.2.7-.1.3-.1.7v93.2l233.2-134.7c2.4-1.4%205-2.4%207.6-3.2%202.7-.7%205.4-1%208.1-1%202.8%200%205.5.3%208.2%201%202.6.8%205.1%201.8%207.5%203.2l191.1%20110.4c1.7%201%204.2%202.4%205.6%203.3zm-505.3-103.2c0-2.7.4-5.4%201.1-8.1.7-2.6%201.7-5.2%203.1-7.6%201.4-2.3%203-4.5%205-6.5%201.9-1.9%204.1-3.6%206.5-4.9l191.1-110.3c1.8-1.1%204.3-2.5%205.7-3.2-26.2-21.9-58.2-35.9-92.1-40.2-33.9-4.4-68.3%201-99.2%2015.5-31%2014.5-57.2%2037.6-75.5%2066.4-18.3%2028.9-28%2062.3-28%2096.5v223q.1.4.2.7.1.3.3.6.2.3.5.6.2.2.6.4l80.7%2046.6zm43.8%20294.7%20103.9%2060%20103.9-60v-119.9l-103.8-60-103.9%2060z'/%3e%3c/svg%3e";
|
|
776
881
|
const DeepSeekLogoSvg = "data:image/svg+xml,%3csvg%20fill='none'%20height='1320'%20viewBox='3.771%206.973%2023.993%2017.652'%20width='2500'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m27.501%208.469c-.252-.123-.36.111-.508.23-.05.04-.093.09-.135.135-.368.395-.797.652-1.358.621-.821-.045-1.521.213-2.14.842-.132-.776-.57-1.238-1.235-1.535-.349-.155-.701-.309-.944-.645-.171-.238-.217-.504-.303-.765-.054-.159-.108-.32-.29-.348-.197-.031-.274.135-.352.273-.31.567-.43%201.192-.419%201.825.028%201.421.628%202.554%201.82%203.36.136.093.17.186.128.321-.081.278-.178.547-.264.824-.054.178-.135.217-.324.14a5.448%205.448%200%200%201%20-1.719-1.169c-.848-.82-1.614-1.726-2.57-2.435-.225-.166-.449-.32-.681-.467-.976-.95.128-1.729.383-1.82.267-.096.093-.428-.77-.424s-1.653.293-2.659.677a2.782%202.782%200%200%201%20-.46.135%209.554%209.554%200%200%200%20-2.853-.1c-1.866.21-3.356%201.092-4.452%202.6-1.315%201.81-1.625%203.87-1.246%206.018.399%202.261%201.552%204.136%203.326%205.601%201.837%201.518%203.955%202.262%206.37%202.12%201.466-.085%203.1-.282%204.942-1.842.465.23.952.322%201.762.392.623.059%201.223-.031%201.687-.127.728-.154.677-.828.414-.953-2.132-.994-1.665-.59-2.09-.916%201.084-1.285%202.717-2.619%203.356-6.94.05-.343.007-.558%200-.837-.004-.168.034-.235.228-.254a4.084%204.084%200%200%200%201.529-.47c1.382-.757%201.938-1.997%202.07-3.485.02-.227-.004-.463-.243-.582zm-12.041%2013.391c-2.067-1.627-3.07-2.162-3.483-2.138-.387.021-.318.465-.233.754.089.285.205.482.368.732.113.166.19.414-.112.598-.666.414-1.823-.139-1.878-.166-1.347-.793-2.473-1.842-3.267-3.276-.765-1.38-1.21-2.861-1.284-4.441-.02-.383.093-.518.472-.586a4.692%204.692%200%200%201%201.514-.04c2.109.31%203.905%201.255%205.41%202.749.86.853%201.51%201.871%202.18%202.865.711%201.057%201.478%202.063%202.454%202.887.343.289.619.51.881.672-.792.088-2.117.107-3.022-.61zm.99-6.38a.304.304%200%201%201%20.609%200c0%20.17-.136.304-.306.304a.3.3%200%200%201%20-.303-.305zm3.077%201.581c-.197.08-.394.15-.584.159a1.246%201.246%200%200%201%20-.79-.252c-.27-.227-.463-.354-.546-.752a1.752%201.752%200%200%201%20.016-.582c.07-.324-.008-.531-.235-.72-.187-.155-.422-.196-.682-.196a.551.551%200%200%201%20-.252-.078c-.108-.055-.197-.19-.112-.356.027-.053.159-.183.19-.207.352-.201.758-.135%201.134.016.349.142.611.404.99.773.388.448.457.573.678.906.174.264.333.534.441.842.066.192-.02.35-.248.448z'%20fill='%234d6bfe'/%3e%3c/svg%3e";
|
|
@@ -893,6 +998,38 @@ function TooltipContent({
|
|
|
893
998
|
}
|
|
894
999
|
) });
|
|
895
1000
|
}
|
|
1001
|
+
const MAX_VISIBLE_LOGOS = 3;
|
|
1002
|
+
const ROW_CHEVRON_SLOT_CLASS = "flex h-8 w-5 shrink-0 items-center justify-center text-muted-foreground";
|
|
1003
|
+
function ProviderLogoStack({
|
|
1004
|
+
items,
|
|
1005
|
+
ariaLabel,
|
|
1006
|
+
className
|
|
1007
|
+
}) {
|
|
1008
|
+
if (items.length === 0) {
|
|
1009
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn("flex h-8 w-12 shrink-0 items-center", className), "aria-hidden": "true" });
|
|
1010
|
+
}
|
|
1011
|
+
const visibleItems = items.slice(0, MAX_VISIBLE_LOGOS);
|
|
1012
|
+
const overflowCount = items.length - visibleItems.length;
|
|
1013
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipProvider, { delayDuration: 150, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: cn("flex h-8 w-12 shrink-0 items-center", className), "aria-label": ariaLabel, children: [
|
|
1014
|
+
visibleItems.map((item, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
|
|
1015
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1016
|
+
"span",
|
|
1017
|
+
{
|
|
1018
|
+
className: cn(
|
|
1019
|
+
"inline-flex size-6 shrink-0 items-center justify-center rounded-md border border-white/10 bg-black/20 shadow-[inset_0_1px_0_rgba(255,255,255,0.05)]",
|
|
1020
|
+
index > 0 && "-ml-2"
|
|
1021
|
+
),
|
|
1022
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ProviderLogo, { provider: item.provider, className: "size-4" })
|
|
1023
|
+
}
|
|
1024
|
+
) }),
|
|
1025
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: item.tooltip })
|
|
1026
|
+
] }, `${item.provider}-${String(index)}`)),
|
|
1027
|
+
overflowCount > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "-ml-2 inline-flex h-6 min-w-6 shrink-0 items-center justify-center rounded-md border border-white/10 bg-black/40 px-1 font-mono text-[10px] text-muted-foreground", children: [
|
|
1028
|
+
"+",
|
|
1029
|
+
overflowCount
|
|
1030
|
+
] })
|
|
1031
|
+
] }) });
|
|
1032
|
+
}
|
|
896
1033
|
function forEachCodePoint(text, visit) {
|
|
897
1034
|
for (const ch of Array.from(text)) {
|
|
898
1035
|
visit(ch);
|
|
@@ -1299,6 +1436,15 @@ function ConversationHeader({
|
|
|
1299
1436
|
},
|
|
1300
1437
|
[conversationId]
|
|
1301
1438
|
);
|
|
1439
|
+
const providerLogoItems = providers?.map(({ provider, models }) => ({
|
|
1440
|
+
provider,
|
|
1441
|
+
tooltip: models.length === 1 ? models[0] ?? provider : models.join(", ")
|
|
1442
|
+
})) ?? [];
|
|
1443
|
+
const clientApp = detectClientApp({ userAgent, conversationId, clientProjectFolder });
|
|
1444
|
+
const detectedClientLabel = clientAppLabel(clientApp);
|
|
1445
|
+
const hasUserAgent = userAgent !== null && userAgent !== void 0 && userAgent !== "";
|
|
1446
|
+
const clientDisplayLabel = detectedClientLabel ?? userAgent ?? null;
|
|
1447
|
+
const clientTooltip = detectedClientLabel !== null && hasUserAgent ? `${detectedClientLabel} - ${userAgent}` : null;
|
|
1302
1448
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1303
1449
|
"div",
|
|
1304
1450
|
{
|
|
@@ -1322,7 +1468,8 @@ function ConversationHeader({
|
|
|
1322
1468
|
}
|
|
1323
1469
|
},
|
|
1324
1470
|
children: [
|
|
1325
|
-
|
|
1471
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ProviderLogoStack, { items: providerLogoItems, ariaLabel: "Models used in this session" }),
|
|
1472
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: ROW_CHEVRON_SLOT_CLASS, children: expanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "size-4 shrink-0" }) : isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-4 shrink-0 animate-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "size-4 shrink-0" }) }),
|
|
1326
1473
|
conversationId.startsWith("PID:") || conversationId.includes("|") ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
1327
1474
|
clientPid !== null && clientPid !== void 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1328
1475
|
"span",
|
|
@@ -1364,28 +1511,17 @@ function ConversationHeader({
|
|
|
1364
1511
|
}
|
|
1365
1512
|
)
|
|
1366
1513
|
] }),
|
|
1367
|
-
|
|
1514
|
+
clientDisplayLabel !== null && clientDisplayLabel !== "" && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1368
1515
|
"span",
|
|
1369
1516
|
{
|
|
1370
1517
|
className: "flex items-center gap-1 text-muted-foreground text-xs shrink-0",
|
|
1371
|
-
title:
|
|
1518
|
+
title: clientTooltip ?? clientDisplayLabel,
|
|
1372
1519
|
children: [
|
|
1373
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1374
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono tabular-nums truncate max-w-[120px]", children:
|
|
1520
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ClientLogo, { client: clientApp, className: "size-5" }),
|
|
1521
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono tabular-nums truncate max-w-[120px]", children: clientDisplayLabel })
|
|
1375
1522
|
]
|
|
1376
1523
|
}
|
|
1377
1524
|
),
|
|
1378
|
-
providers !== void 0 && providers.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipProvider, { delayDuration: 150, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1379
|
-
"span",
|
|
1380
|
-
{
|
|
1381
|
-
className: "flex items-center gap-0.5 shrink-0",
|
|
1382
|
-
"aria-label": "Models used in this session",
|
|
1383
|
-
children: providers.map(({ provider, models }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
|
|
1384
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ProviderLogo, { provider, className: "size-4" }) }) }),
|
|
1385
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: models.length === 1 ? models[0] : models.join(", ") })
|
|
1386
|
-
] }, provider))
|
|
1387
|
-
}
|
|
1388
|
-
) }),
|
|
1389
1525
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "flex items-center gap-1 text-muted-foreground text-xs shrink-0", children: [
|
|
1390
1526
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { className: "size-3" }),
|
|
1391
1527
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono tabular-nums", children: formatTimestampRange(startTime, endTime, timeDisplayFormat) })
|
|
@@ -1519,6 +1655,33 @@ function readLogFocusRequest(event) {
|
|
|
1519
1655
|
function isRecord(value) {
|
|
1520
1656
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1521
1657
|
}
|
|
1658
|
+
function normalizeAnthropicStopReason(value) {
|
|
1659
|
+
switch (value) {
|
|
1660
|
+
case "end_turn":
|
|
1661
|
+
case "tool_use":
|
|
1662
|
+
return value;
|
|
1663
|
+
default:
|
|
1664
|
+
return null;
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
function normalizeOpenAIFinishReason(value) {
|
|
1668
|
+
switch (value) {
|
|
1669
|
+
case "stop":
|
|
1670
|
+
case "length":
|
|
1671
|
+
return value;
|
|
1672
|
+
default:
|
|
1673
|
+
return null;
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
function isResponsesLengthLimitReason(value) {
|
|
1677
|
+
switch (value) {
|
|
1678
|
+
case "max_output_tokens":
|
|
1679
|
+
case "max_tokens":
|
|
1680
|
+
return true;
|
|
1681
|
+
default:
|
|
1682
|
+
return false;
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1522
1685
|
function extractStopReason(log) {
|
|
1523
1686
|
if (log.responseText === null) return null;
|
|
1524
1687
|
try {
|
|
@@ -1528,13 +1691,14 @@ function extractStopReason(log) {
|
|
|
1528
1691
|
}
|
|
1529
1692
|
if (!isRecord(json)) return null;
|
|
1530
1693
|
if (typeof json.stop_reason === "string") {
|
|
1531
|
-
|
|
1532
|
-
return json.stop_reason;
|
|
1533
|
-
}
|
|
1534
|
-
return null;
|
|
1694
|
+
return normalizeAnthropicStopReason(json.stop_reason);
|
|
1535
1695
|
}
|
|
1536
|
-
if (Array.isArray(json.choices)
|
|
1537
|
-
|
|
1696
|
+
if (Array.isArray(json.choices)) {
|
|
1697
|
+
for (const choice of json.choices) {
|
|
1698
|
+
if (!isRecord(choice) || typeof choice.finish_reason !== "string") continue;
|
|
1699
|
+
const reason = normalizeOpenAIFinishReason(choice.finish_reason);
|
|
1700
|
+
if (reason !== null) return reason;
|
|
1701
|
+
}
|
|
1538
1702
|
}
|
|
1539
1703
|
if (Array.isArray(json.output)) {
|
|
1540
1704
|
for (const item of json.output) {
|
|
@@ -1546,13 +1710,19 @@ function extractStopReason(log) {
|
|
|
1546
1710
|
return "stop";
|
|
1547
1711
|
}
|
|
1548
1712
|
}
|
|
1713
|
+
if (json.status === "incomplete" && isRecord(json.incomplete_details)) {
|
|
1714
|
+
const reason = json.incomplete_details.reason;
|
|
1715
|
+
if (typeof reason === "string" && isResponsesLengthLimitReason(reason)) {
|
|
1716
|
+
return "length";
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1549
1719
|
return null;
|
|
1550
1720
|
} catch {
|
|
1551
1721
|
return null;
|
|
1552
1722
|
}
|
|
1553
1723
|
}
|
|
1554
1724
|
function isTurnBoundary(stopReason) {
|
|
1555
|
-
return stopReason === "end_turn" || stopReason === "stop";
|
|
1725
|
+
return stopReason === "end_turn" || stopReason === "stop" || stopReason === "length";
|
|
1556
1726
|
}
|
|
1557
1727
|
function SvgShell({
|
|
1558
1728
|
className,
|
|
@@ -2099,27 +2269,27 @@ function useCopyFeedback(text) {
|
|
|
2099
2269
|
return { copied, copy };
|
|
2100
2270
|
}
|
|
2101
2271
|
const LazyCompareDrawer = reactExports.lazy(
|
|
2102
|
-
() => import("./CompareDrawer-
|
|
2272
|
+
() => import("./CompareDrawer-BoxztaO7.mjs").then((m) => ({ default: m.CompareDrawer }))
|
|
2103
2273
|
);
|
|
2104
2274
|
const LazyReplayDialog = reactExports.lazy(
|
|
2105
|
-
() => import("./ReplayDialog-
|
|
2275
|
+
() => import("./ReplayDialog-Cc1dyDuK.mjs").then((m) => ({ default: m.ReplayDialog }))
|
|
2106
2276
|
);
|
|
2107
2277
|
const LazyRequestAnatomy = reactExports.lazy(
|
|
2108
|
-
() => import("./RequestAnatomy-
|
|
2278
|
+
() => import("./RequestAnatomy-CMGSsz5Z.mjs").then((m) => ({ default: m.RequestAnatomy }))
|
|
2109
2279
|
);
|
|
2110
2280
|
const LazyResponseView = reactExports.lazy(
|
|
2111
|
-
() => import("./ResponseView-
|
|
2281
|
+
() => import("./ResponseView-Cp10DM1D.mjs").then((m) => ({ default: m.ResponseView }))
|
|
2112
2282
|
);
|
|
2113
2283
|
const LazyStreamingChunkSequence = reactExports.lazy(
|
|
2114
|
-
() => import("./StreamingChunkSequence-
|
|
2284
|
+
() => import("./StreamingChunkSequence-B1VGxy3A.mjs").then((m) => ({
|
|
2115
2285
|
default: m.StreamingChunkSequence
|
|
2116
2286
|
}))
|
|
2117
2287
|
);
|
|
2118
2288
|
const LazyJsonViewer = reactExports.lazy(
|
|
2119
|
-
() => import("./json-viewer-
|
|
2289
|
+
() => import("./json-viewer-zDE2rrmJ.mjs").then((m) => ({ default: m.JsonViewer }))
|
|
2120
2290
|
);
|
|
2121
2291
|
const LazyJsonViewerFromString = reactExports.lazy(
|
|
2122
|
-
() => import("./json-viewer-
|
|
2292
|
+
() => import("./json-viewer-zDE2rrmJ.mjs").then((m) => ({ default: m.JsonViewerFromString }))
|
|
2123
2293
|
);
|
|
2124
2294
|
const HIGHLIGHT_DURATION_MS = 1200;
|
|
2125
2295
|
const MAX_HIGHLIGHT_ATTEMPTS = 12;
|
|
@@ -2607,6 +2777,7 @@ function CacheTrendIndicator({ trend }) {
|
|
|
2607
2777
|
}
|
|
2608
2778
|
const LogEntryHeader = reactExports.memo(function({
|
|
2609
2779
|
log,
|
|
2780
|
+
displayNumber,
|
|
2610
2781
|
messageCount = null,
|
|
2611
2782
|
toolCount = null,
|
|
2612
2783
|
expanded,
|
|
@@ -2663,6 +2834,7 @@ const LogEntryHeader = reactExports.memo(function({
|
|
|
2663
2834
|
"aria-hidden": "true"
|
|
2664
2835
|
}
|
|
2665
2836
|
),
|
|
2837
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: ROW_CHEVRON_SLOT_CLASS, children: expanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "size-4 shrink-0" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "size-4 shrink-0" }) }),
|
|
2666
2838
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2667
2839
|
"span",
|
|
2668
2840
|
{
|
|
@@ -2672,10 +2844,9 @@ const LogEntryHeader = reactExports.memo(function({
|
|
|
2672
2844
|
),
|
|
2673
2845
|
children: [
|
|
2674
2846
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn("size-1.5 rounded-full", statusCue.dot), "aria-hidden": "true" }),
|
|
2675
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
2676
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs font-semibold tabular-nums", children: [
|
|
2847
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs font-semibold tabular-nums", title: `Log ID ${String(log.id)}`, children: [
|
|
2677
2848
|
"#",
|
|
2678
|
-
|
|
2849
|
+
displayNumber
|
|
2679
2850
|
] })
|
|
2680
2851
|
]
|
|
2681
2852
|
}
|
|
@@ -2926,8 +3097,7 @@ const LogEntryHeader = reactExports.memo(function({
|
|
|
2926
3097
|
] })
|
|
2927
3098
|
]
|
|
2928
3099
|
}
|
|
2929
|
-
)
|
|
2930
|
-
expanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "size-4 text-muted-foreground shrink-0" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "size-4 text-muted-foreground shrink-0" })
|
|
3100
|
+
)
|
|
2931
3101
|
]
|
|
2932
3102
|
}
|
|
2933
3103
|
) });
|
|
@@ -3599,6 +3769,7 @@ const HeadersDiffContent = reactExports.memo(function({
|
|
|
3599
3769
|
});
|
|
3600
3770
|
const LogEntry = reactExports.memo(function({
|
|
3601
3771
|
log,
|
|
3772
|
+
displayNumber,
|
|
3602
3773
|
viewMode = "simple",
|
|
3603
3774
|
strip,
|
|
3604
3775
|
slowResponseThresholdSeconds,
|
|
@@ -3926,6 +4097,7 @@ const LogEntry = reactExports.memo(function({
|
|
|
3926
4097
|
LogEntryHeader,
|
|
3927
4098
|
{
|
|
3928
4099
|
log: displayLog,
|
|
4100
|
+
displayNumber,
|
|
3929
4101
|
messageCount: requestAnalysis.messageCount,
|
|
3930
4102
|
toolCount: requestAnalysis.toolCount,
|
|
3931
4103
|
expanded,
|
|
@@ -4134,9 +4306,30 @@ const LogEntry = reactExports.memo(function({
|
|
|
4134
4306
|
]
|
|
4135
4307
|
}
|
|
4136
4308
|
),
|
|
4137
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4309
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4310
|
+
LazyReplayDialog,
|
|
4311
|
+
{
|
|
4312
|
+
log: displayLog,
|
|
4313
|
+
displayNumber,
|
|
4314
|
+
open: replayOpen,
|
|
4315
|
+
onOpenChange: setReplayOpen
|
|
4316
|
+
}
|
|
4317
|
+
) })
|
|
4138
4318
|
] });
|
|
4139
4319
|
});
|
|
4320
|
+
function boundaryTitle(stopReason) {
|
|
4321
|
+
switch (stopReason) {
|
|
4322
|
+
case "end_turn":
|
|
4323
|
+
return "End of Turn (Anthropic)";
|
|
4324
|
+
case "stop":
|
|
4325
|
+
return "End of Turn (OpenAI)";
|
|
4326
|
+
case "length":
|
|
4327
|
+
return "End of Turn (length limit)";
|
|
4328
|
+
case "tool_use":
|
|
4329
|
+
case null:
|
|
4330
|
+
return "End of Turn";
|
|
4331
|
+
}
|
|
4332
|
+
}
|
|
4140
4333
|
function ThreadConnector({
|
|
4141
4334
|
stopReason,
|
|
4142
4335
|
isPending,
|
|
@@ -4147,7 +4340,7 @@ function ThreadConnector({
|
|
|
4147
4340
|
collapsible = false,
|
|
4148
4341
|
onToggle
|
|
4149
4342
|
}) {
|
|
4150
|
-
const isBoundary = stopReason
|
|
4343
|
+
const isBoundary = isTurnBoundary(stopReason);
|
|
4151
4344
|
const isFusedBoundary = isOnlyEntry && isTurnStart && isBoundary;
|
|
4152
4345
|
const isRunning = isPending && !isBoundary;
|
|
4153
4346
|
const Crab = reactExports.useMemo(() => getCrabVariant(crabIndex), [crabIndex]);
|
|
@@ -4178,23 +4371,16 @@ function ThreadConnector({
|
|
|
4178
4371
|
"drop-shadow-[0_0_4px_rgba(128,255,0,0.5)]"
|
|
4179
4372
|
)
|
|
4180
4373
|
}
|
|
4181
|
-
) }) : isBoundary ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4182
|
-
|
|
4374
|
+
) }) : isBoundary ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { title: boundaryTitle(stopReason), ...interactiveProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4375
|
+
Crab,
|
|
4183
4376
|
{
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
{
|
|
4189
|
-
className: cn(
|
|
4190
|
-
"size-3.5 text-amber-400",
|
|
4191
|
-
"animate-crab-settle",
|
|
4192
|
-
"drop-shadow-[0_0_4px_rgba(251,191,36,0.5)]"
|
|
4193
|
-
)
|
|
4194
|
-
}
|
|
4377
|
+
className: cn(
|
|
4378
|
+
"size-3.5 text-amber-400",
|
|
4379
|
+
"animate-crab-settle",
|
|
4380
|
+
"drop-shadow-[0_0_4px_rgba(251,191,36,0.5)]"
|
|
4195
4381
|
)
|
|
4196
4382
|
}
|
|
4197
|
-
) : isTurnStart ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { title: "Start of turn", ...interactiveProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4383
|
+
) }) : isTurnStart ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { title: "Start of turn", ...interactiveProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4198
4384
|
Crab,
|
|
4199
4385
|
{
|
|
4200
4386
|
className: cn(
|
|
@@ -4273,8 +4459,10 @@ function buildTurnGroups(logs) {
|
|
|
4273
4459
|
const groups = [];
|
|
4274
4460
|
let entries = [];
|
|
4275
4461
|
let turnIndex = 0;
|
|
4276
|
-
for (
|
|
4277
|
-
|
|
4462
|
+
for (let index = 0; index < logs.length; index += 1) {
|
|
4463
|
+
const log = logs[index];
|
|
4464
|
+
if (log === void 0) continue;
|
|
4465
|
+
entries.push({ log, stopReason: extractStopReason(log), sessionLogNumber: index + 1 });
|
|
4278
4466
|
const current = entries[entries.length - 1];
|
|
4279
4467
|
if (current !== void 0 && isTurnBoundary(current.stopReason)) {
|
|
4280
4468
|
groups.push({ entries, turnIndex });
|
|
@@ -4564,14 +4752,6 @@ const TurnGroup = reactExports.memo(function TurnGroup2({
|
|
|
4564
4752
|
maxElapsed
|
|
4565
4753
|
};
|
|
4566
4754
|
}, [entries, lastIdx]);
|
|
4567
|
-
const uniqueProviders = reactExports.useMemo(() => {
|
|
4568
|
-
const seen = /* @__PURE__ */ new Set();
|
|
4569
|
-
for (const e of entries) {
|
|
4570
|
-
const p = detectProvider(e.log.model);
|
|
4571
|
-
if (p !== "unknown") seen.add(p);
|
|
4572
|
-
}
|
|
4573
|
-
return [...seen];
|
|
4574
|
-
}, [entries]);
|
|
4575
4755
|
const StartCrab = reactExports.useMemo(() => getCrabVariant(entries[0]?.log.id ?? 0), [entries]);
|
|
4576
4756
|
const EndCrab = reactExports.useMemo(() => getCrabVariant(entries[lastIdx]?.log.id ?? 0), [entries, lastIdx]);
|
|
4577
4757
|
const bgClass = turnIndex % 2 === 0 ? "bg-[#070a0f]" : "bg-[#090d12]";
|
|
@@ -4710,18 +4890,27 @@ const TurnGroup = reactExports.memo(function TurnGroup2({
|
|
|
4710
4890
|
bgClass
|
|
4711
4891
|
),
|
|
4712
4892
|
children: [
|
|
4713
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4893
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: ROW_CHEVRON_SLOT_CLASS, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "size-4 shrink-0" }) }),
|
|
4894
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4895
|
+
"span",
|
|
4896
|
+
{
|
|
4897
|
+
className: "text-blue-400/80 font-mono font-semibold tabular-nums shrink-0",
|
|
4898
|
+
title: `Log IDs ${String(entries[0]?.log.id ?? "?")} ~ ${String(
|
|
4899
|
+
entries[lastIdx]?.log.id ?? "?"
|
|
4900
|
+
)}`,
|
|
4901
|
+
children: [
|
|
4902
|
+
"#",
|
|
4903
|
+
entries[0]?.sessionLogNumber ?? "?",
|
|
4904
|
+
" ~ #",
|
|
4905
|
+
entries[lastIdx]?.sessionLogNumber ?? "?"
|
|
4906
|
+
]
|
|
4907
|
+
}
|
|
4908
|
+
),
|
|
4719
4909
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-muted-foreground shrink-0", children: [
|
|
4720
4910
|
entries.length,
|
|
4721
4911
|
" request",
|
|
4722
4912
|
entries.length > 1 ? "s" : ""
|
|
4723
4913
|
] }),
|
|
4724
|
-
uniqueProviders.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex items-center gap-0.5 shrink-0", children: uniqueProviders.map((p) => /* @__PURE__ */ jsxRuntimeExports.jsx(ProviderLogo, { provider: p, className: "size-4" }, p)) }),
|
|
4725
4914
|
aggregate.maxElapsed !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
|
|
4726
4915
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4727
4916
|
"span",
|
|
@@ -4755,8 +4944,7 @@ const TurnGroup = reactExports.memo(function TurnGroup2({
|
|
|
4755
4944
|
] })
|
|
4756
4945
|
] })
|
|
4757
4946
|
] }),
|
|
4758
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 min-w-0" })
|
|
4759
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "size-4 text-muted-foreground shrink-0" })
|
|
4947
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 min-w-0" })
|
|
4760
4948
|
]
|
|
4761
4949
|
}
|
|
4762
4950
|
)
|
|
@@ -4788,6 +4976,7 @@ const TurnGroup = reactExports.memo(function TurnGroup2({
|
|
|
4788
4976
|
LogEntry,
|
|
4789
4977
|
{
|
|
4790
4978
|
log,
|
|
4979
|
+
displayNumber: entry.sessionLogNumber,
|
|
4791
4980
|
viewMode,
|
|
4792
4981
|
strip,
|
|
4793
4982
|
slowResponseThresholdSeconds,
|
|
@@ -4966,6 +5155,18 @@ function firstToolLog(logs) {
|
|
|
4966
5155
|
}
|
|
4967
5156
|
return null;
|
|
4968
5157
|
}
|
|
5158
|
+
function buildDisplayNumberByLogId$1(logs) {
|
|
5159
|
+
const result = /* @__PURE__ */ new Map();
|
|
5160
|
+
for (let index = 0; index < logs.length; index += 1) {
|
|
5161
|
+
const log = logs[index];
|
|
5162
|
+
if (log === void 0) continue;
|
|
5163
|
+
result.set(log.id, index + 1);
|
|
5164
|
+
}
|
|
5165
|
+
return result;
|
|
5166
|
+
}
|
|
5167
|
+
function displayLogNumber(logId, displayNumberByLogId) {
|
|
5168
|
+
return String(displayNumberByLogId.get(logId) ?? logId);
|
|
5169
|
+
}
|
|
4969
5170
|
function buildTraceInsights(input) {
|
|
4970
5171
|
const insights = [
|
|
4971
5172
|
{
|
|
@@ -4980,7 +5181,7 @@ function buildTraceInsights(input) {
|
|
|
4980
5181
|
insights.push({
|
|
4981
5182
|
kind: "tool",
|
|
4982
5183
|
title: `${String(input.summary.toolCallCount)} tool call${input.summary.toolCallCount === 1 ? "" : "s"}`,
|
|
4983
|
-
detail: `First tool evidence at #${
|
|
5184
|
+
detail: `First tool evidence at #${displayLogNumber(toolLog.id, input.displayNumberByLogId)}`,
|
|
4984
5185
|
logId: toolLog.id
|
|
4985
5186
|
});
|
|
4986
5187
|
}
|
|
@@ -4989,7 +5190,7 @@ function buildTraceInsights(input) {
|
|
|
4989
5190
|
insights.push({
|
|
4990
5191
|
kind: "failure",
|
|
4991
5192
|
title: `Failure #${String(failure.responseStatus)}`,
|
|
4992
|
-
detail: `First failed request is #${
|
|
5193
|
+
detail: `First failed request is #${displayLogNumber(failure.id, input.displayNumberByLogId)}`,
|
|
4993
5194
|
logId: failure.id
|
|
4994
5195
|
});
|
|
4995
5196
|
}
|
|
@@ -4998,7 +5199,7 @@ function buildTraceInsights(input) {
|
|
|
4998
5199
|
insights.push({
|
|
4999
5200
|
kind: "slow",
|
|
5000
5201
|
title: `Slowest ${formatElapsed$1(input.summary.maxElapsedMs)}`,
|
|
5001
|
-
detail: `Max latency observed at #${
|
|
5202
|
+
detail: `Max latency observed at #${displayLogNumber(slowest.id, input.displayNumberByLogId)}`,
|
|
5002
5203
|
logId: slowest.id
|
|
5003
5204
|
});
|
|
5004
5205
|
}
|
|
@@ -5086,12 +5287,13 @@ function previewText(value, maxLength) {
|
|
|
5086
5287
|
if (normalized.length <= maxLength) return normalized;
|
|
5087
5288
|
return `${normalized.slice(0, maxLength - 3)}...`;
|
|
5088
5289
|
}
|
|
5089
|
-
function logRangeLabel(logIds) {
|
|
5290
|
+
function logRangeLabel(logIds, displayNumberByLogId) {
|
|
5090
5291
|
const first = logIds[0];
|
|
5091
5292
|
const last = logIds[logIds.length - 1];
|
|
5092
5293
|
if (first === void 0) return "No evidence logs";
|
|
5093
|
-
|
|
5094
|
-
|
|
5294
|
+
const firstLabel = displayLogNumber(first, displayNumberByLogId);
|
|
5295
|
+
if (last === void 0 || first === last) return `#${firstLabel}`;
|
|
5296
|
+
return `#${firstLabel}-#${displayLogNumber(last, displayNumberByLogId)}`;
|
|
5095
5297
|
}
|
|
5096
5298
|
function tagsToText(tags) {
|
|
5097
5299
|
return tags.join(", ");
|
|
@@ -5104,7 +5306,8 @@ function CandidateItem({
|
|
|
5104
5306
|
isPromoting,
|
|
5105
5307
|
isUpdating,
|
|
5106
5308
|
onPromoteCandidate,
|
|
5107
|
-
onUpdateCandidate
|
|
5309
|
+
onUpdateCandidate,
|
|
5310
|
+
displayNumberByLogId
|
|
5108
5311
|
}) {
|
|
5109
5312
|
const [editing, setEditing] = reactExports.useState(false);
|
|
5110
5313
|
const [draftType, setDraftType] = reactExports.useState(candidate.type);
|
|
@@ -5273,7 +5476,7 @@ function CandidateItem({
|
|
|
5273
5476
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 text-[10px] text-muted-foreground", children: [
|
|
5274
5477
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1", children: [
|
|
5275
5478
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FileSearch, { className: "size-3" }),
|
|
5276
|
-
logRangeLabel(candidate.logIds)
|
|
5479
|
+
logRangeLabel(candidate.logIds, displayNumberByLogId)
|
|
5277
5480
|
] }),
|
|
5278
5481
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1", children: [
|
|
5279
5482
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ShieldCheck, { className: "size-3" }),
|
|
@@ -5289,23 +5492,27 @@ function CandidateItem({
|
|
|
5289
5492
|
] })
|
|
5290
5493
|
] }),
|
|
5291
5494
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-1 flex flex-wrap items-center gap-1.5", children: [
|
|
5292
|
-
candidate.logIds.map((logId) =>
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5495
|
+
candidate.logIds.map((logId) => {
|
|
5496
|
+
const displayNumber = displayLogNumber(logId, displayNumberByLogId);
|
|
5497
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
5498
|
+
"a",
|
|
5499
|
+
{
|
|
5500
|
+
href: `#${getLogAnchor(logId)}`,
|
|
5501
|
+
onClick: (event) => {
|
|
5502
|
+
event.preventDefault();
|
|
5503
|
+
jumpToLog(logId);
|
|
5504
|
+
},
|
|
5505
|
+
className: "rounded border border-blue-400/25 px-1.5 py-0.5 font-mono text-[10px] text-blue-400 underline-offset-2 transition-colors hover:bg-blue-400/10 hover:text-blue-300 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5506
|
+
"aria-label": `Jump to evidence log ${displayNumber}`,
|
|
5507
|
+
title: `Log ID ${String(logId)}`,
|
|
5508
|
+
children: [
|
|
5509
|
+
"#",
|
|
5510
|
+
displayNumber
|
|
5511
|
+
]
|
|
5299
5512
|
},
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
"#",
|
|
5304
|
-
logId
|
|
5305
|
-
]
|
|
5306
|
-
},
|
|
5307
|
-
logId
|
|
5308
|
-
)),
|
|
5513
|
+
logId
|
|
5514
|
+
);
|
|
5515
|
+
}),
|
|
5309
5516
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1" }),
|
|
5310
5517
|
canEdit && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
5311
5518
|
Button,
|
|
@@ -5345,7 +5552,8 @@ function CandidateList({
|
|
|
5345
5552
|
promotingCandidateIds,
|
|
5346
5553
|
updatingCandidateIds,
|
|
5347
5554
|
onPromoteCandidate,
|
|
5348
|
-
onUpdateCandidate
|
|
5555
|
+
onUpdateCandidate,
|
|
5556
|
+
displayNumberByLogId
|
|
5349
5557
|
}) {
|
|
5350
5558
|
if (candidates.length === 0) return null;
|
|
5351
5559
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2 grid gap-1.5", children: candidates.map((candidate) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -5355,7 +5563,8 @@ function CandidateList({
|
|
|
5355
5563
|
isPromoting: promotingCandidateIds.has(candidate.id),
|
|
5356
5564
|
isUpdating: updatingCandidateIds.has(candidate.id),
|
|
5357
5565
|
onPromoteCandidate,
|
|
5358
|
-
onUpdateCandidate
|
|
5566
|
+
onUpdateCandidate,
|
|
5567
|
+
displayNumberByLogId
|
|
5359
5568
|
},
|
|
5360
5569
|
candidate.id
|
|
5361
5570
|
)) });
|
|
@@ -5384,9 +5593,10 @@ function AgentTraceSummary({
|
|
|
5384
5593
|
() => buildTraceSummary(logs, slowResponseThresholdSeconds, candidates.length),
|
|
5385
5594
|
[candidates.length, logs, slowResponseThresholdSeconds]
|
|
5386
5595
|
);
|
|
5596
|
+
const displayNumberByLogId = reactExports.useMemo(() => buildDisplayNumberByLogId$1(logs), [logs]);
|
|
5387
5597
|
const traceInsights = reactExports.useMemo(
|
|
5388
|
-
() => buildTraceInsights({ logs, scopeId, summary, candidates }),
|
|
5389
|
-
[candidates, logs, scopeId, summary]
|
|
5598
|
+
() => buildTraceInsights({ logs, scopeId, summary, candidates, displayNumberByLogId }),
|
|
5599
|
+
[candidates, displayNumberByLogId, logs, scopeId, summary]
|
|
5390
5600
|
);
|
|
5391
5601
|
const showElapsedSummary = showRollupMetrics || summary.maxElapsedMs !== null;
|
|
5392
5602
|
const timeRange = reactExports.useMemo(
|
|
@@ -5614,7 +5824,8 @@ function AgentTraceSummary({
|
|
|
5614
5824
|
promotingCandidateIds,
|
|
5615
5825
|
updatingCandidateIds,
|
|
5616
5826
|
onPromoteCandidate: promoteCandidate,
|
|
5617
|
-
onUpdateCandidate: updateCandidate
|
|
5827
|
+
onUpdateCandidate: updateCandidate,
|
|
5828
|
+
displayNumberByLogId
|
|
5618
5829
|
}
|
|
5619
5830
|
)
|
|
5620
5831
|
] });
|
|
@@ -7380,28 +7591,31 @@ function LatestLogsPreview({ logs }) {
|
|
|
7380
7591
|
}
|
|
7381
7592
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "overflow-hidden rounded-md border border-border", children: [
|
|
7382
7593
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-b border-border bg-muted/30 px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: "Latest logs" }),
|
|
7383
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-border", children: visibleLogs.map((log) =>
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
log.id
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
"
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7594
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-border", children: visibleLogs.map((log) => {
|
|
7595
|
+
const displayNumber = log.sessionLogNumber ?? log.id;
|
|
7596
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
7597
|
+
"div",
|
|
7598
|
+
{
|
|
7599
|
+
className: "grid gap-2 px-3 py-2 text-xs sm:grid-cols-[72px_1fr_88px_88px]",
|
|
7600
|
+
children: [
|
|
7601
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-mono text-muted-foreground", title: `Log ID ${String(log.id)}`, children: [
|
|
7602
|
+
"#",
|
|
7603
|
+
displayNumber
|
|
7604
|
+
] }),
|
|
7605
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "min-w-0 truncate", children: [
|
|
7606
|
+
displayText(log.model),
|
|
7607
|
+
" · ",
|
|
7608
|
+
log.apiFormat,
|
|
7609
|
+
" · ",
|
|
7610
|
+
log.path
|
|
7611
|
+
] }),
|
|
7612
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono text-muted-foreground", children: formatMs(log.firstChunkMs) }),
|
|
7613
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono text-muted-foreground", children: formatMs(log.latencyMs) })
|
|
7614
|
+
]
|
|
7615
|
+
},
|
|
7616
|
+
log.id
|
|
7617
|
+
);
|
|
7618
|
+
}) })
|
|
7405
7619
|
] });
|
|
7406
7620
|
}
|
|
7407
7621
|
function MemberMetadata({ entries }) {
|
|
@@ -11556,6 +11770,20 @@ function truncateSessionId(id) {
|
|
|
11556
11770
|
if (id.length <= 30) return id;
|
|
11557
11771
|
return `${id.slice(0, 12)}...${id.slice(-12)}`;
|
|
11558
11772
|
}
|
|
11773
|
+
function buildDisplayNumberByLogId(groups) {
|
|
11774
|
+
const result = /* @__PURE__ */ new Map();
|
|
11775
|
+
for (const group of groups) {
|
|
11776
|
+
for (let index = 0; index < group.logs.length; index += 1) {
|
|
11777
|
+
const log = group.logs[index];
|
|
11778
|
+
if (log === void 0) continue;
|
|
11779
|
+
result.set(log.id, index + 1);
|
|
11780
|
+
}
|
|
11781
|
+
}
|
|
11782
|
+
return result;
|
|
11783
|
+
}
|
|
11784
|
+
function displayNumberForLog(log, displayNumberByLogId) {
|
|
11785
|
+
return displayNumberByLogId.get(log.id) ?? log.id;
|
|
11786
|
+
}
|
|
11559
11787
|
function shouldShowRawExport(captureMode) {
|
|
11560
11788
|
return captureMode === "full";
|
|
11561
11789
|
}
|
|
@@ -12605,6 +12833,7 @@ function ProxyViewer({
|
|
|
12605
12833
|
setComparePair(null);
|
|
12606
12834
|
}, []);
|
|
12607
12835
|
const groups = reactExports.useMemo(() => groupLogsByConversation(logs), [logs]);
|
|
12836
|
+
const displayNumberByLogId = reactExports.useMemo(() => buildDisplayNumberByLogId(groups), [groups]);
|
|
12608
12837
|
const sessionContextScope = reactExports.useMemo(
|
|
12609
12838
|
() => resolveSessionContextScope({ pinnedSessionId, selectedSession, sessions, logs }),
|
|
12610
12839
|
[logs, pinnedSessionId, selectedSession, sessions]
|
|
@@ -12843,7 +13072,16 @@ function ProxyViewer({
|
|
|
12843
13072
|
] })
|
|
12844
13073
|
] })
|
|
12845
13074
|
] }),
|
|
12846
|
-
comparePair !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13075
|
+
comparePair !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13076
|
+
LazyCompareDrawer,
|
|
13077
|
+
{
|
|
13078
|
+
left: comparePair[0],
|
|
13079
|
+
right: comparePair[1],
|
|
13080
|
+
leftDisplayNumber: displayNumberForLog(comparePair[0], displayNumberByLogId),
|
|
13081
|
+
rightDisplayNumber: displayNumberForLog(comparePair[1], displayNumberByLogId),
|
|
13082
|
+
onClose: closeCompare
|
|
13083
|
+
}
|
|
13084
|
+
) })
|
|
12847
13085
|
] });
|
|
12848
13086
|
}
|
|
12849
13087
|
const SSEUpdateSchema = union([
|