@tangle-network/sandbox-ui 0.45.0 → 0.47.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.
Files changed (45) hide show
  1. package/dist/{WorkflowGraph-7YYGIBNV.js → WorkflowGraph-EOV2P5AM.js} +2 -1
  2. package/dist/assets.js +1 -0
  3. package/dist/assistant.js +2 -1
  4. package/dist/auth.js +1 -0
  5. package/dist/chat.js +4 -3
  6. package/dist/{chunk-6NDOA4SB.js → chunk-2ISY4R72.js} +112 -104
  7. package/dist/{chunk-KIRJZUX2.js → chunk-BR2LMUAE.js} +61 -34
  8. package/dist/{chunk-H7GMPMPB.js → chunk-GTJ5PSK5.js} +90 -3
  9. package/dist/{chunk-CUUUFJF5.js → chunk-KOUYJ6QP.js} +23 -23
  10. package/dist/{chunk-3RNYDTQ3.js → chunk-LQHTCM56.js} +21 -27
  11. package/dist/chunk-NXUSLH7H.js +7528 -0
  12. package/dist/{chunk-2XNT74ZX.js → chunk-OMUIPJQZ.js} +28 -20
  13. package/dist/{chunk-KCWIC3SJ.js → chunk-PZ62T5PM.js} +281 -214
  14. package/dist/chunk-U67V476Y.js +35 -0
  15. package/dist/chunk-VIREDUBF.js +215 -0
  16. package/dist/dashboard.d.ts +82 -66
  17. package/dist/dashboard.js +5 -4
  18. package/dist/editor.js +2 -0
  19. package/dist/files.d.ts +5 -0
  20. package/dist/files.js +1 -0
  21. package/dist/globals.css +1170 -47
  22. package/dist/hooks.js +1 -0
  23. package/dist/index.d.ts +3 -1
  24. package/dist/index.js +95 -65
  25. package/dist/integrations.d.ts +5 -6
  26. package/dist/integrations.js +158 -63
  27. package/dist/markdown.js +2 -0
  28. package/dist/openui.d.ts +0 -5
  29. package/dist/openui.js +1 -0
  30. package/dist/pages.d.ts +1 -1
  31. package/dist/pages.js +89 -88
  32. package/dist/ports-list-DfG0VfPt.d.ts +17 -0
  33. package/dist/primitives.js +1 -0
  34. package/dist/run.js +1 -0
  35. package/dist/sdk-hooks.js +1 -0
  36. package/dist/stores.js +1 -0
  37. package/dist/styles.css +1170 -47
  38. package/dist/terminal.js +5 -209
  39. package/dist/utils.js +1 -0
  40. package/dist/workbench.d.ts +227 -0
  41. package/dist/workbench.js +40 -0
  42. package/dist/workflows.js +2 -1
  43. package/dist/workspace.d.ts +6 -2
  44. package/dist/workspace.js +2 -1
  45. package/package.json +13 -7
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  moonshot_default
3
- } from "./chunk-3RNYDTQ3.js";
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 { Fragment, jsx, jsxs } from "react/jsx-runtime";
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
- return /* @__PURE__ */ jsxs("div", { className: cn("space-y-1.5", className), children: [
22
- label && /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-muted-foreground uppercase tracking-[0.06em]", children: label }),
23
- /* @__PURE__ */ jsxs(Select.Root, { value: selected, onValueChange: onChange, children: [
24
- /* @__PURE__ */ jsxs(
25
- Select.Trigger,
26
- {
27
- className: cn(
28
- "flex w-full items-center justify-between gap-2 rounded-[var(--radius-md)]",
29
- "border border-border bg-card",
30
- "px-3 py-2.5 text-sm text-left",
31
- "transition-colors duration-[var(--transition-fast)]",
32
- "hover:border-primary/20 hover:bg-accent/30",
33
- "focus:outline-none focus:border-primary/30",
34
- "data-[state=open]:border-primary/30 data-[state=open]:bg-accent/30"
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 w-[var(--radix-select-trigger-width)] overflow-hidden",
55
- "rounded-[var(--radius-md)] border border-border",
56
- "bg-card shadow-[var(--shadow-dropdown)]",
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.5 text-sm outline-none",
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: 20 })
270
+ icon: /* @__PURE__ */ jsx3(HarnessLogo, { type: h.type, size: 16 })
244
271
  };
245
272
  });
246
273
  return /* @__PURE__ */ jsx3(
@@ -97,13 +97,102 @@ var PROVIDER_LOGO_SLUGS = {
97
97
  buffer: "buffer",
98
98
  hootsuite: "hootsuite"
99
99
  };
100
+ var ACTIVEPIECES_CDN = "https://cdn.activepieces.com/pieces";
101
+ var PROVIDER_LOGO_URLS = {
102
+ // Catalog logo whose filename/extension differs from the provider id.
103
+ "cal-com": `${ACTIVEPIECES_CDN}/cal.com.png`,
104
+ "customer-io": `${ACTIVEPIECES_CDN}/customerio.png`,
105
+ anthropic: `${ACTIVEPIECES_CDN}/claude.png`,
106
+ telegram: `${ACTIVEPIECES_CDN}/telegram_bot.png`,
107
+ "twilio-sms": `${ACTIVEPIECES_CDN}/twilio.png`,
108
+ "amazon-sqs": `${ACTIVEPIECES_CDN}/aws-sqs.png`,
109
+ frame: `${ACTIVEPIECES_CDN}/frameio.png`,
110
+ "jira-cloud": `${ACTIVEPIECES_CDN}/jira.png`,
111
+ "jira-data-center": `${ACTIVEPIECES_CDN}/jira.png`,
112
+ stripe: `${ACTIVEPIECES_CDN}/stripe.png`,
113
+ "stripe-pack": `${ACTIVEPIECES_CDN}/stripe.png`,
114
+ gemini: `${ACTIVEPIECES_CDN}/google-gemini.png`,
115
+ "google-gemini": `${ACTIVEPIECES_CDN}/google-gemini.png`,
116
+ bluesky: `${ACTIVEPIECES_CDN}/bluesky.png`,
117
+ emailit: `${ACTIVEPIECES_CDN}/emailit.svg`,
118
+ cloutly: `${ACTIVEPIECES_CDN}/cloutly.svg`,
119
+ gistly: `${ACTIVEPIECES_CDN}/gistly.svg`,
120
+ jotform: `${ACTIVEPIECES_CDN}/jotform.svg`,
121
+ supadata: `${ACTIVEPIECES_CDN}/supadata.svg`,
122
+ "hugging-face": `${ACTIVEPIECES_CDN}/huggingface.svg`,
123
+ huggingface: `${ACTIVEPIECES_CDN}/huggingface.svg`,
124
+ heygen: `${ACTIVEPIECES_CDN}/heygen.jpg`,
125
+ instasent: `${ACTIVEPIECES_CDN}/instasent.jpg`,
126
+ "chainalysis-api": `${ACTIVEPIECES_CDN}/chainalysis-api.jpg`,
127
+ scrapegraphai: `${ACTIVEPIECES_CDN}/scrapegraphai.jpg`,
128
+ localai: `${ACTIVEPIECES_CDN}/localai.jpeg`,
129
+ talkable: "https://www.talkable.com/wp-content/uploads/2021/12/talkable-favicon.svg",
130
+ // Sub-connector or variant reusing its parent connector's catalog logo.
131
+ "facebook-leads": `${ACTIVEPIECES_CDN}/facebook.png`,
132
+ "facebook-pages": `${ACTIVEPIECES_CDN}/facebook.png`,
133
+ "whatsapp-business": `${ACTIVEPIECES_CDN}/whatsapp.png`,
134
+ onedrive: `${ACTIVEPIECES_CDN}/oneDrive.png`,
135
+ "microsoft-onedrive": `${ACTIVEPIECES_CDN}/oneDrive.png`,
136
+ "outlook-mail": `${ACTIVEPIECES_CDN}/microsoft-outlook.png`,
137
+ "microsoft-calendar": `${ACTIVEPIECES_CDN}/microsoft-outlook.png`,
138
+ "microsoft-outlook-calendar": `${ACTIVEPIECES_CDN}/microsoft-outlook.png`,
139
+ sharepoint: `${ACTIVEPIECES_CDN}/microsoft-sharepoint.png`,
140
+ "notion-database": `${ACTIVEPIECES_CDN}/notion.png`,
141
+ "slack-inbound": `${ACTIVEPIECES_CDN}/slack.png`,
142
+ helpscout: `${ACTIVEPIECES_CDN}/help-scout.png`,
143
+ figjam: `${ACTIVEPIECES_CDN}/figma.png`,
144
+ webhook: `${ACTIVEPIECES_CDN}/new-core/webhooks.svg`,
145
+ // Absent from the catalog CDN — served from a public icon source.
146
+ make: "https://cdn.simpleicons.org/make",
147
+ n8n: "https://cdn.simpleicons.org/n8n",
148
+ zapier: "https://cdn.simpleicons.org/zapier",
149
+ auth0: "https://cdn.simpleicons.org/auth0",
150
+ basecamp: "https://cdn.simpleicons.org/basecamp",
151
+ ebay: "https://cdn.simpleicons.org/ebay",
152
+ gusto: "https://cdn.simpleicons.org/gusto",
153
+ miro: "https://cdn.simpleicons.org/miro",
154
+ sanity: "https://cdn.simpleicons.org/sanity",
155
+ sentry: "https://cdn.simpleicons.org/sentry",
156
+ opsgenie: "https://cdn.simpleicons.org/opsgenie",
157
+ phony: "https://www.google.com/s2/favicons?sz=64&domain_url=https://ph0ny.com",
158
+ docuseal: "https://www.google.com/s2/favicons?sz=64&domain_url=https://docuseal.com",
159
+ braze: "https://www.google.com/s2/favicons?sz=64&domain_url=https://braze.com",
160
+ pipedream: "https://www.google.com/s2/favicons?sz=64&domain_url=https://pipedream.com",
161
+ weaviate: "https://www.google.com/s2/favicons?sz=64&domain_url=https://weaviate.io",
162
+ "adobe-creative-cloud": "https://www.google.com/s2/favicons?sz=64&domain_url=https://adobe.com",
163
+ clio: "https://www.google.com/s2/favicons?sz=64&domain_url=https://clio.com",
164
+ marketo: "https://www.google.com/s2/favicons?sz=64&domain_url=https://marketo.com",
165
+ rippling: "https://www.google.com/s2/favicons?sz=64&domain_url=https://rippling.com",
166
+ "microsoft-graph": "https://www.google.com/s2/favicons?sz=64&domain_url=https://graph.microsoft.com"
167
+ };
168
+ var PROVIDER_VECTOR_LOGOS = {
169
+ slack: "slack",
170
+ salesforce: "salesforce",
171
+ microsoftoutlook: "microsoft-outlook",
172
+ outlook: "microsoft-outlook",
173
+ microsoftteams: "microsoft-teams",
174
+ teams: "microsoft-teams",
175
+ microsoftexcel: "microsoft-excel",
176
+ excel: "microsoft-excel",
177
+ microsoftonedrive: "microsoft-onedrive",
178
+ onedrive: "microsoft-onedrive",
179
+ microsoftsharepoint: "microsoft-sharepoint",
180
+ sharepoint: "microsoft-sharepoint",
181
+ twilio: "twilio",
182
+ linkedin: "linkedin"
183
+ };
100
184
  function providerLogoCandidates(opts) {
101
185
  const out = [];
102
186
  if (opts.iconUrl) out.push(opts.iconUrl);
103
187
  const raw = opts.id.toLowerCase();
104
188
  const norm = normalizeProviderId(raw);
105
- const slugs = /* @__PURE__ */ new Set();
106
189
  const curated = PROVIDER_LOGO_SLUGS[raw] ?? PROVIDER_LOGO_SLUGS[norm];
190
+ const vectorName = PROVIDER_VECTOR_LOGOS[raw] ?? PROVIDER_VECTOR_LOGOS[norm] ?? (curated ? PROVIDER_VECTOR_LOGOS[curated] : void 0);
191
+ if (vectorName) out.push(`https://svgl.app/library/${vectorName}.svg`);
192
+ const pinned = PROVIDER_LOGO_URLS[raw] ?? PROVIDER_LOGO_URLS[norm];
193
+ if (pinned) out.push(pinned);
194
+ if (raw) out.push(`${ACTIVEPIECES_CDN}/${encodeURIComponent(raw)}.png`);
195
+ const slugs = /* @__PURE__ */ new Set();
107
196
  if (curated) slugs.add(curated);
108
197
  slugs.add(norm.replace(/-/g, ""));
109
198
  slugs.add(raw.replace(/[-_\s]/g, ""));
@@ -185,7 +274,5 @@ function ProviderIcon({
185
274
 
186
275
  export {
187
276
  normalizeProviderId,
188
- providerLogoCandidates,
189
- monogramColor,
190
277
  ProviderIcon
191
278
  };
@@ -2,11 +2,11 @@ import {
2
2
  HARNESS_OPTIONS,
3
3
  HarnessLogo,
4
4
  chatCapableHarnesses
5
- } from "./chunk-KIRJZUX2.js";
5
+ } from "./chunk-BR2LMUAE.js";
6
6
  import {
7
7
  ModelPicker,
8
8
  canonicalModelId
9
- } from "./chunk-3RNYDTQ3.js";
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-border bg-card px-2.5",
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-border hover:bg-muted/40 focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
90
- "data-[state=open]:border-border data-[state=open]:bg-muted/40",
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-border bg-card p-1",
110
- "shadow-[var(--shadow-dropdown)]",
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-border bg-card px-2.5",
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-border hover:bg-muted/40 focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
240
- "data-[state=open]:border-border data-[state=open]:bg-muted/40",
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-border bg-card p-1",
259
- "shadow-[var(--shadow-dropdown)]",
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-border bg-card",
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-border hover:bg-muted/40 focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
414
- "data-[state=open]:border-border data-[state=open]:bg-muted/40"
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-border bg-card p-2",
435
- "shadow-[var(--shadow-dropdown)]",
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-border bg-card/95 shadow-[var(--shadow-dropdown)]",
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-border bg-background/60 px-4 py-3", children: [
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-muted hover:text-foreground",
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-border bg-background/60 p-3",
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-border bg-background 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"
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-muted hover:text-foreground",
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 { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
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-border bg-card",
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-border hover:bg-muted/40",
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-border data-[state=open]:bg-muted/40",
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-border bg-card px-3 py-2.5 text-sm text-left",
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-border hover:bg-muted/40",
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-border data-[state=open]:bg-muted/40",
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-border bg-card shadow-[var(--shadow-dropdown)]",
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-border bg-background/80 px-3 py-2", children: [
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-border px-3 py-1.5 text-[10px] text-muted-foreground", children: [
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-baseline justify-between gap-2", children: [
537
- /* @__PURE__ */ jsx2("span", { className: "text-sm font-medium truncate", children: model.name ?? model.id }),
538
- ctx && /* @__PURE__ */ jsx2("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: ctx })
539
- ] }),
540
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 text-[11px] text-muted-foreground", children: [
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
  ] });