@tangle-network/sandbox-ui 0.45.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{WorkflowGraph-7YYGIBNV.js → WorkflowGraph-6IKZYPST.js} +2 -1
- package/dist/assets.js +1 -0
- package/dist/assistant.js +2 -1
- package/dist/auth.js +1 -0
- package/dist/chat.js +4 -3
- package/dist/{chunk-6NDOA4SB.js → chunk-2ISY4R72.js} +112 -104
- package/dist/{chunk-KIRJZUX2.js → chunk-BR2LMUAE.js} +61 -34
- package/dist/{chunk-H7GMPMPB.js → chunk-CXV6X33U.js} +19 -1
- package/dist/{chunk-CUUUFJF5.js → chunk-KOUYJ6QP.js} +23 -23
- package/dist/{chunk-3RNYDTQ3.js → chunk-LQHTCM56.js} +21 -27
- package/dist/chunk-NXUSLH7H.js +7528 -0
- package/dist/{chunk-2XNT74ZX.js → chunk-OMUIPJQZ.js} +28 -20
- package/dist/{chunk-KCWIC3SJ.js → chunk-PZ62T5PM.js} +281 -214
- package/dist/chunk-U67V476Y.js +35 -0
- package/dist/chunk-VIREDUBF.js +215 -0
- package/dist/dashboard.d.ts +82 -66
- package/dist/dashboard.js +5 -4
- package/dist/editor.js +2 -0
- package/dist/files.d.ts +5 -0
- package/dist/files.js +1 -0
- package/dist/globals.css +1149 -48
- package/dist/hooks.js +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +95 -65
- package/dist/integrations.js +2 -1
- package/dist/markdown.js +2 -0
- package/dist/openui.d.ts +0 -5
- package/dist/openui.js +1 -0
- package/dist/pages.d.ts +1 -1
- package/dist/pages.js +89 -88
- package/dist/ports-list-DfG0VfPt.d.ts +17 -0
- package/dist/primitives.js +1 -0
- package/dist/run.js +1 -0
- package/dist/sdk-hooks.js +1 -0
- package/dist/stores.js +1 -0
- package/dist/styles.css +1149 -48
- package/dist/terminal.js +5 -209
- package/dist/utils.js +1 -0
- package/dist/workbench.d.ts +227 -0
- package/dist/workbench.js +40 -0
- package/dist/workflows.js +2 -1
- package/dist/workspace.d.ts +6 -2
- package/dist/workspace.js +2 -1
- package/package.json +13 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
moonshot_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LQHTCM56.js";
|
|
4
4
|
import {
|
|
5
5
|
cn
|
|
6
6
|
} from "./chunk-EI44GEQ5.js";
|
|
@@ -8,52 +8,79 @@ import {
|
|
|
8
8
|
// src/dashboard/backend-selector.tsx
|
|
9
9
|
import { ChevronDown } from "lucide-react";
|
|
10
10
|
import * as Select from "@radix-ui/react-select";
|
|
11
|
-
import {
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
function BackendSelector({
|
|
13
13
|
backends,
|
|
14
14
|
selected,
|
|
15
15
|
onChange,
|
|
16
|
+
variant = "pill",
|
|
16
17
|
label = "Model",
|
|
17
18
|
placeholder = "Select a model",
|
|
18
|
-
className
|
|
19
|
+
className,
|
|
20
|
+
triggerClassName
|
|
19
21
|
}) {
|
|
20
22
|
const current = backends.find((b) => b.type === selected);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: current ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38
|
-
current.icon,
|
|
39
|
-
/* @__PURE__ */ jsxs("span", { className: "min-w-0 truncate", children: [
|
|
40
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: current.label }),
|
|
41
|
-
current.description && /* @__PURE__ */ jsx("span", { className: "ml-2 text-xs text-muted-foreground", children: current.description })
|
|
42
|
-
] })
|
|
43
|
-
] }) : /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: placeholder }) }),
|
|
44
|
-
/* @__PURE__ */ jsx(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-[var(--transition-fast)] data-[state=open]:rotate-180" }) })
|
|
45
|
-
]
|
|
46
|
-
}
|
|
23
|
+
const triggerText = current?.label ?? placeholder;
|
|
24
|
+
const ariaLabel = label ? `${label}: ${triggerText}` : triggerText;
|
|
25
|
+
const trigger = variant === "pill" ? /* @__PURE__ */ jsxs(
|
|
26
|
+
Select.Trigger,
|
|
27
|
+
{
|
|
28
|
+
"aria-label": ariaLabel,
|
|
29
|
+
className: cn(
|
|
30
|
+
"inline-flex h-8 items-center gap-1.5 rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container",
|
|
31
|
+
"px-2.5 text-xs font-medium text-foreground shadow-sm",
|
|
32
|
+
"transition-colors duration-[var(--transition-fast)]",
|
|
33
|
+
"hover:border-[var(--md3-outline-variant)] hover:bg-surface-container-high",
|
|
34
|
+
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
35
|
+
"data-[state=open]:border-[var(--md3-outline)] data-[state=open]:bg-surface-container-high",
|
|
36
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
37
|
+
triggerClassName
|
|
47
38
|
),
|
|
39
|
+
children: [
|
|
40
|
+
current?.icon,
|
|
41
|
+
/* @__PURE__ */ jsx("span", { className: cn("truncate max-w-[140px]", current ? void 0 : "text-muted-foreground"), children: triggerText }),
|
|
42
|
+
current?.description && /* @__PURE__ */ jsx("span", { className: "sr-only", children: current.description }),
|
|
43
|
+
/* @__PURE__ */ jsx(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3 shrink-0 text-muted-foreground transition-transform duration-[var(--transition-fast)] data-[state=open]:rotate-180" }) })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
) : /* @__PURE__ */ jsxs(
|
|
47
|
+
Select.Trigger,
|
|
48
|
+
{
|
|
49
|
+
"aria-label": ariaLabel,
|
|
50
|
+
className: cn(
|
|
51
|
+
"flex w-full items-center justify-between gap-2 rounded-[var(--radius-md)]",
|
|
52
|
+
"border border-[var(--md3-outline-variant)] bg-surface-container px-3 py-2.5 text-sm text-left",
|
|
53
|
+
"transition-colors duration-[var(--transition-fast)]",
|
|
54
|
+
"hover:border-[var(--md3-outline-variant)] hover:bg-surface-container-high",
|
|
55
|
+
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
56
|
+
"data-[state=open]:border-[var(--md3-outline)] data-[state=open]:bg-surface-container-high",
|
|
57
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
58
|
+
triggerClassName
|
|
59
|
+
),
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
62
|
+
current?.icon,
|
|
63
|
+
/* @__PURE__ */ jsx("span", { className: cn("min-w-0 truncate", current ? "font-medium text-foreground" : "text-muted-foreground"), children: triggerText }),
|
|
64
|
+
current?.description && /* @__PURE__ */ jsx("span", { className: "sr-only", children: current.description })
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ jsx(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-[var(--transition-fast)] data-[state=open]:rotate-180" }) })
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(variant === "field" ? "space-y-1.5" : "inline-flex", className), children: [
|
|
71
|
+
variant === "field" && label && /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-muted-foreground uppercase tracking-[0.06em]", children: label }),
|
|
72
|
+
/* @__PURE__ */ jsxs(Select.Root, { value: selected, onValueChange: onChange, children: [
|
|
73
|
+
trigger,
|
|
48
74
|
/* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(
|
|
49
75
|
Select.Content,
|
|
50
76
|
{
|
|
51
77
|
position: "popper",
|
|
52
78
|
sideOffset: 4,
|
|
53
79
|
className: cn(
|
|
54
|
-
"z-50
|
|
55
|
-
"
|
|
56
|
-
"
|
|
80
|
+
"z-50 overflow-hidden",
|
|
81
|
+
variant === "pill" ? "min-w-[240px] max-w-[320px]" : "w-[var(--radix-select-trigger-width)]",
|
|
82
|
+
"rounded-[var(--radius-md)] border border-[var(--md3-outline-variant)]",
|
|
83
|
+
"bg-surface-container-highest shadow-[0_8px_30px_rgba(0,0,0,0.45)] ring-1 ring-[#ffffff14]",
|
|
57
84
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
58
85
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
59
86
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -65,7 +92,7 @@ function BackendSelector({
|
|
|
65
92
|
value: backend.type,
|
|
66
93
|
className: cn(
|
|
67
94
|
"relative flex cursor-pointer select-none items-start gap-2.5 rounded-[var(--radius-sm)]",
|
|
68
|
-
"px-3 py-2
|
|
95
|
+
"px-3 py-2 text-sm outline-none",
|
|
69
96
|
"transition-colors duration-[var(--transition-fast)]",
|
|
70
97
|
"hover:bg-accent/50 focus:bg-accent/50",
|
|
71
98
|
"data-[state=checked]:bg-[var(--accent-surface-soft)] data-[state=checked]:text-[var(--brand-primary)]"
|
|
@@ -240,7 +267,7 @@ function HarnessPicker({
|
|
|
240
267
|
type: h.type,
|
|
241
268
|
label: override?.label ?? h.label,
|
|
242
269
|
description: override?.description ?? h.description,
|
|
243
|
-
icon: /* @__PURE__ */ jsx3(HarnessLogo, { type: h.type, size:
|
|
270
|
+
icon: /* @__PURE__ */ jsx3(HarnessLogo, { type: h.type, size: 16 })
|
|
244
271
|
};
|
|
245
272
|
});
|
|
246
273
|
return /* @__PURE__ */ jsx3(
|
|
@@ -97,13 +97,31 @@ var PROVIDER_LOGO_SLUGS = {
|
|
|
97
97
|
buffer: "buffer",
|
|
98
98
|
hootsuite: "hootsuite"
|
|
99
99
|
};
|
|
100
|
+
var PROVIDER_VECTOR_LOGOS = {
|
|
101
|
+
slack: "slack",
|
|
102
|
+
salesforce: "salesforce",
|
|
103
|
+
microsoftoutlook: "microsoft-outlook",
|
|
104
|
+
outlook: "microsoft-outlook",
|
|
105
|
+
microsoftteams: "microsoft-teams",
|
|
106
|
+
teams: "microsoft-teams",
|
|
107
|
+
microsoftexcel: "microsoft-excel",
|
|
108
|
+
excel: "microsoft-excel",
|
|
109
|
+
microsoftonedrive: "microsoft-onedrive",
|
|
110
|
+
onedrive: "microsoft-onedrive",
|
|
111
|
+
microsoftsharepoint: "microsoft-sharepoint",
|
|
112
|
+
sharepoint: "microsoft-sharepoint",
|
|
113
|
+
twilio: "twilio",
|
|
114
|
+
linkedin: "linkedin"
|
|
115
|
+
};
|
|
100
116
|
function providerLogoCandidates(opts) {
|
|
101
117
|
const out = [];
|
|
102
118
|
if (opts.iconUrl) out.push(opts.iconUrl);
|
|
103
119
|
const raw = opts.id.toLowerCase();
|
|
104
120
|
const norm = normalizeProviderId(raw);
|
|
105
|
-
const slugs = /* @__PURE__ */ new Set();
|
|
106
121
|
const curated = PROVIDER_LOGO_SLUGS[raw] ?? PROVIDER_LOGO_SLUGS[norm];
|
|
122
|
+
const vectorName = PROVIDER_VECTOR_LOGOS[raw] ?? PROVIDER_VECTOR_LOGOS[norm] ?? (curated ? PROVIDER_VECTOR_LOGOS[curated] : void 0);
|
|
123
|
+
if (vectorName) out.push(`https://svgl.app/library/${vectorName}.svg`);
|
|
124
|
+
const slugs = /* @__PURE__ */ new Set();
|
|
107
125
|
if (curated) slugs.add(curated);
|
|
108
126
|
slugs.add(norm.replace(/-/g, ""));
|
|
109
127
|
slugs.add(raw.replace(/[-_\s]/g, ""));
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
HARNESS_OPTIONS,
|
|
3
3
|
HarnessLogo,
|
|
4
4
|
chatCapableHarnesses
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BR2LMUAE.js";
|
|
6
6
|
import {
|
|
7
7
|
ModelPicker,
|
|
8
8
|
canonicalModelId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LQHTCM56.js";
|
|
10
10
|
import {
|
|
11
11
|
cn
|
|
12
12
|
} from "./chunk-EI44GEQ5.js";
|
|
@@ -84,10 +84,10 @@ function ReasoningLevelPicker({
|
|
|
84
84
|
type: "button",
|
|
85
85
|
disabled,
|
|
86
86
|
className: cn(
|
|
87
|
-
"inline-flex h-8 items-center gap-1.5 rounded-lg border border-
|
|
87
|
+
"inline-flex h-8 items-center gap-1.5 rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container px-2.5",
|
|
88
88
|
"text-xs font-medium text-foreground shadow-sm transition-colors",
|
|
89
|
-
"hover:border-
|
|
90
|
-
"data-[state=open]:border-
|
|
89
|
+
"hover:border-[var(--md3-outline-variant)] hover:bg-surface-container-high focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
90
|
+
"data-[state=open]:border-[var(--md3-outline-variant)] data-[state=open]:bg-surface-container-high",
|
|
91
91
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
92
92
|
className,
|
|
93
93
|
triggerClassName
|
|
@@ -106,8 +106,8 @@ function ReasoningLevelPicker({
|
|
|
106
106
|
align: "start",
|
|
107
107
|
sideOffset: 6,
|
|
108
108
|
className: cn(
|
|
109
|
-
"z-50 w-64 overflow-hidden rounded-[var(--radius-md)] border border-
|
|
110
|
-
"shadow-[
|
|
109
|
+
"z-50 w-64 overflow-hidden rounded-[var(--radius-md)] border border-[var(--md3-outline-variant)] bg-surface-container-highest p-1",
|
|
110
|
+
"shadow-[0_8px_30px_rgba(0,0,0,0.45)] ring-1 ring-[#ffffff14]",
|
|
111
111
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
112
112
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
113
113
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"
|
|
@@ -234,10 +234,10 @@ function HarnessDropdown({
|
|
|
234
234
|
disabled: disabled || locked,
|
|
235
235
|
title: locked ? lockReason : void 0,
|
|
236
236
|
className: cn(
|
|
237
|
-
"inline-flex h-8 items-center gap-1.5 rounded-lg border border-
|
|
237
|
+
"inline-flex h-8 items-center gap-1.5 rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container px-2.5",
|
|
238
238
|
"text-xs font-medium text-foreground shadow-sm transition-colors",
|
|
239
|
-
"hover:border-
|
|
240
|
-
"data-[state=open]:border-
|
|
239
|
+
"hover:border-[var(--md3-outline-variant)] hover:bg-surface-container-high focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
240
|
+
"data-[state=open]:border-[var(--md3-outline-variant)] data-[state=open]:bg-surface-container-high",
|
|
241
241
|
"disabled:cursor-not-allowed disabled:opacity-60"
|
|
242
242
|
),
|
|
243
243
|
"aria-label": "Agent harness",
|
|
@@ -255,8 +255,8 @@ function HarnessDropdown({
|
|
|
255
255
|
align,
|
|
256
256
|
sideOffset: 6,
|
|
257
257
|
className: cn(
|
|
258
|
-
"z-50 w-72 overflow-hidden rounded-[var(--radius-md)] border border-
|
|
259
|
-
"shadow-[
|
|
258
|
+
"z-50 w-72 overflow-hidden rounded-[var(--radius-md)] border border-[var(--md3-outline-variant)] bg-surface-container-highest p-1",
|
|
259
|
+
"shadow-[0_8px_30px_rgba(0,0,0,0.45)] ring-1 ring-[#ffffff14]",
|
|
260
260
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
261
261
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
262
262
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"
|
|
@@ -408,10 +408,10 @@ function GearControls({
|
|
|
408
408
|
type: "button",
|
|
409
409
|
"aria-label": "Session controls",
|
|
410
410
|
className: cn(
|
|
411
|
-
"inline-flex h-8 w-8 items-center justify-center rounded-lg border border-
|
|
411
|
+
"inline-flex h-8 w-8 items-center justify-center rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container",
|
|
412
412
|
"text-foreground shadow-sm transition-colors",
|
|
413
|
-
"hover:border-
|
|
414
|
-
"data-[state=open]:border-
|
|
413
|
+
"hover:border-[var(--md3-outline-variant)] hover:bg-surface-container-high focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
414
|
+
"data-[state=open]:border-[var(--md3-outline-variant)] data-[state=open]:bg-surface-container-high"
|
|
415
415
|
),
|
|
416
416
|
children: /* @__PURE__ */ jsx2(SlidersHorizontal, { className: "h-4 w-4 text-muted-foreground" })
|
|
417
417
|
}
|
|
@@ -431,8 +431,8 @@ function GearControls({
|
|
|
431
431
|
}
|
|
432
432
|
},
|
|
433
433
|
className: cn(
|
|
434
|
-
"z-50 flex w-56 flex-col gap-2 rounded-[var(--radius-md)] border border-
|
|
435
|
-
"shadow-[
|
|
434
|
+
"z-50 flex w-56 flex-col gap-2 rounded-[var(--radius-md)] border border-[var(--md3-outline-variant)] bg-surface-container-highest p-2",
|
|
435
|
+
"shadow-[0_8px_30px_rgba(0,0,0,0.45)] ring-1 ring-[#ffffff14]",
|
|
436
436
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
437
437
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
438
438
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"
|
|
@@ -633,12 +633,12 @@ function ArtifactAgentDock({
|
|
|
633
633
|
"aside",
|
|
634
634
|
{
|
|
635
635
|
className: cn(
|
|
636
|
-
"flex h-full w-[420px] min-w-[360px] max-w-[480px] flex-col border-l border-
|
|
636
|
+
"flex h-full w-[420px] min-w-[360px] max-w-[480px] flex-col border-l border-[var(--md3-outline-variant)] bg-surface-container shadow-[var(--shadow-dropdown)]",
|
|
637
637
|
className
|
|
638
638
|
),
|
|
639
639
|
"aria-label": `Agent chat about ${heading}`,
|
|
640
640
|
children: [
|
|
641
|
-
/* @__PURE__ */ jsxs3("header", { className: "flex items-center justify-between border-b border-
|
|
641
|
+
/* @__PURE__ */ jsxs3("header", { className: "flex items-center justify-between border-b border-[var(--md3-outline-variant)] bg-surface-container-low px-4 py-3", children: [
|
|
642
642
|
/* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
643
643
|
/* @__PURE__ */ jsx3(Sparkles2, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
644
644
|
/* @__PURE__ */ jsxs3("div", { className: "min-w-0", children: [
|
|
@@ -652,7 +652,7 @@ function ArtifactAgentDock({
|
|
|
652
652
|
type: "button",
|
|
653
653
|
onClick: () => onOpenChange(false),
|
|
654
654
|
"aria-label": "Close artifact chat",
|
|
655
|
-
className: "rounded-md p-1 text-muted-foreground transition-colors hover:bg-
|
|
655
|
+
className: "rounded-md p-1 text-muted-foreground transition-colors hover:bg-surface-container-high hover:text-foreground",
|
|
656
656
|
children: /* @__PURE__ */ jsx3(X, { className: "h-4 w-4" })
|
|
657
657
|
}
|
|
658
658
|
)
|
|
@@ -672,7 +672,7 @@ function ArtifactAgentDock({
|
|
|
672
672
|
/* @__PURE__ */ jsx3(
|
|
673
673
|
"form",
|
|
674
674
|
{
|
|
675
|
-
className: "border-t border-
|
|
675
|
+
className: "border-t border-[var(--md3-outline-variant)] bg-surface-container-low p-3",
|
|
676
676
|
onSubmit: (e) => {
|
|
677
677
|
e.preventDefault();
|
|
678
678
|
void send();
|
|
@@ -692,7 +692,7 @@ function ArtifactAgentDock({
|
|
|
692
692
|
placeholder: `Ask about ${heading}\u2026`,
|
|
693
693
|
rows: 2,
|
|
694
694
|
disabled: !threadId,
|
|
695
|
-
className: "min-h-[44px] flex-1 resize-none rounded-[20px] border border-
|
|
695
|
+
className: "min-h-[44px] flex-1 resize-none rounded-[20px] border border-[var(--md3-outline-variant)] bg-surface-dim px-3.5 py-2 text-sm text-foreground placeholder:text-muted-foreground transition-colors focus:outline-none focus:border-[var(--border-accent)] disabled:opacity-50"
|
|
696
696
|
}
|
|
697
697
|
),
|
|
698
698
|
sending ? /* @__PURE__ */ jsx3(
|
|
@@ -701,7 +701,7 @@ function ArtifactAgentDock({
|
|
|
701
701
|
type: "button",
|
|
702
702
|
onClick: cancel,
|
|
703
703
|
"aria-label": "Cancel",
|
|
704
|
-
className: "inline-flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-
|
|
704
|
+
className: "inline-flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-surface-container-high hover:text-foreground",
|
|
705
705
|
children: /* @__PURE__ */ jsx3(Square, { className: "h-4 w-4" })
|
|
706
706
|
}
|
|
707
707
|
) : /* @__PURE__ */ jsx3(
|
|
@@ -138,7 +138,7 @@ var xai_default = 'data:image/svg+xml,<svg fill="currentColor" fill-rule="evenod
|
|
|
138
138
|
var zai_default = 'data:image/svg+xml,<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Z.ai</title><path d="M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"></path></svg>';
|
|
139
139
|
|
|
140
140
|
// src/dashboard/model-picker.tsx
|
|
141
|
-
import {
|
|
141
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
142
142
|
function canonicalModelId(model) {
|
|
143
143
|
const id = model.id;
|
|
144
144
|
if (id.includes("/")) return id;
|
|
@@ -345,12 +345,12 @@ function ModelPicker({
|
|
|
345
345
|
"aria-label": triggerLabel,
|
|
346
346
|
disabled,
|
|
347
347
|
className: cn(
|
|
348
|
-
"inline-flex h-8 items-center gap-1.5 rounded-lg border border-
|
|
348
|
+
"inline-flex h-8 items-center gap-1.5 rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container",
|
|
349
349
|
"px-2.5 text-xs font-medium text-foreground shadow-sm",
|
|
350
350
|
"transition-colors duration-[var(--transition-fast)]",
|
|
351
|
-
"hover:border-
|
|
351
|
+
"hover:border-[var(--md3-outline-variant)] hover:bg-surface-container-high",
|
|
352
352
|
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
353
|
-
"data-[state=open]:border-
|
|
353
|
+
"data-[state=open]:border-[var(--md3-outline)] data-[state=open]:bg-surface-container-high",
|
|
354
354
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
355
355
|
className,
|
|
356
356
|
triggerClassName
|
|
@@ -369,11 +369,11 @@ function ModelPicker({
|
|
|
369
369
|
disabled,
|
|
370
370
|
className: cn(
|
|
371
371
|
"flex w-full items-center justify-between gap-2 rounded-[var(--radius-md)]",
|
|
372
|
-
"border border-
|
|
372
|
+
"border border-[var(--md3-outline-variant)] bg-surface-container px-3 py-2.5 text-sm text-left",
|
|
373
373
|
"transition-colors duration-[var(--transition-fast)]",
|
|
374
|
-
"hover:border-
|
|
374
|
+
"hover:border-[var(--md3-outline-variant)] hover:bg-surface-container-high",
|
|
375
375
|
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
376
|
-
"data-[state=open]:border-
|
|
376
|
+
"data-[state=open]:border-[var(--md3-outline)] data-[state=open]:bg-surface-container-high",
|
|
377
377
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
378
378
|
className,
|
|
379
379
|
triggerClassName
|
|
@@ -399,13 +399,13 @@ function ModelPicker({
|
|
|
399
399
|
className: cn(
|
|
400
400
|
"z-50 w-[var(--radix-dropdown-menu-trigger-width)] min-w-[320px] max-w-[460px]",
|
|
401
401
|
"max-h-[440px] overflow-hidden flex flex-col",
|
|
402
|
-
"rounded-[var(--radius-md)] border border-
|
|
402
|
+
"rounded-[var(--radius-md)] border border-[var(--md3-outline-variant)] bg-surface-container-highest shadow-[0_8px_30px_rgba(0,0,0,0.45)] ring-1 ring-[#ffffff14]",
|
|
403
403
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
404
404
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
405
405
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"
|
|
406
406
|
),
|
|
407
407
|
children: [
|
|
408
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 border-b border-
|
|
408
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 border-b border-[var(--md3-outline-variant)] bg-surface-container-high px-3 py-2", children: [
|
|
409
409
|
/* @__PURE__ */ jsx2(Search, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
410
410
|
/* @__PURE__ */ jsx2(
|
|
411
411
|
"input",
|
|
@@ -464,7 +464,7 @@ function ModelPicker({
|
|
|
464
464
|
canonicalModelId(m)
|
|
465
465
|
)) }, groupKey))
|
|
466
466
|
] }),
|
|
467
|
-
/* @__PURE__ */ jsxs2("div", { className: "border-t border-
|
|
467
|
+
/* @__PURE__ */ jsxs2("div", { className: "border-t border-[var(--md3-outline-variant)] px-3 py-1.5 text-[10px] text-muted-foreground", children: [
|
|
468
468
|
filtered.length,
|
|
469
469
|
" of ",
|
|
470
470
|
deduped.length,
|
|
@@ -530,27 +530,21 @@ function ModelRow({
|
|
|
530
530
|
const pricing = formatPricing(model.pricing);
|
|
531
531
|
const ctx = formatContext(model.context_length);
|
|
532
532
|
const identity = resolveModelBrandIdentity(model);
|
|
533
|
+
const via = !identity.combined ? identity.host.label : null;
|
|
533
534
|
return /* @__PURE__ */ jsxs2(PickerItem, { onSelect: () => onSelect(id), active, featured, children: [
|
|
534
535
|
/* @__PURE__ */ jsx2(ModelBrandStack, { identity, size: "md" }),
|
|
535
536
|
/* @__PURE__ */ jsxs2("div", { className: "min-w-0 flex-1", children: [
|
|
536
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex items-
|
|
537
|
-
/* @__PURE__ */ jsx2("span", { className: "text-sm font-medium
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
/* @__PURE__ */ jsx2("span", { className: "truncate", children: id }),
|
|
542
|
-
!identity.combined && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
543
|
-
/* @__PURE__ */ jsx2("span", { className: "shrink-0", children: "\xB7" }),
|
|
544
|
-
/* @__PURE__ */ jsxs2("span", { className: "shrink-0", children: [
|
|
545
|
-
identity.host.label,
|
|
546
|
-
" \u2192 ",
|
|
547
|
-
identity.lab.label
|
|
548
|
-
] })
|
|
549
|
-
] }),
|
|
550
|
-
pricing && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
551
|
-
/* @__PURE__ */ jsx2("span", { className: "shrink-0", children: "\xB7" }),
|
|
552
|
-
/* @__PURE__ */ jsx2("span", { className: "shrink-0 font-mono", children: pricing })
|
|
537
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-1.5", children: [
|
|
538
|
+
/* @__PURE__ */ jsx2("span", { className: "min-w-0 truncate text-sm font-medium", children: model.name ?? model.id }),
|
|
539
|
+
via && /* @__PURE__ */ jsxs2("span", { className: "shrink-0 rounded-full border border-[var(--md3-outline-variant)] bg-surface-container px-1.5 py-px text-[9px] font-medium text-muted-foreground", children: [
|
|
540
|
+
"via ",
|
|
541
|
+
via
|
|
553
542
|
] })
|
|
543
|
+
] }),
|
|
544
|
+
(ctx || pricing) && /* @__PURE__ */ jsxs2("div", { className: "mt-0.5 flex items-center gap-1.5 text-[11px] text-muted-foreground", children: [
|
|
545
|
+
ctx && /* @__PURE__ */ jsx2("span", { className: "shrink-0", children: ctx }),
|
|
546
|
+
ctx && pricing && /* @__PURE__ */ jsx2("span", { className: "shrink-0 opacity-40", children: "\xB7" }),
|
|
547
|
+
pricing && /* @__PURE__ */ jsx2("span", { className: "shrink-0 font-mono", children: pricing })
|
|
554
548
|
] })
|
|
555
549
|
] })
|
|
556
550
|
] });
|