@tonyclaw/llm-inspector 1.9.8 → 1.10.0
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 +3 -3
- package/.output/public/assets/{index-NIg9RFlA.js → index-BFuUQkWu.js} +3 -3
- package/.output/public/assets/index-F2ojFPJp.css +1 -0
- package/.output/public/assets/index-nKnhyW4Y.js +122 -0
- package/.output/server/_libs/@radix-ui/react-accessible-icon+[...].mjs +1 -1
- package/.output/server/_libs/@radix-ui/react-navigation-menu+[...].mjs +2 -1
- package/.output/server/_libs/@radix-ui/react-one-time-password-field+[...].mjs +2 -1
- package/.output/server/_libs/@radix-ui/react-password-toggle-field+[...].mjs +2 -1
- package/.output/server/_libs/@radix-ui/react-use-effect-event+[...].mjs +1 -1
- package/.output/server/_libs/@radix-ui/react-use-is-hydrated+[...].mjs +1 -1
- package/.output/server/_libs/ajv-formats.mjs +3 -3
- package/.output/server/_libs/ajv.mjs +819 -6183
- package/.output/server/_libs/extend.mjs +1 -1
- package/.output/server/_libs/fast-uri.mjs +3 -3
- package/.output/server/_libs/floating-ui__core.mjs +18 -17
- package/.output/server/_libs/floating-ui__dom.mjs +24 -20
- package/.output/server/_libs/floating-ui__react-dom.mjs +55 -28
- package/.output/server/_libs/floating-ui__utils.mjs +36 -36
- package/.output/server/_libs/inherits.mjs +1 -1
- package/.output/server/_libs/isbot.mjs +3 -2
- package/.output/server/_libs/json-schema-traverse.mjs +1 -90
- package/.output/server/_libs/jszip.mjs +103 -101
- package/.output/server/_libs/lie.mjs +1 -1
- package/.output/server/_libs/mdast-util-from-markdown.mjs +1 -1
- package/.output/server/_libs/pako.mjs +28 -28
- package/.output/server/_libs/property-information.mjs +13 -1
- package/.output/server/_libs/radix-ui__react-accordion.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-alert-dialog.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-aspect-ratio.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-avatar.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-checkbox.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-context-menu.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-dropdown-menu.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-form.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-hover-card.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-label.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-menu.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-menubar.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-popover.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-progress.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-radio-group.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-slider.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-switch.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-toast.mjs +2 -1
- package/.output/server/_libs/radix-ui__react-toggle-group.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-toggle.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-toolbar.mjs +1 -1
- package/.output/server/_libs/react-dom.mjs +14 -14
- package/.output/server/_libs/react-remove-scroll.mjs +1 -1
- package/.output/server/_libs/react.mjs +5 -5
- package/.output/server/_libs/readable-stream.mjs +36 -36
- package/.output/server/_libs/semver.mjs +138 -125
- package/.output/server/_libs/setimmediate.mjs +152 -1
- package/.output/server/_libs/style-to-js.mjs +3 -3
- package/.output/server/_libs/style-to-object.mjs +1 -1
- package/.output/server/_libs/swr.mjs +1 -0
- package/.output/server/_libs/tailwind-merge.mjs +286 -41
- package/.output/server/_libs/tanstack__react-router.mjs +1 -1
- package/.output/server/_libs/tanstack__react-store.mjs +1 -1
- package/.output/server/_libs/tanstack__react-virtual.mjs +82 -7
- package/.output/server/_libs/tanstack__virtual-core.mjs +58 -17
- package/.output/server/_libs/tslib.mjs +1 -576
- package/.output/server/_libs/ungap__structured-clone.mjs +14 -2
- package/.output/server/_libs/use-sidecar.mjs +1 -1
- package/.output/server/_libs/use-sync-external-store.mjs +3 -3
- package/.output/server/_ssr/{index-BnKtV0Rq.mjs → index-XyU4WVWt.mjs} +270 -83
- package/.output/server/_ssr/index.mjs +4 -4
- package/.output/server/_ssr/{router-CQ7QyRWm.mjs → router-BR4XO8XJ.mjs} +231 -33
- package/.output/server/_tanstack-start-manifest_v-DFoSjBkb.mjs +4 -0
- package/.output/server/index.mjs +121 -137
- package/.output/server/node_modules/tslib/modules/index.js +70 -0
- package/.output/server/node_modules/tslib/modules/package.json +3 -0
- package/.output/server/node_modules/tslib/package.json +47 -0
- package/.output/server/node_modules/tslib/tslib.js +484 -0
- package/.output/server/package.json +9 -0
- package/package.json +3 -3
- package/src/components/providers/SettingsDialog.tsx +60 -0
- package/src/components/proxy-viewer/ConversationGroup.tsx +7 -2
- package/src/components/proxy-viewer/ConversationHeader.tsx +53 -0
- package/src/components/proxy-viewer/LogEntry.tsx +67 -7
- package/src/components/proxy-viewer/LogEntryHeader.tsx +21 -18
- package/src/components/proxy-viewer/ReplayDialog.tsx +3 -3
- package/src/lib/runtimeConfig.ts +15 -0
- package/src/lib/useStripConfig.ts +86 -0
- package/src/proxy/claudeCodeStrip.ts +102 -0
- package/src/proxy/config.ts +176 -0
- package/src/proxy/constants.ts +11 -0
- package/src/proxy/handler.ts +23 -1
- package/src/routes/api/config.ts +45 -0
- package/.output/public/assets/index-Cc1oV0hF.css +0 -1
- package/.output/public/assets/index-DuukpBQJ.js +0 -122
- package/.output/server/_tanstack-start-manifest_v-CKgCX0Gs.mjs +0 -4
- /package/.output/server/_libs/{unctx.mjs → ocache.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as invariant, a as isDangerousProtocol, e as exactPathTest, r as removeTrailingSlash, h as hasKeys, d as deepEqual, f as functionalUpdate, B as BaseRootRoute, b as BaseRoute, c as isModuleNotFoundError, g as isNotFound, j as getScrollRestorationScriptForRouter, k as rootRouteId, l as isServer, m as isRedirect, n as createNonReactiveReadonlyStore, o as createNonReactiveMutableStore, R as RouterCore, p as escapeHtml, q as getAssetCrossOrigin, s as getScriptPreloadAttrs, t as appendUniqueUserTags, u as resolveManifestCssLink, v as transformReadableStreamWithRouter, w as createSsrStreamResponse, x as transformPipeableStreamWithRouter } from "./tanstack__router-core.mjs";
|
|
2
1
|
import { r as reactExports, j as jsxRuntimeExports, R as React } from "./react.mjs";
|
|
2
|
+
import { i as invariant, a as isDangerousProtocol, e as exactPathTest, r as removeTrailingSlash, h as hasKeys, d as deepEqual, f as functionalUpdate, B as BaseRootRoute, b as BaseRoute, c as isModuleNotFoundError, g as isNotFound, j as getScrollRestorationScriptForRouter, k as rootRouteId, l as isServer, m as isRedirect, n as createNonReactiveReadonlyStore, o as createNonReactiveMutableStore, R as RouterCore, p as escapeHtml, q as getAssetCrossOrigin, s as getScriptPreloadAttrs, t as appendUniqueUserTags, u as resolveManifestCssLink, v as transformReadableStreamWithRouter, w as createSsrStreamResponse, x as transformPipeableStreamWithRouter } from "./tanstack__router-core.mjs";
|
|
3
3
|
import { R as ReactDOMServer } from "./react-dom.mjs";
|
|
4
4
|
import { PassThrough } from "node:stream";
|
|
5
5
|
import { i as isbot } from "./isbot.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "./react.mjs";
|
|
@@ -4,24 +4,96 @@ import { V as Virtualizer, e as elementScroll, o as observeElementOffset, a as o
|
|
|
4
4
|
const useIsomorphicLayoutEffect = typeof document !== "undefined" ? reactExports.useLayoutEffect : reactExports.useEffect;
|
|
5
5
|
function useVirtualizerBase({
|
|
6
6
|
useFlushSync = true,
|
|
7
|
+
directDomUpdates = false,
|
|
8
|
+
directDomUpdatesMode = "transform",
|
|
7
9
|
...options
|
|
8
10
|
}) {
|
|
9
11
|
const rerender = reactExports.useReducer((x) => x + 1, 0)[1];
|
|
12
|
+
const directRef = reactExports.useRef({
|
|
13
|
+
enabled: directDomUpdates,
|
|
14
|
+
mode: directDomUpdatesMode,
|
|
15
|
+
container: null,
|
|
16
|
+
lastSize: null,
|
|
17
|
+
// Keyed by the element itself so a remounted node (same key, new DOM
|
|
18
|
+
// node — e.g. when `enabled` is toggled off then on) is treated as fresh
|
|
19
|
+
// and gets its style written.
|
|
20
|
+
lastPositions: /* @__PURE__ */ new WeakMap(),
|
|
21
|
+
prevRange: null
|
|
22
|
+
});
|
|
23
|
+
directRef.current.enabled = directDomUpdates;
|
|
24
|
+
directRef.current.mode = directDomUpdatesMode;
|
|
25
|
+
const applyDirectStyles = (instance2) => {
|
|
26
|
+
const state = directRef.current;
|
|
27
|
+
if (!state.enabled) return;
|
|
28
|
+
const totalSize = instance2.getTotalSize();
|
|
29
|
+
if (state.container && totalSize !== state.lastSize) {
|
|
30
|
+
state.lastSize = totalSize;
|
|
31
|
+
const sizeAxis = instance2.options.horizontal ? "width" : "height";
|
|
32
|
+
state.container.style[sizeAxis] = `${totalSize}px`;
|
|
33
|
+
}
|
|
34
|
+
const horizontal = !!instance2.options.horizontal;
|
|
35
|
+
const useTransform = state.mode === "transform";
|
|
36
|
+
const posAxis = horizontal ? "left" : "top";
|
|
37
|
+
const scrollMargin = instance2.options.scrollMargin;
|
|
38
|
+
const items = instance2.getVirtualItems();
|
|
39
|
+
for (const item of items) {
|
|
40
|
+
const next = item.start - scrollMargin;
|
|
41
|
+
const el = instance2.elementsCache.get(item.key);
|
|
42
|
+
if (!el) continue;
|
|
43
|
+
if (state.lastPositions.get(el) === next) continue;
|
|
44
|
+
state.lastPositions.set(el, next);
|
|
45
|
+
if (useTransform) {
|
|
46
|
+
el.style.transform = horizontal ? `translate3d(${next}px, 0, 0)` : `translate3d(0, ${next}px, 0)`;
|
|
47
|
+
} else {
|
|
48
|
+
el.style[posAxis] = `${next}px`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
10
52
|
const resolvedOptions = {
|
|
11
53
|
...options,
|
|
12
54
|
onChange: (instance2, sync) => {
|
|
13
55
|
var _a;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
56
|
+
const state = directRef.current;
|
|
57
|
+
let shouldRerender = true;
|
|
58
|
+
if (state.enabled) {
|
|
59
|
+
applyDirectStyles(instance2);
|
|
60
|
+
const range = instance2.range;
|
|
61
|
+
const prev = state.prevRange;
|
|
62
|
+
shouldRerender = !prev || prev.isScrolling !== instance2.isScrolling || prev.startIndex !== (range == null ? void 0 : range.startIndex) || prev.endIndex !== (range == null ? void 0 : range.endIndex);
|
|
63
|
+
if (shouldRerender) {
|
|
64
|
+
state.prevRange = range ? {
|
|
65
|
+
startIndex: range.startIndex,
|
|
66
|
+
endIndex: range.endIndex,
|
|
67
|
+
isScrolling: instance2.isScrolling
|
|
68
|
+
} : null;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (shouldRerender) {
|
|
72
|
+
if (useFlushSync && sync) {
|
|
73
|
+
reactDomExports.flushSync(rerender);
|
|
74
|
+
} else {
|
|
75
|
+
rerender();
|
|
76
|
+
}
|
|
18
77
|
}
|
|
19
78
|
(_a = options.onChange) == null ? void 0 : _a.call(options, instance2, sync);
|
|
20
79
|
}
|
|
21
80
|
};
|
|
22
|
-
const [instance] = reactExports.useState(
|
|
23
|
-
|
|
24
|
-
|
|
81
|
+
const [instance] = reactExports.useState(() => {
|
|
82
|
+
const v = new Virtualizer(resolvedOptions);
|
|
83
|
+
return Object.assign(v, {
|
|
84
|
+
containerRef: (node) => {
|
|
85
|
+
const state = directRef.current;
|
|
86
|
+
state.container = node;
|
|
87
|
+
state.lastSize = null;
|
|
88
|
+
if (node && state.enabled) {
|
|
89
|
+
const total = v.getTotalSize();
|
|
90
|
+
state.lastSize = total;
|
|
91
|
+
const axis = v.options.horizontal ? "width" : "height";
|
|
92
|
+
node.style[axis] = `${total}px`;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
25
97
|
instance.setOptions(resolvedOptions);
|
|
26
98
|
useIsomorphicLayoutEffect(() => {
|
|
27
99
|
return instance._didMount();
|
|
@@ -29,6 +101,9 @@ function useVirtualizerBase({
|
|
|
29
101
|
useIsomorphicLayoutEffect(() => {
|
|
30
102
|
return instance._willUpdate();
|
|
31
103
|
});
|
|
104
|
+
useIsomorphicLayoutEffect(() => {
|
|
105
|
+
applyDirectStyles(instance);
|
|
106
|
+
});
|
|
32
107
|
return instance;
|
|
33
108
|
}
|
|
34
109
|
function useVirtualizer(options) {
|
|
@@ -169,6 +169,11 @@ const observeElementOffset = (instance, cb) => observeOffset(instance, cb, (el)
|
|
|
169
169
|
return horizontal ? el.scrollLeft * (isRtl && -1 || 1) : el.scrollTop;
|
|
170
170
|
});
|
|
171
171
|
const measureElement = (element, entry, instance) => {
|
|
172
|
+
if (instance.options.useCachedMeasurements) {
|
|
173
|
+
const index = instance.indexFromElement(element);
|
|
174
|
+
const key = instance.options.getItemKey(index);
|
|
175
|
+
return instance.itemSizeCache.get(key) ?? instance.options.estimateSize(index);
|
|
176
|
+
}
|
|
172
177
|
if (entry == null ? void 0 : entry.borderBoxSize) {
|
|
173
178
|
const box = entry.borderBoxSize[0];
|
|
174
179
|
if (box) {
|
|
@@ -178,6 +183,14 @@ const measureElement = (element, entry, instance) => {
|
|
|
178
183
|
return size;
|
|
179
184
|
}
|
|
180
185
|
}
|
|
186
|
+
if (!entry) {
|
|
187
|
+
const index = instance.indexFromElement(element);
|
|
188
|
+
const key = instance.options.getItemKey(index);
|
|
189
|
+
const cachedSize = instance.itemSizeCache.get(key);
|
|
190
|
+
if (cachedSize !== void 0) {
|
|
191
|
+
return cachedSize;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
181
194
|
return element[instance.options.horizontal ? "offsetWidth" : "offsetHeight"];
|
|
182
195
|
};
|
|
183
196
|
const scrollWithAdjustments = (offset, {
|
|
@@ -304,7 +317,8 @@ class Virtualizer {
|
|
|
304
317
|
isRtl: false,
|
|
305
318
|
useScrollendEvent: false,
|
|
306
319
|
useAnimationFrameWithResizeObserver: false,
|
|
307
|
-
laneAssignmentMode: "estimate"
|
|
320
|
+
laneAssignmentMode: "estimate",
|
|
321
|
+
useCachedMeasurements: false
|
|
308
322
|
};
|
|
309
323
|
for (const key in opts2) {
|
|
310
324
|
const v = opts2[key];
|
|
@@ -313,6 +327,7 @@ class Virtualizer {
|
|
|
313
327
|
const prevOptions = this.options;
|
|
314
328
|
let anchor = null;
|
|
315
329
|
let followOnAppend = null;
|
|
330
|
+
let edgeKeysChanged = false;
|
|
316
331
|
if (prevOptions !== void 0 && prevOptions.enabled && merged.enabled && merged.anchorTo === "end" && this.scrollElement !== null) {
|
|
317
332
|
const prevCount = prevOptions.count;
|
|
318
333
|
const nextCount = merged.count;
|
|
@@ -322,6 +337,7 @@ class Virtualizer {
|
|
|
322
337
|
const didCountChange = nextCount !== prevCount;
|
|
323
338
|
const didEdgeKeysChange = didCountChange || prevCount > 0 && nextCount > 0 && (merged.getItemKey(0) !== prevFirstKey || merged.getItemKey(nextCount - 1) !== prevLastKey);
|
|
324
339
|
if (didEdgeKeysChange) {
|
|
340
|
+
edgeKeysChanged = true;
|
|
325
341
|
const item = prevCount > 0 ? this.getVirtualItemForOffset(this.getScrollOffset()) ?? measurements[0] : null;
|
|
326
342
|
if (item) {
|
|
327
343
|
anchor = [item.key, this.getScrollOffset() - item.start];
|
|
@@ -333,11 +349,38 @@ class Virtualizer {
|
|
|
333
349
|
}
|
|
334
350
|
}
|
|
335
351
|
this.options = merged;
|
|
336
|
-
if (
|
|
352
|
+
if (edgeKeysChanged) {
|
|
353
|
+
this.pendingMin = 0;
|
|
354
|
+
this.itemSizeCacheVersion++;
|
|
355
|
+
}
|
|
356
|
+
let anchorResolved = false;
|
|
357
|
+
let anchorDelta = 0;
|
|
358
|
+
if (anchor && this.scrollOffset !== null) {
|
|
359
|
+
const [anchorKey, anchorOffset] = anchor;
|
|
360
|
+
const newMeasurements = this.getMeasurements();
|
|
361
|
+
const { count, getItemKey } = this.options;
|
|
362
|
+
let idx = 0;
|
|
363
|
+
while (idx < count && getItemKey(idx) !== anchorKey) {
|
|
364
|
+
idx++;
|
|
365
|
+
}
|
|
366
|
+
if (idx < count) {
|
|
367
|
+
const anchorItem = newMeasurements[idx];
|
|
368
|
+
if (anchorItem) {
|
|
369
|
+
const newOffset = anchorItem.start + anchorOffset;
|
|
370
|
+
if (newOffset !== this.scrollOffset) {
|
|
371
|
+
anchorDelta = newOffset - this.scrollOffset;
|
|
372
|
+
this.scrollOffset = newOffset;
|
|
373
|
+
anchorResolved = true;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
if (anchorResolved || followOnAppend) {
|
|
337
379
|
this.pendingScrollAnchor = [
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
followOnAppend
|
|
380
|
+
anchorResolved ? anchor[0] : null,
|
|
381
|
+
anchorResolved ? anchor[1] : 0,
|
|
382
|
+
followOnAppend,
|
|
383
|
+
anchorDelta
|
|
341
384
|
];
|
|
342
385
|
}
|
|
343
386
|
};
|
|
@@ -474,19 +517,17 @@ class Virtualizer {
|
|
|
474
517
|
const anchor = this.pendingScrollAnchor;
|
|
475
518
|
this.pendingScrollAnchor = null;
|
|
476
519
|
if (anchor && this.scrollElement && this.options.enabled) {
|
|
477
|
-
const [key,
|
|
478
|
-
if (key !== null) {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
index++;
|
|
483
|
-
}
|
|
484
|
-
const item = index < count ? this.getMeasurements()[index] : void 0;
|
|
485
|
-
if (item) {
|
|
486
|
-
const delta = item.start + offset - this.getScrollOffset();
|
|
487
|
-
if (!approxEqual(delta, 0)) {
|
|
488
|
-
this.applyScrollAdjustment(delta);
|
|
520
|
+
const [key, _offset, followOnAppend, anchorDelta] = anchor;
|
|
521
|
+
if (key !== null && !followOnAppend) {
|
|
522
|
+
if (isIOSWebKit() && (this.isScrolling || this._iosTouching || this._iosJustTouchEnded)) {
|
|
523
|
+
if (anchorDelta !== 0) {
|
|
524
|
+
this._iosDeferredAdjustment += anchorDelta;
|
|
489
525
|
}
|
|
526
|
+
} else {
|
|
527
|
+
this._scrollToOffset(this.getScrollOffset(), {
|
|
528
|
+
adjustments: void 0,
|
|
529
|
+
behavior: void 0
|
|
530
|
+
});
|
|
490
531
|
}
|
|
491
532
|
}
|
|
492
533
|
if (followOnAppend) {
|