@tonyclaw/agent-inspector 3.0.10 → 3.0.12
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-BxLP7jmX.js → CompareDrawer-BxgmeTyv.js} +1 -1
- package/.output/public/assets/{ProxyViewerContainer-D_2ez29e.js → ProxyViewerContainer-CchT6T-4.js} +15 -15
- package/.output/public/assets/{ReplayDialog-Btm-wONI.js → ReplayDialog-CMHVUtVB.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-C9eZJN9E.js → RequestAnatomy-CpqHIkD1.js} +1 -1
- package/.output/public/assets/{ResponseView-9R2MW1kp.js → ResponseView-BvhBiQ5k.js} +2 -2
- package/.output/public/assets/{StreamingChunkSequence-zxqGpFfv.js → StreamingChunkSequence-CcNvFNPp.js} +1 -1
- package/.output/public/assets/{_sessionId-C0tPTQlC.js → _sessionId-D5z6C77f.js} +1 -1
- package/.output/public/assets/index-C57MERBU.js +1 -0
- package/.output/public/assets/{index-WiDkyjq8.js → index-CXcH69lm.js} +1 -1
- package/.output/public/assets/{json-viewer-BAmkfRDE.js → json-viewer-DjRQ00mw.js} +1 -1
- package/.output/public/assets/{main-2feHoEI6.js → main-CkKubKth.js} +2 -2
- package/.output/server/{_sessionId-BkoyescL.mjs → _sessionId-IP7wEbnv.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-irfFdkJ8.mjs → CompareDrawer-B4qTq3I9.mjs} +2 -2
- package/.output/server/_ssr/{ProxyViewerContainer-CcJr9STz.mjs → ProxyViewerContainer-CCIJ1EcB.mjs} +107 -151
- package/.output/server/_ssr/{ReplayDialog-CJnmXQGT.mjs → ReplayDialog-BgxCdCxM.mjs} +3 -3
- package/.output/server/_ssr/{RequestAnatomy-CupP0Wdb.mjs → RequestAnatomy-De3QDi_x.mjs} +2 -2
- package/.output/server/_ssr/{ResponseView-Bp-0t5cd.mjs → ResponseView-Dvibk8g5.mjs} +2 -2
- package/.output/server/_ssr/{StreamingChunkSequence-BXSn4kMH.mjs → StreamingChunkSequence-oAsweEag.mjs} +2 -2
- package/.output/server/_ssr/{index-KVltJBV8.mjs → index-BIlK7gMO.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-EYQ5eG2Q.mjs → json-viewer-Dgo4oRbs.mjs} +2 -2
- package/.output/server/_ssr/{router-_cAQddXC.mjs → router-DY_2TxnZ.mjs} +3 -3
- package/.output/server/{_tanstack-start-manifest_v-BfiF5iov.mjs → _tanstack-start-manifest_v-CYOwyBpv.mjs} +1 -1
- package/.output/server/index.mjs +62 -62
- package/package.json +1 -1
- package/src/components/providers/ProviderCard.tsx +15 -45
- package/src/components/providers/ProvidersPanel.tsx +57 -102
- package/src/components/proxy-viewer/LogEntryHeader.tsx +17 -43
- package/src/components/ui/tooltip.tsx +1 -1
- package/.output/public/assets/index-DgVWrzsQ.js +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type JSX, useState, useEffect, useCallback, useMemo, useRef } from "react";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { Button } from "../ui/button";
|
|
4
|
-
import { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from "../ui/tooltip";
|
|
5
4
|
import { Plus, AlertCircle, Copy, Check, Download, Upload, Scan } from "lucide-react";
|
|
6
5
|
import { ImportWizardDialog } from "./ImportWizardDialog";
|
|
7
6
|
import { ConfirmDialog } from "../ui/confirm-dialog";
|
|
@@ -557,38 +556,24 @@ export function ProvidersPanel({
|
|
|
557
556
|
<div className="sticky top-0 z-10 flex items-center justify-between gap-3 rounded-[8px] bg-background/95 px-1 py-1 backdrop-blur">
|
|
558
557
|
<h3 className="text-lg font-medium">Providers</h3>
|
|
559
558
|
<div className="flex items-center gap-2">
|
|
560
|
-
<
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
<TooltipTrigger asChild>
|
|
579
|
-
<Button
|
|
580
|
-
variant="outline"
|
|
581
|
-
size="sm"
|
|
582
|
-
onClick={handleImportClick}
|
|
583
|
-
className="gap-1 hover:bg-muted"
|
|
584
|
-
>
|
|
585
|
-
<Upload className="size-3" />
|
|
586
|
-
Import
|
|
587
|
-
</Button>
|
|
588
|
-
</TooltipTrigger>
|
|
589
|
-
<TooltipContent>Import providers from an exported JSON file</TooltipContent>
|
|
590
|
-
</Tooltip>
|
|
591
|
-
</TooltipProvider>
|
|
559
|
+
<Button
|
|
560
|
+
variant="outline"
|
|
561
|
+
size="sm"
|
|
562
|
+
onClick={() => handleExport(false)}
|
|
563
|
+
className="gap-1 hover:bg-muted"
|
|
564
|
+
>
|
|
565
|
+
<Download className="size-3" />
|
|
566
|
+
Export
|
|
567
|
+
</Button>
|
|
568
|
+
<Button
|
|
569
|
+
variant="outline"
|
|
570
|
+
size="sm"
|
|
571
|
+
onClick={handleImportClick}
|
|
572
|
+
className="gap-1 hover:bg-muted"
|
|
573
|
+
>
|
|
574
|
+
<Upload className="size-3" />
|
|
575
|
+
Import
|
|
576
|
+
</Button>
|
|
592
577
|
<input
|
|
593
578
|
type="file"
|
|
594
579
|
ref={fileInputRef}
|
|
@@ -596,24 +581,15 @@ export function ProvidersPanel({
|
|
|
596
581
|
onChange={handleFileChange}
|
|
597
582
|
style={{ display: "none" }}
|
|
598
583
|
/>
|
|
599
|
-
<
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
<Scan className="size-3" />
|
|
609
|
-
Scan
|
|
610
|
-
</Button>
|
|
611
|
-
</TooltipTrigger>
|
|
612
|
-
<TooltipContent>
|
|
613
|
-
Detect and import provider configs from Claude Code and OpenCode
|
|
614
|
-
</TooltipContent>
|
|
615
|
-
</Tooltip>
|
|
616
|
-
</TooltipProvider>
|
|
584
|
+
<Button
|
|
585
|
+
variant="outline"
|
|
586
|
+
size="sm"
|
|
587
|
+
onClick={() => setShowImportWizard(true)}
|
|
588
|
+
className="gap-1"
|
|
589
|
+
>
|
|
590
|
+
<Scan className="size-3" />
|
|
591
|
+
Scan
|
|
592
|
+
</Button>
|
|
617
593
|
<Button onClick={() => setShowForm(true)} size="sm" className="gap-1">
|
|
618
594
|
<Plus className="size-4" />
|
|
619
595
|
Add Provider
|
|
@@ -627,33 +603,24 @@ export function ProvidersPanel({
|
|
|
627
603
|
<span className="font-mono truncate" title={configPath}>
|
|
628
604
|
{configPath}
|
|
629
605
|
</span>
|
|
630
|
-
<
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
<Check className="size-3 text-cyan-300" />
|
|
649
|
-
) : (
|
|
650
|
-
<Copy className="size-3" />
|
|
651
|
-
)}
|
|
652
|
-
</button>
|
|
653
|
-
</TooltipTrigger>
|
|
654
|
-
<TooltipContent>Copy config file path to clipboard</TooltipContent>
|
|
655
|
-
</Tooltip>
|
|
656
|
-
</TooltipProvider>
|
|
606
|
+
<button
|
|
607
|
+
type="button"
|
|
608
|
+
onClick={() => {
|
|
609
|
+
void copyTextToClipboard(configPath).then((success) => {
|
|
610
|
+
if (!success) return;
|
|
611
|
+
setConfigPathCopied(true);
|
|
612
|
+
setTimeout(() => setConfigPathCopied(false), 2000);
|
|
613
|
+
});
|
|
614
|
+
}}
|
|
615
|
+
className="ml-auto shrink-0 text-muted-foreground transition-colors hover:text-foreground"
|
|
616
|
+
aria-label={configPathCopied ? "Copied config file path" : "Copy config file path"}
|
|
617
|
+
>
|
|
618
|
+
{configPathCopied ? (
|
|
619
|
+
<Check className="size-3 text-cyan-300" />
|
|
620
|
+
) : (
|
|
621
|
+
<Copy className="size-3" />
|
|
622
|
+
)}
|
|
623
|
+
</button>
|
|
657
624
|
</div>
|
|
658
625
|
)}
|
|
659
626
|
|
|
@@ -676,30 +643,18 @@ export function ProvidersPanel({
|
|
|
676
643
|
<div className="space-y-3">
|
|
677
644
|
<div className="inline-flex w-fit gap-1 rounded-[8px] bg-muted/20 p-1">
|
|
678
645
|
{(["all", "personal", "company"] as const).map((tab) => (
|
|
679
|
-
<
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
{tab === "all" ? "All" : tab === "personal" ? "Personal" : "Company"}
|
|
692
|
-
</button>
|
|
693
|
-
</TooltipTrigger>
|
|
694
|
-
<TooltipContent>
|
|
695
|
-
{tab === "all"
|
|
696
|
-
? "Show all providers"
|
|
697
|
-
: tab === "personal"
|
|
698
|
-
? "Providers you configured yourself"
|
|
699
|
-
: "Providers set by your organization"}
|
|
700
|
-
</TooltipContent>
|
|
701
|
-
</Tooltip>
|
|
702
|
-
</TooltipProvider>
|
|
646
|
+
<button
|
|
647
|
+
key={tab}
|
|
648
|
+
type="button"
|
|
649
|
+
onClick={() => setSourceFilter(tab)}
|
|
650
|
+
className={`rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${
|
|
651
|
+
sourceFilter === tab
|
|
652
|
+
? "bg-background text-foreground shadow-sm"
|
|
653
|
+
: "text-muted-foreground hover:text-foreground"
|
|
654
|
+
}`}
|
|
655
|
+
>
|
|
656
|
+
{tab === "all" ? "All" : tab === "personal" ? "Personal" : "Company"}
|
|
657
|
+
</button>
|
|
703
658
|
))}
|
|
704
659
|
</div>
|
|
705
660
|
<div ref={listScrollRef} className="space-y-3">
|
|
@@ -335,26 +335,16 @@ export const LogEntryHeader = memo(function ({
|
|
|
335
335
|
|
|
336
336
|
{/* Streaming timing */}
|
|
337
337
|
{log.streaming && firstChunkLabel !== null && (
|
|
338
|
-
<
|
|
339
|
-
<
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
<span className="font-mono tabular-nums">first {firstChunkLabel}</span>
|
|
343
|
-
</span>
|
|
344
|
-
</TooltipTrigger>
|
|
345
|
-
<TooltipContent>Time to first streaming chunk</TooltipContent>
|
|
346
|
-
</Tooltip>
|
|
338
|
+
<span className={cn(TELEMETRY_CHIP_CLASS, "shrink-0 text-cyan-300")}>
|
|
339
|
+
<Radio className="size-3" />
|
|
340
|
+
<span className="font-mono tabular-nums">first {firstChunkLabel}</span>
|
|
341
|
+
</span>
|
|
347
342
|
)}
|
|
348
343
|
{log.streaming && tokenRateLabel !== null && (
|
|
349
|
-
<
|
|
350
|
-
<
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
<span className="font-mono tabular-nums">{tokenRateLabel}</span>
|
|
354
|
-
</span>
|
|
355
|
-
</TooltipTrigger>
|
|
356
|
-
<TooltipContent>Output token throughput after first chunk</TooltipContent>
|
|
357
|
-
</Tooltip>
|
|
344
|
+
<span className={cn(TELEMETRY_CHIP_CLASS, "shrink-0 text-cyan-300")}>
|
|
345
|
+
<Gauge className="size-3" />
|
|
346
|
+
<span className="font-mono tabular-nums">{tokenRateLabel}</span>
|
|
347
|
+
</span>
|
|
358
348
|
)}
|
|
359
349
|
|
|
360
350
|
{/* Token counts */}
|
|
@@ -431,35 +421,19 @@ export const LogEntryHeader = memo(function ({
|
|
|
431
421
|
|
|
432
422
|
{/* Client info (PID + project folder) */}
|
|
433
423
|
{showClientMetadata && (hasClientPid || hasClientProjectFolder) && (
|
|
434
|
-
<
|
|
435
|
-
<
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
) : (
|
|
443
|
-
<span className="font-mono tabular-nums">PID {log.clientPid}</span>
|
|
444
|
-
)}
|
|
445
|
-
</span>
|
|
446
|
-
</TooltipTrigger>
|
|
447
|
-
<TooltipContent>
|
|
448
|
-
{hasClientCwd
|
|
449
|
-
? `PID: ${log.clientPid ?? "?"} CWD: ${log.clientCwd}`
|
|
450
|
-
: `Process ID: ${log.clientPid ?? "?"}`}
|
|
451
|
-
</TooltipContent>
|
|
452
|
-
</Tooltip>
|
|
424
|
+
<span className={cn(TELEMETRY_CHIP_CLASS, "hidden shrink-0 text-purple-300 xl:flex")}>
|
|
425
|
+
<FileTerminal className="size-3" />
|
|
426
|
+
{hasClientProjectFolder ? (
|
|
427
|
+
<span className="font-mono tabular-nums">{log.clientProjectFolder}</span>
|
|
428
|
+
) : (
|
|
429
|
+
<span className="font-mono tabular-nums">PID {log.clientPid}</span>
|
|
430
|
+
)}
|
|
431
|
+
</span>
|
|
453
432
|
)}
|
|
454
433
|
|
|
455
434
|
{/* Streaming indicator */}
|
|
456
435
|
{showStandaloneStreamingIndicator && (
|
|
457
|
-
<
|
|
458
|
-
<TooltipTrigger asChild>
|
|
459
|
-
<Radio className="size-3 text-muted-foreground/60 shrink-0" />
|
|
460
|
-
</TooltipTrigger>
|
|
461
|
-
<TooltipContent>Request used SSE streaming</TooltipContent>
|
|
462
|
-
</Tooltip>
|
|
436
|
+
<Radio className="size-3 shrink-0 text-muted-foreground/60" />
|
|
463
437
|
)}
|
|
464
438
|
</span>
|
|
465
439
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as o}from"./ProxyViewerContainer-D_2ez29e.js";import"./main-2feHoEI6.js";const r=o;export{r as component};
|