@ai-matrx/agents 0.59.214 → 0.59.216
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/CHANGELOG.md +6 -2
- package/dist/catalog/react/index.cjs +29 -31
- package/dist/catalog/react/index.js +1 -3
- package/dist/context/react/index.cjs +171 -205
- package/dist/context/react/index.js +172 -201
- package/dist/mandates/index.cjs +2 -2
- package/dist/mandates/index.d.cts +4 -4
- package/dist/mandates/index.d.ts +4 -4
- package/dist/mandates/index.js +2 -2
- package/dist/models/index.cjs +113 -14
- package/dist/models/index.d.cts +8 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +113 -14
- package/dist/models/react/index.cjs +339 -436
- package/dist/models/react/index.d.cts +8 -0
- package/dist/models/react/index.d.ts +8 -0
- package/dist/models/react/index.js +346 -432
- package/dist/settings/react/index.cjs +116 -173
- package/dist/settings/react/index.js +126 -172
- package/dist/versions/react/index.cjs +15 -68
- package/dist/versions/react/index.js +83 -121
- package/package.json +5 -5
|
@@ -114,6 +114,9 @@ var import_design_system = require("@ai-matrx/design-system");
|
|
|
114
114
|
var import_controls = require("@ai-matrx/design-system/controls");
|
|
115
115
|
var import_brand_glyphs = require("@ai-matrx/icons/brand-glyphs");
|
|
116
116
|
|
|
117
|
+
// models/react/icons.tsx
|
|
118
|
+
var import_icons2 = require("@ai-matrx/design-system/icons");
|
|
119
|
+
|
|
117
120
|
// catalog/shared/icon-paths.ts
|
|
118
121
|
var SHAPES = {
|
|
119
122
|
star: {
|
|
@@ -223,6 +226,7 @@ var ICON_PATHS = SHAPES;
|
|
|
223
226
|
var ICON_NAMES = Object.keys(ICON_PATHS);
|
|
224
227
|
|
|
225
228
|
// catalog/react/icons.tsx
|
|
229
|
+
var import_icons = require("@ai-matrx/design-system/icons");
|
|
226
230
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
227
231
|
function Svg({ children, ...props }) {
|
|
228
232
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
@@ -270,9 +274,6 @@ function makeIcon(name) {
|
|
|
270
274
|
};
|
|
271
275
|
}
|
|
272
276
|
var ArrowUpDownIcon = makeIcon("arrowUpDown");
|
|
273
|
-
var FolderIcon = makeIcon("folder");
|
|
274
|
-
var TagIcon = makeIcon("tag");
|
|
275
|
-
var RotateCcwIcon = makeIcon("rotateCcw");
|
|
276
277
|
var LoaderIcon = makeIcon("loader");
|
|
277
278
|
var UsersIcon = makeIcon("users");
|
|
278
279
|
var MessageCircleIcon = makeIcon("messageCircle");
|
|
@@ -291,118 +292,20 @@ function MousePointerClickIcon(props) {
|
|
|
291
292
|
}
|
|
292
293
|
|
|
293
294
|
// models/react/icons.tsx
|
|
294
|
-
var
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
strokeLinejoin: "round",
|
|
306
|
-
"aria-hidden": "true",
|
|
307
|
-
...props,
|
|
308
|
-
children
|
|
309
|
-
}
|
|
310
|
-
);
|
|
311
|
-
}
|
|
312
|
-
function ShieldIcon(props) {
|
|
313
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Svg2, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }) });
|
|
314
|
-
}
|
|
315
|
-
function SlidersHorizontalIcon(props) {
|
|
316
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Svg2, { ...props, children: [
|
|
317
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M10 5H3" }),
|
|
318
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 19H3" }),
|
|
319
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M14 3v4" }),
|
|
320
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M16 17v4" }),
|
|
321
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M21 12h-9" }),
|
|
322
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M21 19h-5" }),
|
|
323
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M21 5h-7" }),
|
|
324
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 10v4" }),
|
|
325
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 12H3" })
|
|
326
|
-
] });
|
|
327
|
-
}
|
|
328
|
-
function TypeIcon(props) {
|
|
329
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Svg2, { ...props, children: [
|
|
330
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 4v16" }),
|
|
331
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" }),
|
|
332
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9 20h6" })
|
|
333
|
-
] });
|
|
334
|
-
}
|
|
335
|
-
function ImageIcon(props) {
|
|
336
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Svg2, { ...props, children: [
|
|
337
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }),
|
|
338
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "9", cy: "9", r: "2" }),
|
|
339
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" })
|
|
340
|
-
] });
|
|
341
|
-
}
|
|
342
|
-
function AudioLinesIcon(props) {
|
|
343
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Svg2, { ...props, children: [
|
|
344
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2 10v3" }),
|
|
345
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M6 6v11" }),
|
|
346
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M10 3v18" }),
|
|
347
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M14 8v7" }),
|
|
348
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M18 5v13" }),
|
|
349
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M22 10v3" })
|
|
350
|
-
] });
|
|
351
|
-
}
|
|
352
|
-
function BoxesIcon(props) {
|
|
353
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Svg2, { ...props, children: [
|
|
354
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z" }),
|
|
355
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m7 16.5-4.74-2.85" }),
|
|
356
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m7 16.5 5-3" }),
|
|
357
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7 16.5v5.17" }),
|
|
358
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z" }),
|
|
359
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m17 16.5-5-3" }),
|
|
360
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m17 16.5 4.74-2.85" }),
|
|
361
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M17 16.5v5.17" }),
|
|
362
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z" }),
|
|
363
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 8 7.26 5.15" }),
|
|
364
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m12 8 4.74-2.85" }),
|
|
365
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 13.5V8" })
|
|
366
|
-
] });
|
|
367
|
-
}
|
|
368
|
-
function FileTextIcon(props) {
|
|
369
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Svg2, { ...props, children: [
|
|
370
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }),
|
|
371
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }),
|
|
372
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M10 9H8" }),
|
|
373
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M16 13H8" }),
|
|
374
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M16 17H8" })
|
|
375
|
-
] });
|
|
376
|
-
}
|
|
377
|
-
function LayersIcon(props) {
|
|
378
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Svg2, { ...props, children: [
|
|
379
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z" }),
|
|
380
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12" }),
|
|
381
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17" })
|
|
382
|
-
] });
|
|
383
|
-
}
|
|
384
|
-
function ScaleIcon(props) {
|
|
385
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Svg2, { ...props, children: [
|
|
386
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 3v18" }),
|
|
387
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m19 8 3 8a5 5 0 0 1-6 0zV7" }),
|
|
388
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1" }),
|
|
389
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m5 8 3 8a5 5 0 0 1-6 0zV7" }),
|
|
390
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7 21h10" })
|
|
391
|
-
] });
|
|
392
|
-
}
|
|
393
|
-
function LanguagesIcon(props) {
|
|
394
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Svg2, { ...props, children: [
|
|
395
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m5 8 6 6" }),
|
|
396
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m4 14 6-6 2-3" }),
|
|
397
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2 5h12" }),
|
|
398
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7 2h1" }),
|
|
399
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m22 22-5-10-5 10" }),
|
|
400
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M14 18h6" })
|
|
401
|
-
] });
|
|
402
|
-
}
|
|
295
|
+
var sized = (Glyph) => Glyph;
|
|
296
|
+
var ShieldIcon = sized(import_icons2.ShieldIcon);
|
|
297
|
+
var SlidersHorizontalIcon = sized(import_icons2.SlidersHorizontalIcon);
|
|
298
|
+
var TypeIcon = sized(import_icons2.TypeIcon);
|
|
299
|
+
var ImageIcon = sized(import_icons2.ImageIcon);
|
|
300
|
+
var AudioLinesIcon = sized(import_icons2.AudioLinesIcon);
|
|
301
|
+
var BoxesIcon = sized(import_icons2.BoxesIcon);
|
|
302
|
+
var FileTextIcon = sized(import_icons2.FileTextIcon);
|
|
303
|
+
var LayersIcon = sized(import_icons2.LayersIcon);
|
|
304
|
+
var ScaleIcon = sized(import_icons2.ScaleIcon);
|
|
305
|
+
var LanguagesIcon = sized(import_icons2.LanguagesIcon);
|
|
403
306
|
|
|
404
307
|
// models/react/ModelListDropdown.tsx
|
|
405
|
-
var
|
|
308
|
+
var import_icons5 = require("@ai-matrx/design-system/icons");
|
|
406
309
|
|
|
407
310
|
// models/succession.ts
|
|
408
311
|
var MAX_SUCCESSION_HOPS = 8;
|
|
@@ -567,7 +470,7 @@ function serviceCountLabel(count) {
|
|
|
567
470
|
}
|
|
568
471
|
|
|
569
472
|
// models/react/ModelListDropdown.tsx
|
|
570
|
-
var
|
|
473
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
571
474
|
var PANEL_HEIGHT = 640;
|
|
572
475
|
var LIST_MAX_HEIGHT = `min(${PANEL_HEIGHT}px, var(--radix-popper-available-height, 70dvh))`;
|
|
573
476
|
var LIST_WIDTH = 520;
|
|
@@ -586,7 +489,7 @@ var MODALITY_ICON = {
|
|
|
586
489
|
text: TypeIcon,
|
|
587
490
|
image: ImageIcon,
|
|
588
491
|
audio: AudioLinesIcon,
|
|
589
|
-
video:
|
|
492
|
+
video: import_icons5.VideoIcon,
|
|
590
493
|
document: FileTextIcon,
|
|
591
494
|
entities: BoxesIcon,
|
|
592
495
|
embedding: LayersIcon,
|
|
@@ -605,15 +508,15 @@ var INTERACTION_LABEL = {
|
|
|
605
508
|
};
|
|
606
509
|
function SpeedDots({ value }) {
|
|
607
510
|
const label = speedRatingLabel(value);
|
|
608
|
-
return /* @__PURE__ */ (0,
|
|
511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
609
512
|
"span",
|
|
610
513
|
{
|
|
611
514
|
className: "inline-flex items-center gap-1",
|
|
612
515
|
title: label == null ? "No speed rating yet" : `Speed ${label}/5`,
|
|
613
516
|
children: [
|
|
614
|
-
/* @__PURE__ */ (0,
|
|
615
|
-
/* @__PURE__ */ (0,
|
|
616
|
-
[0, 1, 2, 3, 4].map((i) => /* @__PURE__ */ (0,
|
|
517
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[11px] font-medium tabular-nums text-foreground/80", children: speedRatingWord(value) }),
|
|
518
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "inline-flex items-center gap-0.5", children: [
|
|
519
|
+
[0, 1, 2, 3, 4].map((i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
617
520
|
"span",
|
|
618
521
|
{
|
|
619
522
|
className: (0, import_design_system.cn)(
|
|
@@ -623,7 +526,7 @@ function SpeedDots({ value }) {
|
|
|
623
526
|
},
|
|
624
527
|
i
|
|
625
528
|
)),
|
|
626
|
-
value != null && value >= 6 && /* @__PURE__ */ (0,
|
|
529
|
+
value != null && value >= 6 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[9px] leading-none text-amber-500", children: "+" })
|
|
627
530
|
] })
|
|
628
531
|
]
|
|
629
532
|
}
|
|
@@ -632,40 +535,40 @@ function SpeedDots({ value }) {
|
|
|
632
535
|
function SpeedCell({ value }) {
|
|
633
536
|
const word = speedRatingWord(value);
|
|
634
537
|
const label = speedRatingLabel(value);
|
|
635
|
-
return /* @__PURE__ */ (0,
|
|
538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
636
539
|
DelayedHint,
|
|
637
540
|
{
|
|
638
541
|
label: label == null ? "No speed rating yet" : `Speed ${word} (${label}/5)`,
|
|
639
|
-
children: /* @__PURE__ */ (0,
|
|
542
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "inline-block w-11 text-right text-[11px] font-medium tabular-nums text-foreground/80", children: word })
|
|
640
543
|
}
|
|
641
544
|
);
|
|
642
545
|
}
|
|
643
546
|
function CostTier({ tier }) {
|
|
644
547
|
if (!tier)
|
|
645
|
-
return /* @__PURE__ */ (0,
|
|
548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[11px] text-muted-foreground/50", children: "\u2014" });
|
|
646
549
|
const rating = priceTierRating(tier);
|
|
647
550
|
const word = costRatingWord(rating);
|
|
648
|
-
return /* @__PURE__ */ (0,
|
|
551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
649
552
|
DelayedHint,
|
|
650
553
|
{
|
|
651
554
|
label: `Relative cost ${word} (${rating >= 6 ? "5+" : rating}/5 compared with other models)`,
|
|
652
|
-
children: /* @__PURE__ */ (0,
|
|
555
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "inline-block w-11 text-right text-[11px] font-medium tabular-nums text-foreground/80", children: word })
|
|
653
556
|
}
|
|
654
557
|
);
|
|
655
558
|
}
|
|
656
559
|
function ModalityIcons({ list }) {
|
|
657
560
|
if (list.length === 0)
|
|
658
|
-
return /* @__PURE__ */ (0,
|
|
659
|
-
return /* @__PURE__ */ (0,
|
|
561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[11px] text-muted-foreground/50", children: "\u2014" });
|
|
562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "inline-flex flex-nowrap items-center gap-1 whitespace-nowrap", children: list.map((m) => {
|
|
660
563
|
const Icon = MODALITY_ICON[m];
|
|
661
|
-
return /* @__PURE__ */ (0,
|
|
564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
662
565
|
"span",
|
|
663
566
|
{
|
|
664
567
|
className: "inline-flex shrink-0 items-center gap-0.5 text-xs text-foreground/70",
|
|
665
568
|
title: m,
|
|
666
569
|
children: [
|
|
667
|
-
/* @__PURE__ */ (0,
|
|
668
|
-
/* @__PURE__ */ (0,
|
|
570
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { className: "h-3 w-3" }),
|
|
571
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "capitalize", children: m })
|
|
669
572
|
]
|
|
670
573
|
},
|
|
671
574
|
m
|
|
@@ -677,9 +580,9 @@ function AdminRow({
|
|
|
677
580
|
value,
|
|
678
581
|
mono
|
|
679
582
|
}) {
|
|
680
|
-
return /* @__PURE__ */ (0,
|
|
681
|
-
/* @__PURE__ */ (0,
|
|
682
|
-
/* @__PURE__ */ (0,
|
|
583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-baseline gap-2 whitespace-nowrap", children: [
|
|
584
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "w-[76px] shrink-0 text-[10px] uppercase tracking-wide text-muted-foreground", children: label }),
|
|
585
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
683
586
|
"span",
|
|
684
587
|
{
|
|
685
588
|
className: (0, import_design_system.cn)(
|
|
@@ -707,16 +610,16 @@ function AdminOfferingBlock({
|
|
|
707
610
|
total
|
|
708
611
|
}) {
|
|
709
612
|
const unit = offering.usageBasis ? `/ ${offering.usageBasis}` : "/ 1M tokens";
|
|
710
|
-
return /* @__PURE__ */ (0,
|
|
711
|
-
/* @__PURE__ */ (0,
|
|
712
|
-
/* @__PURE__ */ (0,
|
|
613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "rounded-md border border-border p-2", children: [
|
|
614
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mb-1.5 flex items-center justify-between gap-2", children: [
|
|
615
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "truncate text-[11px] font-semibold text-foreground", children: [
|
|
713
616
|
"Offering ",
|
|
714
617
|
index + 1,
|
|
715
618
|
" of ",
|
|
716
619
|
total,
|
|
717
620
|
index === 0 ? " \u2014 preferred" : ""
|
|
718
621
|
] }),
|
|
719
|
-
/* @__PURE__ */ (0,
|
|
622
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
720
623
|
"span",
|
|
721
624
|
{
|
|
722
625
|
className: (0, import_design_system.cn)(
|
|
@@ -727,21 +630,21 @@ function AdminOfferingBlock({
|
|
|
727
630
|
}
|
|
728
631
|
)
|
|
729
632
|
] }),
|
|
730
|
-
/* @__PURE__ */ (0,
|
|
731
|
-
/* @__PURE__ */ (0,
|
|
732
|
-
/* @__PURE__ */ (0,
|
|
733
|
-
/* @__PURE__ */ (0,
|
|
734
|
-
/* @__PURE__ */ (0,
|
|
735
|
-
/* @__PURE__ */ (0,
|
|
736
|
-
/* @__PURE__ */ (0,
|
|
633
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "space-y-0.5", children: [
|
|
634
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AdminRow, { label: "Model", value: offering.providerModelId, mono: true }),
|
|
635
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AdminRow, { label: "Vendor", value: offering.vendor, mono: true }),
|
|
636
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AdminRow, { label: "API", value: offering.apiName, mono: true }),
|
|
637
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AdminRow, { label: "Translator", value: offering.translatorKey, mono: true }),
|
|
638
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AdminRow, { label: "Transport", value: offering.transport, mono: true }),
|
|
639
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
737
640
|
AdminRow,
|
|
738
641
|
{
|
|
739
642
|
label: "Endpoint",
|
|
740
643
|
value: offering.endpointDisplayName || offering.endpointInternalName ? `${offering.endpointDisplayName ?? "\u2014"} (${offering.endpointInternalName ?? "\u2014"})` : null
|
|
741
644
|
}
|
|
742
645
|
),
|
|
743
|
-
/* @__PURE__ */ (0,
|
|
744
|
-
/* @__PURE__ */ (0,
|
|
646
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AdminRow, { label: "Priority", value: String(offering.priority), mono: true }),
|
|
647
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
745
648
|
AdminRow,
|
|
746
649
|
{
|
|
747
650
|
label: "Points in",
|
|
@@ -749,7 +652,7 @@ function AdminOfferingBlock({
|
|
|
749
652
|
mono: true
|
|
750
653
|
}
|
|
751
654
|
),
|
|
752
|
-
/* @__PURE__ */ (0,
|
|
655
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
753
656
|
AdminRow,
|
|
754
657
|
{
|
|
755
658
|
label: "Points out",
|
|
@@ -757,7 +660,7 @@ function AdminOfferingBlock({
|
|
|
757
660
|
mono: true
|
|
758
661
|
}
|
|
759
662
|
),
|
|
760
|
-
offering.pointsCachedInput != null && /* @__PURE__ */ (0,
|
|
663
|
+
offering.pointsCachedInput != null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
761
664
|
AdminRow,
|
|
762
665
|
{
|
|
763
666
|
label: "Points cached",
|
|
@@ -765,15 +668,15 @@ function AdminOfferingBlock({
|
|
|
765
668
|
mono: true
|
|
766
669
|
}
|
|
767
670
|
),
|
|
768
|
-
offering.pricing.length === 0 ? /* @__PURE__ */ (0,
|
|
769
|
-
band.maxTokens != null && /* @__PURE__ */ (0,
|
|
671
|
+
offering.pricing.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AdminRow, { label: "Pricing", value: "\u2014 (no pricing rows)" }) : offering.pricing.map((band, i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "space-y-0.5", children: [
|
|
672
|
+
band.maxTokens != null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
770
673
|
AdminRow,
|
|
771
674
|
{
|
|
772
675
|
label: `Band ${i + 1}`,
|
|
773
676
|
value: `\u2264 ${(0, import_format.formatCount)(band.maxTokens)} tokens`
|
|
774
677
|
}
|
|
775
678
|
),
|
|
776
|
-
/* @__PURE__ */ (0,
|
|
679
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
777
680
|
AdminRow,
|
|
778
681
|
{
|
|
779
682
|
label: "Input $",
|
|
@@ -781,7 +684,7 @@ function AdminOfferingBlock({
|
|
|
781
684
|
mono: true
|
|
782
685
|
}
|
|
783
686
|
),
|
|
784
|
-
/* @__PURE__ */ (0,
|
|
687
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
785
688
|
AdminRow,
|
|
786
689
|
{
|
|
787
690
|
label: "Output $",
|
|
@@ -789,7 +692,7 @@ function AdminOfferingBlock({
|
|
|
789
692
|
mono: true
|
|
790
693
|
}
|
|
791
694
|
),
|
|
792
|
-
/* @__PURE__ */ (0,
|
|
695
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
793
696
|
AdminRow,
|
|
794
697
|
{
|
|
795
698
|
label: "Cached $",
|
|
@@ -798,26 +701,26 @@ function AdminOfferingBlock({
|
|
|
798
701
|
}
|
|
799
702
|
)
|
|
800
703
|
] }, i)),
|
|
801
|
-
/* @__PURE__ */ (0,
|
|
704
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
802
705
|
AdminRow,
|
|
803
706
|
{
|
|
804
707
|
label: "Billing",
|
|
805
708
|
value: offering.usageBasis ? `Usage basis: ${offering.usageBasis}` : offering.tokenBilled ? "Token-billed (provider-reported tokens)" : "Standard $ / 1M tokens"
|
|
806
709
|
}
|
|
807
710
|
),
|
|
808
|
-
/* @__PURE__ */ (0,
|
|
711
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AdminRow, { label: "Offering", value: offering.offeringId, mono: true })
|
|
809
712
|
] })
|
|
810
713
|
] });
|
|
811
714
|
}
|
|
812
715
|
function AdminOfferingsSection({ model }) {
|
|
813
716
|
const offerings = model.admin?.offerings ?? [];
|
|
814
|
-
return /* @__PURE__ */ (0,
|
|
815
|
-
/* @__PURE__ */ (0,
|
|
717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex h-full flex-col", children: [
|
|
718
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "shrink-0 border-b border-border px-3 py-2 text-[10px] uppercase tracking-wide text-muted-foreground", children: [
|
|
816
719
|
"Offerings \u2014 real vendor / wire data (",
|
|
817
720
|
offerings.length,
|
|
818
721
|
")"
|
|
819
722
|
] }),
|
|
820
|
-
/* @__PURE__ */ (0,
|
|
723
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "min-h-0 flex-1 space-y-2 overflow-y-auto p-2", children: offerings.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "rounded-md border border-destructive/40 bg-destructive/10 p-2 text-[11px] text-destructive-ink", children: "No offerings \u2014 this model is not callable (a model without an `ai.offering` row cannot be routed)." }) : offerings.map((o, i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
821
724
|
AdminOfferingBlock,
|
|
822
725
|
{
|
|
823
726
|
offering: o,
|
|
@@ -842,13 +745,13 @@ function ModelDetailCard({
|
|
|
842
745
|
}) {
|
|
843
746
|
const pinnedHere = (t) => !!isCurrentModel && !!pinnedOfferingId && t.offeringId === pinnedOfferingId;
|
|
844
747
|
const anyPinnedHere = model.tiers.some(pinnedHere);
|
|
845
|
-
return /* @__PURE__ */ (0,
|
|
846
|
-
/* @__PURE__ */ (0,
|
|
847
|
-
/* @__PURE__ */ (0,
|
|
848
|
-
/* @__PURE__ */ (0,
|
|
849
|
-
/* @__PURE__ */ (0,
|
|
850
|
-
model.maker && /* @__PURE__ */ (0,
|
|
851
|
-
/* @__PURE__ */ (0,
|
|
748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex h-full flex-col", children: [
|
|
749
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "min-h-0 flex-1 overflow-y-auto p-4", children: [
|
|
750
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
|
|
751
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "min-w-0", children: [
|
|
752
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "truncate text-sm font-semibold text-foreground", children: model.name }),
|
|
753
|
+
model.maker && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mt-0.5 flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
754
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
852
755
|
import_brand_glyphs.MakerBrandGlyph,
|
|
853
756
|
{
|
|
854
757
|
maker: model.maker,
|
|
@@ -856,13 +759,13 @@ function ModelDetailCard({
|
|
|
856
759
|
className: "h-3.5 w-3.5"
|
|
857
760
|
}
|
|
858
761
|
),
|
|
859
|
-
/* @__PURE__ */ (0,
|
|
762
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: model.maker })
|
|
860
763
|
] })
|
|
861
764
|
] }),
|
|
862
|
-
/* @__PURE__ */ (0,
|
|
863
|
-
model.isPrimary && /* @__PURE__ */ (0,
|
|
864
|
-
model.isPremium && /* @__PURE__ */ (0,
|
|
865
|
-
model.isDeprecated && !model.retiredAt && /* @__PURE__ */ (0,
|
|
765
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex shrink-0 flex-col items-end gap-1", children: [
|
|
766
|
+
model.isPrimary && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-foreground/70", children: "Default" }),
|
|
767
|
+
model.isPremium && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-foreground/70", children: "Premium" }),
|
|
768
|
+
model.isDeprecated && !model.retiredAt && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
866
769
|
"span",
|
|
867
770
|
{
|
|
868
771
|
className: "rounded bg-destructive/15 px-1.5 py-0.5 text-[10px] font-medium text-destructive-ink",
|
|
@@ -870,7 +773,7 @@ function ModelDetailCard({
|
|
|
870
773
|
children: "Deprecated"
|
|
871
774
|
}
|
|
872
775
|
),
|
|
873
|
-
model.retiredAt && /* @__PURE__ */ (0,
|
|
776
|
+
model.retiredAt && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
874
777
|
"span",
|
|
875
778
|
{
|
|
876
779
|
className: "rounded bg-destructive/15 px-1.5 py-0.5 text-[10px] font-medium text-destructive-ink",
|
|
@@ -880,19 +783,19 @@ function ModelDetailCard({
|
|
|
880
783
|
)
|
|
881
784
|
] })
|
|
882
785
|
] }),
|
|
883
|
-
model.description && /* @__PURE__ */ (0,
|
|
884
|
-
/* @__PURE__ */ (0,
|
|
885
|
-
/* @__PURE__ */ (0,
|
|
886
|
-
/* @__PURE__ */ (0,
|
|
887
|
-
/* @__PURE__ */ (0,
|
|
786
|
+
model.description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mt-2 line-clamp-3 text-xs text-muted-foreground", children: model.description }),
|
|
787
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("dl", { className: "mt-3 space-y-2 text-xs", children: [
|
|
788
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
789
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { className: "mb-0.5 text-[10px] uppercase tracking-wide text-muted-foreground", children: "Input" }),
|
|
790
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ModalityIcons, { list: model.input }) })
|
|
888
791
|
] }),
|
|
889
|
-
/* @__PURE__ */ (0,
|
|
890
|
-
/* @__PURE__ */ (0,
|
|
891
|
-
/* @__PURE__ */ (0,
|
|
792
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
793
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { className: "mb-0.5 text-[10px] uppercase tracking-wide text-muted-foreground", children: "Output" }),
|
|
794
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ModalityIcons, { list: model.output }) })
|
|
892
795
|
] }),
|
|
893
|
-
model.features.buckets.length > 0 && /* @__PURE__ */ (0,
|
|
894
|
-
/* @__PURE__ */ (0,
|
|
895
|
-
/* @__PURE__ */ (0,
|
|
796
|
+
model.features.buckets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
797
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { className: "mb-0.5 text-[10px] uppercase tracking-wide text-muted-foreground", children: "Features" }),
|
|
798
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { className: "flex flex-wrap gap-1", children: model.features.buckets.map((b) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
896
799
|
"span",
|
|
897
800
|
{
|
|
898
801
|
className: "whitespace-nowrap rounded border border-border px-1.5 py-0.5 text-[10px] text-foreground/80",
|
|
@@ -902,10 +805,10 @@ function ModelDetailCard({
|
|
|
902
805
|
b
|
|
903
806
|
)) })
|
|
904
807
|
] }),
|
|
905
|
-
/* @__PURE__ */ (0,
|
|
906
|
-
/* @__PURE__ */ (0,
|
|
907
|
-
/* @__PURE__ */ (0,
|
|
908
|
-
/* @__PURE__ */ (0,
|
|
808
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
809
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "col-span-2", children: [
|
|
810
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { className: "text-[10px] uppercase tracking-wide text-muted-foreground", children: "Points / 1M tokens" }),
|
|
811
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
909
812
|
"dd",
|
|
910
813
|
{
|
|
911
814
|
className: "whitespace-nowrap text-sm font-semibold tabular-nums text-foreground",
|
|
@@ -914,31 +817,31 @@ function ModelDetailCard({
|
|
|
914
817
|
}
|
|
915
818
|
)
|
|
916
819
|
] }),
|
|
917
|
-
/* @__PURE__ */ (0,
|
|
918
|
-
/* @__PURE__ */ (0,
|
|
919
|
-
/* @__PURE__ */ (0,
|
|
820
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
821
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { className: "text-[10px] uppercase tracking-wide text-muted-foreground", children: "Context window" }),
|
|
822
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { className: "tabular-nums text-foreground/80", children: model.contextWindow?.toLocaleString() ?? "\u2014" })
|
|
920
823
|
] }),
|
|
921
|
-
/* @__PURE__ */ (0,
|
|
922
|
-
/* @__PURE__ */ (0,
|
|
923
|
-
/* @__PURE__ */ (0,
|
|
824
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
825
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { className: "text-[10px] uppercase tracking-wide text-muted-foreground", children: "Max output" }),
|
|
826
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { className: "tabular-nums text-foreground/80", children: model.maxTokens?.toLocaleString() ?? "\u2014" })
|
|
924
827
|
] }),
|
|
925
|
-
/* @__PURE__ */ (0,
|
|
926
|
-
/* @__PURE__ */ (0,
|
|
927
|
-
/* @__PURE__ */ (0,
|
|
828
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
829
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { className: "text-[10px] uppercase tracking-wide text-muted-foreground", children: "Cost" }),
|
|
830
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CostTier, { tier }) })
|
|
928
831
|
] }),
|
|
929
|
-
/* @__PURE__ */ (0,
|
|
930
|
-
/* @__PURE__ */ (0,
|
|
931
|
-
/* @__PURE__ */ (0,
|
|
832
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
833
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { className: "text-[10px] uppercase tracking-wide text-muted-foreground", children: "Speed" }),
|
|
834
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SpeedDots, { value: model.speedRating }) })
|
|
932
835
|
] }),
|
|
933
|
-
/* @__PURE__ */ (0,
|
|
934
|
-
/* @__PURE__ */ (0,
|
|
935
|
-
/* @__PURE__ */ (0,
|
|
836
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
837
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { className: "text-[10px] uppercase tracking-wide text-muted-foreground", children: "Interaction" }),
|
|
838
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { className: "text-foreground/80", children: INTERACTION_LABEL[model.interaction] })
|
|
936
839
|
] })
|
|
937
840
|
] }),
|
|
938
|
-
model.tiers[0]?.servedVia && /* @__PURE__ */ (0,
|
|
939
|
-
/* @__PURE__ */ (0,
|
|
940
|
-
/* @__PURE__ */ (0,
|
|
941
|
-
/* @__PURE__ */ (0,
|
|
841
|
+
model.tiers[0]?.servedVia && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
842
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { className: "mb-0.5 text-[10px] uppercase tracking-wide text-muted-foreground", children: model.tiers.length === 1 ? SERVICE_LABEL : SERVICE_LABEL_PLURAL }),
|
|
843
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { className: "flex flex-wrap gap-1", children: onPinOffering ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
844
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
942
845
|
"button",
|
|
943
846
|
{
|
|
944
847
|
type: "button",
|
|
@@ -956,7 +859,7 @@ function ModelDetailCard({
|
|
|
956
859
|
),
|
|
957
860
|
model.tiers.map((t) => {
|
|
958
861
|
const pinned = pinnedHere(t);
|
|
959
|
-
return /* @__PURE__ */ (0,
|
|
862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
960
863
|
"button",
|
|
961
864
|
{
|
|
962
865
|
type: "button",
|
|
@@ -977,7 +880,7 @@ function ModelDetailCard({
|
|
|
977
880
|
t.offeringId
|
|
978
881
|
);
|
|
979
882
|
})
|
|
980
|
-
] }) : model.tiers.map((t, i) => /* @__PURE__ */ (0,
|
|
883
|
+
] }) : model.tiers.map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
981
884
|
"span",
|
|
982
885
|
{
|
|
983
886
|
className: i === 0 ? SERVICE_CHIP_SELECTED : SERVICE_CHIP_UNSELECTED,
|
|
@@ -987,18 +890,18 @@ function ModelDetailCard({
|
|
|
987
890
|
t.offeringId
|
|
988
891
|
)) })
|
|
989
892
|
] }),
|
|
990
|
-
model.multilingual && /* @__PURE__ */ (0,
|
|
991
|
-
/* @__PURE__ */ (0,
|
|
992
|
-
/* @__PURE__ */ (0,
|
|
893
|
+
model.multilingual && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-1 text-foreground/80", children: [
|
|
894
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(LanguagesIcon, { className: "h-3.5 w-3.5" }),
|
|
895
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "Multilingual" })
|
|
993
896
|
] }),
|
|
994
|
-
model.features.raw.length > 0 && /* @__PURE__ */ (0,
|
|
995
|
-
/* @__PURE__ */ (0,
|
|
996
|
-
/* @__PURE__ */ (0,
|
|
897
|
+
model.features.raw.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
898
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { className: "text-[10px] uppercase tracking-wide text-muted-foreground", children: "All capability flags" }),
|
|
899
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { className: "font-mono text-[10px] leading-relaxed text-muted-foreground/80", children: model.features.raw.join(", ") })
|
|
997
900
|
] })
|
|
998
901
|
] }),
|
|
999
|
-
includeAdminSection && variant === "admin" && /* @__PURE__ */ (0,
|
|
902
|
+
includeAdminSection && variant === "admin" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "mt-3 rounded-md border border-border", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AdminOfferingsSection, { model }) })
|
|
1000
903
|
] }),
|
|
1001
|
-
/* @__PURE__ */ (0,
|
|
904
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "shrink-0 border-t border-border p-3", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1002
905
|
"button",
|
|
1003
906
|
{
|
|
1004
907
|
type: "button",
|
|
@@ -1014,13 +917,13 @@ function DelayedHint({
|
|
|
1014
917
|
label,
|
|
1015
918
|
children
|
|
1016
919
|
}) {
|
|
1017
|
-
return /* @__PURE__ */ (0,
|
|
1018
|
-
/* @__PURE__ */ (0,
|
|
1019
|
-
/* @__PURE__ */ (0,
|
|
920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system.Tooltip, { children: [
|
|
921
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system.TooltipTrigger, { asChild: true, children }),
|
|
922
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system.TooltipContent, { side: "top", sideOffset: 6, className: "max-w-64 text-xs", children: label })
|
|
1020
923
|
] });
|
|
1021
924
|
}
|
|
1022
925
|
function ChipRow({ children }) {
|
|
1023
|
-
return /* @__PURE__ */ (0,
|
|
926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex flex-nowrap gap-1 overflow-x-auto pb-0.5", children });
|
|
1024
927
|
}
|
|
1025
928
|
function ChipToggle({
|
|
1026
929
|
active,
|
|
@@ -1028,7 +931,7 @@ function ChipToggle({
|
|
|
1028
931
|
children,
|
|
1029
932
|
className
|
|
1030
933
|
}) {
|
|
1031
|
-
return /* @__PURE__ */ (0,
|
|
934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1032
935
|
"button",
|
|
1033
936
|
{
|
|
1034
937
|
type: "button",
|
|
@@ -1047,7 +950,7 @@ function MakerFilterButton({
|
|
|
1047
950
|
active,
|
|
1048
951
|
onClick
|
|
1049
952
|
}) {
|
|
1050
|
-
return /* @__PURE__ */ (0,
|
|
953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
1051
954
|
"button",
|
|
1052
955
|
{
|
|
1053
956
|
type: "button",
|
|
@@ -1059,8 +962,8 @@ function MakerFilterButton({
|
|
|
1059
962
|
active ? "border-primary bg-primary/10 text-foreground" : "border-border text-muted-foreground hover:text-foreground"
|
|
1060
963
|
),
|
|
1061
964
|
children: [
|
|
1062
|
-
/* @__PURE__ */ (0,
|
|
1063
|
-
/* @__PURE__ */ (0,
|
|
965
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_brand_glyphs.MakerBrandGlyph, { maker, colored: true, className: "h-4 w-4 shrink-0" }),
|
|
966
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DelayedHint, { label: maker, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "min-w-0 truncate text-[11px] font-medium leading-tight", children: maker }) })
|
|
1064
967
|
]
|
|
1065
968
|
}
|
|
1066
969
|
);
|
|
@@ -1070,7 +973,7 @@ function ServiceFilterButton({
|
|
|
1070
973
|
active,
|
|
1071
974
|
onClick
|
|
1072
975
|
}) {
|
|
1073
|
-
return /* @__PURE__ */ (0,
|
|
976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
1074
977
|
"button",
|
|
1075
978
|
{
|
|
1076
979
|
type: "button",
|
|
@@ -1082,8 +985,8 @@ function ServiceFilterButton({
|
|
|
1082
985
|
active ? "border-primary bg-primary/10 text-foreground" : "border-border text-muted-foreground hover:text-foreground"
|
|
1083
986
|
),
|
|
1084
987
|
children: [
|
|
1085
|
-
/* @__PURE__ */ (0,
|
|
1086
|
-
/* @__PURE__ */ (0,
|
|
988
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_brand_glyphs.ServiceBrandGlyph, { service, className: "h-4 w-4 shrink-0" }),
|
|
989
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DelayedHint, { label: service, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "min-w-0 truncate text-[11px] font-medium leading-tight", children: service }) })
|
|
1087
990
|
]
|
|
1088
991
|
}
|
|
1089
992
|
);
|
|
@@ -1094,11 +997,11 @@ function TriStateChips({
|
|
|
1094
997
|
yesLabel,
|
|
1095
998
|
noLabel
|
|
1096
999
|
}) {
|
|
1097
|
-
return /* @__PURE__ */ (0,
|
|
1000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex flex-wrap gap-1", children: [
|
|
1098
1001
|
["any", "Any"],
|
|
1099
1002
|
["yes", yesLabel],
|
|
1100
1003
|
["no", noLabel]
|
|
1101
|
-
].map(([key, label]) => /* @__PURE__ */ (0,
|
|
1004
|
+
].map(([key, label]) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1102
1005
|
ChipToggle,
|
|
1103
1006
|
{
|
|
1104
1007
|
active: value === key,
|
|
@@ -1112,8 +1015,8 @@ function FilterSection({
|
|
|
1112
1015
|
label,
|
|
1113
1016
|
children
|
|
1114
1017
|
}) {
|
|
1115
|
-
return /* @__PURE__ */ (0,
|
|
1116
|
-
/* @__PURE__ */ (0,
|
|
1018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
1019
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "mb-1 text-[10px] uppercase tracking-wide text-muted-foreground", children: label }),
|
|
1117
1020
|
children
|
|
1118
1021
|
] });
|
|
1119
1022
|
}
|
|
@@ -1158,8 +1061,8 @@ function FiltersPanel({
|
|
|
1158
1061
|
{ key: "premium", label: "Premium" }
|
|
1159
1062
|
] : []
|
|
1160
1063
|
];
|
|
1161
|
-
const setChip = (kind) => /* @__PURE__ */ (0,
|
|
1162
|
-
/* @__PURE__ */ (0,
|
|
1064
|
+
const setChip = (kind) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex flex-wrap gap-1", children: [
|
|
1065
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1163
1066
|
ChipToggle,
|
|
1164
1067
|
{
|
|
1165
1068
|
active: filters[kind].size === 0,
|
|
@@ -1167,7 +1070,7 @@ function FiltersPanel({
|
|
|
1167
1070
|
children: "Any"
|
|
1168
1071
|
}
|
|
1169
1072
|
),
|
|
1170
|
-
(kind === "makers" ? makerOptions : kind === "services" ? serviceOptions : kind === "vendors" ? vendorOptions : apiOptions).map((v) => /* @__PURE__ */ (0,
|
|
1073
|
+
(kind === "makers" ? makerOptions : kind === "services" ? serviceOptions : kind === "vendors" ? vendorOptions : apiOptions).map((v) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1171
1074
|
ChipToggle,
|
|
1172
1075
|
{
|
|
1173
1076
|
active: filters[kind].has(v),
|
|
@@ -1177,9 +1080,9 @@ function FiltersPanel({
|
|
|
1177
1080
|
v
|
|
1178
1081
|
))
|
|
1179
1082
|
] });
|
|
1180
|
-
return /* @__PURE__ */ (0,
|
|
1181
|
-
/* @__PURE__ */ (0,
|
|
1182
|
-
/* @__PURE__ */ (0,
|
|
1083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex h-full flex-col text-xs", children: [
|
|
1084
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "min-h-0 flex-1 space-y-3 overflow-y-auto p-3 pb-4", children: [
|
|
1085
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FilterSection, { label: "Sort by", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ChipRow, { children: sortOptions.map((o) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1183
1086
|
ChipToggle,
|
|
1184
1087
|
{
|
|
1185
1088
|
active: filters.sort === o.key,
|
|
@@ -1188,8 +1091,8 @@ function FiltersPanel({
|
|
|
1188
1091
|
},
|
|
1189
1092
|
o.key
|
|
1190
1093
|
)) }) }),
|
|
1191
|
-
/* @__PURE__ */ (0,
|
|
1192
|
-
/* @__PURE__ */ (0,
|
|
1094
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FilterSection, { label: "Input", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(ChipRow, { children: [
|
|
1095
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1193
1096
|
ChipToggle,
|
|
1194
1097
|
{
|
|
1195
1098
|
active: filters.input.size === 0,
|
|
@@ -1197,18 +1100,18 @@ function FiltersPanel({
|
|
|
1197
1100
|
children: "Any"
|
|
1198
1101
|
}
|
|
1199
1102
|
),
|
|
1200
|
-
INPUT_MODALITIES.map((m) => /* @__PURE__ */ (0,
|
|
1103
|
+
INPUT_MODALITIES.map((m) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1201
1104
|
ChipToggle,
|
|
1202
1105
|
{
|
|
1203
1106
|
active: filters.input.has(m),
|
|
1204
1107
|
onClick: () => toggleModality("input", m),
|
|
1205
|
-
children: /* @__PURE__ */ (0,
|
|
1108
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "capitalize", children: m })
|
|
1206
1109
|
},
|
|
1207
1110
|
m
|
|
1208
1111
|
))
|
|
1209
1112
|
] }) }),
|
|
1210
|
-
/* @__PURE__ */ (0,
|
|
1211
|
-
/* @__PURE__ */ (0,
|
|
1113
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FilterSection, { label: "Output", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(ChipRow, { children: [
|
|
1114
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1212
1115
|
ChipToggle,
|
|
1213
1116
|
{
|
|
1214
1117
|
active: filters.output.size === 0,
|
|
@@ -1216,18 +1119,18 @@ function FiltersPanel({
|
|
|
1216
1119
|
children: "Any"
|
|
1217
1120
|
}
|
|
1218
1121
|
),
|
|
1219
|
-
OUTPUT_MODALITIES.map((m) => /* @__PURE__ */ (0,
|
|
1122
|
+
OUTPUT_MODALITIES.map((m) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1220
1123
|
ChipToggle,
|
|
1221
1124
|
{
|
|
1222
1125
|
active: filters.output.has(m),
|
|
1223
1126
|
onClick: () => toggleModality("output", m),
|
|
1224
|
-
children: /* @__PURE__ */ (0,
|
|
1127
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "capitalize", children: m })
|
|
1225
1128
|
},
|
|
1226
1129
|
m
|
|
1227
1130
|
))
|
|
1228
1131
|
] }) }),
|
|
1229
|
-
variant === "admin" && /* @__PURE__ */ (0,
|
|
1230
|
-
/* @__PURE__ */ (0,
|
|
1132
|
+
variant === "admin" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
1133
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FilterSection, { label: "Deprecated", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1231
1134
|
TriStateChips,
|
|
1232
1135
|
{
|
|
1233
1136
|
value: filters.deprecated,
|
|
@@ -1236,7 +1139,7 @@ function FiltersPanel({
|
|
|
1236
1139
|
noLabel: "Active only"
|
|
1237
1140
|
}
|
|
1238
1141
|
) }),
|
|
1239
|
-
/* @__PURE__ */ (0,
|
|
1142
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FilterSection, { label: "Availability", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1240
1143
|
TriStateChips,
|
|
1241
1144
|
{
|
|
1242
1145
|
value: filters.availability,
|
|
@@ -1245,7 +1148,7 @@ function FiltersPanel({
|
|
|
1245
1148
|
noLabel: "Unavailable"
|
|
1246
1149
|
}
|
|
1247
1150
|
) }),
|
|
1248
|
-
/* @__PURE__ */ (0,
|
|
1151
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FilterSection, { label: "Premium", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1249
1152
|
TriStateChips,
|
|
1250
1153
|
{
|
|
1251
1154
|
value: filters.premium,
|
|
@@ -1254,11 +1157,11 @@ function FiltersPanel({
|
|
|
1254
1157
|
noLabel: "Standard only"
|
|
1255
1158
|
}
|
|
1256
1159
|
) }),
|
|
1257
|
-
/* @__PURE__ */ (0,
|
|
1258
|
-
/* @__PURE__ */ (0,
|
|
1160
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FilterSection, { label: "Vendor", children: setChip("vendors") }),
|
|
1161
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FilterSection, { label: "API", children: setChip("apis") })
|
|
1259
1162
|
] }),
|
|
1260
|
-
/* @__PURE__ */ (0,
|
|
1261
|
-
/* @__PURE__ */ (0,
|
|
1163
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FilterSection, { label: "Maker", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "grid grid-cols-3 gap-1", children: [
|
|
1164
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1262
1165
|
ChipToggle,
|
|
1263
1166
|
{
|
|
1264
1167
|
active: filters.makers.size === 0,
|
|
@@ -1267,7 +1170,7 @@ function FiltersPanel({
|
|
|
1267
1170
|
children: "Any"
|
|
1268
1171
|
}
|
|
1269
1172
|
),
|
|
1270
|
-
makerOptions.map((maker) => /* @__PURE__ */ (0,
|
|
1173
|
+
makerOptions.map((maker) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1271
1174
|
MakerFilterButton,
|
|
1272
1175
|
{
|
|
1273
1176
|
maker,
|
|
@@ -1277,8 +1180,8 @@ function FiltersPanel({
|
|
|
1277
1180
|
maker
|
|
1278
1181
|
))
|
|
1279
1182
|
] }) }),
|
|
1280
|
-
/* @__PURE__ */ (0,
|
|
1281
|
-
/* @__PURE__ */ (0,
|
|
1183
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FilterSection, { label: SERVICE_LABEL, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "grid grid-cols-3 gap-1", children: [
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1282
1185
|
ChipToggle,
|
|
1283
1186
|
{
|
|
1284
1187
|
active: filters.services.size === 0,
|
|
@@ -1287,7 +1190,7 @@ function FiltersPanel({
|
|
|
1287
1190
|
children: "Any"
|
|
1288
1191
|
}
|
|
1289
1192
|
),
|
|
1290
|
-
serviceOptions.map((service) => /* @__PURE__ */ (0,
|
|
1193
|
+
serviceOptions.map((service) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1291
1194
|
ServiceFilterButton,
|
|
1292
1195
|
{
|
|
1293
1196
|
service,
|
|
@@ -1297,7 +1200,7 @@ function FiltersPanel({
|
|
|
1297
1200
|
service
|
|
1298
1201
|
))
|
|
1299
1202
|
] }) }),
|
|
1300
|
-
/* @__PURE__ */ (0,
|
|
1203
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FilterSection, { label: "Features", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex flex-wrap gap-1", children: FEATURE_BUCKET_ORDER.map((b) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1301
1204
|
ChipToggle,
|
|
1302
1205
|
{
|
|
1303
1206
|
active: filters.features.has(b),
|
|
@@ -1306,8 +1209,8 @@ function FiltersPanel({
|
|
|
1306
1209
|
},
|
|
1307
1210
|
b
|
|
1308
1211
|
)) }) }),
|
|
1309
|
-
/* @__PURE__ */ (0,
|
|
1310
|
-
(i) => /* @__PURE__ */ (0,
|
|
1212
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FilterSection, { label: "Interaction", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex flex-wrap gap-1", children: ["any", "turn", "single", "extraction", "realtime"].map(
|
|
1213
|
+
(i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1311
1214
|
ChipToggle,
|
|
1312
1215
|
{
|
|
1313
1216
|
active: filters.interaction === i,
|
|
@@ -1318,20 +1221,20 @@ function FiltersPanel({
|
|
|
1318
1221
|
)
|
|
1319
1222
|
) }) })
|
|
1320
1223
|
] }),
|
|
1321
|
-
/* @__PURE__ */ (0,
|
|
1322
|
-
/* @__PURE__ */ (0,
|
|
1224
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "z-10 flex shrink-0 flex-nowrap items-center gap-1 border-t border-border bg-popover px-3 py-2", children: [
|
|
1225
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1323
1226
|
ChipToggle,
|
|
1324
1227
|
{
|
|
1325
1228
|
active: filters.multilingualOnly,
|
|
1326
1229
|
onClick: () => setFilters((f) => ({ ...f, multilingualOnly: !f.multilingualOnly })),
|
|
1327
1230
|
className: "flex-1 justify-center",
|
|
1328
|
-
children: /* @__PURE__ */ (0,
|
|
1329
|
-
/* @__PURE__ */ (0,
|
|
1231
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "inline-flex items-center gap-1", children: [
|
|
1232
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(LanguagesIcon, { className: "h-3 w-3" }),
|
|
1330
1233
|
" Multilingual"
|
|
1331
1234
|
] })
|
|
1332
1235
|
}
|
|
1333
1236
|
),
|
|
1334
|
-
variant === "user" && /* @__PURE__ */ (0,
|
|
1237
|
+
variant === "user" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1335
1238
|
ChipToggle,
|
|
1336
1239
|
{
|
|
1337
1240
|
active: filters.includeDeprecated,
|
|
@@ -1362,7 +1265,7 @@ function ModelRow({
|
|
|
1362
1265
|
const retired = model.retiredAt != null;
|
|
1363
1266
|
const retiredTitle = retired ? `Retired ${model.retiredAt?.slice(0, 10)} \u2014 the provider no longer serves this model, so it cannot be selected.` : locked ? TOP_TIER_LOCKED_TITLE : void 0;
|
|
1364
1267
|
const blocked = retired || locked;
|
|
1365
|
-
return /* @__PURE__ */ (0,
|
|
1268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
1366
1269
|
"div",
|
|
1367
1270
|
{
|
|
1368
1271
|
role: "button",
|
|
@@ -1384,7 +1287,7 @@ function ModelRow({
|
|
|
1384
1287
|
selected && "bg-muted"
|
|
1385
1288
|
),
|
|
1386
1289
|
children: [
|
|
1387
|
-
/* @__PURE__ */ (0,
|
|
1290
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1388
1291
|
"button",
|
|
1389
1292
|
{
|
|
1390
1293
|
type: "button",
|
|
@@ -1398,20 +1301,20 @@ function ModelRow({
|
|
|
1398
1301
|
"flex h-4 w-4 items-center justify-center rounded transition-colors",
|
|
1399
1302
|
isFavorite ? "text-amber-400" : "text-muted-foreground/30 hover:text-muted-foreground"
|
|
1400
1303
|
),
|
|
1401
|
-
children: /* @__PURE__ */ (0,
|
|
1304
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_icons5.StarIcon, { className: (0, import_design_system.cn)("h-3 w-3", isFavorite && "fill-amber-400") })
|
|
1402
1305
|
}
|
|
1403
1306
|
),
|
|
1404
|
-
/* @__PURE__ */ (0,
|
|
1307
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1405
1308
|
"span",
|
|
1406
1309
|
{
|
|
1407
1310
|
className: "flex w-5 justify-center",
|
|
1408
1311
|
title: model.maker ?? void 0,
|
|
1409
|
-
children: /* @__PURE__ */ (0,
|
|
1312
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_brand_glyphs.MakerBrandGlyph, { maker: model.maker, colored: true, className: "h-3.5 w-3.5" })
|
|
1410
1313
|
}
|
|
1411
1314
|
),
|
|
1412
|
-
/* @__PURE__ */ (0,
|
|
1413
|
-
/* @__PURE__ */ (0,
|
|
1414
|
-
isDecisionModelCapability(model) && /* @__PURE__ */ (0,
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
1316
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DelayedHint, { label: model.name, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "truncate text-xs font-medium text-foreground", children: model.name }) }),
|
|
1317
|
+
isDecisionModelCapability(model) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1415
1318
|
"span",
|
|
1416
1319
|
{
|
|
1417
1320
|
className: "shrink-0 rounded border border-primary/40 bg-primary/10 px-1 text-[9px] font-medium text-foreground/80",
|
|
@@ -1419,7 +1322,7 @@ function ModelRow({
|
|
|
1419
1322
|
children: "decision"
|
|
1420
1323
|
}
|
|
1421
1324
|
),
|
|
1422
|
-
model.isDeprecated && !retired && /* @__PURE__ */ (0,
|
|
1325
|
+
model.isDeprecated && !retired && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1423
1326
|
"span",
|
|
1424
1327
|
{
|
|
1425
1328
|
className: "shrink-0 rounded bg-destructive/15 px-1 text-[9px] text-destructive-ink",
|
|
@@ -1427,7 +1330,7 @@ function ModelRow({
|
|
|
1427
1330
|
children: "dep"
|
|
1428
1331
|
}
|
|
1429
1332
|
),
|
|
1430
|
-
retired && /* @__PURE__ */ (0,
|
|
1333
|
+
retired && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1431
1334
|
"span",
|
|
1432
1335
|
{
|
|
1433
1336
|
className: "shrink-0 rounded bg-destructive/15 px-1 text-[9px] text-destructive-ink",
|
|
@@ -1435,7 +1338,7 @@ function ModelRow({
|
|
|
1435
1338
|
children: "retired"
|
|
1436
1339
|
}
|
|
1437
1340
|
),
|
|
1438
|
-
unavailable && /* @__PURE__ */ (0,
|
|
1341
|
+
unavailable && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1439
1342
|
"span",
|
|
1440
1343
|
{
|
|
1441
1344
|
className: "shrink-0 rounded bg-destructive/15 px-1 text-[9px] text-destructive-ink",
|
|
@@ -1443,14 +1346,14 @@ function ModelRow({
|
|
|
1443
1346
|
children: "off"
|
|
1444
1347
|
}
|
|
1445
1348
|
),
|
|
1446
|
-
classTier ? /* @__PURE__ */ (0,
|
|
1349
|
+
classTier ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1447
1350
|
"span",
|
|
1448
1351
|
{
|
|
1449
1352
|
className: "shrink-0 rounded border border-primary/40 bg-primary/10 px-1 text-[9px] font-medium text-foreground/80",
|
|
1450
1353
|
title: `Runs on ${classTier.servedVia}`,
|
|
1451
1354
|
children: classTier.servedVia
|
|
1452
1355
|
}
|
|
1453
|
-
) : model.tiers.length > 1 && /* @__PURE__ */ (0,
|
|
1356
|
+
) : model.tiers.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1454
1357
|
"span",
|
|
1455
1358
|
{
|
|
1456
1359
|
className: "shrink-0 rounded border border-primary/40 bg-primary/10 px-1 text-[9px] font-medium text-foreground/80",
|
|
@@ -1459,19 +1362,19 @@ function ModelRow({
|
|
|
1459
1362
|
}
|
|
1460
1363
|
)
|
|
1461
1364
|
] }),
|
|
1462
|
-
/* @__PURE__ */ (0,
|
|
1463
|
-
/* @__PURE__ */ (0,
|
|
1365
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SpeedCell, { value: model.speedRating }),
|
|
1366
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1464
1367
|
DelayedHint,
|
|
1465
1368
|
{
|
|
1466
1369
|
label: model.contextWindow == null ? "No context window listed" : `Context window ${(0, import_format.formatCount)(model.contextWindow)} tokens`,
|
|
1467
|
-
children: /* @__PURE__ */ (0,
|
|
1370
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "block w-12 whitespace-nowrap text-right font-mono text-[11px] tabular-nums text-foreground/80", children: model.contextWindow == null ? "\u2014" : fmtPointsCompact(model.contextWindow) })
|
|
1468
1371
|
}
|
|
1469
1372
|
),
|
|
1470
|
-
/* @__PURE__ */ (0,
|
|
1373
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1471
1374
|
DelayedHint,
|
|
1472
1375
|
{
|
|
1473
1376
|
label: tier == null ? "No relative cost rating yet" : `Relative cost ${tier.replace("+", "")}${tier.endsWith("+") ? "+" : ""} \u2014 more $ is more expensive`,
|
|
1474
|
-
children: /* @__PURE__ */ (0,
|
|
1377
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "block w-[2.75rem] text-right", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CostTier, { tier }) })
|
|
1475
1378
|
}
|
|
1476
1379
|
)
|
|
1477
1380
|
]
|
|
@@ -1481,7 +1384,7 @@ function ModelRow({
|
|
|
1481
1384
|
function LocalModelRow({ model, selected, onSelect }) {
|
|
1482
1385
|
const unusable = model.unusable ?? null;
|
|
1483
1386
|
const dim = model.needsMoreMemory === true;
|
|
1484
|
-
return /* @__PURE__ */ (0,
|
|
1387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
1485
1388
|
"div",
|
|
1486
1389
|
{
|
|
1487
1390
|
role: "button",
|
|
@@ -1504,12 +1407,12 @@ function LocalModelRow({ model, selected, onSelect }) {
|
|
|
1504
1407
|
selected && "bg-muted"
|
|
1505
1408
|
),
|
|
1506
1409
|
children: [
|
|
1507
|
-
/* @__PURE__ */ (0,
|
|
1508
|
-
/* @__PURE__ */ (0,
|
|
1509
|
-
/* @__PURE__ */ (0,
|
|
1510
|
-
/* @__PURE__ */ (0,
|
|
1511
|
-
/* @__PURE__ */ (0,
|
|
1512
|
-
/* @__PURE__ */ (0,
|
|
1410
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "w-4" }),
|
|
1411
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex w-5 justify-center", title: model.maker ?? void 0, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_brand_glyphs.MakerBrandGlyph, { maker: model.maker ?? null, colored: true, className: "h-3.5 w-3.5" }) }),
|
|
1412
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "flex min-w-0 flex-col", children: [
|
|
1413
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
1414
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "truncate text-xs font-medium text-foreground", children: model.name }),
|
|
1415
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1513
1416
|
"span",
|
|
1514
1417
|
{
|
|
1515
1418
|
className: "shrink-0 rounded border border-primary/40 bg-primary/10 px-1 text-[9px] font-medium text-foreground/80",
|
|
@@ -1517,13 +1420,13 @@ function LocalModelRow({ model, selected, onSelect }) {
|
|
|
1517
1420
|
children: "local"
|
|
1518
1421
|
}
|
|
1519
1422
|
),
|
|
1520
|
-
dim && /* @__PURE__ */ (0,
|
|
1423
|
+
dim && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "shrink-0 rounded bg-muted px-1 text-[9px] text-muted-foreground", title: "Needs more memory than this computer has free", children: "needs memory" })
|
|
1521
1424
|
] }),
|
|
1522
|
-
unusable && /* @__PURE__ */ (0,
|
|
1425
|
+
unusable && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "data-local-model-reason": true, className: "truncate text-[11px] text-muted-foreground", children: unusable })
|
|
1523
1426
|
] }),
|
|
1524
|
-
/* @__PURE__ */ (0,
|
|
1525
|
-
/* @__PURE__ */ (0,
|
|
1526
|
-
/* @__PURE__ */ (0,
|
|
1427
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "w-11" }),
|
|
1428
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "block w-12 whitespace-nowrap text-right font-mono text-[11px] tabular-nums text-foreground/80", children: model.contextWindow == null ? "\u2014" : fmtPointsCompact(model.contextWindow) }),
|
|
1429
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "w-[2.75rem]" })
|
|
1527
1430
|
]
|
|
1528
1431
|
}
|
|
1529
1432
|
);
|
|
@@ -1860,7 +1763,7 @@ function ModelListDropdown({
|
|
|
1860
1763
|
onOfferingPinChange(offeringId);
|
|
1861
1764
|
if (model.id !== value) onValueChange(model.id);
|
|
1862
1765
|
};
|
|
1863
|
-
const trigger = /* @__PURE__ */ (0,
|
|
1766
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
1864
1767
|
"button",
|
|
1865
1768
|
{
|
|
1866
1769
|
type: "button",
|
|
@@ -1879,8 +1782,8 @@ function ModelListDropdown({
|
|
|
1879
1782
|
className
|
|
1880
1783
|
),
|
|
1881
1784
|
children: [
|
|
1882
|
-
triggerVariant === "settings" ? /* @__PURE__ */ (0,
|
|
1883
|
-
/* @__PURE__ */ (0,
|
|
1785
|
+
triggerVariant === "settings" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex min-w-0 flex-1 items-center gap-1.5", children: shown ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
1786
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1884
1787
|
import_brand_glyphs.MakerBrandGlyph,
|
|
1885
1788
|
{
|
|
1886
1789
|
maker: shown.maker,
|
|
@@ -1888,15 +1791,15 @@ function ModelListDropdown({
|
|
|
1888
1791
|
className: "h-3.5 w-3.5 shrink-0"
|
|
1889
1792
|
}
|
|
1890
1793
|
),
|
|
1891
|
-
/* @__PURE__ */ (0,
|
|
1794
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "min-w-0 whitespace-normal text-left leading-tight", children: [
|
|
1892
1795
|
shown.name,
|
|
1893
|
-
selectedClassLabel && /* @__PURE__ */ (0,
|
|
1796
|
+
selectedClassLabel && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "text-muted-foreground", children: [
|
|
1894
1797
|
" \xB7 ",
|
|
1895
1798
|
selectedClassLabel
|
|
1896
1799
|
] })
|
|
1897
1800
|
] })
|
|
1898
|
-
] }) : /* @__PURE__ */ (0,
|
|
1899
|
-
/* @__PURE__ */ (0,
|
|
1801
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "min-w-0 whitespace-normal text-left leading-tight text-muted-foreground", children: isLoading ? "Loading models\u2026" : emptyOptionLabel && !value ? emptyOptionLabel : placeholder }) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex min-w-0 flex-1 items-center gap-1.5", children: shown ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
1802
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1900
1803
|
import_brand_glyphs.MakerBrandGlyph,
|
|
1901
1804
|
{
|
|
1902
1805
|
maker: shown.maker,
|
|
@@ -1904,16 +1807,16 @@ function ModelListDropdown({
|
|
|
1904
1807
|
className: "h-3.5 w-3.5 shrink-0"
|
|
1905
1808
|
}
|
|
1906
1809
|
),
|
|
1907
|
-
/* @__PURE__ */ (0,
|
|
1810
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "min-w-0 truncate", children: [
|
|
1908
1811
|
shown.name,
|
|
1909
|
-
selectedClassLabel && /* @__PURE__ */ (0,
|
|
1812
|
+
selectedClassLabel && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "text-muted-foreground", children: [
|
|
1910
1813
|
" \xB7 ",
|
|
1911
1814
|
selectedClassLabel
|
|
1912
1815
|
] })
|
|
1913
1816
|
] })
|
|
1914
|
-
] }) : /* @__PURE__ */ (0,
|
|
1915
|
-
/* @__PURE__ */ (0,
|
|
1916
|
-
|
|
1817
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "min-w-0 truncate text-muted-foreground", children: isLoading ? "Loading models\u2026" : emptyOptionLabel && !value ? emptyOptionLabel : placeholder }) }),
|
|
1818
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1819
|
+
import_icons5.ChevronDownIcon,
|
|
1917
1820
|
{
|
|
1918
1821
|
className: (0, import_design_system.cn)(
|
|
1919
1822
|
"shrink-0 text-muted-foreground/60",
|
|
@@ -1924,11 +1827,11 @@ function ModelListDropdown({
|
|
|
1924
1827
|
]
|
|
1925
1828
|
}
|
|
1926
1829
|
);
|
|
1927
|
-
const listPanel = /* @__PURE__ */ (0,
|
|
1928
|
-
/* @__PURE__ */ (0,
|
|
1929
|
-
/* @__PURE__ */ (0,
|
|
1930
|
-
/* @__PURE__ */ (0,
|
|
1931
|
-
/* @__PURE__ */ (0,
|
|
1830
|
+
const listPanel = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex h-full flex-col", children: [
|
|
1831
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-1.5 border-b border-border p-2", children: [
|
|
1832
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "relative flex-1", children: [
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_icons5.SearchIcon, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
1834
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1932
1835
|
import_controls.Input,
|
|
1933
1836
|
{
|
|
1934
1837
|
adornment: "start",
|
|
@@ -1939,7 +1842,7 @@ function ModelListDropdown({
|
|
|
1939
1842
|
}
|
|
1940
1843
|
)
|
|
1941
1844
|
] }),
|
|
1942
|
-
/* @__PURE__ */ (0,
|
|
1845
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
1943
1846
|
"button",
|
|
1944
1847
|
{
|
|
1945
1848
|
type: "button",
|
|
@@ -1949,14 +1852,14 @@ function ModelListDropdown({
|
|
|
1949
1852
|
rightPanel === "filters" ? "border-primary bg-primary/10 text-foreground" : "border-border text-muted-foreground hover:text-foreground"
|
|
1950
1853
|
),
|
|
1951
1854
|
children: [
|
|
1952
|
-
/* @__PURE__ */ (0,
|
|
1855
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SlidersHorizontalIcon, { className: "h-3.5 w-3.5" }),
|
|
1953
1856
|
"Filters",
|
|
1954
|
-
activeFilterCount > 0 && /* @__PURE__ */ (0,
|
|
1857
|
+
activeFilterCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-primary", children: activeFilterCount })
|
|
1955
1858
|
]
|
|
1956
1859
|
}
|
|
1957
1860
|
)
|
|
1958
1861
|
] }),
|
|
1959
|
-
/* @__PURE__ */ (0,
|
|
1862
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex items-center gap-1 border-b border-border px-2 py-1", children: ["all", "favorites"].map((t) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
1960
1863
|
"button",
|
|
1961
1864
|
{
|
|
1962
1865
|
type: "button",
|
|
@@ -1966,8 +1869,8 @@ function ModelListDropdown({
|
|
|
1966
1869
|
tab === t ? "bg-accent text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
1967
1870
|
),
|
|
1968
1871
|
children: [
|
|
1969
|
-
t === "favorites" && /* @__PURE__ */ (0,
|
|
1970
|
-
|
|
1872
|
+
t === "favorites" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1873
|
+
import_icons5.StarIcon,
|
|
1971
1874
|
{
|
|
1972
1875
|
className: (0, import_design_system.cn)(
|
|
1973
1876
|
"h-3 w-3",
|
|
@@ -1976,30 +1879,30 @@ function ModelListDropdown({
|
|
|
1976
1879
|
}
|
|
1977
1880
|
),
|
|
1978
1881
|
t === "all" ? "All" : "Favorites",
|
|
1979
|
-
t === "favorites" && favoriteSet.size > 0 && /* @__PURE__ */ (0,
|
|
1882
|
+
t === "favorites" && favoriteSet.size > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-muted-foreground", children: favoriteSet.size })
|
|
1980
1883
|
]
|
|
1981
1884
|
},
|
|
1982
1885
|
t
|
|
1983
1886
|
)) }),
|
|
1984
|
-
/* @__PURE__ */ (0,
|
|
1985
|
-
/* @__PURE__ */ (0,
|
|
1986
|
-
/* @__PURE__ */ (0,
|
|
1987
|
-
/* @__PURE__ */ (0,
|
|
1988
|
-
/* @__PURE__ */ (0,
|
|
1989
|
-
/* @__PURE__ */ (0,
|
|
1990
|
-
/* @__PURE__ */ (0,
|
|
1887
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "grid grid-cols-[16px_20px_minmax(0,1fr)_2.75rem_3rem_2.75rem] gap-2 border-b border-border px-2 py-1 text-[10px] uppercase tracking-wide text-muted-foreground", children: [
|
|
1888
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "w-4" }),
|
|
1889
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "w-5", title: "Maker", "aria-label": "Maker" }),
|
|
1890
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "Name" }),
|
|
1891
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "w-11 text-right", children: "Speed" }),
|
|
1892
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DelayedHint, { label: "How many tokens this model can hold in one conversation", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "block w-12 text-right", title: "Context window", children: "Window" }) }),
|
|
1893
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DelayedHint, { label: "Relative cost band \u2014 more $ is more expensive. Not your personal usage.", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "block w-[2.75rem] text-right", children: "Cost" }) })
|
|
1991
1894
|
] }),
|
|
1992
|
-
/* @__PURE__ */ (0,
|
|
1993
|
-
/* @__PURE__ */ (0,
|
|
1895
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto p-1", children: error ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "p-3 text-xs text-destructive", children: [
|
|
1896
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "font-medium", children: [
|
|
1994
1897
|
"Failed to load ",
|
|
1995
1898
|
variant,
|
|
1996
1899
|
" catalog"
|
|
1997
1900
|
] }),
|
|
1998
|
-
/* @__PURE__ */ (0,
|
|
1999
|
-
variant === "admin" && /* @__PURE__ */ (0,
|
|
1901
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "mt-0.5 font-mono text-[11px] opacity-80", children: error }),
|
|
1902
|
+
variant === "admin" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "mt-1 text-[11px] text-muted-foreground", children: "If this is a 42501, the admin_model_catalog RPC rejected your role (super admin required)." }),
|
|
2000
1903
|
ports.renderErrorAction?.(void 0)
|
|
2001
|
-
] }) : isLoading ? /* @__PURE__ */ (0,
|
|
2002
|
-
emptyOptionLabel && onClear && /* @__PURE__ */ (0,
|
|
1904
|
+
] }) : isLoading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "p-4 text-center text-xs text-muted-foreground", children: "Loading catalog\u2026" }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
1905
|
+
emptyOptionLabel && onClear && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2003
1906
|
"button",
|
|
2004
1907
|
{
|
|
2005
1908
|
type: "button",
|
|
@@ -2011,14 +1914,14 @@ function ModelListDropdown({
|
|
|
2011
1914
|
children: emptyOptionLabel
|
|
2012
1915
|
}
|
|
2013
1916
|
),
|
|
2014
|
-
localRows.length > 0 && /* @__PURE__ */ (0,
|
|
2015
|
-
localRunnable.length > 0 && /* @__PURE__ */ (0,
|
|
2016
|
-
localRunnable.map((l) => /* @__PURE__ */ (0,
|
|
2017
|
-
localUnusable.length > 0 && /* @__PURE__ */ (0,
|
|
2018
|
-
localUnusable.map((l) => /* @__PURE__ */ (0,
|
|
2019
|
-
filtered.length > 0 && /* @__PURE__ */ (0,
|
|
1917
|
+
localRows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
1918
|
+
localRunnable.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: GROUP_HEADING, children: localGroupLabel }),
|
|
1919
|
+
localRunnable.map((l) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(LocalModelRow, { model: l, selected: l.id === value, onSelect: () => handleSelectLocal(l) }, l.id)),
|
|
1920
|
+
localUnusable.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: GROUP_HEADING, children: "Cannot run here" }),
|
|
1921
|
+
localUnusable.map((l) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(LocalModelRow, { model: l, selected: false, onSelect: () => void 0 }, l.id)),
|
|
1922
|
+
filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: GROUP_HEADING, children: "Cloud" })
|
|
2020
1923
|
] }),
|
|
2021
|
-
filtered.length === 0 ? localRows.length > 0 ? null : /* @__PURE__ */ (0,
|
|
1924
|
+
filtered.length === 0 ? localRows.length > 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "p-4 text-center text-xs text-muted-foreground", children: "No models match your filters." }) : listRows.map(({ model: m, classTier }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2022
1925
|
ModelRow,
|
|
2023
1926
|
{
|
|
2024
1927
|
model: m,
|
|
@@ -2039,26 +1942,26 @@ function ModelListDropdown({
|
|
|
2039
1942
|
classTier ? `${m.id}:${classTier.offeringId}` : m.id
|
|
2040
1943
|
))
|
|
2041
1944
|
] }) }),
|
|
2042
|
-
/* @__PURE__ */ (0,
|
|
2043
|
-
/* @__PURE__ */ (0,
|
|
1945
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center justify-between gap-2 border-t border-border px-2 py-1 text-[10px] text-muted-foreground", children: [
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: error ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
2044
1947
|
"Models couldn't be loaded",
|
|
2045
1948
|
ports.renderErrorAction?.(String(error))
|
|
2046
|
-
] }) : /* @__PURE__ */ (0,
|
|
1949
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
2047
1950
|
listRows.length + localRunnable.length,
|
|
2048
1951
|
" model",
|
|
2049
1952
|
listRows.length + localRunnable.length === 1 ? "" : "s",
|
|
2050
|
-
variant === "user" && (hiddenModelIds?.length ?? 0) > 0 ? /* @__PURE__ */ (0,
|
|
1953
|
+
variant === "user" && (hiddenModelIds?.length ?? 0) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
2051
1954
|
" \xB7 ",
|
|
2052
|
-
ports.settingsHref && LinkComponent ? /* @__PURE__ */ (0,
|
|
1955
|
+
ports.settingsHref && LinkComponent ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(LinkComponent, { href: ports.settingsHref, className: "underline hover:text-foreground", children: [
|
|
2053
1956
|
hiddenModelIds?.length,
|
|
2054
1957
|
" hidden by you"
|
|
2055
|
-
] }) : /* @__PURE__ */ (0,
|
|
1958
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
2056
1959
|
hiddenModelIds?.length,
|
|
2057
1960
|
" hidden by you"
|
|
2058
1961
|
] })
|
|
2059
1962
|
] }) : null
|
|
2060
1963
|
] }) }),
|
|
2061
|
-
isSuperAdmin && catalogVariant == null && /* @__PURE__ */ (0,
|
|
1964
|
+
isSuperAdmin && catalogVariant == null && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
2062
1965
|
"button",
|
|
2063
1966
|
{
|
|
2064
1967
|
type: "button",
|
|
@@ -2069,7 +1972,7 @@ function ModelListDropdown({
|
|
|
2069
1972
|
variant === "admin" ? "bg-primary/10 text-foreground" : "hover:text-foreground"
|
|
2070
1973
|
),
|
|
2071
1974
|
children: [
|
|
2072
|
-
/* @__PURE__ */ (0,
|
|
1975
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShieldIcon, { className: "h-3 w-3" }),
|
|
2073
1976
|
"Admin"
|
|
2074
1977
|
]
|
|
2075
1978
|
}
|
|
@@ -2079,19 +1982,19 @@ function ModelListDropdown({
|
|
|
2079
1982
|
if (disabled) {
|
|
2080
1983
|
return trigger;
|
|
2081
1984
|
}
|
|
2082
|
-
const mobileBody = /* @__PURE__ */ (0,
|
|
2083
|
-
/* @__PURE__ */ (0,
|
|
1985
|
+
const mobileBody = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: mobileDetail ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
1986
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
2084
1987
|
"button",
|
|
2085
1988
|
{
|
|
2086
1989
|
onClick: () => setMobileDetail(null),
|
|
2087
1990
|
className: "flex shrink-0 items-center gap-1.5 border-b border-border px-3 py-2.5 text-sm font-medium text-primary",
|
|
2088
1991
|
children: [
|
|
2089
|
-
/* @__PURE__ */ (0,
|
|
1992
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_icons5.ChevronRightIcon, { className: "h-4 w-4 rotate-180" }),
|
|
2090
1993
|
" Back"
|
|
2091
1994
|
]
|
|
2092
1995
|
}
|
|
2093
1996
|
),
|
|
2094
|
-
/* @__PURE__ */ (0,
|
|
1997
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2095
1998
|
ModelDetailCard,
|
|
2096
1999
|
{
|
|
2097
2000
|
model: mobileDetail,
|
|
@@ -2104,19 +2007,19 @@ function ModelListDropdown({
|
|
|
2104
2007
|
includeAdminSection: true
|
|
2105
2008
|
}
|
|
2106
2009
|
) })
|
|
2107
|
-
] }) : mobileFilters ? /* @__PURE__ */ (0,
|
|
2108
|
-
/* @__PURE__ */ (0,
|
|
2010
|
+
] }) : mobileFilters ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
2011
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
2109
2012
|
"button",
|
|
2110
2013
|
{
|
|
2111
2014
|
onClick: () => setMobileFilters(false),
|
|
2112
2015
|
className: "flex shrink-0 items-center gap-1.5 border-b border-border px-3 py-2.5 text-sm font-medium text-primary",
|
|
2113
2016
|
children: [
|
|
2114
|
-
/* @__PURE__ */ (0,
|
|
2017
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_icons5.ChevronRightIcon, { className: "h-4 w-4 rotate-180" }),
|
|
2115
2018
|
" Back"
|
|
2116
2019
|
]
|
|
2117
2020
|
}
|
|
2118
2021
|
),
|
|
2119
|
-
/* @__PURE__ */ (0,
|
|
2022
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2120
2023
|
FiltersPanel,
|
|
2121
2024
|
{
|
|
2122
2025
|
filters,
|
|
@@ -2130,18 +2033,18 @@ function ModelListDropdown({
|
|
|
2130
2033
|
) })
|
|
2131
2034
|
] }) : listPanel });
|
|
2132
2035
|
if (isMobile && inline) {
|
|
2133
|
-
return /* @__PURE__ */ (0,
|
|
2036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system.TooltipProvider, { delayDuration: HOVER_DELAY_MS, skipDelayDuration: HOVER_DELAY_MS, children: mobileBody });
|
|
2134
2037
|
}
|
|
2135
2038
|
if (isMobile) {
|
|
2136
|
-
return /* @__PURE__ */ (0,
|
|
2137
|
-
/* @__PURE__ */ (0,
|
|
2138
|
-
/* @__PURE__ */ (0,
|
|
2039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system.Drawer, { open, onOpenChange: handleOpen, children: [
|
|
2040
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system.DrawerTrigger, { asChild: true, children: trigger }),
|
|
2041
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system.DrawerContent, { className: "h-[85dvh]", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
2139
2042
|
import_design_system.TooltipProvider,
|
|
2140
2043
|
{
|
|
2141
2044
|
delayDuration: HOVER_DELAY_MS,
|
|
2142
2045
|
skipDelayDuration: HOVER_DELAY_MS,
|
|
2143
2046
|
children: [
|
|
2144
|
-
/* @__PURE__ */ (0,
|
|
2047
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system.DrawerTitle, { className: "sr-only", children: "Select model" }),
|
|
2145
2048
|
mobileBody
|
|
2146
2049
|
]
|
|
2147
2050
|
}
|
|
@@ -2150,18 +2053,18 @@ function ModelListDropdown({
|
|
|
2150
2053
|
}
|
|
2151
2054
|
const popoverWidth = LIST_WIDTH + DETAIL_WIDTH + (variant === "admin" ? ADMIN_PANEL_WIDTH : 0);
|
|
2152
2055
|
const adminPanelModel = hovered ?? selected;
|
|
2153
|
-
const desktopBody = /* @__PURE__ */ (0,
|
|
2056
|
+
const desktopBody = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2154
2057
|
import_design_system.TooltipProvider,
|
|
2155
2058
|
{
|
|
2156
2059
|
delayDuration: HOVER_DELAY_MS,
|
|
2157
2060
|
skipDelayDuration: HOVER_DELAY_MS,
|
|
2158
|
-
children: /* @__PURE__ */ (0,
|
|
2061
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "h-full overflow-x-auto overflow-y-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
2159
2062
|
"div",
|
|
2160
2063
|
{
|
|
2161
2064
|
className: "flex h-full",
|
|
2162
2065
|
style: inline ? void 0 : { minWidth: popoverWidth },
|
|
2163
2066
|
children: [
|
|
2164
|
-
/* @__PURE__ */ (0,
|
|
2067
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2165
2068
|
"div",
|
|
2166
2069
|
{
|
|
2167
2070
|
className: "flex h-full min-h-0 flex-col border-r border-border",
|
|
@@ -2169,12 +2072,12 @@ function ModelListDropdown({
|
|
|
2169
2072
|
children: listPanel
|
|
2170
2073
|
}
|
|
2171
2074
|
),
|
|
2172
|
-
/* @__PURE__ */ (0,
|
|
2075
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2173
2076
|
"div",
|
|
2174
2077
|
{
|
|
2175
2078
|
className: "flex h-full min-h-0 flex-col overflow-hidden",
|
|
2176
2079
|
style: inline ? { flex: "1 1 0", minWidth: INLINE_DETAIL_MIN_WIDTH } : { width: DETAIL_WIDTH, flexShrink: 0 },
|
|
2177
|
-
children: rightPanel === "filters" ? /* @__PURE__ */ (0,
|
|
2080
|
+
children: rightPanel === "filters" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2178
2081
|
FiltersPanel,
|
|
2179
2082
|
{
|
|
2180
2083
|
filters,
|
|
@@ -2185,11 +2088,11 @@ function ModelListDropdown({
|
|
|
2185
2088
|
vendorOptions,
|
|
2186
2089
|
apiOptions
|
|
2187
2090
|
}
|
|
2188
|
-
) : rightPanel === "detail" && hovered ? /* @__PURE__ */ (0,
|
|
2091
|
+
) : rightPanel === "detail" && hovered ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2189
2092
|
"div",
|
|
2190
2093
|
{
|
|
2191
2094
|
className: "h-full animate-in fade-in-0 duration-300",
|
|
2192
|
-
children: /* @__PURE__ */ (0,
|
|
2095
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2193
2096
|
ModelDetailCard,
|
|
2194
2097
|
{
|
|
2195
2098
|
model: hovered,
|
|
@@ -2203,20 +2106,20 @@ function ModelListDropdown({
|
|
|
2203
2106
|
)
|
|
2204
2107
|
},
|
|
2205
2108
|
hovered.id
|
|
2206
|
-
) : /* @__PURE__ */ (0,
|
|
2207
|
-
/* @__PURE__ */ (0,
|
|
2208
|
-
/* @__PURE__ */ (0,
|
|
2109
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center", children: [
|
|
2110
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MousePointerClickIcon, { className: "h-6 w-6 text-muted-foreground/40" }),
|
|
2111
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs leading-relaxed text-muted-foreground/70", children: "Hover a model to preview its details, or click to select." })
|
|
2209
2112
|
] })
|
|
2210
2113
|
}
|
|
2211
2114
|
),
|
|
2212
|
-
variant === "admin" && /* @__PURE__ */ (0,
|
|
2115
|
+
variant === "admin" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2213
2116
|
"div",
|
|
2214
2117
|
{
|
|
2215
2118
|
className: "flex h-full min-h-0 shrink-0 flex-col overflow-hidden border-l border-border",
|
|
2216
2119
|
style: { width: ADMIN_PANEL_WIDTH },
|
|
2217
|
-
children: adminPanelModel ? /* @__PURE__ */ (0,
|
|
2218
|
-
/* @__PURE__ */ (0,
|
|
2219
|
-
/* @__PURE__ */ (0,
|
|
2120
|
+
children: adminPanelModel ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AdminOfferingsSection, { model: adminPanelModel }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center", children: [
|
|
2121
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShieldIcon, { className: "h-6 w-6 text-muted-foreground/40" }),
|
|
2122
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs leading-relaxed text-muted-foreground/70", children: "Hover a model to see every offering's real vendor, api, provider model id and $ pricing." })
|
|
2220
2123
|
] })
|
|
2221
2124
|
}
|
|
2222
2125
|
)
|
|
@@ -2226,11 +2129,11 @@ function ModelListDropdown({
|
|
|
2226
2129
|
}
|
|
2227
2130
|
);
|
|
2228
2131
|
if (inline) {
|
|
2229
|
-
return /* @__PURE__ */ (0,
|
|
2132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "h-full w-full min-w-0", children: desktopBody });
|
|
2230
2133
|
}
|
|
2231
|
-
return /* @__PURE__ */ (0,
|
|
2232
|
-
/* @__PURE__ */ (0,
|
|
2233
|
-
/* @__PURE__ */ (0,
|
|
2134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system.Popover, { open, onOpenChange: handleOpen, modal: false, children: [
|
|
2135
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system.PopoverTrigger, { asChild: true, children: trigger }),
|
|
2136
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2234
2137
|
import_design_system.PopoverContent,
|
|
2235
2138
|
{
|
|
2236
2139
|
align: "start",
|
|
@@ -2501,7 +2404,7 @@ function fromDiscovery(result) {
|
|
|
2501
2404
|
}
|
|
2502
2405
|
|
|
2503
2406
|
// models/react/ModelDiscovery.tsx
|
|
2504
|
-
var
|
|
2407
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
2505
2408
|
var KINDS = [
|
|
2506
2409
|
{ value: "text", label: "Text" },
|
|
2507
2410
|
{ value: "vision", label: "Vision" },
|
|
@@ -2572,8 +2475,8 @@ function ModelDiscovery({
|
|
|
2572
2475
|
if (abortRef.current === controller) setResolving(null);
|
|
2573
2476
|
}
|
|
2574
2477
|
};
|
|
2575
|
-
return /* @__PURE__ */ (0,
|
|
2576
|
-
/* @__PURE__ */ (0,
|
|
2478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex min-w-0 flex-col gap-4", "data-testid": "model-discovery", children: [
|
|
2479
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2577
2480
|
import_controls2.Tabs,
|
|
2578
2481
|
{
|
|
2579
2482
|
"aria-label": "Find a model",
|
|
@@ -2585,14 +2488,14 @@ function ModelDiscovery({
|
|
|
2585
2488
|
]
|
|
2586
2489
|
}
|
|
2587
2490
|
),
|
|
2588
|
-
tab === "search" ? /* @__PURE__ */ (0,
|
|
2589
|
-
resolving ? /* @__PURE__ */ (0,
|
|
2491
|
+
tab === "search" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SearchTab, { port, onPick: (repo) => void resolve(repo) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(LinkTab, { busy: resolving !== null, onResolve: (l) => void resolve(l) }),
|
|
2492
|
+
resolving ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("p", { className: "text-sm text-muted-foreground", children: [
|
|
2590
2493
|
"Reading ",
|
|
2591
2494
|
resolving,
|
|
2592
2495
|
"\u2026"
|
|
2593
2496
|
] }) : null,
|
|
2594
|
-
resolveError ? /* @__PURE__ */ (0,
|
|
2595
|
-
result ? /* @__PURE__ */ (0,
|
|
2497
|
+
resolveError ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system2.ErrorNotice, { message: resolveError, size: "compact" }) : null,
|
|
2498
|
+
result ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2596
2499
|
DiscoveryResultView,
|
|
2597
2500
|
{
|
|
2598
2501
|
result,
|
|
@@ -2610,8 +2513,8 @@ function ModelDiscovery({
|
|
|
2610
2513
|
}
|
|
2611
2514
|
function LinkTab({ busy, onResolve }) {
|
|
2612
2515
|
const [link, setLink] = (0, import_react4.useState)("");
|
|
2613
|
-
return /* @__PURE__ */ (0,
|
|
2614
|
-
/* @__PURE__ */ (0,
|
|
2516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-center", children: [
|
|
2517
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2615
2518
|
import_controls2.Field,
|
|
2616
2519
|
{
|
|
2617
2520
|
"aria-label": "Model link",
|
|
@@ -2628,7 +2531,7 @@ function LinkTab({ busy, onResolve }) {
|
|
|
2628
2531
|
autoComplete: "off"
|
|
2629
2532
|
}
|
|
2630
2533
|
) }),
|
|
2631
|
-
/* @__PURE__ */ (0,
|
|
2534
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls2.Button, { variant: "primary", onClick: () => onResolve(link), disabled: busy || !link.trim(), children: busy ? "Finding versions\u2026" : "Find versions" })
|
|
2632
2535
|
] });
|
|
2633
2536
|
}
|
|
2634
2537
|
function SearchTab({ port, onPick }) {
|
|
@@ -2657,10 +2560,10 @@ function SearchTab({ port, onPick }) {
|
|
|
2657
2560
|
(0, import_react4.useEffect)(() => {
|
|
2658
2561
|
if (port.search) void run(null);
|
|
2659
2562
|
}, [kind, sort]);
|
|
2660
|
-
if (!port.search) return /* @__PURE__ */ (0,
|
|
2661
|
-
return /* @__PURE__ */ (0,
|
|
2662
|
-
/* @__PURE__ */ (0,
|
|
2663
|
-
/* @__PURE__ */ (0,
|
|
2563
|
+
if (!port.search) return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-sm text-muted-foreground", children: "Search is not available here yet. Paste a link instead." });
|
|
2564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
2565
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-center", children: [
|
|
2566
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2664
2567
|
import_controls2.SearchField,
|
|
2665
2568
|
{
|
|
2666
2569
|
placeholder: "Search models",
|
|
@@ -2674,26 +2577,26 @@ function SearchTab({ port, onPick }) {
|
|
|
2674
2577
|
}
|
|
2675
2578
|
}
|
|
2676
2579
|
) }),
|
|
2677
|
-
/* @__PURE__ */ (0,
|
|
2678
|
-
/* @__PURE__ */ (0,
|
|
2679
|
-
/* @__PURE__ */ (0,
|
|
2580
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls2.Select, { "aria-label": "Kind", value: kind, onValueChange: setKind, options: KINDS.map((k) => ({ value: k.value, label: k.label })) }),
|
|
2581
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls2.Select, { "aria-label": "Order", value: sort, onValueChange: setSort, options: SORTS.map((s) => ({ value: s.value, label: s.label })) }),
|
|
2582
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls2.Button, { onClick: () => void run(null), disabled: busy, children: "Search" })
|
|
2680
2583
|
] }),
|
|
2681
|
-
error ? /* @__PURE__ */ (0,
|
|
2682
|
-
page && page.results.length === 0 && !busy ? /* @__PURE__ */ (0,
|
|
2683
|
-
page?.results.length ? /* @__PURE__ */ (0,
|
|
2684
|
-
/* @__PURE__ */ (0,
|
|
2685
|
-
hit.maker_avatar_url ? /* @__PURE__ */ (0,
|
|
2686
|
-
/* @__PURE__ */ (0,
|
|
2584
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system2.ErrorNotice, { message: error, size: "compact" }) : null,
|
|
2585
|
+
page && page.results.length === 0 && !busy ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-sm text-muted-foreground", children: "No models found" }) : null,
|
|
2586
|
+
page?.results.length ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "flex flex-col divide-y divide-border rounded-md border border-border", "aria-label": "Search results", children: page.results.map((hit) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("button", { type: "button", onClick: () => onPick(hit.repo), className: "flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-accent", children: [
|
|
2587
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_design_system2.Avatar, { size: "sm", children: [
|
|
2588
|
+
hit.maker_avatar_url ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system2.AvatarImage, { src: hit.maker_avatar_url, alt: hit.maker ?? "" }) : null,
|
|
2589
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system2.AvatarFallback, { children: initials(hit.maker ?? hit.repo) })
|
|
2687
2590
|
] }),
|
|
2688
|
-
/* @__PURE__ */ (0,
|
|
2689
|
-
/* @__PURE__ */ (0,
|
|
2690
|
-
/* @__PURE__ */ (0,
|
|
2591
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
2592
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "truncate text-sm font-medium text-foreground", children: hit.name || hit.repo }),
|
|
2593
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "truncate text-xs text-muted-foreground", children: [hit.maker, hit.downloads != null ? `${(0, import_format3.formatCount)(hit.downloads)} downloads` : null, hit.license, sizeOf(hit.size_bytes)].filter(Boolean).join(" \xB7 ") })
|
|
2691
2594
|
] }),
|
|
2692
|
-
hit.has_gguf ? /* @__PURE__ */ (0,
|
|
2693
|
-
hit.gated ? /* @__PURE__ */ (0,
|
|
2595
|
+
hit.has_gguf ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls2.Badge, { tone: "success", children: "GGUF ready" }) : null,
|
|
2596
|
+
hit.gated ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls2.Badge, { tone: "warning", children: "Needs access" }) : null
|
|
2694
2597
|
] }) }, hit.repo)) }) : null,
|
|
2695
|
-
busy ? /* @__PURE__ */ (0,
|
|
2696
|
-
page?.next_cursor && !busy ? /* @__PURE__ */ (0,
|
|
2598
|
+
busy ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-sm text-muted-foreground", children: "Searching\u2026" }) : null,
|
|
2599
|
+
page?.next_cursor && !busy ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls2.Button, { variant: "quiet", onClick: () => void run(page.next_cursor), children: "Show more" }) : null
|
|
2697
2600
|
] });
|
|
2698
2601
|
}
|
|
2699
2602
|
function DiscoveryResultView({ result, device, runtimes, want = DEFAULT_WANT, chooseLabel = "Choose", mode = "device", onChoose, renderVariantActions, renderActions }) {
|
|
@@ -2716,21 +2619,21 @@ function DiscoveryResultView({ result, device, runtimes, want = DEFAULT_WANT, ch
|
|
|
2716
2619
|
setChoosing(null);
|
|
2717
2620
|
}
|
|
2718
2621
|
};
|
|
2719
|
-
return /* @__PURE__ */ (0,
|
|
2720
|
-
/* @__PURE__ */ (0,
|
|
2721
|
-
/* @__PURE__ */ (0,
|
|
2722
|
-
avatar ? /* @__PURE__ */ (0,
|
|
2723
|
-
/* @__PURE__ */ (0,
|
|
2622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: "flex flex-col gap-3", "aria-label": "Model versions", children: [
|
|
2623
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "flex items-start gap-3", children: [
|
|
2624
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_design_system2.Avatar, { size: "md", children: [
|
|
2625
|
+
avatar ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system2.AvatarImage, { src: avatar, alt: result.maker ?? "" }) : null,
|
|
2626
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system2.AvatarFallback, { children: initials(result.maker ?? result.repo) })
|
|
2724
2627
|
] }),
|
|
2725
|
-
/* @__PURE__ */ (0,
|
|
2726
|
-
/* @__PURE__ */ (0,
|
|
2727
|
-
/* @__PURE__ */ (0,
|
|
2728
|
-
result.summary ? /* @__PURE__ */ (0,
|
|
2628
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
2629
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { className: "truncate text-base font-semibold text-foreground", children: result.name || model.common_name || result.repo }),
|
|
2630
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: [result.maker, result.repo, result.license_id ? `License ${result.license_id}` : null].filter(Boolean).join(" \xB7 ") }),
|
|
2631
|
+
result.summary ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: result.summary }) : null
|
|
2729
2632
|
] })
|
|
2730
2633
|
] }),
|
|
2731
|
-
source && !source.runnable_as_is && source.why_not ? /* @__PURE__ */ (0,
|
|
2732
|
-
ranked.length === 0 ? /* @__PURE__ */ (0,
|
|
2733
|
-
/* @__PURE__ */ (0,
|
|
2634
|
+
source && !source.runnable_as_is && source.why_not ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "rounded-md border border-border px-3 py-2 text-sm text-foreground", children: source.why_not }) : null,
|
|
2635
|
+
ranked.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-sm text-muted-foreground", children: "No downloadable versions were found at this link." }) : null,
|
|
2636
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "flex flex-col gap-2", "aria-label": "Versions", children: ranked.map((r) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2734
2637
|
VariantRow,
|
|
2735
2638
|
{
|
|
2736
2639
|
ranked: r,
|
|
@@ -2743,7 +2646,7 @@ function DiscoveryResultView({ result, device, runtimes, want = DEFAULT_WANT, ch
|
|
|
2743
2646
|
},
|
|
2744
2647
|
r.variant.key
|
|
2745
2648
|
)) }),
|
|
2746
|
-
done ? done.ok ? /* @__PURE__ */ (0,
|
|
2649
|
+
done ? done.ok ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-sm text-foreground", children: done.text }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system2.ErrorNotice, { message: done.text, size: "compact" }) : null,
|
|
2747
2650
|
renderActions?.(result, ranked)
|
|
2748
2651
|
] });
|
|
2749
2652
|
}
|
|
@@ -2755,29 +2658,29 @@ function VariantRow({ ranked, mode, chooseLabel, busy, choosingThis, onChoose, e
|
|
|
2755
2658
|
const label = v.quant || v.key;
|
|
2756
2659
|
const publisher = v.discovery?.publisher ?? null;
|
|
2757
2660
|
const size = sizeOf(v.total_bytes);
|
|
2758
|
-
return /* @__PURE__ */ (0,
|
|
2759
|
-
/* @__PURE__ */ (0,
|
|
2760
|
-
/* @__PURE__ */ (0,
|
|
2761
|
-
ranked.recommended ? /* @__PURE__ */ (0,
|
|
2762
|
-
verdict.badge ? /* @__PURE__ */ (0,
|
|
2763
|
-
/* @__PURE__ */ (0,
|
|
2764
|
-
/* @__PURE__ */ (0,
|
|
2661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("li", { className: "flex flex-col gap-2 rounded-md border border-border p-3", "data-testid": "discovery-variant", "data-runs": verdict.runs === null ? void 0 : String(verdict.runs), "data-recommended": ranked.recommended ? "true" : void 0, children: [
|
|
2662
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
2663
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-sm font-medium text-foreground", children: label }),
|
|
2664
|
+
ranked.recommended ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls2.Badge, { tone: "primary", children: "Recommended" }) : null,
|
|
2665
|
+
verdict.badge ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls2.Badge, { tone: "warning", children: verdict.badge }) : null,
|
|
2666
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-xs text-muted-foreground", children: [v.format.toUpperCase(), size, publisher ? `by ${publisher}` : null].filter(Boolean).join(" \xB7 ") }),
|
|
2667
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "ml-auto flex items-center gap-2", children: [
|
|
2765
2668
|
extra,
|
|
2766
|
-
verdict.reason ? /* @__PURE__ */ (0,
|
|
2767
|
-
/* @__PURE__ */ (0,
|
|
2669
|
+
verdict.reason ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-xs text-muted-foreground", "data-testid": "choose-reason", children: verdict.reason }) : null,
|
|
2670
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls2.Button, { variant: ranked.recommended ? "primary" : "outline", disabled: busy || blocked, onClick: onChoose, children: choosingThis ? "Working\u2026" : chooseLabel })
|
|
2768
2671
|
] })
|
|
2769
2672
|
] }),
|
|
2770
|
-
verdict.runtime ? /* @__PURE__ */ (0,
|
|
2771
|
-
/* @__PURE__ */ (0,
|
|
2772
|
-
v.artifacts.length ? /* @__PURE__ */ (0,
|
|
2773
|
-
/* @__PURE__ */ (0,
|
|
2673
|
+
verdict.runtime ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-xs text-muted-foreground", "data-testid": "variant-runtime", children: verdict.runtime }) : null,
|
|
2674
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "flex flex-col gap-0.5", children: verdict.lines.map((line) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { className: "text-xs text-muted-foreground", children: line }, line)) }),
|
|
2675
|
+
v.artifacts.length ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_design_system2.Collapsible, { children: [
|
|
2676
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_design_system2.CollapsibleTrigger, { className: "text-xs text-muted-foreground hover:text-foreground", children: [
|
|
2774
2677
|
"Files in this version (",
|
|
2775
2678
|
v.artifacts.length,
|
|
2776
2679
|
")"
|
|
2777
2680
|
] }),
|
|
2778
|
-
/* @__PURE__ */ (0,
|
|
2779
|
-
/* @__PURE__ */ (0,
|
|
2780
|
-
/* @__PURE__ */ (0,
|
|
2681
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system2.CollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "mt-1 flex flex-col gap-0.5", children: v.artifacts.map((a) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("li", { className: "flex gap-2 text-xs text-muted-foreground", children: [
|
|
2682
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "min-w-0 flex-1 truncate font-mono", children: a.path }),
|
|
2683
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: sizeOf(a.size_bytes) ?? "" })
|
|
2781
2684
|
] }, a.path || a.url)) }) })
|
|
2782
2685
|
] }) : null
|
|
2783
2686
|
] });
|