@tonyclaw/agent-inspector 3.0.27 → 3.0.29
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-BVCAAbbu.js → CompareDrawer-Cb5ccPeX.js} +1 -1
- package/.output/public/assets/{ProxyViewerContainer-CYOXB81n.js → ProxyViewerContainer-COBe5GTT.js} +198 -198
- package/.output/public/assets/{ReplayDialog-DMX23O5G.js → ReplayDialog-CctnITbt.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-S17pYDRc.js → RequestAnatomy-BrN0RBbL.js} +1 -1
- package/.output/public/assets/{ResponseView-Cf1XrawD.js → ResponseView-Cqq87lX_.js} +2 -2
- package/.output/public/assets/{StreamingChunkSequence-BdOrVlCi.js → StreamingChunkSequence-CnTa9mCr.js} +1 -1
- package/.output/public/assets/{_sessionId-BnKGmJrR.js → _sessionId-DKM91udC.js} +1 -1
- package/.output/public/assets/{index-gY3I-7-D.js → index-Bq-nqolG.js} +1 -1
- package/.output/public/assets/{index-9fMLCU4d.js → index-DPiESBo2.js} +1 -1
- package/.output/public/assets/{index-B1atk19i.js → index-DTLNVcgc.js} +7 -7
- package/.output/public/assets/index-DliqmwUw.css +1 -0
- package/.output/public/assets/{json-viewer-CpyYpPjx.js → json-viewer-CfaDJwx8.js} +1 -1
- package/.output/server/_libs/lucide-react.mjs +39 -39
- package/.output/server/{_sessionId-eA_h2_s6.mjs → _sessionId-CwGXPD4C.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-K2k9G7r1.mjs → CompareDrawer-R_P1-VNr.mjs} +3 -3
- package/.output/server/_ssr/{ProxyViewerContainer-CbyBpCAj.mjs → ProxyViewerContainer-DUgxRNbj.mjs} +344 -191
- package/.output/server/_ssr/{ReplayDialog-DacI2Iv0.mjs → ReplayDialog-De9wKKzS.mjs} +4 -4
- package/.output/server/_ssr/{RequestAnatomy-gh-pAdkO.mjs → RequestAnatomy-Db4MxUYo.mjs} +2 -2
- package/.output/server/_ssr/{ResponseView-BRJKN50-.mjs → ResponseView-8rDXOiNB.mjs} +3 -3
- package/.output/server/_ssr/{StreamingChunkSequence-BQLVEuWY.mjs → StreamingChunkSequence-N9teZHkA.mjs} +2 -2
- package/.output/server/_ssr/{index-DuSWrjbH.mjs → index-D4DvByuW.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-DNs1ZjKI.mjs → json-viewer-BjoHRbjS.mjs} +3 -3
- package/.output/server/_ssr/{router-Dgx6-ot3.mjs → router-BYlePDj8.mjs} +138 -162
- package/.output/server/{_tanstack-start-manifest_v-CoGjnkQD.mjs → _tanstack-start-manifest_v-DMCA8KK3.mjs} +1 -1
- package/.output/server/index.mjs +68 -68
- package/package.json +1 -1
- package/src/components/ProxyViewer.tsx +57 -1
- package/src/components/clients/ClientLogo.tsx +51 -9
- package/src/components/inspector-pet/InspectorPet.tsx +0 -7
- package/src/components/proxy-viewer/ConversationGroup.tsx +1 -1
- package/src/components/proxy-viewer/ConversationGroupList.tsx +251 -155
- package/src/components/proxy-viewer/ConversationHeader.tsx +43 -23
- package/src/lib/jsonFile.ts +46 -0
- package/src/lib/utils.ts +5 -1
- package/src/proxy/evidenceAnalysis.ts +116 -117
- package/src/proxy/groupEvidenceExporter.ts +4 -8
- package/src/proxy/groupStore.ts +3 -10
- package/src/proxy/providerSecretStore.ts +4 -8
- package/src/proxy/runFailures.ts +4 -10
- package/src/proxy/runStore.ts +4 -11
- package/.output/public/assets/index-CmeF5XXS.css +0 -1
package/.output/server/index.mjs
CHANGED
|
@@ -20,121 +20,121 @@ const assets = {
|
|
|
20
20
|
"/assets/agent-inspector-58K1_MsC.ico": {
|
|
21
21
|
"type": "image/vnd.microsoft.icon",
|
|
22
22
|
"etag": '"38fa-ZD8kPABHYjPIkcH82FMY6iZM7fI"',
|
|
23
|
-
"mtime": "2026-07-
|
|
23
|
+
"mtime": "2026-07-11T08:33:29.981Z",
|
|
24
24
|
"size": 14586,
|
|
25
25
|
"path": "../public/assets/agent-inspector-58K1_MsC.ico"
|
|
26
26
|
},
|
|
27
27
|
"/assets/alibaba-TTwafVwX.svg": {
|
|
28
28
|
"type": "image/svg+xml",
|
|
29
29
|
"etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
|
|
30
|
-
"mtime": "2026-07-
|
|
30
|
+
"mtime": "2026-07-11T08:33:29.981Z",
|
|
31
31
|
"size": 5915,
|
|
32
32
|
"path": "../public/assets/alibaba-TTwafVwX.svg"
|
|
33
33
|
},
|
|
34
|
-
"/assets/
|
|
34
|
+
"/assets/json-viewer-CfaDJwx8.js": {
|
|
35
35
|
"type": "text/javascript; charset=utf-8",
|
|
36
|
-
"etag": '"
|
|
37
|
-
"mtime": "2026-07-
|
|
38
|
-
"size": 19396,
|
|
39
|
-
"path": "../public/assets/CompareDrawer-BVCAAbbu.js"
|
|
40
|
-
},
|
|
41
|
-
"/assets/json-viewer-CpyYpPjx.js": {
|
|
42
|
-
"type": "text/javascript; charset=utf-8",
|
|
43
|
-
"etag": '"1ae7-AXjzdLeB9CtNkkvC/oR6PHIpZrw"',
|
|
44
|
-
"mtime": "2026-07-11T04:43:38.032Z",
|
|
36
|
+
"etag": '"1ae7-T+/M8FSSwkvGbzOkJ/2Lb5mJqSs"',
|
|
37
|
+
"mtime": "2026-07-11T08:33:29.982Z",
|
|
45
38
|
"size": 6887,
|
|
46
|
-
"path": "../public/assets/json-viewer-
|
|
39
|
+
"path": "../public/assets/json-viewer-CfaDJwx8.js"
|
|
47
40
|
},
|
|
48
|
-
"/assets/index-
|
|
41
|
+
"/assets/index-DPiESBo2.js": {
|
|
49
42
|
"type": "text/javascript; charset=utf-8",
|
|
50
|
-
"etag": '"
|
|
51
|
-
"mtime": "2026-07-
|
|
52
|
-
"size":
|
|
53
|
-
"path": "../public/assets/index-
|
|
43
|
+
"etag": '"1cd2d-ZvxO1FYMv7b0bavhQij+IxPqNxI"',
|
|
44
|
+
"mtime": "2026-07-11T08:33:29.982Z",
|
|
45
|
+
"size": 118061,
|
|
46
|
+
"path": "../public/assets/index-DPiESBo2.js"
|
|
47
|
+
},
|
|
48
|
+
"/assets/index-DliqmwUw.css": {
|
|
49
|
+
"type": "text/css; charset=utf-8",
|
|
50
|
+
"etag": '"28ec4-pKYnk6JA2sEAWeib/WGc4RsJlZo"',
|
|
51
|
+
"mtime": "2026-07-11T08:33:29.981Z",
|
|
52
|
+
"size": 167620,
|
|
53
|
+
"path": "../public/assets/index-DliqmwUw.css"
|
|
54
54
|
},
|
|
55
|
-
"/assets/index-
|
|
55
|
+
"/assets/index-DTLNVcgc.js": {
|
|
56
56
|
"type": "text/javascript; charset=utf-8",
|
|
57
|
-
"etag": '"
|
|
58
|
-
"mtime": "2026-07-
|
|
59
|
-
"size":
|
|
60
|
-
"path": "../public/assets/index-
|
|
57
|
+
"etag": '"537cd-D7PyRt2jku7bDF92q6ovZ+at3vc"',
|
|
58
|
+
"mtime": "2026-07-11T08:33:29.981Z",
|
|
59
|
+
"size": 341965,
|
|
60
|
+
"path": "../public/assets/index-DTLNVcgc.js"
|
|
61
61
|
},
|
|
62
62
|
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
63
63
|
"type": "image/jpeg",
|
|
64
64
|
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
65
|
-
"mtime": "2026-07-
|
|
65
|
+
"mtime": "2026-07-11T08:33:29.981Z",
|
|
66
66
|
"size": 6918,
|
|
67
67
|
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
68
68
|
},
|
|
69
|
-
"/assets/
|
|
70
|
-
"type": "text/css; charset=utf-8",
|
|
71
|
-
"etag": '"28a56-x7Wmw+oL5ZFDjFw5JRwjxSop3gg"',
|
|
72
|
-
"mtime": "2026-07-11T04:43:38.031Z",
|
|
73
|
-
"size": 166486,
|
|
74
|
-
"path": "../public/assets/index-CmeF5XXS.css"
|
|
75
|
-
},
|
|
76
|
-
"/assets/RequestAnatomy-S17pYDRc.js": {
|
|
69
|
+
"/assets/CompareDrawer-Cb5ccPeX.js": {
|
|
77
70
|
"type": "text/javascript; charset=utf-8",
|
|
78
|
-
"etag": '"
|
|
79
|
-
"mtime": "2026-07-
|
|
80
|
-
"size":
|
|
81
|
-
"path": "../public/assets/
|
|
71
|
+
"etag": '"4bc4-DHG9pbDatJk9bClyztEt1UqrAT4"',
|
|
72
|
+
"mtime": "2026-07-11T08:33:29.981Z",
|
|
73
|
+
"size": 19396,
|
|
74
|
+
"path": "../public/assets/CompareDrawer-Cb5ccPeX.js"
|
|
82
75
|
},
|
|
83
|
-
"/assets/
|
|
76
|
+
"/assets/ReplayDialog-CctnITbt.js": {
|
|
84
77
|
"type": "text/javascript; charset=utf-8",
|
|
85
|
-
"etag": '"
|
|
86
|
-
"mtime": "2026-07-
|
|
87
|
-
"size":
|
|
88
|
-
"path": "../public/assets/
|
|
78
|
+
"etag": '"3348-0fckCAOkK1UC4nkjRLBGehN4X2A"',
|
|
79
|
+
"mtime": "2026-07-11T08:33:29.981Z",
|
|
80
|
+
"size": 13128,
|
|
81
|
+
"path": "../public/assets/ReplayDialog-CctnITbt.js"
|
|
89
82
|
},
|
|
90
|
-
"/assets/
|
|
83
|
+
"/assets/index-Bq-nqolG.js": {
|
|
91
84
|
"type": "text/javascript; charset=utf-8",
|
|
92
|
-
"etag": '"
|
|
93
|
-
"mtime": "2026-07-
|
|
94
|
-
"size":
|
|
95
|
-
"path": "../public/assets/
|
|
85
|
+
"etag": '"265-eCPwzF17tobzPmkS8kveSyjk/f8"',
|
|
86
|
+
"mtime": "2026-07-11T08:33:29.981Z",
|
|
87
|
+
"size": 613,
|
|
88
|
+
"path": "../public/assets/index-Bq-nqolG.js"
|
|
96
89
|
},
|
|
97
|
-
"/assets/
|
|
90
|
+
"/assets/RequestAnatomy-BrN0RBbL.js": {
|
|
98
91
|
"type": "text/javascript; charset=utf-8",
|
|
99
|
-
"etag": '"
|
|
100
|
-
"mtime": "2026-07-
|
|
101
|
-
"size":
|
|
102
|
-
"path": "../public/assets/
|
|
92
|
+
"etag": '"43f3-tHiogWhSlLk1V4B2zt7nDCFLDWI"',
|
|
93
|
+
"mtime": "2026-07-11T08:33:29.981Z",
|
|
94
|
+
"size": 17395,
|
|
95
|
+
"path": "../public/assets/RequestAnatomy-BrN0RBbL.js"
|
|
103
96
|
},
|
|
104
|
-
"/assets/
|
|
97
|
+
"/assets/ResponseView-Cqq87lX_.js": {
|
|
105
98
|
"type": "text/javascript; charset=utf-8",
|
|
106
|
-
"etag": '"
|
|
107
|
-
"mtime": "2026-07-
|
|
108
|
-
"size":
|
|
109
|
-
"path": "../public/assets/
|
|
99
|
+
"etag": '"47fe-jzMkpDCjmJMzOygADqj3agP67TA"',
|
|
100
|
+
"mtime": "2026-07-11T08:33:29.981Z",
|
|
101
|
+
"size": 18430,
|
|
102
|
+
"path": "../public/assets/ResponseView-Cqq87lX_.js"
|
|
110
103
|
},
|
|
111
|
-
"/assets/
|
|
104
|
+
"/assets/StreamingChunkSequence-CnTa9mCr.js": {
|
|
112
105
|
"type": "text/javascript; charset=utf-8",
|
|
113
|
-
"etag": '"
|
|
114
|
-
"mtime": "2026-07-
|
|
115
|
-
"size":
|
|
116
|
-
"path": "../public/assets/
|
|
106
|
+
"etag": '"e96-YzbbUNDZ2WAJTeAaxiEjdXJL4uA"',
|
|
107
|
+
"mtime": "2026-07-11T08:33:29.982Z",
|
|
108
|
+
"size": 3734,
|
|
109
|
+
"path": "../public/assets/StreamingChunkSequence-CnTa9mCr.js"
|
|
117
110
|
},
|
|
118
111
|
"/assets/zhipuai-BPNAnxo-.svg": {
|
|
119
112
|
"type": "image/svg+xml",
|
|
120
113
|
"etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
|
|
121
|
-
"mtime": "2026-07-
|
|
114
|
+
"mtime": "2026-07-11T08:33:29.981Z",
|
|
122
115
|
"size": 11256,
|
|
123
116
|
"path": "../public/assets/zhipuai-BPNAnxo-.svg"
|
|
124
117
|
},
|
|
125
118
|
"/assets/qwen-CONDcHqt.png": {
|
|
126
119
|
"type": "image/png",
|
|
127
120
|
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
128
|
-
"mtime": "2026-07-
|
|
121
|
+
"mtime": "2026-07-11T08:33:29.981Z",
|
|
129
122
|
"size": 357059,
|
|
130
123
|
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
131
124
|
},
|
|
132
|
-
"/assets/
|
|
125
|
+
"/assets/_sessionId-DKM91udC.js": {
|
|
126
|
+
"type": "text/javascript; charset=utf-8",
|
|
127
|
+
"etag": '"36d-H7Npt5FbAUZ4PkVzy9EXc0/6t3c"',
|
|
128
|
+
"mtime": "2026-07-11T08:33:29.981Z",
|
|
129
|
+
"size": 877,
|
|
130
|
+
"path": "../public/assets/_sessionId-DKM91udC.js"
|
|
131
|
+
},
|
|
132
|
+
"/assets/ProxyViewerContainer-COBe5GTT.js": {
|
|
133
133
|
"type": "text/javascript; charset=utf-8",
|
|
134
|
-
"etag": '"
|
|
135
|
-
"mtime": "2026-07-
|
|
136
|
-
"size":
|
|
137
|
-
"path": "../public/assets/ProxyViewerContainer-
|
|
134
|
+
"etag": '"141300-JvEEzV1kBx2VyyR9a6sSD0j8rSQ"',
|
|
135
|
+
"mtime": "2026-07-11T08:33:29.982Z",
|
|
136
|
+
"size": 1315584,
|
|
137
|
+
"path": "../public/assets/ProxyViewerContainer-COBe5GTT.js"
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
function readAsset(id) {
|
package/package.json
CHANGED
|
@@ -933,6 +933,32 @@ function ThemeModeToggle(): JSX.Element {
|
|
|
933
933
|
);
|
|
934
934
|
}
|
|
935
935
|
|
|
936
|
+
function PetVisibilityToggle({
|
|
937
|
+
visible,
|
|
938
|
+
onToggle,
|
|
939
|
+
}: {
|
|
940
|
+
visible: boolean;
|
|
941
|
+
onToggle: () => void;
|
|
942
|
+
}): JSX.Element {
|
|
943
|
+
const label = visible ? "Hide Inspector pet" : "Summon Inspector pet";
|
|
944
|
+
|
|
945
|
+
return (
|
|
946
|
+
<button
|
|
947
|
+
type="button"
|
|
948
|
+
onClick={onToggle}
|
|
949
|
+
className={cn(
|
|
950
|
+
"border-border/70 bg-muted/70 inline-flex size-8 shrink-0 items-center justify-center rounded-md border text-muted-foreground shadow-sm transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none",
|
|
951
|
+
visible && "bg-background text-amber-500 shadow-sm",
|
|
952
|
+
)}
|
|
953
|
+
aria-label={label}
|
|
954
|
+
aria-pressed={visible}
|
|
955
|
+
title={label}
|
|
956
|
+
>
|
|
957
|
+
<CrabLogo className={cn("size-4 transition-opacity", !visible && "opacity-45")} />
|
|
958
|
+
</button>
|
|
959
|
+
);
|
|
960
|
+
}
|
|
961
|
+
|
|
936
962
|
function UiScaleControl({
|
|
937
963
|
preference,
|
|
938
964
|
resolvedScale,
|
|
@@ -1056,6 +1082,7 @@ function BrandHeader({
|
|
|
1056
1082
|
}
|
|
1057
1083
|
|
|
1058
1084
|
const DETAILS_PANEL_COLLAPSED_STORAGE_KEY = "agent-inspector.detailsPanelCollapsed";
|
|
1085
|
+
const INSPECTOR_PET_VISIBLE_STORAGE_KEY = "agent-inspector.pet.visible";
|
|
1059
1086
|
|
|
1060
1087
|
function readStoredDetailsPanelCollapsed(): boolean {
|
|
1061
1088
|
if (typeof window === "undefined") return true;
|
|
@@ -1063,6 +1090,15 @@ function readStoredDetailsPanelCollapsed(): boolean {
|
|
|
1063
1090
|
return stored === null || stored === "1";
|
|
1064
1091
|
}
|
|
1065
1092
|
|
|
1093
|
+
function readStoredInspectorPetVisible(): boolean {
|
|
1094
|
+
if (typeof window === "undefined") return true;
|
|
1095
|
+
try {
|
|
1096
|
+
return window.localStorage.getItem(INSPECTOR_PET_VISIBLE_STORAGE_KEY) !== "0";
|
|
1097
|
+
} catch {
|
|
1098
|
+
return true;
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1066
1102
|
function SessionContextLogButton({ label, logId }: { label: string; logId: number }): JSX.Element {
|
|
1067
1103
|
return (
|
|
1068
1104
|
<button
|
|
@@ -1451,6 +1487,8 @@ export function ProxyViewer({
|
|
|
1451
1487
|
const [deletingCurrentView, setDeletingCurrentView] = useState(false);
|
|
1452
1488
|
const [detailsPanelCollapsed, setDetailsPanelCollapsed] = useState(true);
|
|
1453
1489
|
const [detailsPanelStorageLoaded, setDetailsPanelStorageLoaded] = useState(false);
|
|
1490
|
+
const [petVisible, setPetVisible] = useState(true);
|
|
1491
|
+
const [petVisibilityStorageLoaded, setPetVisibilityStorageLoaded] = useState(false);
|
|
1454
1492
|
const [comparePair, setComparePair] = useState<[CapturedLog, CapturedLog] | null>(null);
|
|
1455
1493
|
const [crabEntrancePhase, setCrabEntrancePhase] = useState<"hidden" | "playing" | "done">(
|
|
1456
1494
|
"hidden",
|
|
@@ -1504,6 +1542,20 @@ export function ProxyViewer({
|
|
|
1504
1542
|
);
|
|
1505
1543
|
}, [detailsPanelCollapsed, detailsPanelStorageLoaded]);
|
|
1506
1544
|
|
|
1545
|
+
useEffect(() => {
|
|
1546
|
+
setPetVisible(readStoredInspectorPetVisible());
|
|
1547
|
+
setPetVisibilityStorageLoaded(true);
|
|
1548
|
+
}, []);
|
|
1549
|
+
|
|
1550
|
+
useEffect(() => {
|
|
1551
|
+
if (!petVisibilityStorageLoaded) return;
|
|
1552
|
+
try {
|
|
1553
|
+
window.localStorage.setItem(INSPECTOR_PET_VISIBLE_STORAGE_KEY, petVisible ? "1" : "0");
|
|
1554
|
+
} catch {
|
|
1555
|
+
// Local storage can be unavailable in hardened browser profiles.
|
|
1556
|
+
}
|
|
1557
|
+
}, [petVisibilityStorageLoaded, petVisible]);
|
|
1558
|
+
|
|
1507
1559
|
useEffect(() => {
|
|
1508
1560
|
if (pinnedSessionId === undefined) {
|
|
1509
1561
|
document.title = "Agent Inspector";
|
|
@@ -1640,6 +1692,9 @@ export function ProxyViewer({
|
|
|
1640
1692
|
const toggleDetailsPanelCollapsed = useCallback(() => {
|
|
1641
1693
|
setDetailsPanelCollapsed((value) => !value);
|
|
1642
1694
|
}, []);
|
|
1695
|
+
const togglePetVisibility = useCallback(() => {
|
|
1696
|
+
setPetVisible((value) => !value);
|
|
1697
|
+
}, []);
|
|
1643
1698
|
|
|
1644
1699
|
const groups = useMemo(() => groupLogsByConversation(logs), [logs]);
|
|
1645
1700
|
const displayNumberByLogId = useMemo(() => buildDisplayNumberByLogId(groups), [groups]);
|
|
@@ -1741,7 +1796,7 @@ export function ProxyViewer({
|
|
|
1741
1796
|
<PanelRightClose className="size-3.5" />
|
|
1742
1797
|
)}
|
|
1743
1798
|
</button>
|
|
1744
|
-
{
|
|
1799
|
+
{petVisibilityStorageLoaded && petVisible && <InspectorPet logs={logs} />}
|
|
1745
1800
|
<div
|
|
1746
1801
|
className={cn(
|
|
1747
1802
|
"grid w-full min-w-0 grid-cols-1 lg:min-h-0 lg:flex-1 lg:overflow-hidden",
|
|
@@ -1892,6 +1947,7 @@ export function ProxyViewer({
|
|
|
1892
1947
|
{activeScopeLabel}
|
|
1893
1948
|
</div>
|
|
1894
1949
|
</div>
|
|
1950
|
+
<PetVisibilityToggle visible={petVisible} onToggle={togglePetVisibility} />
|
|
1895
1951
|
{onImportLogs !== undefined && (
|
|
1896
1952
|
<>
|
|
1897
1953
|
<input
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { JSX } from "react";
|
|
2
|
+
import { Code2 } from "lucide-react";
|
|
2
3
|
import { cn } from "../../lib/utils";
|
|
3
4
|
import ClaudeCodeLogoSvg from "../../assets/IDE/claudecode-color.svg";
|
|
4
5
|
import CodexLogoSvg from "../../assets/IDE/codex-color.svg";
|
|
@@ -12,6 +13,7 @@ export type ClientApp =
|
|
|
12
13
|
| "opencode"
|
|
13
14
|
| "mimo-code"
|
|
14
15
|
| "claude-code"
|
|
16
|
+
| "ai-sdk"
|
|
15
17
|
| "unknown";
|
|
16
18
|
|
|
17
19
|
export type ClientAppDetectionInput = {
|
|
@@ -26,6 +28,7 @@ const CLIENT_LABELS: Record<Exclude<ClientApp, "unknown">, string> = {
|
|
|
26
28
|
opencode: "OpenCode",
|
|
27
29
|
"mimo-code": "MiMo Code",
|
|
28
30
|
"claude-code": "Claude Code",
|
|
31
|
+
"ai-sdk": "AI SDK",
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
function normalize(value: string | null | undefined): string {
|
|
@@ -59,6 +62,7 @@ export function detectClientApp(input: ClientAppDetectionInput): ClientApp {
|
|
|
59
62
|
if (matchesAny(haystack, ["codex desktop", "codex-cli", "openai-codex", "codex"])) {
|
|
60
63
|
return "codex";
|
|
61
64
|
}
|
|
65
|
+
if (matchesAny(normalize(input.userAgent), ["ai-sdk", "ai/"])) return "ai-sdk";
|
|
62
66
|
|
|
63
67
|
return "unknown";
|
|
64
68
|
}
|
|
@@ -70,13 +74,30 @@ export function clientAppLabel(client: ClientApp): string | null {
|
|
|
70
74
|
case "opencode":
|
|
71
75
|
case "mimo-code":
|
|
72
76
|
case "claude-code":
|
|
77
|
+
case "ai-sdk":
|
|
73
78
|
return CLIENT_LABELS[client];
|
|
74
79
|
case "unknown":
|
|
75
80
|
return null;
|
|
76
81
|
}
|
|
77
82
|
}
|
|
78
83
|
|
|
79
|
-
|
|
84
|
+
export function clientAppTypeLabel(client: ClientApp): "IDE" | "CLIENT" {
|
|
85
|
+
switch (client) {
|
|
86
|
+
case "codex":
|
|
87
|
+
case "opencode":
|
|
88
|
+
case "mimo-code":
|
|
89
|
+
case "claude-code":
|
|
90
|
+
return "IDE";
|
|
91
|
+
case "agent-inspector":
|
|
92
|
+
case "ai-sdk":
|
|
93
|
+
case "unknown":
|
|
94
|
+
return "CLIENT";
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
type ImageClientApp = Exclude<ClientApp, "unknown" | "ai-sdk">;
|
|
99
|
+
|
|
100
|
+
const CLIENT_LOGOS: Record<ImageClientApp, string> = {
|
|
80
101
|
"agent-inspector": AgentInspectorLogo,
|
|
81
102
|
codex: CodexLogoSvg,
|
|
82
103
|
opencode: OpenCodeLogoSvg,
|
|
@@ -84,15 +105,18 @@ const CLIENT_LOGOS: Record<Exclude<ClientApp, "unknown">, string> = {
|
|
|
84
105
|
"claude-code": ClaudeCodeLogoSvg,
|
|
85
106
|
};
|
|
86
107
|
|
|
87
|
-
const CLIENT_LOGO_FRAMES: Record<
|
|
88
|
-
"agent-inspector":
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
108
|
+
const CLIENT_LOGO_FRAMES: Record<ImageClientApp, string> = {
|
|
109
|
+
"agent-inspector":
|
|
110
|
+
"border-orange-700/15 bg-orange-500/[0.08] dark:border-orange-200/25 dark:bg-orange-300/[0.12]",
|
|
111
|
+
codex: "border-cyan-700/15 bg-cyan-500/[0.08] dark:border-cyan-200/20 dark:bg-cyan-300/[0.08]",
|
|
112
|
+
opencode: "border-sky-700/15 bg-sky-500/[0.09] dark:border-sky-200/25 dark:bg-sky-300/[0.12]",
|
|
113
|
+
"mimo-code":
|
|
114
|
+
"border-orange-700/15 bg-orange-500/[0.09] dark:border-orange-200/25 dark:bg-orange-400/[0.12]",
|
|
115
|
+
"claude-code":
|
|
116
|
+
"border-amber-700/15 bg-amber-500/[0.08] dark:border-amber-100/20 dark:bg-amber-300/[0.09]",
|
|
93
117
|
};
|
|
94
118
|
|
|
95
|
-
const CLIENT_LOGO_IMAGES: Record<
|
|
119
|
+
const CLIENT_LOGO_IMAGES: Record<ImageClientApp, string> = {
|
|
96
120
|
"agent-inspector": "p-0.5 drop-shadow-[0_0_8px_rgba(251,146,60,0.35)]",
|
|
97
121
|
codex: "p-0.5",
|
|
98
122
|
opencode: "p-1 drop-shadow-[0_0_8px_rgba(125,211,252,0.35)]",
|
|
@@ -103,13 +127,30 @@ const CLIENT_LOGO_IMAGES: Record<Exclude<ClientApp, "unknown">, string> = {
|
|
|
103
127
|
export function ClientLogo({
|
|
104
128
|
client,
|
|
105
129
|
className,
|
|
130
|
+
decorative = false,
|
|
106
131
|
}: {
|
|
107
132
|
client: ClientApp;
|
|
108
133
|
className?: string;
|
|
134
|
+
decorative?: boolean;
|
|
109
135
|
}): JSX.Element | null {
|
|
110
136
|
if (client === "unknown") return null;
|
|
111
137
|
const label = clientAppLabel(client);
|
|
112
138
|
if (label === null) return null;
|
|
139
|
+
if (client === "ai-sdk") {
|
|
140
|
+
return (
|
|
141
|
+
<span
|
|
142
|
+
className={cn(
|
|
143
|
+
"inline-flex size-6 shrink-0 items-center justify-center rounded-md border border-cyan-700/15 bg-cyan-500/[0.08] text-[var(--inspector-status-cool)] shadow-sm dark:border-cyan-200/20 dark:bg-cyan-300/[0.08]",
|
|
144
|
+
className,
|
|
145
|
+
)}
|
|
146
|
+
aria-label={decorative ? undefined : label}
|
|
147
|
+
aria-hidden={decorative ? true : undefined}
|
|
148
|
+
title={label}
|
|
149
|
+
>
|
|
150
|
+
<Code2 className="size-1/2" aria-hidden="true" />
|
|
151
|
+
</span>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
113
154
|
const logoSrc = CLIENT_LOGOS[client];
|
|
114
155
|
|
|
115
156
|
return (
|
|
@@ -119,7 +160,8 @@ export function ClientLogo({
|
|
|
119
160
|
CLIENT_LOGO_FRAMES[client],
|
|
120
161
|
className,
|
|
121
162
|
)}
|
|
122
|
-
aria-label={label}
|
|
163
|
+
aria-label={decorative ? undefined : label}
|
|
164
|
+
aria-hidden={decorative ? true : undefined}
|
|
123
165
|
title={label}
|
|
124
166
|
>
|
|
125
167
|
<img
|
|
@@ -349,13 +349,6 @@ export function InspectorPet({ logs }: InspectorPetProps): JSX.Element {
|
|
|
349
349
|
/>
|
|
350
350
|
</span>
|
|
351
351
|
</span>
|
|
352
|
-
<span
|
|
353
|
-
className={cn(
|
|
354
|
-
"absolute right-0 top-2 size-3 rounded-full border border-background/90",
|
|
355
|
-
moodDotClass(status.mood),
|
|
356
|
-
status.mood === "active" && !reduceMotion && "animate-pulse",
|
|
357
|
-
)}
|
|
358
|
-
/>
|
|
359
352
|
{reactionVisible && (
|
|
360
353
|
<Heart
|
|
361
354
|
key={reactionTick}
|