@tonyclaw/agent-inspector 3.0.35 → 3.0.37
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-R4_8sh1x.js → CompareDrawer-BvF04FAX.js} +1 -1
- package/.output/public/assets/{InspectorPet-BXOiEEuy.js → InspectorPet-CSCn4jWU.js} +1 -1
- package/.output/public/assets/ProxyViewerContainer-9mjL1YlZ.js +126 -0
- package/.output/public/assets/{ReplayDialog-ChEc6SEZ.js → ReplayDialog-DWJkKTDB.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-Ur266kvo.js → RequestAnatomy-CDFI55pJ.js} +1 -1
- package/.output/public/assets/{ResponseView-JmIcAvf3.js → ResponseView-tlIj9vRr.js} +1 -1
- package/.output/public/assets/{StreamingChunkSequence-BxRDf8X0.js → StreamingChunkSequence-C7Ntivbf.js} +1 -1
- package/.output/public/assets/{_sessionId-BcTM61oL.js → _sessionId-BbrBvkvn.js} +1 -1
- package/.output/public/assets/{_sessionId-T0zMdPhW.js → _sessionId-DUL-l56X.js} +1 -1
- package/.output/public/assets/{index-DoGM_H4R.js → index-By0CyDmk.js} +1 -1
- package/.output/public/assets/{index-nPB39bG1.js → index-CEdulUJ3.js} +3 -3
- package/.output/public/assets/index-DCj1X8Qt.css +1 -0
- package/.output/public/assets/{index-DXzxeHNI.js → index-DF6bouqm.js} +1 -1
- package/.output/public/assets/{index-BCy0oH7t.js → index-e-fWO2Du.js} +1 -1
- package/.output/public/assets/{json-viewer-AR5MqNsi.js → json-viewer-0fOrL_Cz.js} +1 -1
- package/.output/public/assets/{jszip.min-Dp1qaNzl.js → jszip.min-2Bsoez0Q.js} +1 -1
- package/.output/server/_libs/lucide-react.mjs +69 -69
- package/.output/server/_libs/radix-ui__react-id.mjs +1 -1
- package/.output/server/{_sessionId-3-efukTe.mjs → _sessionId-D-GcecKN.mjs} +23 -23
- package/.output/server/{_sessionId-D0V28kT_.mjs → _sessionId-DzY1bB_L.mjs} +1 -1
- package/.output/server/_ssr/{CompareDrawer-CwUnVrgf.mjs → CompareDrawer-BXm8BitS.mjs} +24 -24
- package/.output/server/_ssr/{InspectorPet-DEPoGC_D.mjs → InspectorPet-CZUOr9sO.mjs} +1 -1
- package/.output/server/_ssr/{ProxyViewerContainer-DT2GnM6k.mjs → ProxyViewerContainer-BAQY5x_x.mjs} +185 -152
- package/.output/server/_ssr/{ReplayDialog-DWjyvYZk.mjs → ReplayDialog-BOODYnLb.mjs} +25 -25
- package/.output/server/_ssr/{RequestAnatomy-DstKoDNo.mjs → RequestAnatomy-Bd2OBiJP.mjs} +24 -24
- package/.output/server/_ssr/{ResponseView-_dBVL1_Y.mjs → ResponseView-ZSjpdHLG.mjs} +24 -24
- package/.output/server/_ssr/{StreamingChunkSequence-Dv3MUYgf.mjs → StreamingChunkSequence-BT-yQGLL.mjs} +24 -24
- package/.output/server/_ssr/{index-DmUQkdzY.mjs → index-CSJlUfwz.mjs} +1 -1
- package/.output/server/_ssr/{index-D9TfBt-A.mjs → index-CXouA5fR.mjs} +23 -23
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-CWGsCD5R.mjs → json-viewer-DF2oLr4x.mjs} +24 -24
- package/.output/server/_ssr/{router-BGaTQE2M.mjs → router-75eycvXZ.mjs} +11 -11
- package/.output/server/{_tanstack-start-manifest_v-BjoievXr.mjs → _tanstack-start-manifest_v-DjCobDeN.mjs} +1 -1
- package/.output/server/index.mjs +97 -97
- package/package.json +7 -1
- package/src/components/ProxyViewer.tsx +97 -127
- package/src/components/pi-agent/PiAgentPanel.tsx +99 -33
- package/src/components/pi-agent/piAgentChatLogic.ts +10 -0
- package/src/services/piAgent.ts +7 -5
- package/.output/public/assets/ProxyViewerContainer-F4pd4poo.js +0 -126
- package/.output/public/assets/index-D17dU-mX.css +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
2
|
import { r as reactDomExports } from "../_libs/react-dom.mjs";
|
|
3
|
-
import { m as cn, ac as CrabLogo } from "./router-
|
|
3
|
+
import { m as cn, ac as CrabLogo } from "./router-75eycvXZ.mjs";
|
|
4
4
|
import { W as WebGLRenderer, S as SRGBColorSpace, A as ACESFilmicToneMapping, a as Scene, O as OrthographicCamera, M as MeshPhysicalMaterial, C as Color, G as Group, b as Mesh, c as CircleGeometry, d as MeshBasicMaterial, e as SphereGeometry, f as AmbientLight, H as HemisphereLight, D as DirectionalLight, P as PointLight, V as Vector3, g as CylinderGeometry } from "../_libs/three.mjs";
|
|
5
5
|
import "node:crypto";
|
|
6
6
|
import "node:path";
|
package/.output/server/_ssr/{ProxyViewerContainer-DT2GnM6k.mjs → ProxyViewerContainer-BAQY5x_x.mjs}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports, R as React } from "../_libs/react.mjs";
|
|
2
|
-
import { C as CapturedLogSchema, M as DeleteInspectorGroupsResponseSchema, 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, m as cn, F as LazyFeatureBoundary, x as formatTokens, B as Button, d as RuntimeConfigSchema, g as readStoredUiScalePreference, h as persistUiScalePreference, j as applyUiScalePreference, ac as CrabLogo, p as packageJson, k as normalizeUiScalePreference, N as GroupEvidenceExportResultSchema, P as DeleteInspectorGroupResponseSchema, y as copyTextToClipboard, l as RedactedProviderDtoSchema, U as UI_SCALE_STORAGE_KEY, v as apiFormatForPath, i as isRecord, a2 as createPendingProviderTestResults, a3 as ProviderTestResultsSchema, a4 as createFailedProviderTestResults, a5 as MAX_SLOW_RESPONSE_THRESHOLD_SECONDS, a6 as MAX_PROVIDER_TEST_TIMEOUT_SECONDS, a7 as TimeDisplayFormatSchema, G as AlertSummarySchema, H as AlertListResponseSchema, r as readStoredThemeMode, e as applyThemeMode, f as persistThemeMode, af as formatUiScale, J as InspectorGroupsListResponseSchema, I as GroupEvidenceReadResponseSchema, a8 as EcosystemPackagesResponseSchema, a9 as EcosystemTaskResponseSchema, aa as EcosystemTasksResponseSchema, Y as PATH_V1_MESSAGES, Z as PATH_V1_CHAT_COMPLETIONS, _ as PATH_V1_RESPONSES, V as providerHasContextMetadata, Q as ProviderScanResponseSchema, T as THEME_MODE_STORAGE_KEY, n as normalizeThemeMode, ab as EcosystemExecutionConfirmationResponseSchema,
|
|
2
|
+
import { C as CapturedLogSchema, M as DeleteInspectorGroupsResponseSchema, 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, m as cn, F as LazyFeatureBoundary, x as formatTokens, B as Button, d as RuntimeConfigSchema, g as readStoredUiScalePreference, h as persistUiScalePreference, j as applyUiScalePreference, ac as CrabLogo, p as packageJson, k as normalizeUiScalePreference, N as GroupEvidenceExportResultSchema, P as DeleteInspectorGroupResponseSchema, y as copyTextToClipboard, l as RedactedProviderDtoSchema, U as UI_SCALE_STORAGE_KEY, v as apiFormatForPath, i as isRecord, a2 as createPendingProviderTestResults, a3 as ProviderTestResultsSchema, a4 as createFailedProviderTestResults, a5 as MAX_SLOW_RESPONSE_THRESHOLD_SECONDS, a6 as MAX_PROVIDER_TEST_TIMEOUT_SECONDS, a7 as TimeDisplayFormatSchema, G as AlertSummarySchema, H as AlertListResponseSchema, r as readStoredThemeMode, e as applyThemeMode, f as persistThemeMode, af as formatUiScale, J as InspectorGroupsListResponseSchema, I as GroupEvidenceReadResponseSchema, a8 as EcosystemPackagesResponseSchema, a9 as EcosystemTaskResponseSchema, aa as EcosystemTasksResponseSchema, Y as PATH_V1_MESSAGES, Z as PATH_V1_CHAT_COMPLETIONS, _ as PATH_V1_RESPONSES, V as providerHasContextMetadata, Q as ProviderScanResponseSchema, s as safeGetOwnProperty, T as THEME_MODE_STORAGE_KEY, n as normalizeThemeMode, ab as EcosystemExecutionConfirmationResponseSchema, $ as formatContextWindowInput, W as findProviderModelMetadata, X as formatContextWindowTokens, w as getSessionPath, q as parseOpenAIResponse, t as parseOpenAIResponsesResponse, O as OpenAIRequestSchema, u as OpenAIResponsesRequestSchema, A as AnthropicResponseSchema$1, o as AnthropicRequestSchema, ad as resolveProviderContextWindow, a0 as parseContextWindowTokensInput, a1 as previewUpstreamUrl, K as KnowledgeCandidateSchema, ae as isPlainRecord, E as stripClaudeCodeBillingHeader, L as LogBodyChunkSchema, z as getStatusCategory } from "./router-75eycvXZ.mjs";
|
|
3
3
|
import { u as useSWR, a as useSWRConfig } from "../_libs/swr.mjs";
|
|
4
4
|
import { u as useWindowVirtualizer, a as useVirtualizer } from "../_libs/tanstack__react-virtual.mjs";
|
|
5
5
|
import { c as cva } from "../_libs/class-variance-authority.mjs";
|
|
6
6
|
import { d as diffJson, a as diffLines } from "../_libs/diff.mjs";
|
|
7
|
-
import { T as TriangleAlert, C as CircleCheck, X, P as PanelRightOpen, a as PanelRightClose,
|
|
7
|
+
import { T as TriangleAlert, C as CircleCheck, X, P as PanelRightOpen, a as PanelRightClose, U as Upload, D as Download, F as FileBraces, R as RefreshCw, b as Trash2, I as Info, c as ChevronDown, d as Check, S as Settings, e as Siren, L as LoaderCircle, B as BrainCircuit, f as RotateCcw, g as Sparkles, h as Send, i as Sun, E as Eye, M as Moon, A as ALargeSmall, j as Layers, k as FlaskConical, l as Activity, m as Beaker, N as Network, n as Copy, o as Terminal, p as ArrowLeft, q as ChevronUp, r as ChevronsLeft, s as ChevronLeft, t as ChevronRight, u as ChevronsRight, v as CircleStop, w as Clapperboard, x as Flag, y as Timer, G as Gauge, z as Minimize2, H as Maximize2, J as Scan, K as Plus, O as CircleAlert, Q as Rocket, V as PackageCheck, W as History, Y as Monitor, Z as EyeOff, _ as ExternalLink, $ as Clock, a0 as RotateCw, a1 as CircleCheckBig, a2 as Pencil, a3 as Bell, a4 as Clock3, a5 as ShieldAlert, a6 as ArrowUpRight, a7 as ArrowDownRight, a8 as CodeXml, a9 as Cpu, aa as FolderOpen, ab as MessageSquare, ac as Zap, ad as Wrench, ae as Brain, af as Minus, ag as CircleQuestionMark, ah as Server, ai as Lock, aj as Wifi, ak as WifiOff, al as CircleX, am as ShieldCheck, an as Save, ao as FileSearch, ap as CloudUpload, aq as OctagonAlert, ar as Radio, as as Globe, at as FileTerminal, au as ChevronsUp, av as ChevronsDown, aw as FileDiff, ax as Search, ay as GitCompareArrows, az as ArrowUp, aA as ArrowDown, aB as Ellipsis, aC as Blocks, aD as MousePointerClick, aE as FileText, aF as Rows3, aG as Columns2 } from "../_libs/lucide-react.mjs";
|
|
8
8
|
import { u as union, o as object, e as array, l as literal, n as number, d as boolean, b as string } from "../_libs/zod.mjs";
|
|
9
|
-
import { S as Select$1, a as SelectTrigger$1, b as SelectIcon, c as SelectValue$1, d as SelectPortal, e as SelectContent$1, f as SelectViewport, g as SelectItem$1, h as SelectItemIndicator, i as SelectItemText, j as SelectScrollUpButton$1, k as SelectScrollDownButton$1 } from "../_libs/radix-ui__react-select.mjs";
|
|
10
9
|
import { D as Dialog$1, a as DialogContent$1, b as DialogClose, c as DialogTitle$1, d as DialogDescription$1, e as DialogTrigger$1, f as DialogPortal$1, g as DialogOverlay$1 } from "../_libs/radix-ui__react-dialog.mjs";
|
|
11
10
|
import { R as Root2, C as Content, L as List, T as Trigger } from "../_libs/radix-ui__react-tabs.mjs";
|
|
12
11
|
import { S as Slot } from "../_libs/radix-ui__react-slot.mjs";
|
|
12
|
+
import { S as Select$1, a as SelectTrigger$1, b as SelectIcon, c as SelectValue$1, d as SelectPortal, e as SelectContent$1, f as SelectViewport, g as SelectItem$1, h as SelectItemIndicator, i as SelectItemText, j as SelectScrollUpButton$1, k as SelectScrollDownButton$1 } from "../_libs/radix-ui__react-select.mjs";
|
|
13
13
|
import { P as Provider, R as Root3, T as Trigger$1, a as Portal, C as Content2, A as Arrow2 } from "../_libs/radix-ui__react-tooltip.mjs";
|
|
14
14
|
import { R as Root, C as CollapsibleContent$1, a as CollapsibleTrigger$1 } from "../_libs/radix-ui__react-collapsible.mjs";
|
|
15
15
|
import { R as Root$1, V as Viewport, C as Corner, S as ScrollAreaScrollbar, a as ScrollAreaThumb } from "../_libs/radix-ui__react-scroll-area.mjs";
|
|
@@ -2504,30 +2504,30 @@ function useCopyFeedback(text) {
|
|
|
2504
2504
|
return { copied, copy };
|
|
2505
2505
|
}
|
|
2506
2506
|
const LazyCompareDrawer = reactExports.lazy(
|
|
2507
|
-
() => import("./CompareDrawer-
|
|
2507
|
+
() => import("./CompareDrawer-BXm8BitS.mjs").then((m) => ({ default: m.CompareDrawer }))
|
|
2508
2508
|
);
|
|
2509
2509
|
const LazyInspectorPet = reactExports.lazy(
|
|
2510
|
-
() => import("./InspectorPet-
|
|
2510
|
+
() => import("./InspectorPet-CZUOr9sO.mjs").then((m) => ({ default: m.InspectorPet }))
|
|
2511
2511
|
);
|
|
2512
2512
|
const LazyReplayDialog = reactExports.lazy(
|
|
2513
|
-
() => import("./ReplayDialog-
|
|
2513
|
+
() => import("./ReplayDialog-BOODYnLb.mjs").then((m) => ({ default: m.ReplayDialog }))
|
|
2514
2514
|
);
|
|
2515
2515
|
const LazyRequestAnatomy = reactExports.lazy(
|
|
2516
|
-
() => import("./RequestAnatomy-
|
|
2516
|
+
() => import("./RequestAnatomy-Bd2OBiJP.mjs").then((m) => ({ default: m.RequestAnatomy }))
|
|
2517
2517
|
);
|
|
2518
2518
|
const LazyResponseView = reactExports.lazy(
|
|
2519
|
-
() => import("./ResponseView-
|
|
2519
|
+
() => import("./ResponseView-ZSjpdHLG.mjs").then((m) => ({ default: m.ResponseView }))
|
|
2520
2520
|
);
|
|
2521
2521
|
const LazyStreamingChunkSequence = reactExports.lazy(
|
|
2522
|
-
() => import("./StreamingChunkSequence-
|
|
2522
|
+
() => import("./StreamingChunkSequence-BT-yQGLL.mjs").then((m) => ({
|
|
2523
2523
|
default: m.StreamingChunkSequence
|
|
2524
2524
|
}))
|
|
2525
2525
|
);
|
|
2526
2526
|
const LazyJsonViewer = reactExports.lazy(
|
|
2527
|
-
() => import("./json-viewer-
|
|
2527
|
+
() => import("./json-viewer-DF2oLr4x.mjs").then((m) => ({ default: m.JsonViewer }))
|
|
2528
2528
|
);
|
|
2529
2529
|
const LazyJsonViewerFromString = reactExports.lazy(
|
|
2530
|
-
() => import("./json-viewer-
|
|
2530
|
+
() => import("./json-viewer-DF2oLr4x.mjs").then((m) => ({ default: m.JsonViewerFromString }))
|
|
2531
2531
|
);
|
|
2532
2532
|
const HIGHLIGHT_DURATION_MS = 1200;
|
|
2533
2533
|
const MAX_HIGHLIGHT_ATTEMPTS = 12;
|
|
@@ -12277,6 +12277,13 @@ function AgentLabDialog({ currentSessionId, logCount }) {
|
|
|
12277
12277
|
)
|
|
12278
12278
|
] });
|
|
12279
12279
|
}
|
|
12280
|
+
function getPiAgentResultLogIds(response) {
|
|
12281
|
+
return [
|
|
12282
|
+
...new Set(
|
|
12283
|
+
response.evidence.map((evidence) => evidence.logId).filter((logId) => logId !== null)
|
|
12284
|
+
)
|
|
12285
|
+
];
|
|
12286
|
+
}
|
|
12280
12287
|
const PI_AGENT_SCOPE_PILLS = [
|
|
12281
12288
|
{
|
|
12282
12289
|
id: "saved-data",
|
|
@@ -12485,12 +12492,32 @@ function sortProviderBySource(providers) {
|
|
|
12485
12492
|
function nextMessageId(role) {
|
|
12486
12493
|
return `${role}-${String(Date.now())}-${String(Math.random()).slice(2)}`;
|
|
12487
12494
|
}
|
|
12495
|
+
function TerminalLabel({
|
|
12496
|
+
label,
|
|
12497
|
+
value,
|
|
12498
|
+
tone = "muted"
|
|
12499
|
+
}) {
|
|
12500
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 items-center gap-1.5 font-mono text-[10px]", children: [
|
|
12501
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tone === "cyan" ? "text-cyan-100" : "text-muted-foreground", children: label }),
|
|
12502
|
+
value !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
12503
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground/55", children: ":" }),
|
|
12504
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate text-muted-foreground", children: value })
|
|
12505
|
+
] })
|
|
12506
|
+
] });
|
|
12507
|
+
}
|
|
12488
12508
|
function MetricStrip({ metrics }) {
|
|
12489
12509
|
if (metrics.length === 0) return null;
|
|
12490
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "
|
|
12491
|
-
|
|
12492
|
-
|
|
12493
|
-
|
|
12510
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-2 gap-1.5", children: metrics.slice(0, 8).map((metric) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
12511
|
+
"div",
|
|
12512
|
+
{
|
|
12513
|
+
className: "rounded-sm bg-black/25 px-2 py-1 shadow-[inset_2px_0_0_rgba(103,232,249,0.22)]",
|
|
12514
|
+
children: [
|
|
12515
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "truncate font-mono text-[9px] text-muted-foreground", children: metric.label }),
|
|
12516
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "truncate font-mono text-[11px] text-cyan-50/95", children: metric.value })
|
|
12517
|
+
]
|
|
12518
|
+
},
|
|
12519
|
+
metric.key
|
|
12520
|
+
)) });
|
|
12494
12521
|
}
|
|
12495
12522
|
function EvidenceCard({ evidence }) {
|
|
12496
12523
|
const openLog = () => {
|
|
@@ -12504,7 +12531,7 @@ function EvidenceCard({ evidence }) {
|
|
|
12504
12531
|
type: "button",
|
|
12505
12532
|
onClick: openLog,
|
|
12506
12533
|
disabled: evidence.logId === null,
|
|
12507
|
-
className: "w-full rounded-sm bg-black/
|
|
12534
|
+
className: "w-full rounded-sm bg-black/25 px-2 py-2 text-left shadow-[inset_2px_0_0_rgba(103,232,249,0.22),inset_0_0_0_1px_rgba(255,255,255,0.045)] transition-colors hover:bg-black/35 disabled:cursor-default disabled:hover:bg-black/25",
|
|
12508
12535
|
children: [
|
|
12509
12536
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 items-center justify-between gap-2", children: [
|
|
12510
12537
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate font-mono text-[10px] text-cyan-100", children: title }),
|
|
@@ -12528,31 +12555,49 @@ function EvidenceCard({ evidence }) {
|
|
|
12528
12555
|
);
|
|
12529
12556
|
}
|
|
12530
12557
|
function AssistantMessage({ response }) {
|
|
12531
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-md bg-
|
|
12532
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
response.protocol,
|
|
12539
|
-
" /",
|
|
12540
|
-
" ",
|
|
12541
|
-
String(response.logCount),
|
|
12542
|
-
" matched logs"
|
|
12558
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "overflow-hidden rounded-md bg-[#050b12]/85 shadow-[inset_0_0_0_1px_rgba(103,232,249,0.12),0_10px_24px_rgba(0,0,0,0.18)]", children: [
|
|
12559
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 items-center justify-between gap-2 border-b border-cyan-100/[0.08] bg-cyan-400/[0.045] px-3 py-2", children: [
|
|
12560
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TerminalLabel, { label: "assistant@inspector", value: "output", tone: "cyan" }),
|
|
12561
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "shrink-0 font-mono text-[9px] text-muted-foreground", children: [
|
|
12562
|
+
String(response.logCount),
|
|
12563
|
+
" logs"
|
|
12564
|
+
] })
|
|
12543
12565
|
] }),
|
|
12544
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
12545
|
-
|
|
12546
|
-
|
|
12566
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-3 p-3", children: [
|
|
12567
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "rounded-sm bg-black/20 px-2.5 py-2 text-xs leading-5 shadow-[inset_2px_0_0_rgba(103,232,249,0.28)]", children: /* @__PURE__ */ jsxRuntimeExports.jsx(AnswerMarkdown, { text: response.answer }) }),
|
|
12568
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid gap-1.5 rounded-sm bg-black/20 px-2 py-1.5", children: [
|
|
12569
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TerminalLabel, { label: "provider", value: response.providerName }),
|
|
12570
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TerminalLabel, { label: "model", value: response.model }),
|
|
12571
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TerminalLabel, { label: "protocol", value: response.protocol })
|
|
12572
|
+
] }),
|
|
12573
|
+
(response.summaryMetrics.length > 0 || response.queryMetrics.length > 0) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5", children: [
|
|
12574
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TerminalLabel, { label: "metrics", tone: "cyan" }),
|
|
12575
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(MetricStrip, { metrics: [...response.summaryMetrics, ...response.queryMetrics] })
|
|
12576
|
+
] }),
|
|
12577
|
+
response.evidence.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5", children: [
|
|
12578
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TerminalLabel, { label: "evidence", value: "click to inspect source log", tone: "cyan" }),
|
|
12579
|
+
response.evidence.slice(0, 6).map((evidence) => /* @__PURE__ */ jsxRuntimeExports.jsx(EvidenceCard, { evidence }, `${evidence.source}-${evidence.id}`))
|
|
12580
|
+
] })
|
|
12581
|
+
] })
|
|
12547
12582
|
] });
|
|
12548
12583
|
}
|
|
12549
12584
|
function ConversationMessage({ message }) {
|
|
12550
12585
|
if (message.role === "assistant" && message.response !== null) {
|
|
12551
12586
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(AssistantMessage, { response: message.response });
|
|
12552
12587
|
}
|
|
12553
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
12588
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "overflow-hidden rounded-md bg-black/25 shadow-[inset_0_0_0_1px_rgba(255,255,255,0.055)]", children: [
|
|
12589
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-b border-white/[0.06] px-3 py-1.5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(TerminalLabel, { label: "user@inspector", value: "query", tone: "cyan" }) }),
|
|
12590
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-3 py-2 font-mono text-[11px] leading-5 text-cyan-50", children: [
|
|
12591
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "select-none text-cyan-100/60", children: "> " }),
|
|
12592
|
+
message.content
|
|
12593
|
+
] })
|
|
12594
|
+
] });
|
|
12554
12595
|
}
|
|
12555
|
-
function PiAgentPanel({
|
|
12596
|
+
function PiAgentPanel({
|
|
12597
|
+
currentSessionId,
|
|
12598
|
+
logCount,
|
|
12599
|
+
onResultChange
|
|
12600
|
+
}) {
|
|
12556
12601
|
const { providers } = useProviders();
|
|
12557
12602
|
const piProviders = reactExports.useMemo(
|
|
12558
12603
|
() => sortProviderBySource(providers.filter(providerSupportsPiAgent)),
|
|
@@ -12578,6 +12623,7 @@ function PiAgentPanel({ currentSessionId, logCount }) {
|
|
|
12578
12623
|
};
|
|
12579
12624
|
const resetConversation = () => {
|
|
12580
12625
|
setConversation({ ...createEmptyPiAgentConversation(), question: DEFAULT_QUESTION });
|
|
12626
|
+
onResultChange(null);
|
|
12581
12627
|
};
|
|
12582
12628
|
const setStarter = (questionText) => {
|
|
12583
12629
|
setConversation((current) => ({ ...current, question: questionText, error: null }));
|
|
@@ -12619,7 +12665,7 @@ function PiAgentPanel({ currentSessionId, logCount }) {
|
|
|
12619
12665
|
if (!response.ok) {
|
|
12620
12666
|
setConversation((current) => ({
|
|
12621
12667
|
...current,
|
|
12622
|
-
error: `
|
|
12668
|
+
error: `Inspector Assistant failed: HTTP ${String(response.status)} ${raw}`
|
|
12623
12669
|
}));
|
|
12624
12670
|
return;
|
|
12625
12671
|
}
|
|
@@ -12628,7 +12674,7 @@ function PiAgentPanel({ currentSessionId, logCount }) {
|
|
|
12628
12674
|
if (normalized === null) {
|
|
12629
12675
|
setConversation((current) => ({
|
|
12630
12676
|
...current,
|
|
12631
|
-
error: "
|
|
12677
|
+
error: "Inspector Assistant returned an unexpected response."
|
|
12632
12678
|
}));
|
|
12633
12679
|
return;
|
|
12634
12680
|
}
|
|
@@ -12644,10 +12690,15 @@ function PiAgentPanel({ currentSessionId, logCount }) {
|
|
|
12644
12690
|
}
|
|
12645
12691
|
]
|
|
12646
12692
|
}));
|
|
12693
|
+
onResultChange({
|
|
12694
|
+
question: trimmedQuestion,
|
|
12695
|
+
logIds: getPiAgentResultLogIds(normalized),
|
|
12696
|
+
reportedLogCount: normalized.logCount
|
|
12697
|
+
});
|
|
12647
12698
|
}).catch((err) => {
|
|
12648
12699
|
setConversation((current) => ({
|
|
12649
12700
|
...current,
|
|
12650
|
-
error: err instanceof Error ? err.message : "
|
|
12701
|
+
error: err instanceof Error ? err.message : "Inspector Assistant request failed."
|
|
12651
12702
|
}));
|
|
12652
12703
|
}).finally(() => {
|
|
12653
12704
|
setLoading(false);
|
|
@@ -12657,8 +12708,8 @@ function PiAgentPanel({ currentSessionId, logCount }) {
|
|
|
12657
12708
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
12658
12709
|
/* @__PURE__ */ jsxRuntimeExports.jsx(BrainCircuit, { className: "size-4 text-cyan-200" }),
|
|
12659
12710
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
12660
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-semibold text-foreground", children: "
|
|
12661
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-[11px] text-muted-foreground", children: currentSessionId === null ? "
|
|
12711
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-semibold text-foreground", children: "Search with Assistant" }),
|
|
12712
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-[11px] text-muted-foreground", children: currentSessionId === null ? "Search all Inspector evidence" : "Search this session" })
|
|
12662
12713
|
] }),
|
|
12663
12714
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12664
12715
|
"button",
|
|
@@ -12672,7 +12723,7 @@ function PiAgentPanel({ currentSessionId, logCount }) {
|
|
|
12672
12723
|
)
|
|
12673
12724
|
] }),
|
|
12674
12725
|
conversation.messages.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-3 rounded-md bg-black/[0.18] px-3 py-2 shadow-[inset_0_0_0_1px_rgba(255,255,255,0.045)]", children: [
|
|
12675
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[11px] leading-5 text-muted-foreground", children: "
|
|
12726
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[11px] leading-5 text-muted-foreground", children: "Describe the traffic you want to find in plain language. Assistant searches saved traffic, sessions, tools, alerts, runs, groups, and knowledge, then uses linked evidence to shape the log results." }),
|
|
12676
12727
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2 grid gap-1.5", children: PI_AGENT_SCOPE_PILLS.map((pill) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
12677
12728
|
"div",
|
|
12678
12729
|
{
|
|
@@ -12733,7 +12784,7 @@ function PiAgentPanel({ currentSessionId, logCount }) {
|
|
|
12733
12784
|
value: question,
|
|
12734
12785
|
onChange: handleQuestionChange,
|
|
12735
12786
|
className: "mt-3 min-h-20 w-full resize-y rounded-md bg-black/25 px-3 py-2 text-xs leading-5 text-foreground outline-none shadow-[inset_0_0_0_1px_rgba(255,255,255,0.06)] transition-colors placeholder:text-muted-foreground focus-visible:ring-1 focus-visible:ring-ring",
|
|
12736
|
-
placeholder: "
|
|
12787
|
+
placeholder: "Search failures, slow requests, token spikes, tool calls..."
|
|
12737
12788
|
}
|
|
12738
12789
|
),
|
|
12739
12790
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -12745,13 +12796,13 @@ function PiAgentPanel({ currentSessionId, logCount }) {
|
|
|
12745
12796
|
className: "mt-2 inline-flex h-8 w-full items-center justify-center gap-2 rounded-md bg-cyan-400/12 px-3 text-xs font-medium text-cyan-100 shadow-[inset_0_0_0_1px_rgba(103,232,249,0.18)] transition-colors hover:bg-cyan-400/18 disabled:cursor-not-allowed disabled:opacity-50",
|
|
12746
12797
|
children: [
|
|
12747
12798
|
loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Send, { className: "size-3.5" }),
|
|
12748
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: loading ? "
|
|
12799
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: loading ? "Searching..." : "Search logs" })
|
|
12749
12800
|
]
|
|
12750
12801
|
}
|
|
12751
12802
|
),
|
|
12752
12803
|
conversation.error !== null && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 break-words text-[11px] leading-5 text-red-200", children: conversation.error }),
|
|
12753
|
-
piProviders.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-[11px] leading-5 text-muted-foreground", children: "Configure a Provider with Responses, Chat, or Anthropic URL to enable
|
|
12754
|
-
logCount === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-[11px] leading-5 text-muted-foreground", children: "No logs are visible in this scope yet;
|
|
12804
|
+
piProviders.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-[11px] leading-5 text-muted-foreground", children: "Configure a Provider with Responses, Chat, or Anthropic URL to enable Inspector Assistant." }),
|
|
12805
|
+
logCount === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-[11px] leading-5 text-muted-foreground", children: "No logs are visible in this scope yet; Inspector Assistant can still answer Provider setup questions." })
|
|
12755
12806
|
] });
|
|
12756
12807
|
}
|
|
12757
12808
|
function computeCacheTrends(groups) {
|
|
@@ -15780,11 +15831,9 @@ function SessionContextBar({
|
|
|
15780
15831
|
function ProxyViewer({
|
|
15781
15832
|
logs,
|
|
15782
15833
|
sessions,
|
|
15783
|
-
models,
|
|
15784
15834
|
selectedSession,
|
|
15785
15835
|
selectedModel,
|
|
15786
15836
|
onSessionChange,
|
|
15787
|
-
onModelChange,
|
|
15788
15837
|
onClearAll,
|
|
15789
15838
|
onDeleteCurrentView,
|
|
15790
15839
|
onReloadSession,
|
|
@@ -15822,6 +15871,9 @@ function ProxyViewer({
|
|
|
15822
15871
|
const [detailsPanelStorageLoaded, setDetailsPanelStorageLoaded] = reactExports.useState(false);
|
|
15823
15872
|
const [petVisible, setPetVisible] = reactExports.useState(true);
|
|
15824
15873
|
const [petVisibilityStorageLoaded, setPetVisibilityStorageLoaded] = reactExports.useState(false);
|
|
15874
|
+
const [assistantSearchResult, setAssistantSearchResult] = reactExports.useState(
|
|
15875
|
+
null
|
|
15876
|
+
);
|
|
15825
15877
|
const [comparePair, setComparePair] = reactExports.useState(null);
|
|
15826
15878
|
const logListRef = reactExports.useRef(null);
|
|
15827
15879
|
const logListWrapperRef = reactExports.useRef(null);
|
|
@@ -15956,6 +16008,7 @@ function ProxyViewer({
|
|
|
15956
16008
|
reactExports.useEffect(() => {
|
|
15957
16009
|
cancelTransientTasks();
|
|
15958
16010
|
setComparePair(null);
|
|
16011
|
+
setAssistantSearchResult(null);
|
|
15959
16012
|
}, [cancelTransientTasks, selectedSession, selectedModel]);
|
|
15960
16013
|
const handleClearCurrentView = reactExports.useCallback(() => {
|
|
15961
16014
|
cancelTransientTasks();
|
|
@@ -16004,7 +16057,15 @@ function ProxyViewer({
|
|
|
16004
16057
|
const togglePetVisibility = reactExports.useCallback(() => {
|
|
16005
16058
|
setPetVisible((value) => !value);
|
|
16006
16059
|
}, []);
|
|
16007
|
-
const
|
|
16060
|
+
const assistantResultLogIds = reactExports.useMemo(
|
|
16061
|
+
() => assistantSearchResult === null ? null : new Set(assistantSearchResult.logIds),
|
|
16062
|
+
[assistantSearchResult]
|
|
16063
|
+
);
|
|
16064
|
+
const displayedLogs = reactExports.useMemo(
|
|
16065
|
+
() => assistantResultLogIds === null ? logs : logs.filter((log) => assistantResultLogIds.has(log.id)),
|
|
16066
|
+
[assistantResultLogIds, logs]
|
|
16067
|
+
);
|
|
16068
|
+
const groups = reactExports.useMemo(() => groupLogsByConversation(displayedLogs), [displayedLogs]);
|
|
16008
16069
|
const displayNumberByLogId = reactExports.useMemo(() => buildDisplayNumberByLogId(groups), [groups]);
|
|
16009
16070
|
const sessionContextScope = reactExports.useMemo(
|
|
16010
16071
|
() => resolveSessionContextScope({ pinnedSessionId, selectedSession, sessions, logs }),
|
|
@@ -16029,20 +16090,18 @@ function ProxyViewer({
|
|
|
16029
16090
|
const deleteTargetLabel = selectedSession === "__all__" ? "all sessions" : "this session";
|
|
16030
16091
|
const deleteTargetDescription = selectedSession === "__all__" ? "Deletes every stored log, streaming chunk, and session archive entry across all sessions." : "Deletes every stored log, streaming chunk, and session archive entry for this session, including history that is not currently loaded.";
|
|
16031
16092
|
const reloadSessionLabel = logs.length === 0 ? "Load" : "Reload";
|
|
16032
|
-
const sessionInputValue = selectedSession === "__all__" ? "" : selectedSession;
|
|
16033
|
-
const sessionSelectValue = selectedSession === "__all__" || sessions.includes(selectedSession) ? selectedSession : "__typed__";
|
|
16034
16093
|
const activeScopeLabel = hasSessionContext && sessionContextScope !== null ? truncateSessionId(sessionContextScope.label) : selectedSession === "__all__" ? "All sessions" : truncateSessionId(selectedSession);
|
|
16035
16094
|
const liveEmptyState = resolveLiveEmptyState(liveConnection);
|
|
16036
16095
|
const liveEmptyStateCopy = getLiveEmptyStateCopy(liveEmptyState);
|
|
16037
16096
|
const slateStats = reactExports.useMemo(
|
|
16038
16097
|
() => buildSessionSlateStats({
|
|
16039
|
-
logs,
|
|
16098
|
+
logs: displayedLogs,
|
|
16040
16099
|
conversationGroups: groups,
|
|
16041
16100
|
isLoading,
|
|
16042
16101
|
timeDisplayFormat,
|
|
16043
16102
|
slowResponseThresholdSeconds
|
|
16044
16103
|
}),
|
|
16045
|
-
[groups, isLoading,
|
|
16104
|
+
[displayedLogs, groups, isLoading, slowResponseThresholdSeconds, timeDisplayFormat]
|
|
16046
16105
|
);
|
|
16047
16106
|
const handleCompareWithPrevious = reactExports.useCallback(
|
|
16048
16107
|
(log) => {
|
|
@@ -16051,20 +16110,6 @@ function ProxyViewer({
|
|
|
16051
16110
|
},
|
|
16052
16111
|
[comparisonPredecessors]
|
|
16053
16112
|
);
|
|
16054
|
-
const handleSessionInputChange = reactExports.useCallback(
|
|
16055
|
-
(event) => {
|
|
16056
|
-
const value = event.currentTarget.value.trim();
|
|
16057
|
-
onSessionChange(value === "" ? "__all__" : value);
|
|
16058
|
-
},
|
|
16059
|
-
[onSessionChange]
|
|
16060
|
-
);
|
|
16061
|
-
const handleSessionSelectChange = reactExports.useCallback(
|
|
16062
|
-
(value) => {
|
|
16063
|
-
if (value === "__typed__") return;
|
|
16064
|
-
onSessionChange(value);
|
|
16065
|
-
},
|
|
16066
|
-
[onSessionChange]
|
|
16067
|
-
);
|
|
16068
16113
|
const labSessionId = pinnedSessionId !== void 0 ? pinnedSessionId : selectedSession === "__all__" ? null : selectedSession;
|
|
16069
16114
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-background min-h-screen w-full overflow-x-clip text-foreground lg:h-screen lg:flex lg:flex-col lg:overflow-hidden", children: [
|
|
16070
16115
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -16102,22 +16147,34 @@ function ProxyViewer({
|
|
|
16102
16147
|
),
|
|
16103
16148
|
children: [
|
|
16104
16149
|
!detailsPanelCollapsed && /* @__PURE__ */ jsxRuntimeExports.jsx("aside", { className: "bg-background/95 order-1 border-b border-white/[0.045] lg:order-2 lg:h-full lg:overflow-y-auto lg:border-b-0 lg:border-l lg:border-white/[0.055] inspector-scrollbar", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4 p-4", children: [
|
|
16105
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16106
|
-
|
|
16107
|
-
|
|
16108
|
-
|
|
16109
|
-
|
|
16110
|
-
|
|
16111
|
-
|
|
16112
|
-
|
|
16113
|
-
|
|
16114
|
-
),
|
|
16115
|
-
|
|
16116
|
-
|
|
16117
|
-
|
|
16118
|
-
|
|
16150
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16151
|
+
PiAgentPanel,
|
|
16152
|
+
{
|
|
16153
|
+
currentSessionId: labSessionId,
|
|
16154
|
+
logCount: logs.length,
|
|
16155
|
+
onResultChange: setAssistantSearchResult
|
|
16156
|
+
}
|
|
16157
|
+
),
|
|
16158
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SidebarPanel, { label: "Current scope", children: [
|
|
16159
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-2 rounded-md bg-black/20 px-3 py-2 shadow-[inset_0_1px_0_rgba(255,255,255,0.035)]", children: [
|
|
16160
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16161
|
+
"div",
|
|
16162
|
+
{
|
|
16163
|
+
className: "truncate font-mono text-xs font-semibold text-cyan-100",
|
|
16164
|
+
title: activeScopeLabel,
|
|
16165
|
+
children: activeScopeLabel
|
|
16166
|
+
}
|
|
16167
|
+
),
|
|
16168
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-1 text-[11px] text-muted-foreground", children: isPinnedSessionPage ? "Pinned session" : "Live Inspector data" })
|
|
16169
|
+
] }),
|
|
16119
16170
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
16120
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16171
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16172
|
+
SidebarMetric,
|
|
16173
|
+
{
|
|
16174
|
+
label: assistantSearchResult === null ? "Requests" : "Results",
|
|
16175
|
+
value: displayedLogs.length
|
|
16176
|
+
}
|
|
16177
|
+
),
|
|
16121
16178
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SidebarMetric, { label: "Sessions", value: sessions.length }),
|
|
16122
16179
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16123
16180
|
SidebarMetric,
|
|
@@ -16136,18 +16193,19 @@ function ProxyViewer({
|
|
|
16136
16193
|
] }),
|
|
16137
16194
|
sessionLoadProgress !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2 rounded-md bg-black/20 px-2 py-2 shadow-[inset_0_0_0_1px_rgba(255,255,255,0.045)]", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SessionLoadProgressBar, { progress: sessionLoadProgress }) })
|
|
16138
16195
|
] }),
|
|
16139
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SidebarPanel, { label: "
|
|
16196
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SidebarPanel, { label: "Tools", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
16197
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ThemeModeToggle, {}),
|
|
16140
16198
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16141
|
-
|
|
16199
|
+
UiScaleControl,
|
|
16142
16200
|
{
|
|
16143
|
-
|
|
16144
|
-
|
|
16145
|
-
|
|
16201
|
+
preference: uiScalePreference,
|
|
16202
|
+
resolvedScale: resolvedUiScale,
|
|
16203
|
+
onChange: setUiScalePreference
|
|
16146
16204
|
}
|
|
16147
16205
|
),
|
|
16148
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16206
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(GroupsDialog, {}),
|
|
16207
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AgentLabDialog, { currentSessionId: labSessionId, logCount: logs.length })
|
|
16149
16208
|
] }) }),
|
|
16150
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(PiAgentPanel, { currentSessionId: labSessionId, logCount: logs.length }),
|
|
16151
16209
|
hasSessionContext && sessionContextScope !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16152
16210
|
SessionContextBar,
|
|
16153
16211
|
{
|
|
@@ -16160,69 +16218,7 @@ function ProxyViewer({
|
|
|
16160
16218
|
showBackLink: sessionContextScope.showBackLink
|
|
16161
16219
|
}
|
|
16162
16220
|
),
|
|
16163
|
-
hasSessionContext && pinnedSessionId !== void 0 && sessionMemberships.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(SessionMembershipPanel, { memberships: sessionMemberships })
|
|
16164
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SidebarPanel, { label: "Filters", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
16165
|
-
!hideSessionFilter && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
16166
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
|
|
16167
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Search, { className: "pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
16168
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16169
|
-
"input",
|
|
16170
|
-
{
|
|
16171
|
-
type: "search",
|
|
16172
|
-
value: sessionInputValue,
|
|
16173
|
-
onChange: handleSessionInputChange,
|
|
16174
|
-
placeholder: "Paste session ID",
|
|
16175
|
-
className: "bg-black/25 hover:bg-white/[0.045] focus-visible:ring-ring h-9 w-full rounded-md px-8 font-mono text-xs text-foreground outline-none shadow-[inset_0_0_0_1px_rgba(255,255,255,0.06)] transition-colors placeholder:font-sans placeholder:text-muted-foreground focus-visible:ring-1",
|
|
16176
|
-
"aria-label": "Filter by session ID",
|
|
16177
|
-
title: "Filter by exact session ID"
|
|
16178
|
-
}
|
|
16179
|
-
),
|
|
16180
|
-
sessionInputValue !== "" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16181
|
-
"button",
|
|
16182
|
-
{
|
|
16183
|
-
type: "button",
|
|
16184
|
-
onClick: () => onSessionChange("__all__"),
|
|
16185
|
-
className: "absolute right-1.5 top-1/2 inline-flex size-6 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none",
|
|
16186
|
-
"aria-label": "Clear session filter",
|
|
16187
|
-
title: "Clear session filter",
|
|
16188
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "size-3.5" })
|
|
16189
|
-
}
|
|
16190
|
-
)
|
|
16191
|
-
] }),
|
|
16192
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: sessionSelectValue, onValueChange: handleSessionSelectChange, children: [
|
|
16193
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16194
|
-
SelectTrigger,
|
|
16195
|
-
{
|
|
16196
|
-
"aria-label": "Select a session",
|
|
16197
|
-
className: "bg-black/25 hover:bg-white/[0.045] h-9 w-full border-0 text-xs text-foreground shadow-[inset_0_0_0_1px_rgba(255,255,255,0.06)]",
|
|
16198
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "All sessions" })
|
|
16199
|
-
}
|
|
16200
|
-
),
|
|
16201
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectContent, { children: [
|
|
16202
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: "__all__", children: "All sessions" }),
|
|
16203
|
-
sessionSelectValue === "__typed__" && /* @__PURE__ */ jsxRuntimeExports.jsxs(SelectItem, { value: "__typed__", children: [
|
|
16204
|
-
"Typed: ",
|
|
16205
|
-
truncateSessionId(selectedSession)
|
|
16206
|
-
] }),
|
|
16207
|
-
sessions.map((s) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: s, children: truncateSessionId(s) }, s))
|
|
16208
|
-
] })
|
|
16209
|
-
] })
|
|
16210
|
-
] }),
|
|
16211
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: selectedModel, onValueChange: onModelChange, children: [
|
|
16212
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16213
|
-
SelectTrigger,
|
|
16214
|
-
{
|
|
16215
|
-
"aria-label": "Select a model",
|
|
16216
|
-
className: "bg-black/25 hover:bg-white/[0.045] h-9 w-full border-0 text-xs text-foreground shadow-[inset_0_0_0_1px_rgba(255,255,255,0.06)]",
|
|
16217
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "All models" })
|
|
16218
|
-
}
|
|
16219
|
-
),
|
|
16220
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectContent, { children: [
|
|
16221
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: "__all__", children: "All models" }),
|
|
16222
|
-
models.map((m) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: m, children: m }, m))
|
|
16223
|
-
] })
|
|
16224
|
-
] })
|
|
16225
|
-
] }) })
|
|
16221
|
+
hasSessionContext && pinnedSessionId !== void 0 && sessionMemberships.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(SessionMembershipPanel, { memberships: sessionMemberships })
|
|
16226
16222
|
] }) }),
|
|
16227
16223
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("main", { className: "order-2 min-w-0 lg:order-1 lg:h-full lg:overflow-y-auto inspector-scrollbar", children: [
|
|
16228
16224
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-background/95 shadow-[0_12px_36px_rgba(0,0,0,0.18),inset_0_-1px_0_rgba(255,255,255,0.045)] sticky top-0 z-30 px-4 py-3 lg:px-5", children: [
|
|
@@ -16368,7 +16364,32 @@ function ProxyViewer({
|
|
|
16368
16364
|
]
|
|
16369
16365
|
}
|
|
16370
16366
|
),
|
|
16371
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
16367
|
+
assistantSearchResult !== null && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 flex items-center gap-3 rounded-md bg-cyan-400/[0.07] px-3 py-2 shadow-[inset_2px_0_0_rgba(103,232,249,0.35),inset_0_0_0_1px_rgba(103,232,249,0.08)]", children: [
|
|
16368
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
16369
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "truncate text-xs font-medium text-cyan-50", children: assistantSearchResult.question }),
|
|
16370
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-0.5 text-[10px] text-muted-foreground", children: [
|
|
16371
|
+
"Showing ",
|
|
16372
|
+
String(displayedLogs.length),
|
|
16373
|
+
" loaded logs from",
|
|
16374
|
+
" ",
|
|
16375
|
+
String(assistantSearchResult.logIds.length),
|
|
16376
|
+
" linked results"
|
|
16377
|
+
] })
|
|
16378
|
+
] }),
|
|
16379
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
16380
|
+
"button",
|
|
16381
|
+
{
|
|
16382
|
+
type: "button",
|
|
16383
|
+
onClick: () => setAssistantSearchResult(null),
|
|
16384
|
+
className: "inline-flex h-7 shrink-0 items-center gap-1 rounded-md bg-black/20 px-2 text-[11px] text-muted-foreground transition-colors hover:bg-black/30 hover:text-foreground focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none",
|
|
16385
|
+
children: [
|
|
16386
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "size-3" }),
|
|
16387
|
+
"All logs"
|
|
16388
|
+
]
|
|
16389
|
+
}
|
|
16390
|
+
)
|
|
16391
|
+
] }),
|
|
16392
|
+
assistantSearchResult === null && /* @__PURE__ */ jsxRuntimeExports.jsx(LogPaginationBar, { logs, pagination, embedded: true }),
|
|
16372
16393
|
onNotify === void 0 && exportError !== null && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive", children: exportError }),
|
|
16373
16394
|
onNotify === void 0 && importError !== null && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive", children: importError }),
|
|
16374
16395
|
onNotify === void 0 && importStatus !== null && importError === null && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2 rounded-md border border-cyan-400/25 bg-cyan-500/10 px-3 py-2 text-xs text-cyan-100", children: importStatus }),
|
|
@@ -16384,7 +16405,19 @@ function ProxyViewer({
|
|
|
16384
16405
|
] }),
|
|
16385
16406
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-4 py-4 lg:px-5", children: [
|
|
16386
16407
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SessionOpeningSlate, { stats: slateStats }),
|
|
16387
|
-
|
|
16408
|
+
assistantSearchResult !== null && displayedLogs.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-16 text-center text-muted-foreground", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mx-auto max-w-xl rounded-[8px] bg-white/[0.035] px-5 py-8 shadow-[inset_0_1px_0_rgba(255,255,255,0.045),0_18px_52px_rgba(0,0,0,0.18)]", children: [
|
|
16409
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium text-foreground", children: "No linked logs are loaded" }),
|
|
16410
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-xs leading-5 text-muted-foreground", children: "Assistant found evidence, but none of its linked log IDs are in the current loaded window. Open an evidence card in Assistant or restore the full log view." }),
|
|
16411
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16412
|
+
"button",
|
|
16413
|
+
{
|
|
16414
|
+
type: "button",
|
|
16415
|
+
onClick: () => setAssistantSearchResult(null),
|
|
16416
|
+
className: "mt-4 inline-flex h-8 items-center rounded-md bg-cyan-400/10 px-3 text-xs text-cyan-100 transition-colors hover:bg-cyan-400/16",
|
|
16417
|
+
children: "Show all logs"
|
|
16418
|
+
}
|
|
16419
|
+
)
|
|
16420
|
+
] }) }) : logs.length === 0 ? selectedSession !== "__all__" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-16 text-center text-muted-foreground", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white/[0.035] shadow-[inset_0_1px_0_rgba(255,255,255,0.045),0_18px_52px_rgba(0,0,0,0.18)] mx-auto max-w-xl space-y-4 rounded-[8px] px-4 py-8", children: [
|
|
16388
16421
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children: isLoading ? "Loading session data..." : sessionLoadError === void 0 ? "No logs loaded for this session" : "Session logs could not be loaded" }),
|
|
16389
16422
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "inline-block max-w-full rounded bg-muted px-3 py-1 font-mono text-xs break-all", children: truncateSessionId(selectedSession) }),
|
|
16390
16423
|
sessionLoadProgress !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mx-auto max-w-md rounded-md bg-black/20 px-2 py-2 text-left shadow-[inset_0_0_0_1px_rgba(255,255,255,0.045)]", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SessionLoadProgressBar, { progress: sessionLoadProgress }) }),
|
|
@@ -16456,7 +16489,7 @@ function ProxyViewer({
|
|
|
16456
16489
|
timeDisplayFormat
|
|
16457
16490
|
}
|
|
16458
16491
|
) }),
|
|
16459
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LogPaginationBar, { logs, pagination }) })
|
|
16492
|
+
assistantSearchResult === null && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LogPaginationBar, { logs, pagination }) })
|
|
16460
16493
|
]
|
|
16461
16494
|
}
|
|
16462
16495
|
)
|