@tonyclaw/llm-inspector 1.7.8 → 1.7.9

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.
@@ -14,4 +14,4 @@ Error generating stack: `+l.message+`
14
14
  `)}else{const p=o.indexOf(`
15
15
  `);if(p>=0){const S=o.slice(0,p).trim();o=o.slice(p+1),S.length>0&&(m=JSON.parse(S),f=!0)}}}return(async()=>{try{for(;;){const{value:y,done:h}=await r.read();y&&(o+=y);const p=o.lastIndexOf(`
16
16
  `);if(p>=0){const S=o.slice(0,p);o=o.slice(p+1);const b=S.split(`
17
- `).filter(Boolean);for(const _ of b)try{u(JSON.parse(_))}catch(R){i?.(`Invalid JSON line: ${_}`,R)}}if(h)break}}catch(y){i?.("Stream processing error:",y)}})(),u(m)}async function _E({jsonStream:a,onMessage:u,onError:i}){const r=a.getReader(),{value:o,done:f}=await r.read();if(f||!o)throw new Error("Stream ended before first object");const m=JSON.parse(o);return(async()=>{try{for(;;){const{value:y,done:h}=await r.read();if(h)break;if(y)try{u(JSON.parse(y))}catch(p){i?.(`Invalid JSON: ${y}`,p)}}}catch(y){i?.("Stream processing error:",y)}})(),u(m)}function EE(a){const u="/_serverFn/"+a;return Object.assign((...o)=>{const f=Lp()?.serverFns?.fetch;return gE(u,o,f??fetch)},{url:u,serverFnMeta:{id:a},[Ao]:!0})}const RE={key:"$TSS/serverfn",test:a=>typeof a!="function"||!(Ao in a)?!1:!!a[Ao],toSerializable:({serverFnMeta:a})=>({functionId:a.id}),fromSerializable:({functionId:a})=>EE(a)},TE="/assets/index-B3RwBPLW.css",Hp=G_({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"llm-inspector"}],links:[{rel:"stylesheet",href:TE}]}),component:AE});function AE(){return k.jsx(OE,{children:k.jsx(Cp,{})})}function OE({children:a}){return k.jsxs("html",{lang:"en",className:"dark",children:[k.jsx("head",{children:k.jsx(aE,{})}),k.jsxs("body",{children:[a,k.jsx(lE,{})]})]})}const ME="modulepreload",zE=function(a){return"/"+a},zy={},xE=function(u,i,r){let o=Promise.resolve();if(i&&i.length>0){let h=function(p){return Promise.all(p.map(S=>Promise.resolve(S).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),y=m?.nonce||m?.getAttribute("nonce");o=h(i.map(p=>{if(p=zE(p),p in zy)return;zy[p]=!0;const S=p.endsWith(".css"),b=S?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${b}`))return;const _=document.createElement("link");if(_.rel=S?"stylesheet":ME,S||(_.as="script"),_.crossOrigin="",_.href=p,y&&_.setAttribute("nonce",y),document.head.appendChild(_),S)return new Promise((R,D)=>{_.addEventListener("load",R),_.addEventListener("error",()=>D(new Error(`Unable to preload CSS for ${p}`)))})}))}function f(m){const y=new Event("vite:preloadError",{cancelable:!0});if(y.payload=m,window.dispatchEvent(y),!y.defaultPrevented)throw m}return o.then(m=>{for(const y of m||[])y.status==="rejected"&&f(y.reason);return u().catch(f)})},wE=()=>xE(()=>import("./index-C8o6bEv6.js"),[]),CE=To("/")({component:V_(wE,"component")}),DE=CE.update({id:"/",path:"/",getParentRoute:()=>Hp}),UE={IndexRoute:DE},LE=Hp._addFileChildren(UE);function NE(){return P_({routeTree:LE,scrollRestoration:!1})}async function BE(){const a=await NE();let u;return u=[],window.__TSS_START_OPTIONS__={serializationAdapters:u},u.push(RE),a.options.serializationAdapters&&u.push(...a.options.serializationAdapters),a.update({basepath:"",serializationAdapters:u}),a.state.matches.length||await uE(a),a}async function jE(){const a=await BE();return window.$_TSR?.h(),a}let So;function HE(){return So||(So=jE()),k.jsx(p_,{promise:So,children:a=>k.jsx(I_,{router:a})})}nt.startTransition(()=>{h0.hydrateRoot(document,k.jsx(nt.StrictMode,{children:k.jsx(HE,{})}))});export{Ul as R,Mp as a,s0 as b,qE as c,XE as d,xy as g,k as j,nt as r};
17
+ `).filter(Boolean);for(const _ of b)try{u(JSON.parse(_))}catch(R){i?.(`Invalid JSON line: ${_}`,R)}}if(h)break}}catch(y){i?.("Stream processing error:",y)}})(),u(m)}async function _E({jsonStream:a,onMessage:u,onError:i}){const r=a.getReader(),{value:o,done:f}=await r.read();if(f||!o)throw new Error("Stream ended before first object");const m=JSON.parse(o);return(async()=>{try{for(;;){const{value:y,done:h}=await r.read();if(h)break;if(y)try{u(JSON.parse(y))}catch(p){i?.(`Invalid JSON: ${y}`,p)}}}catch(y){i?.("Stream processing error:",y)}})(),u(m)}function EE(a){const u="/_serverFn/"+a;return Object.assign((...o)=>{const f=Lp()?.serverFns?.fetch;return gE(u,o,f??fetch)},{url:u,serverFnMeta:{id:a},[Ao]:!0})}const RE={key:"$TSS/serverfn",test:a=>typeof a!="function"||!(Ao in a)?!1:!!a[Ao],toSerializable:({serverFnMeta:a})=>({functionId:a.id}),fromSerializable:({functionId:a})=>EE(a)},TE="/assets/index-B3RwBPLW.css",Hp=G_({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"llm-inspector"}],links:[{rel:"stylesheet",href:TE}]}),component:AE});function AE(){return k.jsx(OE,{children:k.jsx(Cp,{})})}function OE({children:a}){return k.jsxs("html",{lang:"en",className:"dark",children:[k.jsx("head",{children:k.jsx(aE,{})}),k.jsxs("body",{children:[a,k.jsx(lE,{})]})]})}const ME="modulepreload",zE=function(a){return"/"+a},zy={},xE=function(u,i,r){let o=Promise.resolve();if(i&&i.length>0){let h=function(p){return Promise.all(p.map(S=>Promise.resolve(S).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),y=m?.nonce||m?.getAttribute("nonce");o=h(i.map(p=>{if(p=zE(p),p in zy)return;zy[p]=!0;const S=p.endsWith(".css"),b=S?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${b}`))return;const _=document.createElement("link");if(_.rel=S?"stylesheet":ME,S||(_.as="script"),_.crossOrigin="",_.href=p,y&&_.setAttribute("nonce",y),document.head.appendChild(_),S)return new Promise((R,D)=>{_.addEventListener("load",R),_.addEventListener("error",()=>D(new Error(`Unable to preload CSS for ${p}`)))})}))}function f(m){const y=new Event("vite:preloadError",{cancelable:!0});if(y.payload=m,window.dispatchEvent(y),!y.defaultPrevented)throw m}return o.then(m=>{for(const y of m||[])y.status==="rejected"&&f(y.reason);return u().catch(f)})},wE=()=>xE(()=>import("./index-CB8ZIeEk.js"),[]),CE=To("/")({component:V_(wE,"component")}),DE=CE.update({id:"/",path:"/",getParentRoute:()=>Hp}),UE={IndexRoute:DE},LE=Hp._addFileChildren(UE);function NE(){return P_({routeTree:LE,scrollRestoration:!1})}async function BE(){const a=await NE();let u;return u=[],window.__TSS_START_OPTIONS__={serializationAdapters:u},u.push(RE),a.options.serializationAdapters&&u.push(...a.options.serializationAdapters),a.update({basepath:"",serializationAdapters:u}),a.state.matches.length||await uE(a),a}async function jE(){const a=await BE();return window.$_TSR?.h(),a}let So;function HE(){return So||(So=jE()),k.jsx(p_,{promise:So,children:a=>k.jsx(I_,{router:a})})}nt.startTransition(()=>{h0.hydrateRoot(document,k.jsx(nt.StrictMode,{children:k.jsx(HE,{})}))});export{Ul as R,Mp as a,s0 as b,qE as c,XE as d,xy as g,k as j,nt as r};
@@ -75,7 +75,7 @@ const createLucideIcon = (iconName, iconNode) => {
75
75
  Component.displayName = toPascalCase(iconName);
76
76
  return Component;
77
77
  };
78
- const __iconNode$F = [
78
+ const __iconNode$G = [
79
79
  ["path", { d: "M12 18V5", key: "adv99a" }],
80
80
  ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
81
81
  ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
@@ -85,70 +85,70 @@ const __iconNode$F = [
85
85
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
86
86
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
87
87
  ];
88
- const Brain = createLucideIcon("brain", __iconNode$F);
89
- const __iconNode$E = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
90
- const Check = createLucideIcon("check", __iconNode$E);
91
- const __iconNode$D = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
92
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$D);
93
- const __iconNode$C = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
94
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$C);
95
- const __iconNode$B = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
96
- const ChevronUp = createLucideIcon("chevron-up", __iconNode$B);
97
- const __iconNode$A = [
88
+ const Brain = createLucideIcon("brain", __iconNode$G);
89
+ const __iconNode$F = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
90
+ const Check = createLucideIcon("check", __iconNode$F);
91
+ const __iconNode$E = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
92
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$E);
93
+ const __iconNode$D = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
94
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$D);
95
+ const __iconNode$C = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
96
+ const ChevronUp = createLucideIcon("chevron-up", __iconNode$C);
97
+ const __iconNode$B = [
98
98
  ["path", { d: "m7 6 5 5 5-5", key: "1lc07p" }],
99
99
  ["path", { d: "m7 13 5 5 5-5", key: "1d48rs" }]
100
100
  ];
101
- const ChevronsDown = createLucideIcon("chevrons-down", __iconNode$A);
102
- const __iconNode$z = [
101
+ const ChevronsDown = createLucideIcon("chevrons-down", __iconNode$B);
102
+ const __iconNode$A = [
103
103
  ["path", { d: "m17 11-5-5-5 5", key: "e8nh98" }],
104
104
  ["path", { d: "m17 18-5-5-5 5", key: "2avn1x" }]
105
105
  ];
106
- const ChevronsUp = createLucideIcon("chevrons-up", __iconNode$z);
107
- const __iconNode$y = [
106
+ const ChevronsUp = createLucideIcon("chevrons-up", __iconNode$A);
107
+ const __iconNode$z = [
108
108
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
109
109
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
110
110
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
111
111
  ];
112
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$y);
113
- const __iconNode$x = [
112
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$z);
113
+ const __iconNode$y = [
114
114
  ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
115
115
  ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
116
116
  ];
117
- const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$x);
118
- const __iconNode$w = [
117
+ const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$y);
118
+ const __iconNode$x = [
119
119
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
120
120
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
121
121
  ["path", { d: "M12 17h.01", key: "p32p05" }]
122
122
  ];
123
- const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$w);
124
- const __iconNode$v = [
123
+ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$x);
124
+ const __iconNode$w = [
125
125
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
126
126
  ["rect", { x: "9", y: "9", width: "6", height: "6", rx: "1", key: "1ssd4o" }]
127
127
  ];
128
- const CircleStop = createLucideIcon("circle-stop", __iconNode$v);
129
- const __iconNode$u = [
128
+ const CircleStop = createLucideIcon("circle-stop", __iconNode$w);
129
+ const __iconNode$v = [
130
130
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }],
131
131
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
132
132
  ];
133
- const Clock = createLucideIcon("clock", __iconNode$u);
134
- const __iconNode$t = [
133
+ const Clock = createLucideIcon("clock", __iconNode$v);
134
+ const __iconNode$u = [
135
135
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
136
136
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
137
137
  ];
138
- const Copy = createLucideIcon("copy", __iconNode$t);
139
- const __iconNode$s = [
138
+ const Copy = createLucideIcon("copy", __iconNode$u);
139
+ const __iconNode$t = [
140
140
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
141
141
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
142
142
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
143
143
  ];
144
- const Download = createLucideIcon("download", __iconNode$s);
145
- const __iconNode$r = [
144
+ const Download = createLucideIcon("download", __iconNode$t);
145
+ const __iconNode$s = [
146
146
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
147
147
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
148
148
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
149
149
  ];
150
- const ExternalLink = createLucideIcon("external-link", __iconNode$r);
151
- const __iconNode$q = [
150
+ const ExternalLink = createLucideIcon("external-link", __iconNode$s);
151
+ const __iconNode$r = [
152
152
  [
153
153
  "path",
154
154
  {
@@ -166,8 +166,8 @@ const __iconNode$q = [
166
166
  ],
167
167
  ["path", { d: "m2 2 20 20", key: "1ooewy" }]
168
168
  ];
169
- const EyeOff = createLucideIcon("eye-off", __iconNode$q);
170
- const __iconNode$p = [
169
+ const EyeOff = createLucideIcon("eye-off", __iconNode$r);
170
+ const __iconNode$q = [
171
171
  [
172
172
  "path",
173
173
  {
@@ -177,8 +177,8 @@ const __iconNode$p = [
177
177
  ],
178
178
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
179
179
  ];
180
- const Eye = createLucideIcon("eye", __iconNode$p);
181
- const __iconNode$o = [
180
+ const Eye = createLucideIcon("eye", __iconNode$q);
181
+ const __iconNode$p = [
182
182
  [
183
183
  "path",
184
184
  {
@@ -190,26 +190,26 @@ const __iconNode$o = [
190
190
  ["path", { d: "m8 16 2-2-2-2", key: "10vzyd" }],
191
191
  ["path", { d: "M12 18h4", key: "1wd2n7" }]
192
192
  ];
193
- const FileTerminal = createLucideIcon("file-terminal", __iconNode$o);
194
- const __iconNode$n = [
193
+ const FileTerminal = createLucideIcon("file-terminal", __iconNode$p);
194
+ const __iconNode$o = [
195
195
  ["path", { d: "m12 14 4-4", key: "9kzdfg" }],
196
196
  ["path", { d: "M3.34 19a10 10 0 1 1 17.32 0", key: "19p75a" }]
197
197
  ];
198
- const Gauge = createLucideIcon("gauge", __iconNode$n);
199
- const __iconNode$m = [
198
+ const Gauge = createLucideIcon("gauge", __iconNode$o);
199
+ const __iconNode$n = [
200
200
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
201
201
  ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
202
202
  ["path", { d: "M2 12h20", key: "9i4pu4" }]
203
203
  ];
204
- const Globe = createLucideIcon("globe", __iconNode$m);
205
- const __iconNode$l = [
204
+ const Globe = createLucideIcon("globe", __iconNode$n);
205
+ const __iconNode$m = [
206
206
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
207
207
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
208
208
  ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
209
209
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
210
210
  ];
211
- const LayoutGrid = createLucideIcon("layout-grid", __iconNode$l);
212
- const __iconNode$k = [
211
+ const LayoutGrid = createLucideIcon("layout-grid", __iconNode$m);
212
+ const __iconNode$l = [
213
213
  ["path", { d: "M3 5h.01", key: "18ugdj" }],
214
214
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
215
215
  ["path", { d: "M3 19h.01", key: "noohij" }],
@@ -217,15 +217,15 @@ const __iconNode$k = [
217
217
  ["path", { d: "M8 12h13", key: "1za7za" }],
218
218
  ["path", { d: "M8 19h13", key: "m83p4d" }]
219
219
  ];
220
- const List = createLucideIcon("list", __iconNode$k);
221
- const __iconNode$j = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
222
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$j);
223
- const __iconNode$i = [
220
+ const List = createLucideIcon("list", __iconNode$l);
221
+ const __iconNode$k = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
222
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$k);
223
+ const __iconNode$j = [
224
224
  ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
225
225
  ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
226
226
  ];
227
- const Lock = createLucideIcon("lock", __iconNode$i);
228
- const __iconNode$h = [
227
+ const Lock = createLucideIcon("lock", __iconNode$j);
228
+ const __iconNode$i = [
229
229
  [
230
230
  "path",
231
231
  {
@@ -234,10 +234,10 @@ const __iconNode$h = [
234
234
  }
235
235
  ]
236
236
  ];
237
- const MessageSquare = createLucideIcon("message-square", __iconNode$h);
238
- const __iconNode$g = [["path", { d: "M5 12h14", key: "1ays0h" }]];
239
- const Minus = createLucideIcon("minus", __iconNode$g);
240
- const __iconNode$f = [
237
+ const MessageSquare = createLucideIcon("message-square", __iconNode$i);
238
+ const __iconNode$h = [["path", { d: "M5 12h14", key: "1ays0h" }]];
239
+ const Minus = createLucideIcon("minus", __iconNode$h);
240
+ const __iconNode$g = [
241
241
  [
242
242
  "path",
243
243
  {
@@ -247,38 +247,38 @@ const __iconNode$f = [
247
247
  ],
248
248
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
249
249
  ];
250
- const Pencil = createLucideIcon("pencil", __iconNode$f);
251
- const __iconNode$e = [
250
+ const Pencil = createLucideIcon("pencil", __iconNode$g);
251
+ const __iconNode$f = [
252
252
  ["path", { d: "M5 12h14", key: "1ays0h" }],
253
253
  ["path", { d: "M12 5v14", key: "s699le" }]
254
254
  ];
255
- const Plus = createLucideIcon("plus", __iconNode$e);
256
- const __iconNode$d = [
255
+ const Plus = createLucideIcon("plus", __iconNode$f);
256
+ const __iconNode$e = [
257
257
  ["path", { d: "M16.247 7.761a6 6 0 0 1 0 8.478", key: "1fwjs5" }],
258
258
  ["path", { d: "M19.075 4.933a10 10 0 0 1 0 14.134", key: "ehdyv1" }],
259
259
  ["path", { d: "M4.925 19.067a10 10 0 0 1 0-14.134", key: "1q22gi" }],
260
260
  ["path", { d: "M7.753 16.239a6 6 0 0 1 0-8.478", key: "r2q7qm" }],
261
261
  ["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }]
262
262
  ];
263
- const Radio = createLucideIcon("radio", __iconNode$d);
264
- const __iconNode$c = [
263
+ const Radio = createLucideIcon("radio", __iconNode$e);
264
+ const __iconNode$d = [
265
265
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
266
266
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
267
267
  ];
268
- const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$c);
269
- const __iconNode$b = [
268
+ const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$d);
269
+ const __iconNode$c = [
270
270
  ["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
271
271
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }]
272
272
  ];
273
- const RotateCw = createLucideIcon("rotate-cw", __iconNode$b);
274
- const __iconNode$a = [
273
+ const RotateCw = createLucideIcon("rotate-cw", __iconNode$c);
274
+ const __iconNode$b = [
275
275
  ["rect", { width: "20", height: "8", x: "2", y: "2", rx: "2", ry: "2", key: "ngkwjq" }],
276
276
  ["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", ry: "2", key: "iecqi9" }],
277
277
  ["line", { x1: "6", x2: "6.01", y1: "6", y2: "6", key: "16zg32" }],
278
278
  ["line", { x1: "6", x2: "6.01", y1: "18", y2: "18", key: "nzw8ys" }]
279
279
  ];
280
- const Server = createLucideIcon("server", __iconNode$a);
281
- const __iconNode$9 = [
280
+ const Server = createLucideIcon("server", __iconNode$b);
281
+ const __iconNode$a = [
282
282
  [
283
283
  "path",
284
284
  {
@@ -288,21 +288,21 @@ const __iconNode$9 = [
288
288
  ],
289
289
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
290
290
  ];
291
- const Settings = createLucideIcon("settings", __iconNode$9);
292
- const __iconNode$8 = [
291
+ const Settings = createLucideIcon("settings", __iconNode$a);
292
+ const __iconNode$9 = [
293
293
  ["path", { d: "M12 19h8", key: "baeox8" }],
294
294
  ["path", { d: "m4 17 6-6-6-6", key: "1yngyt" }]
295
295
  ];
296
- const Terminal = createLucideIcon("terminal", __iconNode$8);
297
- const __iconNode$7 = [
296
+ const Terminal = createLucideIcon("terminal", __iconNode$9);
297
+ const __iconNode$8 = [
298
298
  ["path", { d: "M10 11v6", key: "nco0om" }],
299
299
  ["path", { d: "M14 11v6", key: "outv1u" }],
300
300
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
301
301
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
302
302
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
303
303
  ];
304
- const Trash2 = createLucideIcon("trash-2", __iconNode$7);
305
- const __iconNode$6 = [
304
+ const Trash2 = createLucideIcon("trash-2", __iconNode$8);
305
+ const __iconNode$7 = [
306
306
  [
307
307
  "path",
308
308
  {
@@ -313,7 +313,13 @@ const __iconNode$6 = [
313
313
  ["path", { d: "M12 9v4", key: "juzpu7" }],
314
314
  ["path", { d: "M12 17h.01", key: "p32p05" }]
315
315
  ];
316
- const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$6);
316
+ const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$7);
317
+ const __iconNode$6 = [
318
+ ["path", { d: "M12 3v12", key: "1x0j5s" }],
319
+ ["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
320
+ ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
321
+ ];
322
+ const Upload = createLucideIcon("upload", __iconNode$6);
317
323
  const __iconNode$5 = [
318
324
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
319
325
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
@@ -362,6 +368,7 @@ const __iconNode = [
362
368
  ];
363
369
  const Zap = createLucideIcon("zap", __iconNode);
364
370
  export {
371
+ Terminal as A,
365
372
  Brain as B,
366
373
  ChevronDown as C,
367
374
  Download as D,
@@ -374,7 +381,7 @@ export {
374
381
  RotateCcw as R,
375
382
  Settings as S,
376
383
  Trash2 as T,
377
- User as U,
384
+ Upload as U,
378
385
  Wrench as W,
379
386
  X,
380
387
  Zap as Z,
@@ -386,22 +393,22 @@ export {
386
393
  ChevronRight as f,
387
394
  Clock as g,
388
395
  LoaderCircle as h,
389
- Radio as i,
390
- EyeOff as j,
391
- Eye as k,
392
- RotateCw as l,
393
- Pencil as m,
394
- TriangleAlert as n,
395
- Minus as o,
396
- CircleCheckBig as p,
397
- CircleStop as q,
398
- CircleQuestionMark as r,
399
- Server as s,
400
- Gauge as t,
401
- Lock as u,
402
- Wifi as v,
403
- WifiOff as w,
404
- ChevronsUp as x,
405
- ChevronsDown as y,
406
- Terminal as z
396
+ User as i,
397
+ Radio as j,
398
+ EyeOff as k,
399
+ Eye as l,
400
+ RotateCw as m,
401
+ Pencil as n,
402
+ TriangleAlert as o,
403
+ Minus as p,
404
+ CircleCheckBig as q,
405
+ CircleStop as r,
406
+ CircleQuestionMark as s,
407
+ Server as t,
408
+ Gauge as u,
409
+ Lock as v,
410
+ Wifi as w,
411
+ WifiOff as x,
412
+ ChevronsUp as y,
413
+ ChevronsDown as z
407
414
  };
@@ -4451,6 +4451,7 @@ export {
4451
4451
  lazy as c,
4452
4452
  discriminatedUnion as d,
4453
4453
  _null as e,
4454
+ unknown as f,
4454
4455
  literal as l,
4455
4456
  number as n,
4456
4457
  object as o,
@@ -1,5 +1,5 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports, a as React } from "../_libs/react.mjs";
2
- import { C as CapturedLogSchema, a as parseRequest, p as parseOpenAIResponse, I as InspectorResponseSchema } from "./router-MmnX-LYh.mjs";
2
+ import { C as CapturedLogSchema, a as parseRequest, p as parseOpenAIResponse, I as InspectorResponseSchema } from "./router-CsCLdrXq.mjs";
3
3
  import { u as useVirtualizer } from "../_libs/tanstack__react-virtual.mjs";
4
4
  import { J as JSZip } from "../_libs/jszip.mjs";
5
5
  import { c as clsx } from "../_libs/clsx.mjs";
@@ -7,9 +7,9 @@ import { t as twMerge } from "../_libs/tailwind-merge.mjs";
7
7
  import { c as cva } from "../_libs/class-variance-authority.mjs";
8
8
  import { R as Root, T as Trigger$1, C as Content, a as Close, b as Title, P as Portal$1, O as Overlay } from "../_libs/radix-ui__react-dialog.mjs";
9
9
  import { R as Root2, T as Trigger, I as Icon, V as Value, P as Portal, C as Content2, a as Viewport, b as Item, c as ItemIndicator, d as ItemText, S as ScrollUpButton, e as ScrollDownButton } from "../_libs/radix-ui__react-select.mjs";
10
- import { D as Download, L as LayoutGrid, a as List, S as Settings, C as ChevronDown, b as Check, R as RotateCcw, X, P as Plus, c as Copy, d as CircleAlert, e as ChevronUp, f as ChevronRight, g as Clock, M as MessageSquare, Z as Zap, h as LoaderCircle, W as Wrench, G as Globe, U as User, F as FileTerminal, i as Radio, E as ExternalLink, j as EyeOff, k as Eye, l as RotateCw, m as Pencil, T as Trash2, n as TriangleAlert, o as Minus, p as CircleCheckBig, q as CircleStop, r as CircleQuestionMark, s as Server, t as Gauge, u as Lock, v as Wifi, w as WifiOff, x as ChevronsUp, y as ChevronsDown, z as Terminal, B as Brain } from "../_libs/lucide-react.mjs";
10
+ import { D as Download, L as LayoutGrid, a as List, S as Settings, C as ChevronDown, b as Check, R as RotateCcw, X, U as Upload, P as Plus, c as Copy, d as CircleAlert, e as ChevronUp, f as ChevronRight, g as Clock, M as MessageSquare, Z as Zap, h as LoaderCircle, W as Wrench, G as Globe, i as User, F as FileTerminal, j as Radio, E as ExternalLink, k as EyeOff, l as Eye, m as RotateCw, n as Pencil, T as Trash2, o as TriangleAlert, p as Minus, q as CircleCheckBig, r as CircleStop, s as CircleQuestionMark, t as Server, u as Gauge, v as Lock, w as Wifi, x as WifiOff, y as ChevronsUp, z as ChevronsDown, A as Terminal, B as Brain } from "../_libs/lucide-react.mjs";
11
11
  import { M as Markdown } from "../_libs/react-markdown.mjs";
12
- import { a as array, s as string, u as union, o as object, l as literal, b as boolean, n as number } from "../_libs/zod.mjs";
12
+ import { a as array, s as string, u as union, o as object, l as literal, n as number, b as boolean } from "../_libs/zod.mjs";
13
13
  import { R as Root2$1, L as List$1, T as Trigger$2, C as Content$1 } from "../_libs/radix-ui__react-tabs.mjs";
14
14
  import { S as Slot } from "../_libs/radix-ui__react-slot.mjs";
15
15
  import { P as Provider, R as Root3, T as Trigger$3, a as Portal$2, C as Content2$1, A as Arrow2 } from "../_libs/radix-ui__react-tooltip.mjs";
@@ -946,7 +946,7 @@ const STATUS_BADGE_CLASSES = {
946
946
  server_error: "",
947
947
  pending: "bg-muted text-muted-foreground border-border"
948
948
  };
949
- function LogEntryHeader({
949
+ const LogEntryHeader = reactExports.memo(function LogEntryHeader2({
950
950
  log,
951
951
  parsedRequest,
952
952
  expanded,
@@ -1098,7 +1098,7 @@ function LogEntryHeader({
1098
1098
  ]
1099
1099
  }
1100
1100
  );
1101
- }
1101
+ });
1102
1102
  function Dialog({
1103
1103
  ...props
1104
1104
  }) {
@@ -1832,7 +1832,10 @@ function CopyButton({
1832
1832
  }
1833
1833
  );
1834
1834
  }
1835
- function LogEntry({ log, viewMode = "simple" }) {
1835
+ const LogEntry = reactExports.memo(function LogEntry2({
1836
+ log,
1837
+ viewMode = "simple"
1838
+ }) {
1836
1839
  const [expanded, setExpanded] = reactExports.useState(false);
1837
1840
  const [requestCopied, setRequestCopied] = reactExports.useState(false);
1838
1841
  const [responseCopied, setResponseCopied] = reactExports.useState(false);
@@ -1953,7 +1956,7 @@ function LogEntry({ log, viewMode = "simple" }) {
1953
1956
  ] }),
1954
1957
  /* @__PURE__ */ jsxRuntimeExports.jsx(ReplayDialog, { log, open: replayOpen, onOpenChange: setReplayOpen })
1955
1958
  ] });
1956
- }
1959
+ });
1957
1960
  function computeStats(logs) {
1958
1961
  let totalInput = 0;
1959
1962
  let totalOutput = 0;
@@ -1963,7 +1966,7 @@ function computeStats(logs) {
1963
1966
  }
1964
1967
  return { totalInputTokens: totalInput, totalOutputTokens: totalOutput };
1965
1968
  }
1966
- function ConversationGroup({
1969
+ const ConversationGroup = reactExports.memo(function ConversationGroup2({
1967
1970
  group,
1968
1971
  viewMode = "simple"
1969
1972
  }) {
@@ -1988,7 +1991,7 @@ function ConversationGroup({
1988
1991
  ),
1989
1992
  expanded && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pl-4 border-l-2 border-muted ml-3", children: group.logs.map((log) => /* @__PURE__ */ jsxRuntimeExports.jsx(LogEntry, { log, viewMode }, log.id)) })
1990
1993
  ] });
1991
- }
1994
+ });
1992
1995
  function Select({
1993
1996
  ...props
1994
1997
  }) {
@@ -2562,6 +2565,15 @@ function ProvidersPanel({
2562
2565
  const TEST_TIMEOUT_SECONDS = 30;
2563
2566
  const runTest = reactExports.useCallback(
2564
2567
  async (providerId) => {
2568
+ const resetResults = {
2569
+ anthropic: { nonStreaming: { notConfigured: true }, streaming: { notConfigured: true } },
2570
+ openai: { nonStreaming: { notConfigured: true }, streaming: { notConfigured: true } }
2571
+ };
2572
+ if (onTestResultsChange) {
2573
+ onTestResultsChange(providerId, resetResults);
2574
+ } else {
2575
+ setInternalTestResults((prev) => ({ ...prev, [providerId]: resetResults }));
2576
+ }
2565
2577
  if (onTestingProvidersChange) {
2566
2578
  onTestingProvidersChange(providerId, true);
2567
2579
  } else {
@@ -2614,7 +2626,8 @@ function ProvidersPanel({
2614
2626
  }
2615
2627
  }
2616
2628
  } catch (err) {
2617
- if (err instanceof Error && err.name === "AbortError") {
2629
+ const isAbort = err instanceof Error && err.name === "AbortError";
2630
+ if (isAbort) {
2618
2631
  const timeoutResult = {
2619
2632
  anthropic: {
2620
2633
  nonStreaming: {
@@ -2640,14 +2653,17 @@ function ProvidersPanel({
2640
2653
  } finally {
2641
2654
  clearInterval(intervalId);
2642
2655
  setTestingTimeLeft(providerId, void 0);
2643
- if (onTestingProvidersChange) {
2644
- onTestingProvidersChange(providerId, false);
2645
- } else {
2646
- setInternalTestingProviders((prev) => {
2647
- const next = new Set(prev);
2648
- next.delete(providerId);
2649
- return next;
2650
- });
2656
+ try {
2657
+ if (onTestingProvidersChange) {
2658
+ onTestingProvidersChange(providerId, false);
2659
+ } else {
2660
+ setInternalTestingProviders((prev) => {
2661
+ const next = new Set(prev);
2662
+ next.delete(providerId);
2663
+ return next;
2664
+ });
2665
+ }
2666
+ } catch {
2651
2667
  }
2652
2668
  }
2653
2669
  },
@@ -2720,6 +2736,65 @@ function ProvidersPanel({
2720
2736
  await fetchProviders();
2721
2737
  })();
2722
2738
  }
2739
+ const fileInputRef = reactExports.useRef(null);
2740
+ function handleExport(includeKeys) {
2741
+ const url = `/api/providers/export${""}`;
2742
+ void (async () => {
2743
+ try {
2744
+ const res = await fetch(url);
2745
+ if (!res.ok) {
2746
+ setError("Failed to export providers");
2747
+ return;
2748
+ }
2749
+ const blob = await res.blob();
2750
+ const downloadUrl = URL.createObjectURL(blob);
2751
+ const a = document.createElement("a");
2752
+ a.href = downloadUrl;
2753
+ a.download = res.headers.get("Content-Disposition")?.match(/filename="(.+)"/)?.[1] ?? "providers.json";
2754
+ document.body.appendChild(a);
2755
+ a.click();
2756
+ document.body.removeChild(a);
2757
+ URL.revokeObjectURL(downloadUrl);
2758
+ } catch {
2759
+ setError("Failed to export providers");
2760
+ }
2761
+ })();
2762
+ }
2763
+ function handleImportClick() {
2764
+ fileInputRef.current?.click();
2765
+ }
2766
+ function handleFileChange(e) {
2767
+ const file = e.target.files?.[0];
2768
+ if (!file) return;
2769
+ void (async () => {
2770
+ try {
2771
+ const text = await file.text();
2772
+ const res = await fetch("/api/providers/import", {
2773
+ method: "POST",
2774
+ headers: { "Content-Type": "application/json" },
2775
+ body: JSON.stringify(text)
2776
+ });
2777
+ const ImportResponseSchema = object({
2778
+ success: boolean().optional(),
2779
+ imported: number().optional(),
2780
+ message: string().optional(),
2781
+ errors: array(string()).optional()
2782
+ });
2783
+ const data = ImportResponseSchema.parse(await res.json());
2784
+ if (res.ok && data.imported !== void 0 && data.imported > 0) {
2785
+ await fetchProviders();
2786
+ setError(null);
2787
+ } else if (data.errors && data.errors.length > 0) {
2788
+ setError(data.errors.join("; "));
2789
+ } else {
2790
+ setError(data.message ?? "Import failed");
2791
+ }
2792
+ } catch {
2793
+ setError("Failed to import providers");
2794
+ }
2795
+ e.target.value = "";
2796
+ })();
2797
+ }
2723
2798
  if (isLoading && providers.length === 0) {
2724
2799
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Loading providers..." }) });
2725
2800
  }
@@ -2742,9 +2817,29 @@ function ProvidersPanel({
2742
2817
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
2743
2818
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
2744
2819
  /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-medium", children: "Providers" }),
2745
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { onClick: () => setShowForm(true), size: "sm", className: "gap-1", children: [
2746
- /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-4" }),
2747
- "Add Provider"
2820
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
2821
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "outline", size: "sm", onClick: () => handleExport(), className: "gap-1", children: [
2822
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Download, { className: "size-3" }),
2823
+ "Export"
2824
+ ] }),
2825
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "outline", size: "sm", onClick: handleImportClick, className: "gap-1", children: [
2826
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Upload, { className: "size-3" }),
2827
+ "Import"
2828
+ ] }),
2829
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
2830
+ "input",
2831
+ {
2832
+ type: "file",
2833
+ ref: fileInputRef,
2834
+ accept: ".json",
2835
+ onChange: handleFileChange,
2836
+ style: { display: "none" }
2837
+ }
2838
+ ),
2839
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { onClick: () => setShowForm(true), size: "sm", className: "gap-1", children: [
2840
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-4" }),
2841
+ "Add Provider"
2842
+ ] })
2748
2843
  ] })
2749
2844
  ] }),
2750
2845
  configPath !== null && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-xs text-muted-foreground bg-muted/30 rounded-md px-3 py-2", children: [
@@ -197,7 +197,7 @@ function getResponse() {
197
197
  return event.res;
198
198
  }
199
199
  async function getStartManifest(matchedRoutes) {
200
- const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-CYKtU_9S.mjs");
200
+ const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-BF6ge6dS.mjs");
201
201
  const startManifest = tsrStartManifest();
202
202
  const rootRoute = startManifest.routes[rootRouteId] = startManifest.routes[rootRouteId] || {};
203
203
  rootRoute.assets = rootRoute.assets || [];
@@ -766,7 +766,7 @@ let entriesPromise;
766
766
  let baseManifestPromise;
767
767
  let cachedFinalManifestPromise;
768
768
  async function loadEntries() {
769
- const routerEntry = await import("./router-MmnX-LYh.mjs").then((n) => n.r);
769
+ const routerEntry = await import("./router-CsCLdrXq.mjs").then((n) => n.r);
770
770
  const startEntry = await import("./start-HYkvq4Ni.mjs");
771
771
  return { startEntry, routerEntry };
772
772
  }