@tonyclaw/llm-inspector 1.7.0 → 1.7.2

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-s4lwsWvq.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-Bf_WGooQ.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$A = [
78
+ const __iconNode$F = [
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$A = [
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$A);
89
- const __iconNode$z = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
90
- const Check = createLucideIcon("check", __iconNode$z);
91
- const __iconNode$y = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
92
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$y);
93
- const __iconNode$x = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
94
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$x);
95
- const __iconNode$w = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
96
- const ChevronUp = createLucideIcon("chevron-up", __iconNode$w);
97
- const __iconNode$v = [
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 = [
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$v);
102
- const __iconNode$u = [
101
+ const ChevronsDown = createLucideIcon("chevrons-down", __iconNode$A);
102
+ const __iconNode$z = [
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$u);
107
- const __iconNode$t = [
106
+ const ChevronsUp = createLucideIcon("chevrons-up", __iconNode$z);
107
+ const __iconNode$y = [
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$t);
113
- const __iconNode$s = [
112
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$y);
113
+ const __iconNode$x = [
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$s);
118
- const __iconNode$r = [
117
+ const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$x);
118
+ const __iconNode$w = [
119
119
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
120
- ["rect", { x: "9", y: "9", width: "6", height: "6", rx: "1", key: "1ssd4o" }]
120
+ ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
121
+ ["path", { d: "M12 17h.01", key: "p32p05" }]
121
122
  ];
122
- const CircleStop = createLucideIcon("circle-stop", __iconNode$r);
123
- const __iconNode$q = [
123
+ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$w);
124
+ const __iconNode$v = [
124
125
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
125
- ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
126
- ["path", { d: "m9 9 6 6", key: "z0biqf" }]
126
+ ["rect", { x: "9", y: "9", width: "6", height: "6", rx: "1", key: "1ssd4o" }]
127
127
  ];
128
- const CircleX = createLucideIcon("circle-x", __iconNode$q);
129
- const __iconNode$p = [
128
+ const CircleStop = createLucideIcon("circle-stop", __iconNode$v);
129
+ const __iconNode$u = [
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$p);
134
- const __iconNode$o = [
133
+ const Clock = createLucideIcon("clock", __iconNode$u);
134
+ const __iconNode$t = [
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$o);
139
- const __iconNode$n = [
138
+ const Copy = createLucideIcon("copy", __iconNode$t);
139
+ const __iconNode$s = [
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$n);
145
- const __iconNode$m = [
144
+ const Download = createLucideIcon("download", __iconNode$s);
145
+ const __iconNode$r = [
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$m);
151
- const __iconNode$l = [
150
+ const ExternalLink = createLucideIcon("external-link", __iconNode$r);
151
+ const __iconNode$q = [
152
152
  [
153
153
  "path",
154
154
  {
@@ -166,8 +166,8 @@ const __iconNode$l = [
166
166
  ],
167
167
  ["path", { d: "m2 2 20 20", key: "1ooewy" }]
168
168
  ];
169
- const EyeOff = createLucideIcon("eye-off", __iconNode$l);
170
- const __iconNode$k = [
169
+ const EyeOff = createLucideIcon("eye-off", __iconNode$q);
170
+ const __iconNode$p = [
171
171
  [
172
172
  "path",
173
173
  {
@@ -177,8 +177,8 @@ const __iconNode$k = [
177
177
  ],
178
178
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
179
179
  ];
180
- const Eye = createLucideIcon("eye", __iconNode$k);
181
- const __iconNode$j = [
180
+ const Eye = createLucideIcon("eye", __iconNode$p);
181
+ const __iconNode$o = [
182
182
  [
183
183
  "path",
184
184
  {
@@ -190,21 +190,26 @@ const __iconNode$j = [
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$j);
194
- const __iconNode$i = [
193
+ const FileTerminal = createLucideIcon("file-terminal", __iconNode$o);
194
+ const __iconNode$n = [
195
+ ["path", { d: "m12 14 4-4", key: "9kzdfg" }],
196
+ ["path", { d: "M3.34 19a10 10 0 1 1 17.32 0", key: "19p75a" }]
197
+ ];
198
+ const Gauge = createLucideIcon("gauge", __iconNode$n);
199
+ const __iconNode$m = [
195
200
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
196
201
  ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
197
202
  ["path", { d: "M2 12h20", key: "9i4pu4" }]
198
203
  ];
199
- const Globe = createLucideIcon("globe", __iconNode$i);
200
- const __iconNode$h = [
204
+ const Globe = createLucideIcon("globe", __iconNode$m);
205
+ const __iconNode$l = [
201
206
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
202
207
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
203
208
  ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
204
209
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
205
210
  ];
206
- const LayoutGrid = createLucideIcon("layout-grid", __iconNode$h);
207
- const __iconNode$g = [
211
+ const LayoutGrid = createLucideIcon("layout-grid", __iconNode$l);
212
+ const __iconNode$k = [
208
213
  ["path", { d: "M3 5h.01", key: "18ugdj" }],
209
214
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
210
215
  ["path", { d: "M3 19h.01", key: "noohij" }],
@@ -212,10 +217,15 @@ const __iconNode$g = [
212
217
  ["path", { d: "M8 12h13", key: "1za7za" }],
213
218
  ["path", { d: "M8 19h13", key: "m83p4d" }]
214
219
  ];
215
- const List = createLucideIcon("list", __iconNode$g);
216
- const __iconNode$f = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
217
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$f);
218
- const __iconNode$e = [
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 = [
224
+ ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
225
+ ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
226
+ ];
227
+ const Lock = createLucideIcon("lock", __iconNode$i);
228
+ const __iconNode$h = [
219
229
  [
220
230
  "path",
221
231
  {
@@ -224,10 +234,10 @@ const __iconNode$e = [
224
234
  }
225
235
  ]
226
236
  ];
227
- const MessageSquare = createLucideIcon("message-square", __iconNode$e);
228
- const __iconNode$d = [["path", { d: "M5 12h14", key: "1ays0h" }]];
229
- const Minus = createLucideIcon("minus", __iconNode$d);
230
- const __iconNode$c = [
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 = [
231
241
  [
232
242
  "path",
233
243
  {
@@ -237,31 +247,38 @@ const __iconNode$c = [
237
247
  ],
238
248
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
239
249
  ];
240
- const Pencil = createLucideIcon("pencil", __iconNode$c);
241
- const __iconNode$b = [
250
+ const Pencil = createLucideIcon("pencil", __iconNode$f);
251
+ const __iconNode$e = [
242
252
  ["path", { d: "M5 12h14", key: "1ays0h" }],
243
253
  ["path", { d: "M12 5v14", key: "s699le" }]
244
254
  ];
245
- const Plus = createLucideIcon("plus", __iconNode$b);
246
- const __iconNode$a = [
255
+ const Plus = createLucideIcon("plus", __iconNode$e);
256
+ const __iconNode$d = [
247
257
  ["path", { d: "M16.247 7.761a6 6 0 0 1 0 8.478", key: "1fwjs5" }],
248
258
  ["path", { d: "M19.075 4.933a10 10 0 0 1 0 14.134", key: "ehdyv1" }],
249
259
  ["path", { d: "M4.925 19.067a10 10 0 0 1 0-14.134", key: "1q22gi" }],
250
260
  ["path", { d: "M7.753 16.239a6 6 0 0 1 0-8.478", key: "r2q7qm" }],
251
261
  ["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }]
252
262
  ];
253
- const Radio = createLucideIcon("radio", __iconNode$a);
254
- const __iconNode$9 = [
263
+ const Radio = createLucideIcon("radio", __iconNode$d);
264
+ const __iconNode$c = [
255
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" }],
256
266
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
257
267
  ];
258
- const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$9);
259
- const __iconNode$8 = [
268
+ const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$c);
269
+ const __iconNode$b = [
260
270
  ["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
261
271
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }]
262
272
  ];
263
- const RotateCw = createLucideIcon("rotate-cw", __iconNode$8);
264
- const __iconNode$7 = [
273
+ const RotateCw = createLucideIcon("rotate-cw", __iconNode$b);
274
+ const __iconNode$a = [
275
+ ["rect", { width: "20", height: "8", x: "2", y: "2", rx: "2", ry: "2", key: "ngkwjq" }],
276
+ ["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", ry: "2", key: "iecqi9" }],
277
+ ["line", { x1: "6", x2: "6.01", y1: "6", y2: "6", key: "16zg32" }],
278
+ ["line", { x1: "6", x2: "6.01", y1: "18", y2: "18", key: "nzw8ys" }]
279
+ ];
280
+ const Server = createLucideIcon("server", __iconNode$a);
281
+ const __iconNode$9 = [
265
282
  [
266
283
  "path",
267
284
  {
@@ -271,21 +288,21 @@ const __iconNode$7 = [
271
288
  ],
272
289
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
273
290
  ];
274
- const Settings = createLucideIcon("settings", __iconNode$7);
275
- const __iconNode$6 = [
291
+ const Settings = createLucideIcon("settings", __iconNode$9);
292
+ const __iconNode$8 = [
276
293
  ["path", { d: "M12 19h8", key: "baeox8" }],
277
294
  ["path", { d: "m4 17 6-6-6-6", key: "1yngyt" }]
278
295
  ];
279
- const Terminal = createLucideIcon("terminal", __iconNode$6);
280
- const __iconNode$5 = [
296
+ const Terminal = createLucideIcon("terminal", __iconNode$8);
297
+ const __iconNode$7 = [
281
298
  ["path", { d: "M10 11v6", key: "nco0om" }],
282
299
  ["path", { d: "M14 11v6", key: "outv1u" }],
283
300
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
284
301
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
285
302
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
286
303
  ];
287
- const Trash2 = createLucideIcon("trash-2", __iconNode$5);
288
- const __iconNode$4 = [
304
+ const Trash2 = createLucideIcon("trash-2", __iconNode$7);
305
+ const __iconNode$6 = [
289
306
  [
290
307
  "path",
291
308
  {
@@ -296,12 +313,29 @@ const __iconNode$4 = [
296
313
  ["path", { d: "M12 9v4", key: "juzpu7" }],
297
314
  ["path", { d: "M12 17h.01", key: "p32p05" }]
298
315
  ];
299
- const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$4);
300
- const __iconNode$3 = [
316
+ const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$6);
317
+ const __iconNode$5 = [
301
318
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
302
319
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
303
320
  ];
304
- const User = createLucideIcon("user", __iconNode$3);
321
+ const User = createLucideIcon("user", __iconNode$5);
322
+ const __iconNode$4 = [
323
+ ["path", { d: "M12 20h.01", key: "zekei9" }],
324
+ ["path", { d: "M8.5 16.429a5 5 0 0 1 7 0", key: "1bycff" }],
325
+ ["path", { d: "M5 12.859a10 10 0 0 1 5.17-2.69", key: "1dl1wf" }],
326
+ ["path", { d: "M19 12.859a10 10 0 0 0-2.007-1.523", key: "4k23kn" }],
327
+ ["path", { d: "M2 8.82a15 15 0 0 1 4.177-2.643", key: "1grhjp" }],
328
+ ["path", { d: "M22 8.82a15 15 0 0 0-11.288-3.764", key: "z3jwby" }],
329
+ ["path", { d: "m2 2 20 20", key: "1ooewy" }]
330
+ ];
331
+ const WifiOff = createLucideIcon("wifi-off", __iconNode$4);
332
+ const __iconNode$3 = [
333
+ ["path", { d: "M12 20h.01", key: "zekei9" }],
334
+ ["path", { d: "M2 8.82a15 15 0 0 1 20 0", key: "dnpr2z" }],
335
+ ["path", { d: "M5 12.859a10 10 0 0 1 14 0", key: "1x1e6c" }],
336
+ ["path", { d: "M8.5 16.429a5 5 0 0 1 7 0", key: "1bycff" }]
337
+ ];
338
+ const Wifi = createLucideIcon("wifi", __iconNode$3);
305
339
  const __iconNode$2 = [
306
340
  [
307
341
  "path",
@@ -360,9 +394,14 @@ export {
360
394
  TriangleAlert as n,
361
395
  Minus as o,
362
396
  CircleCheckBig as p,
363
- CircleX as q,
364
- CircleStop as r,
365
- ChevronsUp as s,
366
- ChevronsDown as t,
367
- Terminal as u
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
368
407
  };
@@ -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-Bq_mxeNz.mjs";
2
+ import { C as CapturedLogSchema, a as parseRequest, p as parseOpenAIResponse, I as InspectorResponseSchema } from "./router-D7g2K6y6.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,7 +7,7 @@ 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 CircleX, r as CircleStop, s as ChevronsUp, t as ChevronsDown, u 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, 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";
11
11
  import { M as Markdown } from "../_libs/react-markdown.mjs";
12
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";
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";
@@ -2116,7 +2116,33 @@ function maskApiKey(apiKey) {
2116
2116
  function hasSuccessField(result) {
2117
2117
  return Object.prototype.hasOwnProperty.call(result, "success");
2118
2118
  }
2119
- function TestStatus({ result }) {
2119
+ function getErrorIcon(type) {
2120
+ const iconProps = { className: "size-3", strokeWidth: 2 };
2121
+ switch (type) {
2122
+ case "timeout":
2123
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { ...iconProps });
2124
+ case "network_unreachable":
2125
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WifiOff, { ...iconProps });
2126
+ case "connection_refused":
2127
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Wifi, { ...iconProps });
2128
+ case "auth_failed":
2129
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Lock, { ...iconProps });
2130
+ case "rate_limited":
2131
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Gauge, { ...iconProps });
2132
+ case "server_error":
2133
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Server, { ...iconProps });
2134
+ case "invalid_response":
2135
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CircleQuestionMark, { ...iconProps });
2136
+ case "unknown":
2137
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CircleAlert, { ...iconProps });
2138
+ default:
2139
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CircleAlert, { ...iconProps });
2140
+ }
2141
+ }
2142
+ function TestStatus({
2143
+ result,
2144
+ isTesting
2145
+ }) {
2120
2146
  if (!hasSuccessField(result)) {
2121
2147
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2122
2148
  /* @__PURE__ */ jsxRuntimeExports.jsx(Minus, { className: "size-3" }),
@@ -2129,9 +2155,23 @@ function TestStatus({ result }) {
2129
2155
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Connected" })
2130
2156
  ] });
2131
2157
  }
2132
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1 text-xs text-red-600", title: result.error, children: [
2133
- /* @__PURE__ */ jsxRuntimeExports.jsx(CircleX, { className: "size-3" }),
2134
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: result.error })
2158
+ const error = result.error;
2159
+ const errorMessage = error?.message ?? "Connection failed";
2160
+ const errorHint = error?.hint;
2161
+ const errorType = error?.type ?? "unknown";
2162
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1 min-w-0", children: [
2163
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
2164
+ "div",
2165
+ {
2166
+ className: "flex items-center gap-1 text-xs text-red-600 min-w-0",
2167
+ title: error?.details ?? errorMessage,
2168
+ children: [
2169
+ getErrorIcon(errorType),
2170
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: errorMessage })
2171
+ ]
2172
+ }
2173
+ ),
2174
+ errorHint !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground pl-4 truncate", title: errorHint, children: errorHint })
2135
2175
  ] });
2136
2176
  }
2137
2177
  function ProviderCard({
@@ -2183,7 +2223,7 @@ function ProviderCard({
2183
2223
  " ",
2184
2224
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: provider.anthropicBaseUrl })
2185
2225
  ] }),
2186
- testResults && /* @__PURE__ */ jsxRuntimeExports.jsx(TestStatus, { result: testResults.anthropic.nonStreaming })
2226
+ testResults && /* @__PURE__ */ jsxRuntimeExports.jsx(TestStatus, { result: testResults.anthropic.nonStreaming, isTesting })
2187
2227
  ] }),
2188
2228
  provider.openaiBaseUrl !== void 0 && provider.openaiBaseUrl !== "" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
2189
2229
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-muted-foreground min-w-0 flex-1", children: [
@@ -2191,7 +2231,7 @@ function ProviderCard({
2191
2231
  " ",
2192
2232
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: provider.openaiBaseUrl })
2193
2233
  ] }),
2194
- testResults && /* @__PURE__ */ jsxRuntimeExports.jsx(TestStatus, { result: testResults.openai.nonStreaming })
2234
+ testResults && /* @__PURE__ */ jsxRuntimeExports.jsx(TestStatus, { result: testResults.openai.nonStreaming, isTesting })
2195
2235
  ] }),
2196
2236
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2 pt-1 border-t", children: [
2197
2237
  onTest !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -2507,10 +2547,18 @@ function ProvidersPanel() {
2507
2547
  }, []);
2508
2548
  function handleAddProvider(data) {
2509
2549
  void (async () => {
2550
+ const payload = {
2551
+ name: data.name,
2552
+ apiKey: data.apiKey,
2553
+ model: data.model,
2554
+ format: data.format,
2555
+ anthropicBaseUrl: data.format === "anthropic" ? data.baseUrl : void 0,
2556
+ openaiBaseUrl: data.format === "openai" ? data.baseUrl : void 0
2557
+ };
2510
2558
  const res = await fetch("/api/providers", {
2511
2559
  method: "POST",
2512
2560
  headers: { "Content-Type": "application/json" },
2513
- body: JSON.stringify(data)
2561
+ body: JSON.stringify(payload)
2514
2562
  });
2515
2563
  if (!res.ok) {
2516
2564
  const err = await res.json();
@@ -2526,10 +2574,18 @@ function ProvidersPanel() {
2526
2574
  function handleUpdateProvider(data) {
2527
2575
  if (!editingProvider) return;
2528
2576
  void (async () => {
2577
+ const payload = {
2578
+ name: data.name,
2579
+ apiKey: data.apiKey,
2580
+ model: data.model,
2581
+ format: data.format,
2582
+ anthropicBaseUrl: data.format === "anthropic" ? data.baseUrl : void 0,
2583
+ openaiBaseUrl: data.format === "openai" ? data.baseUrl : void 0
2584
+ };
2529
2585
  const res = await fetch(`/api/providers/${editingProvider.id}`, {
2530
2586
  method: "PUT",
2531
2587
  headers: { "Content-Type": "application/json" },
2532
- body: JSON.stringify(data)
2588
+ body: JSON.stringify(payload)
2533
2589
  });
2534
2590
  if (!res.ok) {
2535
2591
  const err = await res.json();
@@ -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-C4E0e9my.mjs");
200
+ const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-b6u6g-Cr.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-Bq_mxeNz.mjs").then((n) => n.r);
769
+ const routerEntry = await import("./router-D7g2K6y6.mjs").then((n) => n.r);
770
770
  const startEntry = await import("./start-HYkvq4Ni.mjs");
771
771
  return { startEntry, routerEntry };
772
772
  }