@tonyclaw/agent-inspector 3.0.36 → 3.0.38

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.
Files changed (40) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{CompareDrawer-BF8Yk4Nq.js → CompareDrawer-BXQWabQJ.js} +1 -1
  3. package/.output/public/assets/{InspectorPet-D01knLHJ.js → InspectorPet-CpQEXKcr.js} +1 -1
  4. package/.output/public/assets/ProxyViewerContainer-8pNJsCJ5.js +126 -0
  5. package/.output/public/assets/{ReplayDialog-NRgCp09o.js → ReplayDialog-CnYt4UKE.js} +1 -1
  6. package/.output/public/assets/{RequestAnatomy-BPiUptQ-.js → RequestAnatomy-BI25al3m.js} +1 -1
  7. package/.output/public/assets/{ResponseView-C6oCKVyP.js → ResponseView-D3y-I9nb.js} +1 -1
  8. package/.output/public/assets/{StreamingChunkSequence-B90BNPvD.js → StreamingChunkSequence-n90dYzPp.js} +1 -1
  9. package/.output/public/assets/{_sessionId-B7pqqX6S.js → _sessionId-CogrNhCS.js} +1 -1
  10. package/.output/public/assets/{_sessionId-c3quqe4s.js → _sessionId-DLbOYm3h.js} +1 -1
  11. package/.output/public/assets/{index-CmGZ17BL.js → index-BWWA1Rf6.js} +1 -1
  12. package/.output/public/assets/{index-D444FJGM.js → index-Ca0grOxW.js} +3 -3
  13. package/.output/public/assets/index-DKwrwHsI.css +1 -0
  14. package/.output/public/assets/{index-D4Atppe6.js → index-DXGp27k9.js} +1 -1
  15. package/.output/public/assets/{index-CjODQxYY.js → index-I5zN_KrA.js} +1 -1
  16. package/.output/public/assets/{json-viewer-CuYTDXFj.js → json-viewer-BoB2BfHg.js} +1 -1
  17. package/.output/public/assets/{jszip.min-C-avw0w1.js → jszip.min-CAXkxQd6.js} +1 -1
  18. package/.output/server/_libs/lucide-react.mjs +59 -59
  19. package/.output/server/{_sessionId-BsDZ3m3b.mjs → _sessionId-DScqlEFC.mjs} +2 -2
  20. package/.output/server/{_sessionId-BTazjVlZ.mjs → _sessionId-_hORwhWH.mjs} +1 -1
  21. package/.output/server/_ssr/{CompareDrawer-BMo93_DO.mjs → CompareDrawer-BtGm5i_L.mjs} +3 -3
  22. package/.output/server/_ssr/{InspectorPet-DApzyYro.mjs → InspectorPet-BnN6lVqM.mjs} +1 -1
  23. package/.output/server/_ssr/{ProxyViewerContainer-CiXXtVXH.mjs → ProxyViewerContainer-aduEJ_Xy.mjs} +112 -272
  24. package/.output/server/_ssr/{ReplayDialog-B8bP1qUr.mjs → ReplayDialog-BSGZ-TFs.mjs} +4 -4
  25. package/.output/server/_ssr/{RequestAnatomy-DkVynjyh.mjs → RequestAnatomy-DN_eSnDN.mjs} +3 -3
  26. package/.output/server/_ssr/{ResponseView-BAQa0WUP.mjs → ResponseView-Dk9Td_HM.mjs} +3 -3
  27. package/.output/server/_ssr/{StreamingChunkSequence-B4_K4_VI.mjs → StreamingChunkSequence-DthH8Lx4.mjs} +3 -3
  28. package/.output/server/_ssr/{index-BiwG5Sws.mjs → index-CqeZgFFF.mjs} +2 -2
  29. package/.output/server/_ssr/{index-DhjNsApq.mjs → index-DvVHL942.mjs} +1 -1
  30. package/.output/server/_ssr/index.mjs +2 -2
  31. package/.output/server/_ssr/{json-viewer-Dlpq5S-r.mjs → json-viewer-DLKA2jUq.mjs} +3 -3
  32. package/.output/server/_ssr/{router-6s7p8rsX.mjs → router-CRKEDn6n.mjs} +6 -6
  33. package/.output/server/{_tanstack-start-manifest_v-ClIF-cfh.mjs → _tanstack-start-manifest_v-pQO9kTmV.mjs} +1 -1
  34. package/.output/server/index.mjs +95 -95
  35. package/package.json +7 -1
  36. package/src/components/ProxyViewer.tsx +103 -331
  37. package/src/components/pi-agent/PiAgentPanel.tsx +23 -14
  38. package/src/components/pi-agent/piAgentChatLogic.ts +10 -0
  39. package/.output/public/assets/ProxyViewerContainer-CArcMNg_.js +0 -126
  40. package/.output/public/assets/index-BQqVblQv.css +0 -1
@@ -1,10 +1,10 @@
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, s as safeGetOwnProperty, $ 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-6s7p8rsX.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, s as safeGetOwnProperty, $ 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-CRKEDn6n.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, 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, f as Sun, E as Eye, M as Moon, A as ALargeSmall, g as Layers, h as FlaskConical, i as Sparkles, j as Activity, B as Beaker, N as Network, k as Copy, l as Terminal, m as BrainCircuit, n as RotateCcw, o as Send, p as ArrowLeft, q as ChevronUp, r as Search, s as ChevronsLeft, t as ChevronLeft, u as ChevronRight, v as ChevronsRight, w as CircleStop, x as Clapperboard, y as Flag, z as Timer, G as Gauge, H as Minimize2, J as Maximize2, K as Scan, O as Plus, Q as CircleAlert, V as Rocket, W as PackageCheck, Y as History, Z as Monitor, _ as EyeOff, $ as ExternalLink, a0 as Clock, a1 as RotateCw, a2 as CircleCheckBig, a3 as Pencil, a4 as Bell, a5 as Clock3, a6 as ShieldAlert, a7 as ArrowUpRight, a8 as ArrowDownRight, a9 as CodeXml, aa as Cpu, ab as FolderOpen, ac as MessageSquare, ad as Zap, ae as Wrench, af as Brain, ag as Minus, ah as CircleQuestionMark, ai as Server, aj as Lock, ak as Wifi, al as WifiOff, am as CircleX, an as ShieldCheck, ao as Save, ap as FileSearch, aq as CloudUpload, ar as OctagonAlert, as as Radio, at as Globe, au as FileTerminal, av as ChevronsUp, aw as ChevronsDown, ax as FileDiff, 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";
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, f as Sun, E as Eye, M as Moon, A as ALargeSmall, g as Layers, h as FlaskConical, i as Sparkles, j as Activity, B as Beaker, N as Network, k as Copy, l as Terminal, m as ArrowLeft, n as ChevronUp, o as BrainCircuit, p as RotateCcw, q as Send, 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
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";
10
10
  import { R as Root2, C as Content, L as List, T as Trigger } from "../_libs/radix-ui__react-tabs.mjs";
@@ -2504,30 +2504,30 @@ function useCopyFeedback(text) {
2504
2504
  return { copied, copy };
2505
2505
  }
2506
2506
  const LazyCompareDrawer = reactExports.lazy(
2507
- () => import("./CompareDrawer-BMo93_DO.mjs").then((m) => ({ default: m.CompareDrawer }))
2507
+ () => import("./CompareDrawer-BtGm5i_L.mjs").then((m) => ({ default: m.CompareDrawer }))
2508
2508
  );
2509
2509
  const LazyInspectorPet = reactExports.lazy(
2510
- () => import("./InspectorPet-DApzyYro.mjs").then((m) => ({ default: m.InspectorPet }))
2510
+ () => import("./InspectorPet-BnN6lVqM.mjs").then((m) => ({ default: m.InspectorPet }))
2511
2511
  );
2512
2512
  const LazyReplayDialog = reactExports.lazy(
2513
- () => import("./ReplayDialog-B8bP1qUr.mjs").then((m) => ({ default: m.ReplayDialog }))
2513
+ () => import("./ReplayDialog-BSGZ-TFs.mjs").then((m) => ({ default: m.ReplayDialog }))
2514
2514
  );
2515
2515
  const LazyRequestAnatomy = reactExports.lazy(
2516
- () => import("./RequestAnatomy-DkVynjyh.mjs").then((m) => ({ default: m.RequestAnatomy }))
2516
+ () => import("./RequestAnatomy-DN_eSnDN.mjs").then((m) => ({ default: m.RequestAnatomy }))
2517
2517
  );
2518
2518
  const LazyResponseView = reactExports.lazy(
2519
- () => import("./ResponseView-BAQa0WUP.mjs").then((m) => ({ default: m.ResponseView }))
2519
+ () => import("./ResponseView-Dk9Td_HM.mjs").then((m) => ({ default: m.ResponseView }))
2520
2520
  );
2521
2521
  const LazyStreamingChunkSequence = reactExports.lazy(
2522
- () => import("./StreamingChunkSequence-B4_K4_VI.mjs").then((m) => ({
2522
+ () => import("./StreamingChunkSequence-DthH8Lx4.mjs").then((m) => ({
2523
2523
  default: m.StreamingChunkSequence
2524
2524
  }))
2525
2525
  );
2526
2526
  const LazyJsonViewer = reactExports.lazy(
2527
- () => import("./json-viewer-Dlpq5S-r.mjs").then((m) => ({ default: m.JsonViewer }))
2527
+ () => import("./json-viewer-DLKA2jUq.mjs").then((m) => ({ default: m.JsonViewer }))
2528
2528
  );
2529
2529
  const LazyJsonViewerFromString = reactExports.lazy(
2530
- () => import("./json-viewer-Dlpq5S-r.mjs").then((m) => ({ default: m.JsonViewerFromString }))
2530
+ () => import("./json-viewer-DLKA2jUq.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",
@@ -12589,7 +12596,7 @@ function ConversationMessage({ message }) {
12589
12596
  function PiAgentPanel({
12590
12597
  currentSessionId,
12591
12598
  logCount,
12592
- suggestedQuestion
12599
+ onResultChange
12593
12600
  }) {
12594
12601
  const { providers } = useProviders();
12595
12602
  const piProviders = reactExports.useMemo(
@@ -12607,10 +12614,6 @@ function PiAgentPanel({
12607
12614
  const modelOptions = selectedProvider?.models ?? [];
12608
12615
  const question = conversation.question;
12609
12616
  const canAsk = question.trim() !== "" && piProviders.length > 0 && !loading;
12610
- reactExports.useEffect(() => {
12611
- if (suggestedQuestion === void 0 || suggestedQuestion.trim() === "") return;
12612
- setConversation((current) => ({ ...current, question: suggestedQuestion, error: null }));
12613
- }, [suggestedQuestion]);
12614
12617
  const handleQuestionChange = (event) => {
12615
12618
  setConversation((current) => ({ ...current, question: event.currentTarget.value }));
12616
12619
  };
@@ -12620,6 +12623,7 @@ function PiAgentPanel({
12620
12623
  };
12621
12624
  const resetConversation = () => {
12622
12625
  setConversation({ ...createEmptyPiAgentConversation(), question: DEFAULT_QUESTION });
12626
+ onResultChange(null);
12623
12627
  };
12624
12628
  const setStarter = (questionText) => {
12625
12629
  setConversation((current) => ({ ...current, question: questionText, error: null }));
@@ -12686,6 +12690,11 @@ function PiAgentPanel({
12686
12690
  }
12687
12691
  ]
12688
12692
  }));
12693
+ onResultChange({
12694
+ question: trimmedQuestion,
12695
+ logIds: getPiAgentResultLogIds(normalized),
12696
+ reportedLogCount: normalized.logCount
12697
+ });
12689
12698
  }).catch((err) => {
12690
12699
  setConversation((current) => ({
12691
12700
  ...current,
@@ -12699,8 +12708,8 @@ function PiAgentPanel({
12699
12708
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
12700
12709
  /* @__PURE__ */ jsxRuntimeExports.jsx(BrainCircuit, { className: "size-4 text-cyan-200" }),
12701
12710
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", children: [
12702
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-semibold text-foreground", children: "Inspector Assistant" }),
12703
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-[11px] text-muted-foreground", children: currentSessionId === null ? "Ask saved Inspector data" : "Ask this session" })
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" })
12704
12713
  ] }),
12705
12714
  /* @__PURE__ */ jsxRuntimeExports.jsx(
12706
12715
  "button",
@@ -12714,7 +12723,7 @@ function PiAgentPanel({
12714
12723
  )
12715
12724
  ] }),
12716
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: [
12717
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[11px] leading-5 text-muted-foreground", children: "Ask your Inspector memory across saved traffic, sessions, tools, Provider signals, alerts, runs, groups, and knowledge candidates. Answers include linked evidence." }),
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." }),
12718
12727
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2 grid gap-1.5", children: PI_AGENT_SCOPE_PILLS.map((pill) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
12719
12728
  "div",
12720
12729
  {
@@ -12775,7 +12784,7 @@ function PiAgentPanel({
12775
12784
  value: question,
12776
12785
  onChange: handleQuestionChange,
12777
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",
12778
- placeholder: "Ask across saved Inspector data..."
12787
+ placeholder: "Search failures, slow requests, token spikes, tool calls..."
12779
12788
  }
12780
12789
  ),
12781
12790
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -12787,7 +12796,7 @@ function PiAgentPanel({
12787
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",
12788
12797
  children: [
12789
12798
  loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Send, { className: "size-3.5" }),
12790
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: loading ? "Thinking..." : "Ask Assistant" })
12799
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: loading ? "Searching..." : "Search logs" })
12791
12800
  ]
12792
12801
  }
12793
12802
  ),
@@ -14838,173 +14847,6 @@ function truncateSessionId(id) {
14838
14847
  if (id.length <= 30) return id;
14839
14848
  return `${id.slice(0, 12)}...${id.slice(-12)}`;
14840
14849
  }
14841
- function normalizeSearchQuery(value) {
14842
- return value.trim().toLowerCase();
14843
- }
14844
- function includesSearchText(value, query) {
14845
- return value !== null && value !== void 0 && value.toLowerCase().includes(query);
14846
- }
14847
- function buildSessionSuggestionDetail(sessionId, logs) {
14848
- const scopedLogs = logs.filter((log) => log.sessionId === sessionId);
14849
- if (scopedLogs.length === 0) return "Stored session";
14850
- const models = /* @__PURE__ */ new Set();
14851
- const providers = /* @__PURE__ */ new Set();
14852
- for (const log of scopedLogs) {
14853
- if (log.model !== null && log.model !== "") models.add(log.model);
14854
- if (log.providerName !== null && log.providerName !== void 0 && log.providerName.trim() !== "") {
14855
- providers.add(log.providerName);
14856
- }
14857
- }
14858
- const modelLabel = models.size === 0 ? "unknown model" : [...models].slice(0, 2).join(", ");
14859
- const providerLabel = providers.size === 0 ? "unknown provider" : [...providers].slice(0, 2).join(", ");
14860
- return `${String(scopedLogs.length)} req · ${providerLabel} · ${modelLabel}`;
14861
- }
14862
- function sessionMatchesSearchQuery(sessionId, logs, query) {
14863
- if (includesSearchText(sessionId, query)) return true;
14864
- return logs.some(
14865
- (log) => log.sessionId === sessionId && (includesSearchText(log.model, query) || includesSearchText(log.providerName, query) || includesSearchText(log.path, query))
14866
- );
14867
- }
14868
- function buildSessionSearchSuggestions({
14869
- query,
14870
- sessions,
14871
- models,
14872
- logs
14873
- }) {
14874
- const normalizedQuery = normalizeSearchQuery(query);
14875
- const suggestions = [];
14876
- if (normalizedQuery === "") {
14877
- suggestions.push({
14878
- id: "all",
14879
- label: "All sessions",
14880
- detail: `${String(logs.length)} visible requests`,
14881
- kind: "all",
14882
- value: "__all__"
14883
- });
14884
- for (const session of sessions.slice(0, 5)) {
14885
- suggestions.push({
14886
- id: `session-${session}`,
14887
- label: truncateSessionId(session),
14888
- detail: buildSessionSuggestionDetail(session, logs),
14889
- kind: "session",
14890
- value: session
14891
- });
14892
- }
14893
- return suggestions;
14894
- }
14895
- const matchingSessions = sessions.filter(
14896
- (session) => sessionMatchesSearchQuery(session, logs, normalizedQuery)
14897
- );
14898
- for (const session of matchingSessions.slice(0, 5)) {
14899
- suggestions.push({
14900
- id: `session-${session}`,
14901
- label: truncateSessionId(session),
14902
- detail: buildSessionSuggestionDetail(session, logs),
14903
- kind: "session",
14904
- value: session
14905
- });
14906
- }
14907
- const matchingModels = models.filter((model) => includesSearchText(model, normalizedQuery));
14908
- for (const model of matchingModels.slice(0, 3)) {
14909
- suggestions.push({
14910
- id: `model-${model}`,
14911
- label: model,
14912
- detail: "Model filter",
14913
- kind: "model",
14914
- value: model
14915
- });
14916
- }
14917
- return suggestions.slice(0, 7);
14918
- }
14919
- function buildAssistantQuestionFromSearch(query, selectedSession) {
14920
- const trimmed = query.trim();
14921
- const scope = selectedSession === "__all__" ? "all visible Inspector sessions" : `session ${selectedSession}`;
14922
- if (trimmed === "") {
14923
- return `Analyze ${scope}. What failed, slowed down, or deserves attention?`;
14924
- }
14925
- return `Search ${scope} for "${trimmed}" and explain the relevant failures, latency, token usage, provider behavior, and evidence.`;
14926
- }
14927
- function SessionSearchBox({
14928
- query,
14929
- suggestions,
14930
- selectedSession,
14931
- selectedModel,
14932
- onQueryChange,
14933
- onApplySuggestion,
14934
- onClear,
14935
- onAskAssistant
14936
- }) {
14937
- const handleKeyDown = (event) => {
14938
- if (event.key !== "Enter") return;
14939
- const firstSuggestion = suggestions[0];
14940
- if (firstSuggestion === void 0) return;
14941
- event.preventDefault();
14942
- onApplySuggestion(firstSuggestion);
14943
- };
14944
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-xl bg-black/20 p-2 shadow-[inset_0_0_0_1px_rgba(255,255,255,0.055)]", children: [
14945
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
14946
- /* @__PURE__ */ jsxRuntimeExports.jsx(Search, { className: "pointer-events-none absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-cyan-100/70" }),
14947
- /* @__PURE__ */ jsxRuntimeExports.jsx(
14948
- "input",
14949
- {
14950
- type: "search",
14951
- value: query,
14952
- onChange: (event) => onQueryChange(event.currentTarget.value),
14953
- onKeyDown: handleKeyDown,
14954
- placeholder: "Search sessions, models, providers...",
14955
- className: "h-10 w-full rounded-full bg-black/30 px-9 pr-9 text-xs text-foreground outline-none shadow-[inset_0_0_0_1px_rgba(103,232,249,0.13)] transition-colors placeholder:text-muted-foreground hover:bg-black/35 focus-visible:ring-1 focus-visible:ring-cyan-200/70",
14956
- "aria-label": "Search sessions and models"
14957
- }
14958
- ),
14959
- (query !== "" || selectedSession !== "__all__" || selectedModel !== "__all__") && /* @__PURE__ */ jsxRuntimeExports.jsx(
14960
- "button",
14961
- {
14962
- type: "button",
14963
- onClick: onClear,
14964
- className: "absolute right-2 top-1/2 inline-flex size-6 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.07] hover:text-foreground focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none",
14965
- "aria-label": "Clear session search",
14966
- title: "Clear search",
14967
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "size-3.5" })
14968
- }
14969
- )
14970
- ] }),
14971
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 flex flex-wrap gap-1.5", children: [
14972
- /* @__PURE__ */ jsxRuntimeExports.jsx(
14973
- "button",
14974
- {
14975
- type: "button",
14976
- onClick: onAskAssistant,
14977
- className: "inline-flex h-7 items-center rounded-full bg-cyan-400/10 px-2.5 text-[11px] font-medium text-cyan-100 shadow-[inset_0_0_0_1px_rgba(103,232,249,0.14)] transition-colors hover:bg-cyan-400/16",
14978
- children: "Ask Assistant"
14979
- }
14980
- ),
14981
- selectedSession !== "__all__" && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex h-7 max-w-full items-center rounded-full bg-white/[0.045] px-2.5 font-mono text-[10px] text-muted-foreground", children: [
14982
- "session:",
14983
- truncateSessionId(selectedSession)
14984
- ] }),
14985
- selectedModel !== "__all__" && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex h-7 max-w-full items-center rounded-full bg-white/[0.045] px-2.5 text-[10px] text-muted-foreground", children: [
14986
- "model:",
14987
- selectedModel
14988
- ] })
14989
- ] }),
14990
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2 space-y-1", children: suggestions.map((suggestion) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
14991
- "button",
14992
- {
14993
- type: "button",
14994
- onClick: () => onApplySuggestion(suggestion),
14995
- className: "grid w-full grid-cols-[minmax(0,1fr)_auto] items-center gap-2 rounded-lg px-2 py-1.5 text-left transition-colors hover:bg-white/[0.045] focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none",
14996
- children: [
14997
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "min-w-0", children: [
14998
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "block truncate text-[11px] font-medium text-foreground", children: suggestion.label }),
14999
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "block truncate text-[10px] text-muted-foreground", children: suggestion.detail })
15000
- ] }),
15001
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "rounded-full bg-white/[0.045] px-2 py-0.5 text-[9px] uppercase tracking-[0.12em] text-muted-foreground", children: suggestion.kind })
15002
- ]
15003
- },
15004
- suggestion.id
15005
- )) })
15006
- ] });
15007
- }
15008
14850
  function buildDisplayNumberByLogId(groups) {
15009
14851
  const result = /* @__PURE__ */ new Map();
15010
14852
  for (const group of groups) {
@@ -15989,11 +15831,9 @@ function SessionContextBar({
15989
15831
  function ProxyViewer({
15990
15832
  logs,
15991
15833
  sessions,
15992
- models,
15993
15834
  selectedSession,
15994
15835
  selectedModel,
15995
15836
  onSessionChange,
15996
- onModelChange,
15997
15837
  onClearAll,
15998
15838
  onDeleteCurrentView,
15999
15839
  onReloadSession,
@@ -16031,9 +15871,8 @@ function ProxyViewer({
16031
15871
  const [detailsPanelStorageLoaded, setDetailsPanelStorageLoaded] = reactExports.useState(false);
16032
15872
  const [petVisible, setPetVisible] = reactExports.useState(true);
16033
15873
  const [petVisibilityStorageLoaded, setPetVisibilityStorageLoaded] = reactExports.useState(false);
16034
- const [sessionSearchQuery, setSessionSearchQuery] = reactExports.useState("");
16035
- const [assistantSuggestedQuestion, setAssistantSuggestedQuestion] = reactExports.useState(
16036
- void 0
15874
+ const [assistantSearchResult, setAssistantSearchResult] = reactExports.useState(
15875
+ null
16037
15876
  );
16038
15877
  const [comparePair, setComparePair] = reactExports.useState(null);
16039
15878
  const logListRef = reactExports.useRef(null);
@@ -16169,6 +16008,7 @@ function ProxyViewer({
16169
16008
  reactExports.useEffect(() => {
16170
16009
  cancelTransientTasks();
16171
16010
  setComparePair(null);
16011
+ setAssistantSearchResult(null);
16172
16012
  }, [cancelTransientTasks, selectedSession, selectedModel]);
16173
16013
  const handleClearCurrentView = reactExports.useCallback(() => {
16174
16014
  cancelTransientTasks();
@@ -16217,7 +16057,15 @@ function ProxyViewer({
16217
16057
  const togglePetVisibility = reactExports.useCallback(() => {
16218
16058
  setPetVisible((value) => !value);
16219
16059
  }, []);
16220
- const groups = reactExports.useMemo(() => groupLogsByConversation(logs), [logs]);
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]);
16221
16069
  const displayNumberByLogId = reactExports.useMemo(() => buildDisplayNumberByLogId(groups), [groups]);
16222
16070
  const sessionContextScope = reactExports.useMemo(
16223
16071
  () => resolveSessionContextScope({ pinnedSessionId, selectedSession, sessions, logs }),
@@ -16242,27 +16090,18 @@ function ProxyViewer({
16242
16090
  const deleteTargetLabel = selectedSession === "__all__" ? "all sessions" : "this session";
16243
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.";
16244
16092
  const reloadSessionLabel = logs.length === 0 ? "Load" : "Reload";
16245
- const sessionSearchSuggestions = reactExports.useMemo(
16246
- () => buildSessionSearchSuggestions({
16247
- query: sessionSearchQuery,
16248
- sessions,
16249
- models,
16250
- logs
16251
- }),
16252
- [logs, models, sessionSearchQuery, sessions]
16253
- );
16254
16093
  const activeScopeLabel = hasSessionContext && sessionContextScope !== null ? truncateSessionId(sessionContextScope.label) : selectedSession === "__all__" ? "All sessions" : truncateSessionId(selectedSession);
16255
16094
  const liveEmptyState = resolveLiveEmptyState(liveConnection);
16256
16095
  const liveEmptyStateCopy = getLiveEmptyStateCopy(liveEmptyState);
16257
16096
  const slateStats = reactExports.useMemo(
16258
16097
  () => buildSessionSlateStats({
16259
- logs,
16098
+ logs: displayedLogs,
16260
16099
  conversationGroups: groups,
16261
16100
  isLoading,
16262
16101
  timeDisplayFormat,
16263
16102
  slowResponseThresholdSeconds
16264
16103
  }),
16265
- [groups, isLoading, logs, slowResponseThresholdSeconds, timeDisplayFormat]
16104
+ [displayedLogs, groups, isLoading, slowResponseThresholdSeconds, timeDisplayFormat]
16266
16105
  );
16267
16106
  const handleCompareWithPrevious = reactExports.useCallback(
16268
16107
  (log) => {
@@ -16271,36 +16110,6 @@ function ProxyViewer({
16271
16110
  },
16272
16111
  [comparisonPredecessors]
16273
16112
  );
16274
- const handleApplySessionSearchSuggestion = reactExports.useCallback(
16275
- (suggestion) => {
16276
- switch (suggestion.kind) {
16277
- case "all":
16278
- onSessionChange("__all__");
16279
- onModelChange("__all__");
16280
- setSessionSearchQuery("");
16281
- break;
16282
- case "session":
16283
- onSessionChange(suggestion.value);
16284
- setSessionSearchQuery(suggestion.value);
16285
- break;
16286
- case "model":
16287
- onModelChange(suggestion.value);
16288
- setSessionSearchQuery(suggestion.value);
16289
- break;
16290
- }
16291
- },
16292
- [onModelChange, onSessionChange]
16293
- );
16294
- const handleClearSessionSearch = reactExports.useCallback(() => {
16295
- setSessionSearchQuery("");
16296
- onSessionChange("__all__");
16297
- onModelChange("__all__");
16298
- }, [onModelChange, onSessionChange]);
16299
- const handleAskAssistantFromSearch = reactExports.useCallback(() => {
16300
- setAssistantSuggestedQuestion(
16301
- buildAssistantQuestionFromSearch(sessionSearchQuery, selectedSession)
16302
- );
16303
- }, [selectedSession, sessionSearchQuery]);
16304
16113
  const labSessionId = pinnedSessionId !== void 0 ? pinnedSessionId : selectedSession === "__all__" ? null : selectedSession;
16305
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: [
16306
16115
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -16337,8 +16146,8 @@ function ProxyViewer({
16337
16146
  detailsPanelCollapsed ? "lg:grid-cols-[minmax(0,1fr)]" : "lg:grid-cols-[minmax(0,1fr)_21.25rem] xl:grid-cols-[minmax(0,1fr)_22.5rem]"
16338
16147
  ),
16339
16148
  children: [
16340
- !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: [
16341
- /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarPanel, { label: "Tools", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
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: "flex min-h-full flex-col gap-4 p-4", children: [
16150
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-background/95 sticky top-0 z-20 -mx-4 -mt-4 px-4 pt-4 pb-3 shadow-[0_12px_24px_rgba(0,0,0,0.18),inset_0_-1px_0_rgba(255,255,255,0.045)] backdrop-blur", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarPanel, { label: "Tools", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
16342
16151
  /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeModeToggle, {}),
16343
16152
  /* @__PURE__ */ jsxRuntimeExports.jsx(
16344
16153
  UiScaleControl,
@@ -16350,10 +16159,27 @@ function ProxyViewer({
16350
16159
  ),
16351
16160
  /* @__PURE__ */ jsxRuntimeExports.jsx(GroupsDialog, {}),
16352
16161
  /* @__PURE__ */ jsxRuntimeExports.jsx(AgentLabDialog, { currentSessionId: labSessionId, logCount: logs.length })
16353
- ] }) }),
16354
- /* @__PURE__ */ jsxRuntimeExports.jsxs(SidebarPanel, { label: "Session", children: [
16162
+ ] }) }) }),
16163
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(SidebarPanel, { label: "Current scope", children: [
16164
+ /* @__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: [
16165
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16166
+ "div",
16167
+ {
16168
+ className: "truncate font-mono text-xs font-semibold text-cyan-100",
16169
+ title: activeScopeLabel,
16170
+ children: activeScopeLabel
16171
+ }
16172
+ ),
16173
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-1 text-[11px] text-muted-foreground", children: isPinnedSessionPage ? "Pinned session" : "Live Inspector data" })
16174
+ ] }),
16355
16175
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
16356
- /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarMetric, { label: "Requests", value: logs.length }),
16176
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16177
+ SidebarMetric,
16178
+ {
16179
+ label: assistantSearchResult === null ? "Requests" : "Results",
16180
+ value: displayedLogs.length
16181
+ }
16182
+ ),
16357
16183
  /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarMetric, { label: "Sessions", value: sessions.length }),
16358
16184
  /* @__PURE__ */ jsxRuntimeExports.jsx(
16359
16185
  SidebarMetric,
@@ -16372,25 +16198,6 @@ function ProxyViewer({
16372
16198
  ] }),
16373
16199
  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 }) })
16374
16200
  ] }),
16375
- /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarPanel, { label: "Workspace", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-black/20 rounded-md px-3 py-2 shadow-[inset_0_1px_0_rgba(255,255,255,0.035)]", children: [
16376
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16377
- "div",
16378
- {
16379
- className: "truncate font-mono text-xs font-semibold text-cyan-100",
16380
- title: activeScopeLabel,
16381
- children: activeScopeLabel
16382
- }
16383
- ),
16384
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-1 text-[11px] text-muted-foreground", children: isPinnedSessionPage ? "Session workspace" : "Live workspace" })
16385
- ] }) }),
16386
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16387
- PiAgentPanel,
16388
- {
16389
- currentSessionId: labSessionId,
16390
- logCount: logs.length,
16391
- suggestedQuestion: assistantSuggestedQuestion
16392
- }
16393
- ),
16394
16201
  hasSessionContext && sessionContextScope !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(
16395
16202
  SessionContextBar,
16396
16203
  {
@@ -16404,19 +16211,15 @@ function ProxyViewer({
16404
16211
  }
16405
16212
  ),
16406
16213
  hasSessionContext && pinnedSessionId !== void 0 && sessionMemberships.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(SessionMembershipPanel, { memberships: sessionMemberships }),
16407
- /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarPanel, { label: "Filters", children: hideSessionFilter ? /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[11px] leading-5 text-muted-foreground", children: "This session is pinned by the current URL." }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
16408
- SessionSearchBox,
16214
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1" }),
16215
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16216
+ PiAgentPanel,
16409
16217
  {
16410
- query: sessionSearchQuery,
16411
- suggestions: sessionSearchSuggestions,
16412
- selectedSession,
16413
- selectedModel,
16414
- onQueryChange: setSessionSearchQuery,
16415
- onApplySuggestion: handleApplySessionSearchSuggestion,
16416
- onClear: handleClearSessionSearch,
16417
- onAskAssistant: handleAskAssistantFromSearch
16218
+ currentSessionId: labSessionId,
16219
+ logCount: logs.length,
16220
+ onResultChange: setAssistantSearchResult
16418
16221
  }
16419
- ) })
16222
+ )
16420
16223
  ] }) }),
16421
16224
  /* @__PURE__ */ jsxRuntimeExports.jsxs("main", { className: "order-2 min-w-0 lg:order-1 lg:h-full lg:overflow-y-auto inspector-scrollbar", children: [
16422
16225
  /* @__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: [
@@ -16562,7 +16365,32 @@ function ProxyViewer({
16562
16365
  ]
16563
16366
  }
16564
16367
  ),
16565
- /* @__PURE__ */ jsxRuntimeExports.jsx(LogPaginationBar, { logs, pagination, embedded: true }),
16368
+ 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: [
16369
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", children: [
16370
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "truncate text-xs font-medium text-cyan-50", children: assistantSearchResult.question }),
16371
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-0.5 text-[10px] text-muted-foreground", children: [
16372
+ "Showing ",
16373
+ String(displayedLogs.length),
16374
+ " loaded logs from",
16375
+ " ",
16376
+ String(assistantSearchResult.logIds.length),
16377
+ " linked results"
16378
+ ] })
16379
+ ] }),
16380
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
16381
+ "button",
16382
+ {
16383
+ type: "button",
16384
+ onClick: () => setAssistantSearchResult(null),
16385
+ 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",
16386
+ children: [
16387
+ /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "size-3" }),
16388
+ "All logs"
16389
+ ]
16390
+ }
16391
+ )
16392
+ ] }),
16393
+ assistantSearchResult === null && /* @__PURE__ */ jsxRuntimeExports.jsx(LogPaginationBar, { logs, pagination, embedded: true }),
16566
16394
  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 }),
16567
16395
  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 }),
16568
16396
  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 }),
@@ -16578,7 +16406,19 @@ function ProxyViewer({
16578
16406
  ] }),
16579
16407
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-4 py-4 lg:px-5", children: [
16580
16408
  /* @__PURE__ */ jsxRuntimeExports.jsx(SessionOpeningSlate, { stats: slateStats }),
16581
- 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: [
16409
+ 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: [
16410
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium text-foreground", children: "No linked logs are loaded" }),
16411
+ /* @__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." }),
16412
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16413
+ "button",
16414
+ {
16415
+ type: "button",
16416
+ onClick: () => setAssistantSearchResult(null),
16417
+ 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",
16418
+ children: "Show all logs"
16419
+ }
16420
+ )
16421
+ ] }) }) : 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: [
16582
16422
  /* @__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" }),
16583
16423
  /* @__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) }),
16584
16424
  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 }) }),
@@ -16650,7 +16490,7 @@ function ProxyViewer({
16650
16490
  timeDisplayFormat
16651
16491
  }
16652
16492
  ) }),
16653
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LogPaginationBar, { logs, pagination }) })
16493
+ assistantSearchResult === null && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LogPaginationBar, { logs, pagination }) })
16654
16494
  ]
16655
16495
  }
16656
16496
  )
@@ -1,7 +1,7 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { u as useProviders, f as fetchJsonWithTimeout, D as Dialog, b as DialogContent, c as DialogHeader, d as DialogTitle, T as Tabs, e as TabsList, h as TabsTrigger, i as TabsContent, j as TooltipProvider, k as Tooltip, l as TooltipTrigger, m as TooltipContent, n as dispatchLogFocusRequest, A as ApiTimeoutError } from "./ProxyViewerContainer-CiXXtVXH.mjs";
3
- import { B as Button, C as CapturedLogSchema } from "./router-6s7p8rsX.mjs";
4
- import { ResponseView } from "./ResponseView-BAQa0WUP.mjs";
2
+ import { u as useProviders, f as fetchJsonWithTimeout, D as Dialog, b as DialogContent, c as DialogHeader, d as DialogTitle, T as Tabs, e as TabsList, h as TabsTrigger, i as TabsContent, j as TooltipProvider, k as Tooltip, l as TooltipTrigger, m as TooltipContent, n as dispatchLogFocusRequest, A as ApiTimeoutError } from "./ProxyViewerContainer-aduEJ_Xy.mjs";
3
+ import { B as Button, C as CapturedLogSchema } from "./router-CRKEDn6n.mjs";
4
+ import { ResponseView } from "./ResponseView-Dk9Td_HM.mjs";
5
5
  import "node:crypto";
6
6
  import "node:path";
7
7
  import "node:fs";
@@ -14,7 +14,7 @@ import "node:net";
14
14
  import "../_libs/modelcontextprotocol__server.mjs";
15
15
  import "../_libs/jszip.mjs";
16
16
  import "node:os";
17
- import { n as RotateCcw, aL as Braces, H as Minimize2 } from "../_libs/lucide-react.mjs";
17
+ import { p as RotateCcw, aL as Braces, z as Minimize2 } from "../_libs/lucide-react.mjs";
18
18
  import { o as object, n as number, e as array, d as boolean, b as string } from "../_libs/zod.mjs";
19
19
  import "../_libs/swr.mjs";
20
20
  import "../_libs/use-sync-external-store.mjs";