@plaisolutions/react 0.18.0 → 0.20.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.
@@ -1,4 +1,4 @@
1
- import { Bot, Brain, CalendarDays, Check, CheckCircle2, ChevronDown, CircleAlert, CircleX, Clock, Copy, Database, Download, ExternalLink, File, FileText, Globe, LoaderCircle, Mail, MessageSquare, Minus, Paperclip as Paperclip$1, Plug, Plus, RotateCcw, ThumbsDown, ThumbsUp, Video, Workflow, XCircle } from "lucide-react";
1
+ import { ArrowUpRight, Bot, Brain, CalendarDays, Check, CheckCircle2, ChevronDown, ChevronUp, CircleAlert, CircleX, Clock, Copy, Database, Download, File, FileText, Globe, LoaderCircle, Mail, MessageSquare, Paperclip as Paperclip$1, Plug, RotateCcw, ThumbsDown, ThumbsUp, Video, Workflow, X as X$1, XCircle } from "lucide-react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { createContext, forwardRef, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
4
4
  import { HttpStatusError, isHiddenMessage, toolConfirmationAt } from "@plaisolutions/client";
@@ -179,7 +179,7 @@ function ChatError({ error, locale, title, children, className,...props }) {
179
179
  return /* @__PURE__ */ jsxs("div", {
180
180
  role: "alert",
181
181
  ...props,
182
- className: joinClasses("plai-chat-error flex gap-3 rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-950 dark:border-red-900 dark:bg-red-950/30 dark:text-red-100", className),
182
+ className: joinClasses("plai-chat-error flex gap-3 rounded-lg border border-danger-border bg-danger-subtle p-4 text-sm text-danger-strong ", className),
183
183
  children: [/* @__PURE__ */ jsx(CircleAlert, {
184
184
  "aria-hidden": "true",
185
185
  className: "mt-0.5 size-4 shrink-0"
@@ -1347,7 +1347,7 @@ function DatasourceToolResultCardContent({ title, description, type, icon, resou
1347
1347
  children: description
1348
1348
  }),
1349
1349
  resourceCount === void 0 ? null : /* @__PURE__ */ jsxs("p", {
1350
- className: "mt-2 text-xs leading-4 text-neutral-600",
1350
+ className: "mt-2 text-xs leading-4 text-secondary",
1351
1351
  children: [
1352
1352
  resourceCount,
1353
1353
  " ",
@@ -1359,7 +1359,7 @@ function DatasourceToolResultCardContent({ title, description, type, icon, resou
1359
1359
  function DatasourceToolResultCard(props) {
1360
1360
  return /* @__PURE__ */ jsx("article", {
1361
1361
  "aria-label": `${props.type}: ${props.title}`,
1362
- className: "w-46.5 rounded-lg bg-neutral-100 p-4 text-neutral-950",
1362
+ className: "plai-datasource-tool-result-card w-46.5 rounded-lg bg-surface-subtle p-4 text-foreground",
1363
1363
  children: /* @__PURE__ */ jsx(DatasourceToolResultCardContent, { ...props })
1364
1364
  });
1365
1365
  }
@@ -1392,7 +1392,7 @@ function ResourceCardContent({ icon, type, title, description, variant = "card"
1392
1392
  children: bodyTitle
1393
1393
  }) : null,
1394
1394
  bodyDescription ? /* @__PURE__ */ jsx("p", {
1395
- className: "mt-2 line-clamp-2 text-xs leading-4 text-neutral-600",
1395
+ className: "mt-2 line-clamp-2 text-xs leading-4 text-secondary",
1396
1396
  children: bodyDescription
1397
1397
  }) : null
1398
1398
  ] });
@@ -1402,8 +1402,8 @@ function ResourceCard(props) {
1402
1402
  const copy = getUiCopy(locale);
1403
1403
  const [downloadState, setDownloadState] = useState("idle");
1404
1404
  const abortControllerRef = useRef(null);
1405
- const className = joinClasses("block rounded-lg bg-neutral-100 p-4 text-left text-neutral-950", variant === "card" ? "min-h-[183px] w-[186px] max-w-full" : "w-full", customClassName);
1406
- const interactiveClassName = `${className} transition-colors hover:bg-neutral-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950`;
1405
+ const className = joinClasses("plai-resource-card block rounded-lg bg-surface-subtle p-4 text-left text-foreground", variant === "card" ? "min-h-[183px] w-[186px] max-w-full" : "w-full", customClassName);
1406
+ const interactiveClassName = `${className} transition-colors hover:bg-surface-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`;
1407
1407
  useEffect(() => () => {
1408
1408
  abortControllerRef.current?.abort();
1409
1409
  }, []);
@@ -1449,12 +1449,12 @@ function ResourceCard(props) {
1449
1449
  variant
1450
1450
  }),
1451
1451
  downloadState === "loading" ? /* @__PURE__ */ jsx("span", {
1452
- className: "mt-2 block text-xs text-neutral-600",
1452
+ className: "mt-2 block text-xs text-secondary",
1453
1453
  "aria-live": "polite",
1454
1454
  children: copy.openingResource
1455
1455
  }) : null,
1456
1456
  downloadState === "error" ? /* @__PURE__ */ jsx("span", {
1457
- className: "mt-2 block text-xs text-red-700",
1457
+ className: "mt-2 block text-xs text-danger-strong",
1458
1458
  role: "alert",
1459
1459
  children: copy.resourceOpenFailed
1460
1460
  }) : null
@@ -1748,7 +1748,7 @@ const SheetContent = forwardRef(function SheetContent$1({ children, className, s
1748
1748
  "aria-label": ariaLabel,
1749
1749
  "aria-labelledby": ariaLabelledBy ?? labelledBy,
1750
1750
  "aria-describedby": ariaDescribedBy ?? describedBy,
1751
- className: "plai-sheet-overlay fixed inset-0 m-0 h-full max-h-none w-full max-w-none border-0 bg-black/80 p-0",
1751
+ className: "plai-sheet-overlay fixed inset-0 m-0 h-full max-h-none w-full max-w-none border-0 bg-overlay p-0",
1752
1752
  onCancel: (event) => {
1753
1753
  onCancel?.(event);
1754
1754
  if (!event.defaultPrevented) {
@@ -1764,13 +1764,13 @@ const SheetContent = forwardRef(function SheetContent$1({ children, className, s
1764
1764
  "data-slot": "sheet-content",
1765
1765
  "data-state": state,
1766
1766
  "data-side": side,
1767
- className: joinClasses("plai-sheet-content fixed overflow-y-auto border-neutral-200 bg-white px-6 py-5 text-neutral-950 shadow-2xl outline-none", getSideClasses(side), className),
1767
+ className: joinClasses("plai-sheet-content fixed overflow-y-auto border-border bg-surface px-6 py-5 text-foreground shadow-2xl outline-none", getSideClasses(side), className),
1768
1768
  onAnimationEnd: (event) => {
1769
1769
  if (event.currentTarget === event.target && !open) setPresent(false);
1770
1770
  },
1771
1771
  children: [showCloseButton ? /* @__PURE__ */ jsx(SheetClose, {
1772
1772
  "aria-label": closeLabel ?? getUiCopy(locale).close,
1773
- className: "absolute right-4 top-2 rounded-sm p-1 text-neutral-500 transition-colors hover:bg-neutral-100 hover:text-neutral-950 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950",
1773
+ className: "absolute right-4 top-2 rounded-sm p-1 text-muted transition-colors hover:bg-surface-subtle hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
1774
1774
  children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
1775
1775
  }) : null, children]
1776
1776
  })
@@ -1824,7 +1824,7 @@ const SheetDescription = forwardRef(function SheetDescription$1({ className, id,
1824
1824
  ref: forwardedRef,
1825
1825
  id: resolvedId,
1826
1826
  "data-slot": "sheet-description",
1827
- className: joinClasses("text-sm text-neutral-600", className)
1827
+ className: joinClasses("text-sm text-secondary", className)
1828
1828
  });
1829
1829
  });
1830
1830
 
@@ -1834,7 +1834,7 @@ function DatasourceFolderCard({ icon, title, description, type, url, resources,
1834
1834
  const copy = getUiCopy(locale);
1835
1835
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
1836
1836
  "aria-label": `${type}: ${title}`,
1837
- className: `${variant === "card" ? "min-h-[183px] w-[186px] max-w-full" : "w-full"} rounded-lg bg-neutral-100 p-4 text-left font-normal text-neutral-950 transition-colors hover:bg-neutral-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950`,
1837
+ className: `${variant === "card" ? "min-h-[183px] w-[186px] max-w-full" : "w-full"} plai-datasource-folder-card rounded-lg bg-surface-subtle p-4 text-left font-normal text-foreground transition-colors hover:bg-surface-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`,
1838
1838
  children: /* @__PURE__ */ jsx(DatasourceToolResultCardContent, {
1839
1839
  icon,
1840
1840
  title,
@@ -1867,7 +1867,7 @@ function DatasourceFolderCard({ icon, title, description, type, url, resources,
1867
1867
  href: url,
1868
1868
  target: "_blank",
1869
1869
  rel: "noreferrer noopener",
1870
- className: "text-xs font-medium text-neutral-700 underline underline-offset-2",
1870
+ className: "text-xs font-medium text-strong underline underline-offset-2",
1871
1871
  children: copy.view
1872
1872
  }) : null
1873
1873
  ]
@@ -2036,12 +2036,42 @@ function isDatasourceResource(value) {
2036
2036
  const datasource = value.datasource;
2037
2037
  return typeof value.id === "string" && typeof value.name === "string" && typeof value.type === "string" && (value.url === null || typeof value.url === "string") && (value.external_url === null || typeof value.external_url === "string") && isObject(value.metadata) && isObject(value.extra_info) && (folder === null || isObject(folder) && typeof folder.id === "string" && typeof folder.name === "string" && isObject(folder.extra_info)) && (datasource === null || isObject(datasource) && typeof datasource.type === "string" && (datasource.description === null || typeof datasource.description === "string") && (datasource.summary === null || typeof datasource.summary === "string"));
2038
2038
  }
2039
- function getDatasourceResourceCards(resources, locale, getResourceDownloadUrl) {
2039
+ function isResourceLink(value) {
2040
+ return isObject(value) && typeof value.id === "string" && typeof value.resource_id === "string" && typeof value.url === "string" && (value.title === null || typeof value.title === "string") && (value.favicon === null || typeof value.favicon === "string");
2041
+ }
2042
+ function getDatasourceResourceCards(resources, locale, getResourceDownloadUrl, resourceLinks = []) {
2040
2043
  const folderGroups = /* @__PURE__ */ new Map();
2041
2044
  const ungroupedResources = [];
2045
+ const linkCards = [];
2042
2046
  const seenUrls = /* @__PURE__ */ new Set();
2047
+ const linksByResource = /* @__PURE__ */ new Map();
2048
+ for (const link of resourceLinks) {
2049
+ const group = linksByResource.get(link.resource_id);
2050
+ if (group) group.push(link);
2051
+ else linksByResource.set(link.resource_id, [link]);
2052
+ }
2043
2053
  for (const resource of resources) {
2044
2054
  if (resource.extra_info.public === false) continue;
2055
+ const links = linksByResource.get(resource.id);
2056
+ if (resource.type === "WEBPAGE" && links?.length) {
2057
+ for (const link of links) {
2058
+ if (seenUrls.has(link.url)) continue;
2059
+ seenUrls.add(link.url);
2060
+ linkCards.push({
2061
+ kind: "resource",
2062
+ key: `resource-link-${link.id}`,
2063
+ props: {
2064
+ icon: link.favicon ?? void 0,
2065
+ type: getResourceType(resource, locale),
2066
+ title: link.title?.trim() || link.url,
2067
+ url: link.url,
2068
+ resourceId: resource.id,
2069
+ locale
2070
+ }
2071
+ });
2072
+ }
2073
+ continue;
2074
+ }
2045
2075
  const resourceUrl = getResourceUrl(resource, locale);
2046
2076
  if (resourceUrl) {
2047
2077
  if (seenUrls.has(resourceUrl)) continue;
@@ -2058,15 +2088,19 @@ function getDatasourceResourceCards(resources, locale, getResourceDownloadUrl) {
2058
2088
  resources: [resource]
2059
2089
  });
2060
2090
  }
2061
- return [...Array.from(folderGroups.values()).map(({ folder, resources: group }) => ({
2062
- kind: "folder",
2063
- key: `folder-${folder.id}`,
2064
- props: toFolderCardProps(folder, group, locale, getResourceDownloadUrl)
2065
- })), ...ungroupedResources.map((resource) => ({
2066
- kind: "resource",
2067
- key: `resource-${resource.id}`,
2068
- props: toResourceCardProps(resource, locale, getResourceDownloadUrl)
2069
- }))];
2091
+ return [
2092
+ ...Array.from(folderGroups.values()).map(({ folder, resources: group }) => ({
2093
+ kind: "folder",
2094
+ key: `folder-${folder.id}`,
2095
+ props: toFolderCardProps(folder, group, locale, getResourceDownloadUrl)
2096
+ })),
2097
+ ...ungroupedResources.map((resource) => ({
2098
+ kind: "resource",
2099
+ key: `resource-${resource.id}`,
2100
+ props: toResourceCardProps(resource, locale, getResourceDownloadUrl)
2101
+ })),
2102
+ ...linkCards
2103
+ ];
2070
2104
  }
2071
2105
  function DatasourceResourceCardView({ card, variant = "card" }) {
2072
2106
  if (card.kind === "folder") return /* @__PURE__ */ jsx(DatasourceFolderCard, {
@@ -2078,8 +2112,8 @@ function DatasourceResourceCardView({ card, variant = "card" }) {
2078
2112
  variant
2079
2113
  });
2080
2114
  }
2081
- function DatasourceToolResources({ resources, locale, className, getResourceDownloadUrl }) {
2082
- const cards = getDatasourceResourceCards(resources, locale, getResourceDownloadUrl);
2115
+ function DatasourceToolResources({ resources, resourceLinks, locale, className, getResourceDownloadUrl }) {
2116
+ const cards = getDatasourceResourceCards(resources, locale, getResourceDownloadUrl, resourceLinks);
2083
2117
  return /* @__PURE__ */ jsx("section", {
2084
2118
  "aria-label": getUiCopy(locale).datasourceResources,
2085
2119
  className: joinClasses("flex flex-wrap gap-3", className),
@@ -2214,18 +2248,18 @@ function WebSearchResultItem({ result }) {
2214
2248
  const imageUrl = toStringOrNull$2(result.image_url);
2215
2249
  const faviconUrl = getFaviconUrl(result.url);
2216
2250
  return /* @__PURE__ */ jsx("article", {
2217
- className: "rounded-lg border border-neutral-200 bg-white p-4",
2251
+ className: "rounded-lg border border-border bg-surface p-4",
2218
2252
  children: /* @__PURE__ */ jsxs("div", {
2219
2253
  className: "flex items-start gap-3",
2220
2254
  children: [/* @__PURE__ */ jsxs("span", {
2221
2255
  "aria-hidden": "true",
2222
- className: "relative flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-full border border-neutral-300 bg-white text-neutral-600",
2256
+ className: "relative flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-full border border-border-strong bg-surface text-secondary",
2223
2257
  children: [/* @__PURE__ */ jsx(Globe, { className: "h-4 w-4" }), faviconUrl ? /* @__PURE__ */ jsx("img", {
2224
2258
  src: faviconUrl,
2225
2259
  alt: "",
2226
2260
  width: "16",
2227
2261
  height: "16",
2228
- className: "absolute h-4 w-4 bg-white",
2262
+ className: "absolute h-4 w-4 bg-surface",
2229
2263
  onError: (event) => {
2230
2264
  event.currentTarget.style.display = "none";
2231
2265
  }
@@ -2237,28 +2271,28 @@ function WebSearchResultItem({ result }) {
2237
2271
  href: result.url,
2238
2272
  target: "_blank",
2239
2273
  rel: "noreferrer noopener",
2240
- className: "block line-clamp-2 text-sm font-medium leading-5 text-neutral-950 hover:underline",
2274
+ className: "block line-clamp-2 text-sm font-medium leading-5 text-foreground hover:underline",
2241
2275
  children: result.title
2242
2276
  }),
2243
2277
  /* @__PURE__ */ jsxs("div", {
2244
- className: "flex flex-wrap items-center gap-1.5 text-xs text-neutral-500",
2278
+ className: "flex flex-wrap items-center gap-1.5 text-xs text-muted",
2245
2279
  children: [
2246
2280
  date ? /* @__PURE__ */ jsx("span", { children: date }) : null,
2247
2281
  source ? /* @__PURE__ */ jsx("span", {
2248
- className: "rounded-full bg-neutral-100 px-1.5 py-0.5 capitalize text-neutral-600",
2282
+ className: "rounded-full bg-surface-subtle px-1.5 py-0.5 capitalize text-secondary",
2249
2283
  children: source
2250
2284
  }) : null,
2251
2285
  !date && !source && hostname ? /* @__PURE__ */ jsx("span", { children: hostname }) : null
2252
2286
  ]
2253
2287
  }),
2254
2288
  snippet ? /* @__PURE__ */ jsx("p", {
2255
- className: "line-clamp-2 text-xs leading-5 text-neutral-600",
2289
+ className: "line-clamp-2 text-xs leading-5 text-secondary",
2256
2290
  children: snippet
2257
2291
  }) : null,
2258
2292
  imageUrl ? /* @__PURE__ */ jsx("img", {
2259
2293
  src: imageUrl,
2260
2294
  alt: "",
2261
- className: "max-h-64 w-full rounded-md border border-neutral-200 object-contain",
2295
+ className: "max-h-64 w-full rounded-md border border-border object-contain",
2262
2296
  loading: "lazy"
2263
2297
  }) : null
2264
2298
  ]
@@ -2275,7 +2309,7 @@ function ToolResultWebSearchCard({ part, locale, className }) {
2275
2309
  const sourceLabel = searchResults.length === 1 ? copy.singularSource : copy.pluralSources;
2276
2310
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsxs(SheetTrigger, {
2277
2311
  "aria-label": `Web: ${copy.webSearchTitle}, ${searchResults.length} ${sourceLabel}`,
2278
- className: joinClasses("plai-tool-result-web-search-card min-h-[183px] w-[186px] rounded-lg bg-neutral-100 p-4 text-left font-normal text-neutral-950 transition-colors hover:bg-neutral-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950", className),
2312
+ className: joinClasses("plai-tool-result-web-search-card min-h-[183px] w-[186px] rounded-lg bg-surface-subtle p-4 text-left font-normal text-foreground transition-colors hover:bg-surface-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", className),
2279
2313
  children: [
2280
2314
  /* @__PURE__ */ jsxs("header", {
2281
2315
  className: "flex items-center gap-3",
@@ -2292,7 +2326,7 @@ function ToolResultWebSearchCard({ part, locale, className }) {
2292
2326
  children: copy.webSearchTitle
2293
2327
  }),
2294
2328
  /* @__PURE__ */ jsx("p", {
2295
- className: "mt-2 text-xs leading-4 text-neutral-600",
2329
+ className: "mt-2 text-xs leading-4 text-secondary",
2296
2330
  children: part.state === "pending" ? uiCopy.searching : `${searchResults.length} ${sourceLabel}`
2297
2331
  })
2298
2332
  ]
@@ -2319,13 +2353,13 @@ function ToolResultWebSearchResults({ part, searchResults = getWebSearchResults(
2319
2353
  className: "space-y-3",
2320
2354
  children: searchResults.map((result, index) => /* @__PURE__ */ jsx(WebSearchResultItem, { result }, `${result.url}-${index}`))
2321
2355
  }) : part.state === "pending" ? /* @__PURE__ */ jsx("p", {
2322
- className: "text-sm text-neutral-600",
2356
+ className: "text-sm text-secondary",
2323
2357
  children: copy.searchingForSources
2324
2358
  }) : /* @__PURE__ */ jsx("p", {
2325
- className: "text-sm text-neutral-600",
2359
+ className: "text-sm text-secondary",
2326
2360
  children: copy.noSourcesReturned
2327
2361
  }), errorDetails ? /* @__PURE__ */ jsxs("p", {
2328
- className: "mt-4 rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
2362
+ className: "mt-4 rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
2329
2363
  children: [
2330
2364
  /* @__PURE__ */ jsxs("span", {
2331
2365
  className: "font-semibold",
@@ -2347,8 +2381,12 @@ function getDatasourceResources$2(part) {
2347
2381
  const resources = part.metadata?.resources;
2348
2382
  return Array.isArray(resources) ? resources.filter(isDatasourceResource) : [];
2349
2383
  }
2384
+ function getDatasourceResourceLinks$1(part) {
2385
+ const links = part.metadata?.resource_links;
2386
+ return Array.isArray(links) ? links.filter(isResourceLink) : [];
2387
+ }
2350
2388
  function getAggregatedCards(parts, locale, getResourceDownloadUrl) {
2351
- const datasourceCards = parts.filter((part) => part.toolType === "datasource").flatMap((part) => getDatasourceResourceCards(getDatasourceResources$2(part), locale, getResourceDownloadUrl).map((card) => ({
2389
+ const datasourceCards = parts.filter((part) => part.toolType === "datasource").flatMap((part) => getDatasourceResourceCards(getDatasourceResources$2(part), locale, getResourceDownloadUrl, getDatasourceResourceLinks$1(part)).map((card) => ({
2352
2390
  kind: "datasource",
2353
2391
  key: `${part.id}-${card.key}`,
2354
2392
  card
@@ -2370,7 +2408,7 @@ function SourceCard({ source, locale, variant = "card" }) {
2370
2408
  locale
2371
2409
  });
2372
2410
  return /* @__PURE__ */ jsxs("section", {
2373
- className: "rounded-lg bg-neutral-100 p-4",
2411
+ className: "rounded-lg bg-surface-subtle p-4",
2374
2412
  children: [/* @__PURE__ */ jsxs("header", {
2375
2413
  className: "mb-4 flex items-center gap-3",
2376
2414
  children: [/* @__PURE__ */ jsx(Globe, {
@@ -2408,7 +2446,7 @@ function AggregatedSourceResults({ parts, locale, maxVisible = 3, className, get
2408
2446
  locale
2409
2447
  }, source.key)), overflowCount > 0 ? /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsxs(SheetTrigger, {
2410
2448
  "aria-label": `+${overflowCount} ${overflowLabel}`,
2411
- className: "flex min-h-[183px] w-[186px] max-w-full flex-col justify-center rounded-lg bg-neutral-100 p-4 text-left font-normal text-neutral-950 transition-colors hover:bg-neutral-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950",
2449
+ className: "flex min-h-[183px] w-[186px] max-w-full flex-col justify-center rounded-lg bg-surface-subtle p-4 text-left font-normal text-foreground transition-colors hover:bg-surface-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
2412
2450
  children: [/* @__PURE__ */ jsxs("span", {
2413
2451
  className: "text-2xl font-medium leading-7",
2414
2452
  children: ["+", overflowCount]
@@ -2461,15 +2499,15 @@ function getFileExtension(name, contentType) {
2461
2499
  return null;
2462
2500
  }
2463
2501
  function getFileIconClass(extension) {
2464
- if (extension === "pdf") return "text-rose-500";
2465
- if (["doc", "docx"].includes(extension ?? "")) return "text-blue-600";
2502
+ if (extension === "pdf") return "text-danger";
2503
+ if (["doc", "docx"].includes(extension ?? "")) return "text-info";
2466
2504
  if ([
2467
2505
  "xls",
2468
2506
  "xlsx",
2469
2507
  "csv"
2470
- ].includes(extension ?? "")) return "text-emerald-600";
2471
- if (["ppt", "pptx"].includes(extension ?? "")) return "text-orange-600";
2472
- return "text-neutral-500";
2508
+ ].includes(extension ?? "")) return "text-success";
2509
+ if (["ppt", "pptx"].includes(extension ?? "")) return "text-warning";
2510
+ return "text-muted";
2473
2511
  }
2474
2512
 
2475
2513
  //#endregion
@@ -2725,88 +2763,94 @@ function MemoryProposalCard({ proposal: initial, actions, activeAgentId, locale,
2725
2763
  const statusCopy = proposal.status === "ACCEPTED" ? copy.accepted : proposal.status === "REJECTED" ? copy.rejected : proposal.status === "EXPIRED" ? copy.expired : proposal.status === "CONFLICTED" ? copy.conflicted : null;
2726
2764
  const operation = proposal.operation === "CREATE" ? copy.create : proposal.operation === "UPDATE" ? copy.update : copy.delete;
2727
2765
  return /* @__PURE__ */ jsxs("section", {
2728
- className: joinClasses("space-y-3 rounded-lg border border-emerald-200 bg-emerald-50/30 p-4 text-left", className),
2766
+ className: joinClasses("plai-memory-proposal-card overflow-hidden rounded-lg border border-success-border bg-success-subtle/30 text-left", className),
2729
2767
  "data-memory-proposal-id": proposal.id,
2730
- children: [
2731
- /* @__PURE__ */ jsxs("header", {
2732
- className: "space-y-2",
2768
+ children: [/* @__PURE__ */ jsx("header", {
2769
+ className: "border-b border-success-border px-3 py-2",
2770
+ children: /* @__PURE__ */ jsxs("div", {
2771
+ className: "flex items-center gap-2",
2733
2772
  children: [/* @__PURE__ */ jsxs("h4", {
2734
- className: "flex items-center gap-2 text-sm font-semibold text-slate-900",
2735
- children: [/* @__PURE__ */ jsx(Brain, { className: "size-4" }), copy.title]
2773
+ className: "flex items-center gap-2 text-sm font-semibold text-foreground",
2774
+ children: [/* @__PURE__ */ jsx(Brain, { className: "size-4" }), proposal.scope === "USER" ? copy.user : copy.project]
2736
2775
  }), /* @__PURE__ */ jsxs("div", {
2776
+ "aria-label": "type",
2737
2777
  className: "flex flex-wrap gap-2 text-xs",
2738
- children: [
2739
- /* @__PURE__ */ jsx("span", {
2740
- className: "rounded-full border border-slate-300 bg-white px-2 py-0.5",
2741
- children: proposal.scope === "USER" ? copy.user : copy.project
2742
- }),
2743
- /* @__PURE__ */ jsx("span", {
2744
- className: "rounded-full bg-slate-100 px-2 py-0.5",
2745
- children: operation
2746
- }),
2747
- /* @__PURE__ */ jsx("span", {
2748
- className: "rounded-full bg-slate-100 px-2 py-0.5",
2749
- children: formatCategory(proposal.category)
2750
- })
2751
- ]
2752
- })]
2753
- }),
2754
- proposal.previous_content && proposal.previous_content !== REDACTED ? /* @__PURE__ */ jsxs("div", {
2755
- className: "rounded-md bg-slate-100 p-3 text-sm",
2756
- children: [/* @__PURE__ */ jsx("span", {
2757
- className: "mb-1 block text-xs font-medium text-slate-500",
2758
- children: copy.previous
2759
- }), /* @__PURE__ */ jsx("p", {
2760
- className: "whitespace-pre-wrap break-words",
2761
- children: proposal.previous_content
2762
- })]
2763
- }) : null,
2764
- proposal.content && proposal.content !== REDACTED ? /* @__PURE__ */ jsxs("div", {
2765
- className: "text-sm",
2766
- children: [/* @__PURE__ */ jsx("span", {
2767
- className: "mb-1 block text-xs font-medium text-slate-500",
2768
- children: copy.proposed
2769
- }), /* @__PURE__ */ jsx("p", {
2770
- className: "whitespace-pre-wrap break-words",
2771
- children: proposal.content
2772
- })]
2773
- }) : null,
2774
- canResolve ? /* @__PURE__ */ jsxs("div", {
2775
- className: "flex gap-2",
2776
- children: [/* @__PURE__ */ jsxs("button", {
2777
- type: "button",
2778
- disabled: resolving,
2779
- onClick: () => void resolve(true),
2780
- className: "inline-flex items-center rounded-md bg-slate-900 px-3 py-1.5 text-xs font-medium text-white disabled:opacity-50",
2781
- children: [resolving ? /* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 size-3 animate-spin" }) : null, copy.accept]
2782
- }), /* @__PURE__ */ jsx("button", {
2783
- type: "button",
2784
- disabled: resolving,
2785
- onClick: () => void resolve(false),
2786
- className: "rounded-md border border-slate-300 bg-white px-3 py-1.5 text-xs font-medium disabled:opacity-50",
2787
- children: copy.reject
2788
- })]
2789
- }) : null,
2790
- proposal.status === "PENDING" && !canResolve ? /* @__PURE__ */ jsx("p", {
2791
- className: "text-xs font-medium text-slate-500",
2792
- children: proposal.scope === "PROJECT" ? copy.review : copy.unavailable
2793
- }) : null,
2794
- proposal.status === "ACCEPTED" && statusCopy ? /* @__PURE__ */ jsxs("span", {
2795
- className: "inline-flex items-center gap-1.5 rounded-full border bg-white px-3 py-1 text-xs font-medium text-slate-900 shadow-sm",
2796
- children: [statusCopy, /* @__PURE__ */ jsx(Check, {
2797
- className: "size-3.5 stroke-[2.5] text-emerald-600",
2798
- "aria-hidden": "true"
2778
+ children: [/* @__PURE__ */ jsx("span", {
2779
+ className: "rounded-full bg-surface-subtle px-2 py-0.5",
2780
+ children: operation
2781
+ }), /* @__PURE__ */ jsx("span", {
2782
+ className: "rounded-full bg-surface-subtle px-2 py-0.5",
2783
+ children: formatCategory(proposal.category)
2784
+ })]
2799
2785
  })]
2800
- }) : null,
2801
- statusCopy && proposal.status !== "ACCEPTED" ? /* @__PURE__ */ jsx("p", {
2802
- className: "text-xs font-medium text-slate-500",
2803
- children: statusCopy
2804
- }) : null,
2805
- error ? /* @__PURE__ */ jsx("p", {
2806
- className: "text-xs text-red-600",
2807
- children: error
2808
- }) : null
2809
- ]
2786
+ })
2787
+ }), /* @__PURE__ */ jsxs("div", {
2788
+ className: "space-y-3 px-3 py-2",
2789
+ children: [
2790
+ " ",
2791
+ proposal.previous_content && proposal.previous_content !== REDACTED ? /* @__PURE__ */ jsxs("div", {
2792
+ className: "rounded-md bg-surface-subtle p-3 text-sm",
2793
+ children: [/* @__PURE__ */ jsx("span", {
2794
+ className: "mb-1 block text-xs font-medium text-muted",
2795
+ children: copy.previous
2796
+ }), /* @__PURE__ */ jsx("p", {
2797
+ className: "whitespace-pre-wrap break-words",
2798
+ children: proposal.previous_content
2799
+ })]
2800
+ }) : null,
2801
+ proposal.content && proposal.content !== REDACTED ? /* @__PURE__ */ jsxs("div", {
2802
+ className: "text-sm",
2803
+ children: [/* @__PURE__ */ jsx("span", {
2804
+ className: "mb-1 block text-xs font-medium text-muted",
2805
+ children: copy.proposed
2806
+ }), /* @__PURE__ */ jsx("p", {
2807
+ className: "whitespace-pre-wrap break-words",
2808
+ children: proposal.content
2809
+ })]
2810
+ }) : null,
2811
+ canResolve ? /* @__PURE__ */ jsxs("div", {
2812
+ className: "flex gap-2",
2813
+ children: [/* @__PURE__ */ jsxs("button", {
2814
+ type: "button",
2815
+ disabled: resolving,
2816
+ onClick: () => void resolve(true),
2817
+ className: "inline-flex items-center rounded-md bg-inverse px-3 py-1.5 text-xs font-medium text-inverse-foreground disabled:opacity-50",
2818
+ children: [resolving ? /* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 size-3 animate-spin" }) : null, copy.accept]
2819
+ }), /* @__PURE__ */ jsx("button", {
2820
+ type: "button",
2821
+ disabled: resolving,
2822
+ onClick: () => void resolve(false),
2823
+ className: "rounded-md border border-border-strong bg-surface px-3 py-1.5 text-xs font-medium disabled:opacity-50",
2824
+ children: copy.reject
2825
+ })]
2826
+ }) : null,
2827
+ proposal.status === "PENDING" && !canResolve ? /* @__PURE__ */ jsxs("span", {
2828
+ className: "inline-flex items-center gap-1.5 rounded-full border bg-surface px-3 py-1 text-xs font-medium text-foreground",
2829
+ children: [proposal.scope === "PROJECT" ? copy.review : copy.unavailable, /* @__PURE__ */ jsx(Clock, {
2830
+ className: "size-3.5 stroke-[2.5] text-muted",
2831
+ "aria-hidden": "true"
2832
+ })]
2833
+ }) : null,
2834
+ proposal.status === "ACCEPTED" && statusCopy ? /* @__PURE__ */ jsxs("span", {
2835
+ className: "inline-flex items-center gap-1.5 rounded-full border bg-surface px-3 py-1 text-xs font-medium text-foreground",
2836
+ children: [statusCopy, /* @__PURE__ */ jsx(Check, {
2837
+ className: "size-3.5 stroke-[2.5] text-success",
2838
+ "aria-hidden": "true"
2839
+ })]
2840
+ }) : null,
2841
+ statusCopy && proposal.status !== "ACCEPTED" ? /* @__PURE__ */ jsxs("span", {
2842
+ className: "inline-flex items-center gap-1.5 rounded-full border border-danger bg-surface px-3 py-1 text-xs font-medium text-danger",
2843
+ children: [statusCopy, /* @__PURE__ */ jsx(X$1, {
2844
+ className: "size-3.5 stroke-[2.5]",
2845
+ "aria-hidden": "true"
2846
+ })]
2847
+ }) : null,
2848
+ error ? /* @__PURE__ */ jsx("p", {
2849
+ className: "text-xs text-danger",
2850
+ children: error
2851
+ }) : null
2852
+ ]
2853
+ })]
2810
2854
  });
2811
2855
  }
2812
2856
  function mergeProposal(current, incoming) {
@@ -2913,7 +2957,7 @@ function ToolError({ part, locale, defaultOpen = false, className,...props }) {
2913
2957
  const copy = getToolErrorCopy(part, locale);
2914
2958
  const errorDetails = formatToolErrorDetails(part.errorDetails);
2915
2959
  return /* @__PURE__ */ jsxs("section", {
2916
- className: joinClasses("text-sm text-neutral-600", className),
2960
+ className: joinClasses("text-sm text-secondary", className),
2917
2961
  "data-tool-call-id": part.id,
2918
2962
  "data-tool-call-state": part.state,
2919
2963
  ...props,
@@ -2921,14 +2965,17 @@ function ToolError({ part, locale, defaultOpen = false, className,...props }) {
2921
2965
  type: "button",
2922
2966
  "aria-controls": contentId,
2923
2967
  "aria-expanded": isOpen,
2924
- className: "inline-flex items-center gap-2 rounded-md py-1 text-left font-medium text-rose-600 transition-colors hover:text-rose-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950",
2968
+ className: "inline-flex items-center gap-2 rounded-md py-1 text-left font-medium text-danger transition-colors hover:text-danger-strong focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
2925
2969
  onClick: () => setIsOpen((value) => !value),
2926
2970
  children: [
2927
2971
  /* @__PURE__ */ jsx(CircleX, {
2928
2972
  className: "size-4 shrink-0",
2929
2973
  "aria-hidden": "true"
2930
2974
  }),
2931
- /* @__PURE__ */ jsx("span", { children: copy.summary }),
2975
+ /* @__PURE__ */ jsx("span", {
2976
+ className: "line-clamp-1",
2977
+ children: copy.summary
2978
+ }),
2932
2979
  /* @__PURE__ */ jsx(ChevronDown, {
2933
2980
  className: joinClasses("size-4 shrink-0 transition-transform motion-reduce:transition-none", isOpen ? "rotate-180" : void 0),
2934
2981
  "aria-hidden": "true"
@@ -2936,27 +2983,27 @@ function ToolError({ part, locale, defaultOpen = false, className,...props }) {
2936
2983
  ]
2937
2984
  }), isOpen ? /* @__PURE__ */ jsxs("div", {
2938
2985
  id: contentId,
2939
- className: "mt-2 space-y-3 border-l-2 border-rose-200 pl-3",
2986
+ className: "mt-2 space-y-3 border-l-2 border-danger-border pl-3",
2940
2987
  children: [
2941
2988
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
2942
- className: "mb-2 text-xs font-semibold text-neutral-700",
2989
+ className: "mb-2 text-xs font-semibold text-strong",
2943
2990
  children: copy.input
2944
2991
  }), /* @__PURE__ */ jsx("pre", {
2945
- className: "overflow-x-auto whitespace-pre-wrap rounded-md bg-neutral-100 p-3 text-xs leading-5 text-neutral-800",
2992
+ className: "overflow-x-auto whitespace-pre-wrap rounded-md bg-surface-subtle p-3 text-xs leading-5 text-strong",
2946
2993
  children: formatJson$1(part.input)
2947
2994
  })] }),
2948
2995
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
2949
- className: "mb-2 text-xs font-semibold text-neutral-700",
2996
+ className: "mb-2 text-xs font-semibold text-strong",
2950
2997
  children: copy.output
2951
2998
  }), /* @__PURE__ */ jsx("pre", {
2952
- className: "overflow-x-auto whitespace-pre-wrap rounded-md bg-neutral-100 p-3 text-xs leading-5 text-neutral-800",
2999
+ className: "overflow-x-auto whitespace-pre-wrap rounded-md bg-surface-subtle p-3 text-xs leading-5 text-strong",
2953
3000
  children: part.result === void 0 ? copy.noOutput : formatJson$1(part.result)
2954
3001
  })] }),
2955
3002
  errorDetails ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
2956
- className: "mb-2 text-xs font-semibold text-rose-700",
3003
+ className: "mb-2 text-xs font-semibold text-danger-strong",
2957
3004
  children: copy.details
2958
3005
  }), /* @__PURE__ */ jsx("p", {
2959
- className: "whitespace-pre-wrap text-xs leading-5 text-rose-700",
3006
+ className: "whitespace-pre-wrap text-xs leading-5 text-danger-strong",
2960
3007
  children: errorDetails
2961
3008
  })] }) : null
2962
3009
  ]
@@ -2996,12 +3043,12 @@ function ToolResultAgentInvocationCard({ part, className, onOpenThread, locale }
2996
3043
  const pending = part.state === "pending";
2997
3044
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
2998
3045
  "aria-label": `${copy.agent}: ${agentName}`,
2999
- className: joinClasses("w-full rounded-lg border border-neutral-200 bg-white text-left font-normal text-neutral-950 transition-colors hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950", className),
3046
+ className: joinClasses("plai-tool-result-agent-invocation-card w-full rounded-lg border border-border bg-surface text-left font-normal text-foreground transition-colors hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", className),
3000
3047
  children: /* @__PURE__ */ jsxs("span", {
3001
3048
  className: "flex items-center gap-2 px-3 py-2 text-sm",
3002
3049
  children: [
3003
3050
  /* @__PURE__ */ jsx(Bot, {
3004
- className: "h-4 w-4 shrink-0 text-neutral-500",
3051
+ className: "h-4 w-4 shrink-0 text-muted",
3005
3052
  "aria-hidden": "true"
3006
3053
  }),
3007
3054
  /* @__PURE__ */ jsx("span", {
@@ -3009,19 +3056,19 @@ function ToolResultAgentInvocationCard({ part, className, onOpenThread, locale }
3009
3056
  children: copy.agent
3010
3057
  }),
3011
3058
  /* @__PURE__ */ jsx("span", {
3012
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
3059
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
3013
3060
  children: agentName
3014
3061
  }),
3015
3062
  /* @__PURE__ */ jsx("span", {
3016
3063
  className: "ml-auto shrink-0",
3017
3064
  children: pending ? /* @__PURE__ */ jsx(LoaderCircle, {
3018
- className: "h-4 w-4 animate-spin text-amber-600",
3065
+ className: "h-4 w-4 animate-spin text-warning",
3019
3066
  "aria-label": copy.pending
3020
3067
  }) : failed ? /* @__PURE__ */ jsx(XCircle, {
3021
- className: "h-4 w-4 text-rose-600",
3068
+ className: "h-4 w-4 text-danger",
3022
3069
  "aria-hidden": "true"
3023
3070
  }) : /* @__PURE__ */ jsx(CheckCircle2, {
3024
- className: "h-4 w-4 text-emerald-600",
3071
+ className: "h-4 w-4 text-success",
3025
3072
  "aria-hidden": "true"
3026
3073
  })
3027
3074
  })
@@ -3040,25 +3087,25 @@ function ToolResultAgentInvocationCard({ part, className, onOpenThread, locale }
3040
3087
  className: "grid gap-2 text-sm",
3041
3088
  children: [
3042
3089
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3043
- className: "text-xs text-neutral-500",
3090
+ className: "text-xs text-muted",
3044
3091
  children: copy.status
3045
3092
  }), /* @__PURE__ */ jsx("dd", { children: getUiStatusLabel(part.state, copy) })] }),
3046
3093
  metadata?.agent_id ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3047
- className: "text-xs text-neutral-500",
3094
+ className: "text-xs text-muted",
3048
3095
  children: copy.agentId
3049
3096
  }), /* @__PURE__ */ jsx("dd", {
3050
3097
  className: "break-all",
3051
3098
  children: metadata.agent_id
3052
3099
  })] }) : null,
3053
3100
  metadata?.tracked_execution_id ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3054
- className: "text-xs text-neutral-500",
3101
+ className: "text-xs text-muted",
3055
3102
  children: copy.executionId
3056
3103
  }), /* @__PURE__ */ jsx("dd", {
3057
3104
  className: "break-all",
3058
3105
  children: metadata.tracked_execution_id
3059
3106
  })] }) : null,
3060
3107
  threadId ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3061
- className: "text-xs text-neutral-500",
3108
+ className: "text-xs text-muted",
3062
3109
  children: copy.threadId
3063
3110
  }), /* @__PURE__ */ jsx("dd", {
3064
3111
  className: "break-all",
@@ -3070,19 +3117,19 @@ function ToolResultAgentInvocationCard({ part, className, onOpenThread, locale }
3070
3117
  className: "mb-2 text-sm font-medium",
3071
3118
  children: copy.prompt
3072
3119
  }), /* @__PURE__ */ jsx("p", {
3073
- className: "whitespace-pre-wrap rounded-md border border-neutral-200 bg-neutral-50 p-3 text-sm leading-6",
3120
+ className: "whitespace-pre-wrap rounded-md border border-border bg-surface-muted p-3 text-sm leading-6",
3074
3121
  children: prompt
3075
3122
  })] }) : null,
3076
3123
  output$1 ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
3077
3124
  className: "mb-2 text-sm font-medium",
3078
3125
  children: copy.result
3079
3126
  }), /* @__PURE__ */ jsx("pre", {
3080
- className: "overflow-x-auto whitespace-pre-wrap rounded-md border border-neutral-200 bg-neutral-50 p-3 text-xs leading-5",
3127
+ className: "overflow-x-auto whitespace-pre-wrap rounded-md border border-border bg-surface-muted p-3 text-xs leading-5",
3081
3128
  children: output$1
3082
3129
  })] }) : null,
3083
3130
  threadId && onOpenThread ? /* @__PURE__ */ jsxs("button", {
3084
3131
  type: "button",
3085
- className: "inline-flex items-center gap-2 rounded-md border border-neutral-300 px-3 py-2 text-sm font-medium text-neutral-900 transition-colors hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950",
3132
+ className: "inline-flex items-center gap-2 rounded-md border border-border-strong px-3 py-2 text-sm font-medium text-foreground transition-colors hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
3086
3133
  onClick: () => onOpenThread(threadId),
3087
3134
  children: [/* @__PURE__ */ jsx(MessageSquare, {
3088
3135
  className: "h-4 w-4",
@@ -3090,7 +3137,7 @@ function ToolResultAgentInvocationCard({ part, className, onOpenThread, locale }
3090
3137
  }), copy.openConversation]
3091
3138
  }) : null,
3092
3139
  error ? /* @__PURE__ */ jsxs("p", {
3093
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
3140
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
3094
3141
  children: [
3095
3142
  /* @__PURE__ */ jsxs("span", {
3096
3143
  className: "font-semibold",
@@ -3142,66 +3189,67 @@ function ToolResultBrowserCard({ part, className, locale }) {
3142
3189
  const pending = part.state === "pending";
3143
3190
  const canExpand = Boolean(preview || error || url);
3144
3191
  return /* @__PURE__ */ jsxs("section", {
3145
- className: joinClasses("overflow-hidden rounded-lg border border-neutral-200 bg-white", className),
3192
+ className: joinClasses("plai-tool-result-browser-card overflow-hidden rounded-lg border border-border bg-surface", className),
3146
3193
  "aria-label": copy.browserResult,
3147
- children: [/* @__PURE__ */ jsxs("div", {
3148
- className: "flex items-center gap-2 px-3 py-2 text-sm",
3149
- children: [
3150
- /* @__PURE__ */ jsx(Globe, {
3151
- className: "h-4 w-4 shrink-0 text-neutral-500",
3152
- "aria-hidden": "true"
3153
- }),
3154
- /* @__PURE__ */ jsx("span", {
3155
- className: "font-medium text-neutral-800",
3156
- children: copy.browser
3157
- }),
3158
- subtitle ? /* @__PURE__ */ jsx("span", {
3159
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
3160
- children: subtitle
3161
- }) : null,
3162
- /* @__PURE__ */ jsxs("span", {
3163
- className: "ml-auto flex shrink-0 items-center gap-2",
3164
- children: [pending ? /* @__PURE__ */ jsx(LoaderCircle, {
3165
- className: "h-4 w-4 animate-spin text-amber-600",
3166
- "aria-label": copy.pending
3167
- }) : failed ? /* @__PURE__ */ jsx(XCircle, {
3168
- className: "h-4 w-4 text-rose-600",
3169
- "aria-hidden": "true"
3170
- }) : /* @__PURE__ */ jsx(CheckCircle2, {
3171
- className: "h-4 w-4 text-emerald-600",
3194
+ children: [/* @__PURE__ */ jsx("header", {
3195
+ className: "flex items-center gap-2 border-b border-border px-3 py-2 text-xs text-secondary",
3196
+ children: /* @__PURE__ */ jsxs("button", {
3197
+ type: "button",
3198
+ disabled: !canExpand,
3199
+ "aria-label": expanded ? copy.collapseBrowserResult : copy.expandBrowserResult,
3200
+ "aria-expanded": canExpand ? expanded : void 0,
3201
+ className: "flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors enabled:cursor-pointer enabled:hover:bg-surface-subtle focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring",
3202
+ onClick: () => setExpanded((value) => !value),
3203
+ children: [
3204
+ /* @__PURE__ */ jsx(Globe, {
3205
+ className: "h-4 w-4 shrink-0 text-muted",
3172
3206
  "aria-hidden": "true"
3173
- }), canExpand ? /* @__PURE__ */ jsx("button", {
3174
- type: "button",
3175
- "aria-label": expanded ? copy.collapseBrowserResult : copy.expandBrowserResult,
3176
- "aria-expanded": expanded,
3177
- className: "flex h-5 w-5 items-center justify-center rounded text-neutral-400 transition-colors hover:bg-neutral-100 hover:text-neutral-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950",
3178
- onClick: () => setExpanded((value) => !value),
3179
- children: expanded ? /* @__PURE__ */ jsx(Minus, {
3180
- className: "h-3 w-3",
3207
+ }),
3208
+ /* @__PURE__ */ jsx("span", {
3209
+ className: "font-medium text-strong",
3210
+ children: copy.browser
3211
+ }),
3212
+ subtitle ? /* @__PURE__ */ jsx("span", {
3213
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
3214
+ children: subtitle
3215
+ }) : null,
3216
+ /* @__PURE__ */ jsxs("span", {
3217
+ className: "ml-auto flex shrink-0 items-center gap-2",
3218
+ children: [pending ? /* @__PURE__ */ jsx(LoaderCircle, {
3219
+ className: "h-4 w-4 animate-spin text-warning",
3220
+ "aria-label": copy.pending
3221
+ }) : failed ? /* @__PURE__ */ jsx(XCircle, {
3222
+ className: "h-4 w-4 text-danger",
3181
3223
  "aria-hidden": "true"
3182
- }) : /* @__PURE__ */ jsx(Plus, {
3183
- className: "h-3 w-3",
3224
+ }) : /* @__PURE__ */ jsx(CheckCircle2, {
3225
+ className: "h-4 w-4 text-success",
3184
3226
  "aria-hidden": "true"
3185
- })
3186
- }) : null]
3187
- })
3188
- ]
3227
+ }), canExpand ? expanded ? /* @__PURE__ */ jsx(ChevronUp, {
3228
+ className: "h-4 w-4 text-muted",
3229
+ "aria-hidden": "true"
3230
+ }) : /* @__PURE__ */ jsx(ChevronDown, {
3231
+ className: "h-4 w-4 text-muted",
3232
+ "aria-hidden": "true"
3233
+ }) : null]
3234
+ })
3235
+ ]
3236
+ })
3189
3237
  }), expanded ? /* @__PURE__ */ jsxs("div", {
3190
- className: "space-y-3 border-t border-neutral-200 bg-neutral-50 p-3",
3238
+ className: "space-y-3 border-t border-border bg-surface-muted p-3",
3191
3239
  children: [
3192
3240
  url ? /* @__PURE__ */ jsx("a", {
3193
3241
  href: url,
3194
3242
  target: "_blank",
3195
3243
  rel: "noreferrer noopener",
3196
- className: "block truncate text-xs text-blue-700 underline underline-offset-2 hover:text-blue-900",
3244
+ className: "block truncate text-xs text-info-strong underline underline-offset-2 hover:text-info-strong",
3197
3245
  children: url
3198
3246
  }) : null,
3199
3247
  preview ? /* @__PURE__ */ jsx("p", {
3200
- className: "whitespace-pre-wrap text-xs leading-5 text-neutral-600",
3248
+ className: "whitespace-pre-wrap text-xs leading-5 text-secondary",
3201
3249
  children: preview
3202
3250
  }) : null,
3203
3251
  error ? /* @__PURE__ */ jsxs("p", {
3204
- className: "text-xs text-rose-700",
3252
+ className: "text-xs text-danger-strong",
3205
3253
  children: [
3206
3254
  /* @__PURE__ */ jsxs("span", {
3207
3255
  className: "font-semibold",
@@ -3280,159 +3328,161 @@ function ToolResultEmailSendCard({ part, className, locale }) {
3280
3328
  const emailInput = parseEmailSendInput(part);
3281
3329
  const emailResult = parseEmailSendResult(part);
3282
3330
  const errorDetails = formatToolErrorDetails(part.errorDetails);
3283
- const statusClass = part.state === "error" ? "border-rose-200 bg-rose-50 text-rose-800" : part.state === "pending" ? "border-amber-200 bg-amber-50 text-amber-800" : "border-emerald-200 bg-emerald-50 text-emerald-800";
3331
+ const statusClass = part.state === "error" ? "border-danger-border bg-danger-subtle text-danger-strong" : part.state === "pending" ? "border-warning-border bg-warning-subtle text-warning-strong" : "border-success-border bg-success-subtle text-success-strong";
3284
3332
  return /* @__PURE__ */ jsxs("section", {
3285
- className: joinClasses("space-y-4 rounded-lg border border-slate-200 bg-slate-50 p-3", className),
3333
+ className: joinClasses("plai-tool-result-email-send-card overflow-hidden rounded-lg border border-border bg-surface-muted", className),
3286
3334
  "data-tool-call-id": part.id,
3287
3335
  "data-tool-call-state": part.state,
3288
- children: [
3289
- /* @__PURE__ */ jsxs("header", {
3290
- className: "flex items-center justify-between gap-2",
3291
- children: [/* @__PURE__ */ jsx("h4", {
3292
- className: "text-sm font-semibold text-slate-900",
3336
+ children: [/* @__PURE__ */ jsx("header", {
3337
+ className: "flex items-center gap-2 border-b border-border px-3 py-2 text-xs text-secondary",
3338
+ children: /* @__PURE__ */ jsxs("button", {
3339
+ type: "button",
3340
+ "aria-expanded": isExpanded,
3341
+ "aria-label": isExpanded ? copy.collapse : copy.expand,
3342
+ "aria-controls": `tool-email-details-${part.id}`,
3343
+ className: "flex w-full cursor-pointer items-center justify-between gap-2 rounded text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
3344
+ onClick: () => setIsExpanded((previous) => !previous),
3345
+ children: [/* @__PURE__ */ jsx("span", {
3346
+ className: "text-sm font-semibold text-foreground",
3293
3347
  children: copy.email
3294
- }), /* @__PURE__ */ jsxs("div", {
3348
+ }), /* @__PURE__ */ jsxs("span", {
3295
3349
  className: "flex items-center gap-2",
3296
3350
  children: [/* @__PURE__ */ jsx("span", {
3297
- className: joinClasses("rounded-full uppercase border px-2 py-0.5 text-xs", statusClass),
3351
+ className: joinClasses("rounded-full border capitalize px-2 py-0.5 text-xs", statusClass),
3298
3352
  children: getUiStatusLabel(part.state, copy)
3299
- }), /* @__PURE__ */ jsx("button", {
3300
- type: "button",
3301
- "aria-expanded": isExpanded,
3302
- "aria-label": isExpanded ? copy.collapse : copy.expand,
3303
- "aria-controls": `tool-email-details-${part.id}`,
3304
- className: "inline-flex h-6 w-6 items-center justify-center rounded border border-slate-300 bg-white text-xs text-slate-700 hover:bg-slate-100",
3305
- onClick: () => setIsExpanded((previous) => !previous),
3306
- children: isExpanded ? /* @__PURE__ */ jsx(Minus, {
3307
- className: "h-3 w-3",
3308
- "aria-hidden": "true"
3309
- }) : /* @__PURE__ */ jsx(Plus, {
3310
- className: "h-3 w-3",
3311
- "aria-hidden": "true"
3312
- })
3353
+ }), isExpanded ? /* @__PURE__ */ jsx(ChevronUp, {
3354
+ className: "h-4 w-4 text-muted",
3355
+ "aria-hidden": "true"
3356
+ }) : /* @__PURE__ */ jsx(ChevronDown, {
3357
+ className: "h-4 w-4 text-muted",
3358
+ "aria-hidden": "true"
3313
3359
  })]
3314
3360
  })]
3315
- }),
3316
- emailInput.subject ? /* @__PURE__ */ jsxs("div", {
3317
- className: "flex items-center gap-1",
3318
- children: [/* @__PURE__ */ jsxs("p", {
3319
- className: "text-xs font-semibold text-slate-600",
3320
- children: [copy.subject, ":"]
3321
- }), /* @__PURE__ */ jsx("p", {
3322
- className: "text-xs text-slate-900",
3323
- children: emailInput.subject
3324
- })]
3325
- }) : null,
3326
- /* @__PURE__ */ jsxs("div", {
3327
- className: "flex items-center gap-1",
3328
- children: [/* @__PURE__ */ jsxs("p", {
3329
- className: "text-xs font-semibold text-slate-600",
3330
- children: [copy.to, ":"]
3331
- }), emailInput.to.length > 0 ? /* @__PURE__ */ jsx("div", {
3332
- className: "flex flex-wrap gap-2",
3333
- children: emailInput.to.map((recipient) => /* @__PURE__ */ jsx("span", {
3334
- className: "rounded-full border border-slate-300 bg-slate-100 px-2 py-0.5 text-xs text-slate-700",
3335
- children: recipient
3336
- }, recipient))
3337
- }) : /* @__PURE__ */ jsx("p", {
3338
- className: "text-xs text-slate-500",
3339
- children: copy.noRecipientsProvided
3340
- })]
3341
- }),
3342
- /* @__PURE__ */ jsxs("div", {
3343
- id: `tool-email-details-${part.id}`,
3344
- "data-testid": "email-send-details",
3345
- className: joinClasses(isExpanded ? "block space-y-4" : "hidden"),
3346
- children: [emailInput.text ? /* @__PURE__ */ jsxs("div", {
3347
- className: "space-y-1",
3361
+ })
3362
+ }), /* @__PURE__ */ jsxs("div", {
3363
+ className: "space-y-4 px-3 py-2",
3364
+ children: [
3365
+ emailInput.subject ? /* @__PURE__ */ jsxs("div", {
3366
+ className: "flex items-center gap-1",
3348
3367
  children: [/* @__PURE__ */ jsxs("p", {
3349
- className: "text-xs font-semibold text-slate-600",
3350
- children: [copy.body, ":"]
3368
+ className: "text-xs font-semibold text-secondary",
3369
+ children: [copy.subject, ":"]
3351
3370
  }), /* @__PURE__ */ jsx("p", {
3352
- className: "whitespace-pre-wrap rounded border border-slate-200 bg-white p-2 text-sm text-slate-700",
3353
- children: emailInput.text
3371
+ className: "text-xs text-foreground",
3372
+ children: emailInput.subject
3354
3373
  })]
3355
- }) : null, part.result !== void 0 ? /* @__PURE__ */ jsxs("div", {
3356
- className: "space-y-2 rounded border border-slate-200 bg-slate-50 p-3",
3374
+ }) : null,
3375
+ /* @__PURE__ */ jsxs("div", {
3376
+ className: "flex items-center gap-1",
3377
+ children: [/* @__PURE__ */ jsxs("p", {
3378
+ className: "text-xs font-semibold text-secondary",
3379
+ children: [copy.to, ":"]
3380
+ }), emailInput.to.length > 0 ? /* @__PURE__ */ jsx("div", {
3381
+ className: "flex flex-wrap gap-2",
3382
+ children: emailInput.to.map((recipient) => /* @__PURE__ */ jsx("span", {
3383
+ className: "rounded-full border border-border-strong bg-surface-subtle px-2 py-0.5 text-xs text-strong",
3384
+ children: recipient
3385
+ }, recipient))
3386
+ }) : /* @__PURE__ */ jsx("p", {
3387
+ className: "text-xs text-muted",
3388
+ children: copy.noRecipientsProvided
3389
+ })]
3390
+ }),
3391
+ /* @__PURE__ */ jsxs("div", {
3392
+ id: `tool-email-details-${part.id}`,
3393
+ "data-testid": "email-send-details",
3394
+ className: joinClasses(isExpanded ? "block space-y-4" : "hidden"),
3395
+ children: [emailInput.text ? /* @__PURE__ */ jsxs("div", {
3396
+ className: "space-y-1",
3397
+ children: [/* @__PURE__ */ jsxs("p", {
3398
+ className: "text-xs font-semibold text-secondary",
3399
+ children: [copy.body, ":"]
3400
+ }), /* @__PURE__ */ jsx("p", {
3401
+ className: "whitespace-pre-wrap rounded border border-border bg-surface p-2 text-sm text-strong",
3402
+ children: emailInput.text
3403
+ })]
3404
+ }) : null, part.result !== void 0 ? /* @__PURE__ */ jsxs("div", {
3405
+ className: "space-y-2 rounded border border-border bg-surface-muted p-3",
3406
+ children: [
3407
+ /* @__PURE__ */ jsx("p", {
3408
+ className: "text-xs font-semibold capitalize tracking-wide text-muted",
3409
+ children: copy.delivery
3410
+ }),
3411
+ emailResult.status ? /* @__PURE__ */ jsxs("p", {
3412
+ className: "text-xs text-strong",
3413
+ children: [
3414
+ /* @__PURE__ */ jsxs("span", {
3415
+ className: "font-semibold text-foreground",
3416
+ children: [copy.status, ":"]
3417
+ }),
3418
+ " ",
3419
+ emailResult.status
3420
+ ]
3421
+ }) : null,
3422
+ emailResult.recipientsCount !== null ? /* @__PURE__ */ jsxs("p", {
3423
+ className: "text-xs text-strong",
3424
+ children: [
3425
+ /* @__PURE__ */ jsxs("span", {
3426
+ className: "font-semibold text-foreground",
3427
+ children: [copy.recipients, ":"]
3428
+ }),
3429
+ " ",
3430
+ emailResult.recipientsCount
3431
+ ]
3432
+ }) : null,
3433
+ emailResult.receiptProvider ? /* @__PURE__ */ jsxs("p", {
3434
+ className: "text-xs text-strong",
3435
+ children: [
3436
+ /* @__PURE__ */ jsxs("span", {
3437
+ className: "font-semibold text-foreground",
3438
+ children: [copy.provider, ":"]
3439
+ }),
3440
+ " ",
3441
+ emailResult.receiptProvider
3442
+ ]
3443
+ }) : null,
3444
+ emailResult.receiptMessageId ? /* @__PURE__ */ jsxs("p", {
3445
+ className: "break-all text-xs text-strong",
3446
+ children: [
3447
+ /* @__PURE__ */ jsxs("span", {
3448
+ className: "font-semibold text-foreground",
3449
+ children: [copy.messageId, ":"]
3450
+ }),
3451
+ " ",
3452
+ emailResult.receiptMessageId
3453
+ ]
3454
+ }) : null,
3455
+ emailResult.receiptRawStatus ? /* @__PURE__ */ jsxs("p", {
3456
+ className: "text-xs text-strong",
3457
+ children: [
3458
+ /* @__PURE__ */ jsxs("span", {
3459
+ className: "font-semibold text-foreground",
3460
+ children: [copy.rawStatus, ":"]
3461
+ }),
3462
+ " ",
3463
+ emailResult.receiptRawStatus
3464
+ ]
3465
+ }) : null,
3466
+ emailResult.raw ? /* @__PURE__ */ jsx("p", {
3467
+ className: "whitespace-pre-wrap text-xs text-strong",
3468
+ children: emailResult.raw
3469
+ }) : null
3470
+ ]
3471
+ }) : null]
3472
+ }),
3473
+ errorDetails ? /* @__PURE__ */ jsxs("p", {
3474
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
3357
3475
  children: [
3358
- /* @__PURE__ */ jsx("p", {
3359
- className: "text-xs font-semibold uppercase tracking-wide text-slate-500",
3360
- children: copy.delivery
3476
+ /* @__PURE__ */ jsxs("span", {
3477
+ className: "font-semibold",
3478
+ children: [copy.errorDetails, ":"]
3361
3479
  }),
3362
- emailResult.status ? /* @__PURE__ */ jsxs("p", {
3363
- className: "text-xs text-slate-700",
3364
- children: [
3365
- /* @__PURE__ */ jsxs("span", {
3366
- className: "font-semibold text-slate-900",
3367
- children: [copy.status, ":"]
3368
- }),
3369
- " ",
3370
- emailResult.status
3371
- ]
3372
- }) : null,
3373
- emailResult.recipientsCount !== null ? /* @__PURE__ */ jsxs("p", {
3374
- className: "text-xs text-slate-700",
3375
- children: [
3376
- /* @__PURE__ */ jsxs("span", {
3377
- className: "font-semibold text-slate-900",
3378
- children: [copy.recipients, ":"]
3379
- }),
3380
- " ",
3381
- emailResult.recipientsCount
3382
- ]
3383
- }) : null,
3384
- emailResult.receiptProvider ? /* @__PURE__ */ jsxs("p", {
3385
- className: "text-xs text-slate-700",
3386
- children: [
3387
- /* @__PURE__ */ jsxs("span", {
3388
- className: "font-semibold text-slate-900",
3389
- children: [copy.provider, ":"]
3390
- }),
3391
- " ",
3392
- emailResult.receiptProvider
3393
- ]
3394
- }) : null,
3395
- emailResult.receiptMessageId ? /* @__PURE__ */ jsxs("p", {
3396
- className: "break-all text-xs text-slate-700",
3397
- children: [
3398
- /* @__PURE__ */ jsxs("span", {
3399
- className: "font-semibold text-slate-900",
3400
- children: [copy.messageId, ":"]
3401
- }),
3402
- " ",
3403
- emailResult.receiptMessageId
3404
- ]
3405
- }) : null,
3406
- emailResult.receiptRawStatus ? /* @__PURE__ */ jsxs("p", {
3407
- className: "text-xs text-slate-700",
3408
- children: [
3409
- /* @__PURE__ */ jsxs("span", {
3410
- className: "font-semibold text-slate-900",
3411
- children: [copy.rawStatus, ":"]
3412
- }),
3413
- " ",
3414
- emailResult.receiptRawStatus
3415
- ]
3416
- }) : null,
3417
- emailResult.raw ? /* @__PURE__ */ jsx("p", {
3418
- className: "whitespace-pre-wrap text-xs text-slate-700",
3419
- children: emailResult.raw
3420
- }) : null
3480
+ " ",
3481
+ errorDetails
3421
3482
  ]
3422
- }) : null]
3423
- }),
3424
- errorDetails ? /* @__PURE__ */ jsxs("p", {
3425
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
3426
- children: [
3427
- /* @__PURE__ */ jsxs("span", {
3428
- className: "font-semibold",
3429
- children: [copy.errorDetails, ":"]
3430
- }),
3431
- " ",
3432
- errorDetails
3433
- ]
3434
- }) : null
3435
- ]
3483
+ }) : null
3484
+ ]
3485
+ })]
3436
3486
  });
3437
3487
  }
3438
3488
 
@@ -3507,15 +3557,15 @@ function ToolResultExternalDatasourceCard({ part, className, locale }) {
3507
3557
  const sqlQuery = toStringOrNull(part.metadata?.sql_query);
3508
3558
  const table = normalizeTable(getTableValue(part), copy);
3509
3559
  const errorDetails = formatToolErrorDetails(part.errorDetails);
3510
- const statusClass = part.state === "error" ? "text-rose-600" : part.state === "pending" ? "text-amber-600" : "text-emerald-600";
3560
+ const statusClass = part.state === "error" ? "text-danger" : part.state === "pending" ? "text-warning" : "text-success";
3511
3561
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
3512
3562
  "aria-label": `${copy.externalDatasource}: ${getUiStatusLabel(part.state, copy)}`,
3513
- className: joinClasses("w-full overflow-hidden rounded-lg border border-neutral-200 bg-white text-left font-normal text-neutral-950 transition-colors hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950", className),
3563
+ className: joinClasses("plai-tool-result-external-datasource-card w-full overflow-hidden rounded-lg border border-border bg-surface text-left font-normal text-foreground transition-colors hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", className),
3514
3564
  children: /* @__PURE__ */ jsxs("span", {
3515
3565
  className: "flex items-center gap-2 px-3 py-2 text-sm",
3516
3566
  children: [
3517
3567
  /* @__PURE__ */ jsx(Database, {
3518
- className: "h-4 w-4 shrink-0 text-neutral-500",
3568
+ className: "h-4 w-4 shrink-0 text-muted",
3519
3569
  "aria-hidden": "true"
3520
3570
  }),
3521
3571
  /* @__PURE__ */ jsx("span", {
@@ -3551,14 +3601,14 @@ function ToolResultExternalDatasourceCard({ part, className, locale }) {
3551
3601
  children: [/* @__PURE__ */ jsxs("div", {
3552
3602
  className: "flex items-center gap-2",
3553
3603
  children: [/* @__PURE__ */ jsx(Database, {
3554
- className: "h-5 w-5 text-blue-500",
3604
+ className: "h-5 w-5 text-info",
3555
3605
  "aria-hidden": "true"
3556
3606
  }), /* @__PURE__ */ jsx("h3", {
3557
3607
  className: "text-sm font-medium",
3558
3608
  children: copy.sqlQuery
3559
3609
  })]
3560
3610
  }), /* @__PURE__ */ jsx("pre", {
3561
- className: "overflow-x-auto rounded-md border border-neutral-200 bg-neutral-50 p-3 text-xs leading-5 text-neutral-800",
3611
+ className: "overflow-x-auto rounded-md border border-border bg-surface-muted p-3 text-xs leading-5 text-strong",
3562
3612
  children: sqlQuery
3563
3613
  })]
3564
3614
  }) : null,
@@ -3568,22 +3618,22 @@ function ToolResultExternalDatasourceCard({ part, className, locale }) {
3568
3618
  className: "text-sm font-medium",
3569
3619
  children: copy.queryResults
3570
3620
  }), /* @__PURE__ */ jsx("div", {
3571
- className: "overflow-x-auto rounded-md border border-neutral-200",
3621
+ className: "overflow-x-auto rounded-md border border-border",
3572
3622
  children: /* @__PURE__ */ jsxs("table", {
3573
3623
  className: "w-full border-collapse text-left text-xs",
3574
3624
  children: [/* @__PURE__ */ jsx("thead", {
3575
- className: "bg-neutral-50 text-neutral-600",
3625
+ className: "bg-surface-muted text-secondary",
3576
3626
  children: /* @__PURE__ */ jsx("tr", { children: table.columns.map((column) => /* @__PURE__ */ jsx("th", {
3577
- className: "max-w-56 truncate border-b border-neutral-200 px-3 py-2 font-medium",
3627
+ className: "max-w-56 truncate border-b border-border px-3 py-2 font-medium",
3578
3628
  title: column,
3579
3629
  children: column
3580
3630
  }, column)) })
3581
3631
  }), /* @__PURE__ */ jsx("tbody", { children: table.rows.map((row) => /* @__PURE__ */ jsx("tr", {
3582
- className: "border-b border-neutral-100 last:border-0",
3632
+ className: "border-b border-divider last:border-0",
3583
3633
  children: table.columns.map((column, columnIndex) => {
3584
3634
  const value = formatCell(row[columnIndex]);
3585
3635
  return /* @__PURE__ */ jsx("td", {
3586
- className: "max-w-56 truncate px-3 py-2 text-neutral-700",
3636
+ className: "max-w-56 truncate px-3 py-2 text-strong",
3587
3637
  title: value,
3588
3638
  children: value
3589
3639
  }, column);
@@ -3592,11 +3642,11 @@ function ToolResultExternalDatasourceCard({ part, className, locale }) {
3592
3642
  })
3593
3643
  })]
3594
3644
  }) : part.state === "completed" && !errorDetails ? /* @__PURE__ */ jsx("p", {
3595
- className: "text-sm text-neutral-600",
3645
+ className: "text-sm text-secondary",
3596
3646
  children: copy.noDataToDisplay
3597
3647
  }) : null,
3598
3648
  errorDetails ? /* @__PURE__ */ jsxs("p", {
3599
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
3649
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
3600
3650
  children: [
3601
3651
  /* @__PURE__ */ jsxs("span", {
3602
3652
  className: "font-semibold",
@@ -3632,12 +3682,12 @@ function ToolResultHttpRequestCard({ part, className, locale }) {
3632
3682
  const status = statusCode ? `${statusCode}${metadata?.status_reason ? ` ${metadata.status_reason}` : ""}` : getUiStatusLabel(part.state, copy);
3633
3683
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
3634
3684
  "aria-label": `${copy.httpRequest}: ${status}`,
3635
- className: joinClasses("w-full rounded-lg border border-neutral-200 bg-white text-left font-normal text-neutral-950 transition-colors hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950", className),
3685
+ className: joinClasses("plai-tool-result-http-request-card w-full rounded-lg border border-border bg-surface text-left font-normal text-foreground transition-colors hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", className),
3636
3686
  children: /* @__PURE__ */ jsxs("span", {
3637
3687
  className: "flex items-center gap-2 px-3 py-2 text-sm",
3638
3688
  children: [
3639
3689
  /* @__PURE__ */ jsx(Globe, {
3640
- className: "h-4 w-4 shrink-0 text-neutral-500",
3690
+ className: "h-4 w-4 shrink-0 text-muted",
3641
3691
  "aria-hidden": "true"
3642
3692
  }),
3643
3693
  /* @__PURE__ */ jsx("span", {
@@ -3645,11 +3695,11 @@ function ToolResultHttpRequestCard({ part, className, locale }) {
3645
3695
  children: metadata?.method ?? "HTTP"
3646
3696
  }),
3647
3697
  /* @__PURE__ */ jsx("span", {
3648
- className: "min-w-0 truncate text-neutral-600",
3698
+ className: "min-w-0 truncate text-secondary",
3649
3699
  children: metadata?.url ?? part.name
3650
3700
  }),
3651
3701
  /* @__PURE__ */ jsx("span", {
3652
- className: joinClasses("ml-auto shrink-0", failed ? "text-rose-600" : "text-emerald-600"),
3702
+ className: joinClasses("ml-auto shrink-0", failed ? "text-danger" : "text-success"),
3653
3703
  children: failed ? /* @__PURE__ */ jsx(XCircle, {
3654
3704
  className: "h-4 w-4",
3655
3705
  "aria-hidden": "true"
@@ -3673,25 +3723,25 @@ function ToolResultHttpRequestCard({ part, className, locale }) {
3673
3723
  className: "grid gap-2 text-sm",
3674
3724
  children: [
3675
3725
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3676
- className: "text-xs text-neutral-500",
3726
+ className: "text-xs text-muted",
3677
3727
  children: copy.status
3678
3728
  }), /* @__PURE__ */ jsx("dd", { children: status })] }),
3679
3729
  metadata?.url ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3680
- className: "text-xs text-neutral-500",
3730
+ className: "text-xs text-muted",
3681
3731
  children: copy.requestUrl
3682
3732
  }), /* @__PURE__ */ jsx("dd", {
3683
3733
  className: "break-all",
3684
3734
  children: metadata.url
3685
3735
  })] }) : null,
3686
3736
  metadata?.response_url && metadata.response_url !== metadata.url ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3687
- className: "text-xs text-neutral-500",
3737
+ className: "text-xs text-muted",
3688
3738
  children: copy.responseUrl
3689
3739
  }), /* @__PURE__ */ jsx("dd", {
3690
3740
  className: "break-all",
3691
3741
  children: metadata.response_url
3692
3742
  })] }) : null,
3693
3743
  metadata?.content_type ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3694
- className: "text-xs text-neutral-500",
3744
+ className: "text-xs text-muted",
3695
3745
  children: copy.contentType
3696
3746
  }), /* @__PURE__ */ jsx("dd", { children: metadata.content_type })] }) : null
3697
3747
  ]
@@ -3700,18 +3750,18 @@ function ToolResultHttpRequestCard({ part, className, locale }) {
3700
3750
  className: "mb-2 text-sm font-medium",
3701
3751
  children: copy.response
3702
3752
  }), /* @__PURE__ */ jsx("pre", {
3703
- className: "overflow-x-auto rounded-md border border-neutral-200 bg-neutral-50 p-3 text-xs leading-5",
3753
+ className: "overflow-x-auto rounded-md border border-border bg-surface-muted p-3 text-xs leading-5",
3704
3754
  children: response
3705
3755
  })] }) : null,
3706
3756
  metadata?.response_headers && Object.keys(metadata.response_headers).length ? /* @__PURE__ */ jsxs("details", { children: [/* @__PURE__ */ jsx("summary", {
3707
3757
  className: "cursor-pointer text-sm font-medium",
3708
3758
  children: copy.responseHeaders
3709
3759
  }), /* @__PURE__ */ jsx("pre", {
3710
- className: "mt-2 overflow-x-auto rounded-md border border-neutral-200 bg-neutral-50 p-3 text-xs",
3760
+ className: "mt-2 overflow-x-auto rounded-md border border-border bg-surface-muted p-3 text-xs",
3711
3761
  children: JSON.stringify(metadata.response_headers, null, 2)
3712
3762
  })] }) : null,
3713
3763
  errorDetails ? /* @__PURE__ */ jsxs("p", {
3714
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
3764
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
3715
3765
  children: [
3716
3766
  /* @__PURE__ */ jsxs("span", {
3717
3767
  className: "font-semibold",
@@ -3747,12 +3797,12 @@ function ToolResultMcpCard({ part, className, locale }) {
3747
3797
  const failed = part.state === "error";
3748
3798
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
3749
3799
  "aria-label": `${copy.mcpTool}: ${tool}`,
3750
- className: joinClasses("w-full rounded-lg border border-neutral-200 bg-white text-left font-normal text-neutral-950 transition-colors hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950", className),
3800
+ className: joinClasses("plai-tool-result-mcp-card w-full rounded-lg border border-border bg-surface text-left font-normal text-foreground transition-colors hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", className),
3751
3801
  children: /* @__PURE__ */ jsxs("span", {
3752
3802
  className: "flex items-center gap-2 px-3 py-2 text-sm",
3753
3803
  children: [
3754
3804
  /* @__PURE__ */ jsx(Plug, {
3755
- className: "h-4 w-4 shrink-0 text-neutral-500",
3805
+ className: "h-4 w-4 shrink-0 text-muted",
3756
3806
  "aria-hidden": "true"
3757
3807
  }),
3758
3808
  /* @__PURE__ */ jsx("span", {
@@ -3760,11 +3810,11 @@ function ToolResultMcpCard({ part, className, locale }) {
3760
3810
  children: "MCP"
3761
3811
  }),
3762
3812
  /* @__PURE__ */ jsx("span", {
3763
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
3813
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
3764
3814
  children: tool
3765
3815
  }),
3766
3816
  /* @__PURE__ */ jsx("span", {
3767
- className: joinClasses("ml-auto shrink-0", failed ? "text-rose-600" : "text-emerald-600"),
3817
+ className: joinClasses("ml-auto shrink-0", failed ? "text-danger" : "text-success"),
3768
3818
  children: failed ? /* @__PURE__ */ jsx(XCircle, {
3769
3819
  className: "h-4 w-4",
3770
3820
  "aria-hidden": "true"
@@ -3787,10 +3837,10 @@ function ToolResultMcpCard({ part, className, locale }) {
3787
3837
  /* @__PURE__ */ jsxs("dl", {
3788
3838
  className: "grid gap-2 text-sm",
3789
3839
  children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3790
- className: "text-xs text-neutral-500",
3840
+ className: "text-xs text-muted",
3791
3841
  children: copy.tool
3792
3842
  }), /* @__PURE__ */ jsx("dd", { children: tool })] }), server ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3793
- className: "text-xs text-neutral-500",
3843
+ className: "text-xs text-muted",
3794
3844
  children: copy.server
3795
3845
  }), /* @__PURE__ */ jsx("dd", {
3796
3846
  className: "break-all",
@@ -3801,11 +3851,11 @@ function ToolResultMcpCard({ part, className, locale }) {
3801
3851
  className: "mb-2 text-sm font-medium",
3802
3852
  children: copy.result
3803
3853
  }), /* @__PURE__ */ jsx("pre", {
3804
- className: "overflow-x-auto rounded-md border border-neutral-200 bg-neutral-50 p-3 text-xs leading-5",
3854
+ className: "overflow-x-auto rounded-md border border-border bg-surface-muted p-3 text-xs leading-5",
3805
3855
  children: result
3806
3856
  })] }) : null,
3807
3857
  error ? /* @__PURE__ */ jsxs("p", {
3808
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
3858
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
3809
3859
  children: [
3810
3860
  /* @__PURE__ */ jsxs("span", {
3811
3861
  className: "font-semibold",
@@ -3877,7 +3927,7 @@ function FileDownloadButton({ file, label, copy, className }) {
3877
3927
  className: "ml-auto flex shrink-0 items-center gap-2",
3878
3928
  children: [state === "error" ? /* @__PURE__ */ jsx("span", {
3879
3929
  role: "alert",
3880
- className: "text-xs text-rose-600",
3930
+ className: "text-xs text-danger",
3881
3931
  children: copy.downloadFailed
3882
3932
  }) : null, /* @__PURE__ */ jsx("button", {
3883
3933
  type: "button",
@@ -3885,7 +3935,7 @@ function FileDownloadButton({ file, label, copy, className }) {
3885
3935
  disabled: isDownloading,
3886
3936
  "aria-label": `${isDownloading ? copy.downloading : copy.download}: ${label}`,
3887
3937
  title: isDownloading ? copy.downloading : copy.download,
3888
- className: joinClasses("inline-flex h-8 w-8 items-center justify-center rounded-md border border-neutral-200 bg-white text-neutral-700 transition-colors hover:bg-neutral-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950 disabled:cursor-wait disabled:opacity-60", className),
3938
+ className: joinClasses("inline-flex h-8 w-8 items-center justify-center rounded-md border border-border bg-surface text-strong transition-colors hover:bg-surface-subtle focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-wait disabled:opacity-60", className),
3889
3939
  children: isDownloading ? /* @__PURE__ */ jsx(LoaderCircle, {
3890
3940
  className: "h-4 w-4 animate-spin",
3891
3941
  "aria-hidden": "true"
@@ -3914,14 +3964,14 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
3914
3964
  const files = getFiles(part);
3915
3965
  const errorDetails = formatToolErrorDetails(part.errorDetails);
3916
3966
  const fileLabel = files.length === 1 ? copy.file : copy.files;
3917
- const statusClass = part.state === "error" ? "text-rose-600" : part.state === "pending" ? "text-amber-600" : "text-emerald-600";
3967
+ const statusClass = part.state === "error" ? "text-danger" : part.state === "pending" ? "text-warning" : "text-success";
3918
3968
  const singleFile = part.state === "completed" && files.length === 1 && !errorDetails ? files[0] : void 0;
3919
3969
  if (singleFile) {
3920
3970
  const extension = getExtension(singleFile);
3921
3971
  const label = getLabel(singleFile);
3922
3972
  return /* @__PURE__ */ jsxs("section", {
3923
3973
  "aria-label": `${copy.officeDocuments}: ${label}`,
3924
- className: joinClasses("flex w-full items-center gap-3 overflow-hidden rounded-lg border border-neutral-200 bg-white px-3 py-2 text-left font-normal text-neutral-950", className),
3974
+ className: joinClasses("plai-tool-result-office-documents-card flex w-full items-center gap-3 overflow-hidden rounded-lg border border-border bg-surface px-3 py-2 text-left font-normal text-foreground", className),
3925
3975
  children: [
3926
3976
  /* @__PURE__ */ jsx(File, {
3927
3977
  className: joinClasses("h-6 w-6 shrink-0", getFileIconClass(extension)),
@@ -3933,7 +3983,7 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
3933
3983
  className: "truncate text-sm font-medium",
3934
3984
  children: label
3935
3985
  }), /* @__PURE__ */ jsxs("p", {
3936
- className: "truncate text-[11px] text-neutral-500",
3986
+ className: "truncate text-[11px] text-muted",
3937
3987
  children: [copy.officeDocuments, extension ? ` · ${extension.toUpperCase()}` : null]
3938
3988
  })]
3939
3989
  }),
@@ -3945,7 +3995,7 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
3945
3995
  label,
3946
3996
  copy
3947
3997
  }) : /* @__PURE__ */ jsx(CheckCircle2, {
3948
- className: "ml-auto h-4 w-4 shrink-0 text-emerald-600",
3998
+ className: "ml-auto h-4 w-4 shrink-0 text-success",
3949
3999
  "aria-hidden": "true"
3950
4000
  })
3951
4001
  ]
@@ -3953,12 +4003,12 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
3953
4003
  }
3954
4004
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
3955
4005
  "aria-label": `${copy.officeDocuments}: ${files.length} ${fileLabel}`,
3956
- className: joinClasses("w-full overflow-hidden rounded-lg border border-neutral-200 bg-white text-left font-normal text-neutral-950 transition-colors hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950", className),
4006
+ className: joinClasses("plai-tool-result-office-documents-card w-full overflow-hidden rounded-lg border border-border bg-surface text-left font-normal text-foreground transition-colors hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", className),
3957
4007
  children: /* @__PURE__ */ jsxs("span", {
3958
4008
  className: "flex items-center gap-2 px-3 py-2 text-sm",
3959
4009
  children: [
3960
4010
  /* @__PURE__ */ jsx(FileText, {
3961
- className: "h-4 w-4 shrink-0 text-neutral-500",
4011
+ className: "h-4 w-4 shrink-0 text-muted",
3962
4012
  "aria-hidden": "true"
3963
4013
  }),
3964
4014
  /* @__PURE__ */ jsx("span", {
@@ -3966,7 +4016,7 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
3966
4016
  children: copy.officeDocuments
3967
4017
  }),
3968
4018
  /* @__PURE__ */ jsx("span", {
3969
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
4019
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
3970
4020
  children: part.state === "pending" ? copy.pending : `${files.length} ${fileLabel}`
3971
4021
  }),
3972
4022
  /* @__PURE__ */ jsx("span", {
@@ -3994,7 +4044,7 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
3994
4044
  const extension = getExtension(file);
3995
4045
  const label = getLabel(file);
3996
4046
  return /* @__PURE__ */ jsxs("div", {
3997
- className: "flex items-center gap-3 rounded-lg border border-neutral-200 bg-white p-3",
4047
+ className: "flex items-center gap-3 rounded-lg border border-border bg-surface p-3",
3998
4048
  children: [
3999
4049
  /* @__PURE__ */ jsx(File, {
4000
4050
  className: joinClasses("h-8 w-8 shrink-0", getFileIconClass(extension)),
@@ -4006,7 +4056,7 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
4006
4056
  className: "truncate text-sm font-medium",
4007
4057
  children: label
4008
4058
  }), extension ? /* @__PURE__ */ jsx("p", {
4009
- className: "text-[11px] uppercase text-neutral-500",
4059
+ className: "text-[11px] uppercase text-muted",
4010
4060
  children: extension
4011
4061
  }) : null]
4012
4062
  }),
@@ -4022,15 +4072,15 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
4022
4072
  }, file.id);
4023
4073
  }),
4024
4074
  files.length === 0 && part.state === "pending" ? /* @__PURE__ */ jsx("p", {
4025
- className: "text-sm text-neutral-600",
4075
+ className: "text-sm text-secondary",
4026
4076
  children: copy.creatingDocuments
4027
4077
  }) : null,
4028
4078
  files.length === 0 && part.state === "completed" && !errorDetails ? /* @__PURE__ */ jsx("p", {
4029
- className: "text-sm text-neutral-600",
4079
+ className: "text-sm text-secondary",
4030
4080
  children: copy.noFilesGenerated
4031
4081
  }) : null,
4032
4082
  errorDetails ? /* @__PURE__ */ jsxs("p", {
4033
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
4083
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
4034
4084
  children: [
4035
4085
  /* @__PURE__ */ jsxs("span", {
4036
4086
  className: "font-semibold",
@@ -4824,11 +4874,11 @@ function statusLabel(status, copy) {
4824
4874
  return key ? copy[key] : null;
4825
4875
  }
4826
4876
  const BADGE_TONE = {
4827
- pending: "border-amber-200 bg-amber-50 text-amber-800",
4877
+ pending: "border-warning-border bg-warning-subtle text-warning-strong",
4828
4878
  executing: "border-sky-200 bg-sky-50 text-sky-800",
4829
- executed: "border-emerald-200 bg-emerald-50 text-emerald-800",
4830
- failed: "border-rose-200 bg-rose-50 text-rose-800",
4831
- unknown: "border-amber-300 bg-amber-50 text-amber-900"
4879
+ executed: "border-success-border bg-success-subtle text-success-strong",
4880
+ failed: "border-danger-border bg-danger-subtle text-danger-strong",
4881
+ unknown: "border-warning-border bg-warning-subtle text-warning-strong"
4832
4882
  };
4833
4883
  /** Header badge of a held action: "Awaiting your confirmation" or its outcome. */
4834
4884
  function ConfirmationBadge({ state, copy }) {
@@ -4836,7 +4886,7 @@ function ConfirmationBadge({ state, copy }) {
4836
4886
  const label = status === "pending" ? copy.awaitingConfirmation : statusLabel(status, copy);
4837
4887
  const Icon = status === "executed" ? CheckCircle2 : status === "failed" ? XCircle : status === "executing" ? LoaderCircle : Clock;
4838
4888
  return /* @__PURE__ */ jsxs("span", {
4839
- className: joinClasses("ml-auto inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 font-medium", BADGE_TONE[status] ?? "border-neutral-200 bg-neutral-50 text-neutral-700"),
4889
+ className: joinClasses("ml-auto inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 font-medium", BADGE_TONE[status] ?? "border-border bg-surface-muted text-strong"),
4840
4890
  "data-confirmation-status": status,
4841
4891
  children: [/* @__PURE__ */ jsx(Icon, {
4842
4892
  className: joinClasses("h-3 w-3", status === "executing" ? "animate-spin" : void 0),
@@ -4860,18 +4910,18 @@ function PendingConfirmationFooter({ pending, toolConfirmation, copy }) {
4860
4910
  const [sending, setSending] = useState(null);
4861
4911
  const [failed, setFailed] = useState(false);
4862
4912
  if (!toolConfirmation) return /* @__PURE__ */ jsx("p", {
4863
- className: "border-t border-amber-100 bg-amber-50/60 px-3 py-2 text-xs text-neutral-700",
4913
+ className: "border-t border-border bg-warning-subtle/60 px-3 py-2 text-xs text-strong",
4864
4914
  children: copy.confirmHint
4865
4915
  });
4866
4916
  if (!state) return /* @__PURE__ */ jsx("p", {
4867
- className: "border-t border-neutral-100 bg-neutral-50 px-3 py-2 text-xs text-neutral-500",
4917
+ className: "border-t border-divider bg-surface-muted px-3 py-2 text-xs text-muted",
4868
4918
  "aria-live": "polite",
4869
4919
  children: copy.verifying
4870
4920
  });
4871
4921
  if (state.status !== "pending") {
4872
4922
  const label = statusLabel(state.status, copy);
4873
4923
  return label ? /* @__PURE__ */ jsxs("p", {
4874
- className: "border-t border-neutral-100 bg-neutral-50 px-3 py-2 text-xs text-neutral-700",
4924
+ className: "border-t border-divider bg-surface-muted px-3 py-2 text-xs text-strong",
4875
4925
  "aria-live": "polite",
4876
4926
  children: [label, state.status === "failed" && state.error ? `: ${state.error}` : null]
4877
4927
  }) : null;
@@ -4895,14 +4945,14 @@ function PendingConfirmationFooter({ pending, toolConfirmation, copy }) {
4895
4945
  const expiry = expiryText(state, toolConfirmation.states.serverOffsetMs, now, copy);
4896
4946
  const unavailable = state.error === "tool_unavailable";
4897
4947
  return /* @__PURE__ */ jsxs("div", {
4898
- className: "flex flex-wrap items-center gap-2 border-t border-amber-100 bg-amber-50/60 px-3 py-2",
4948
+ className: "flex flex-wrap items-center gap-2 border-t border-border bg-warning-subtle/60 px-3 py-2",
4899
4949
  "data-confirmation-actions": pending.action_id,
4900
4950
  children: [
4901
4951
  state.canConfirm ? /* @__PURE__ */ jsxs("button", {
4902
4952
  type: "button",
4903
4953
  disabled,
4904
4954
  onClick: () => void decide("confirm"),
4905
- className: joinClasses("inline-flex items-center rounded-md px-3 py-1.5 text-xs font-medium text-white disabled:opacity-50", destructive ? "bg-rose-600 hover:bg-rose-700" : "bg-neutral-900 hover:bg-neutral-800"),
4955
+ className: joinClasses("inline-flex items-center rounded-md px-3 py-1.5 text-xs font-medium text-inverse-foreground disabled:opacity-50", destructive ? "bg-danger hover:bg-danger-strong" : "bg-inverse hover:bg-inverse-hover"),
4906
4956
  children: [sending === "confirm" ? /* @__PURE__ */ jsx(LoaderCircle, {
4907
4957
  className: "mr-2 size-3 animate-spin",
4908
4958
  "aria-hidden": "true"
@@ -4912,14 +4962,14 @@ function PendingConfirmationFooter({ pending, toolConfirmation, copy }) {
4912
4962
  type: "button",
4913
4963
  disabled,
4914
4964
  onClick: () => void decide("reject"),
4915
- className: "inline-flex items-center rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-xs font-medium text-neutral-800 hover:bg-neutral-50 disabled:opacity-50",
4965
+ className: "inline-flex items-center rounded-md border border-border-strong bg-surface px-3 py-1.5 text-xs font-medium text-strong hover:bg-surface-muted disabled:opacity-50",
4916
4966
  children: [sending === "reject" ? /* @__PURE__ */ jsx(LoaderCircle, {
4917
4967
  className: "mr-2 size-3 animate-spin",
4918
4968
  "aria-hidden": "true"
4919
4969
  }) : null, sending === "reject" ? copy.cancelling : copy.cancel]
4920
4970
  }) : null,
4921
4971
  /* @__PURE__ */ jsx("span", {
4922
- className: "ml-auto text-xs text-neutral-600",
4972
+ className: "ml-auto text-xs text-secondary",
4923
4973
  "aria-live": "polite",
4924
4974
  children: failed ? copy.decisionError : unavailable ? copy.toolUnavailable : expiry
4925
4975
  })
@@ -5054,7 +5104,7 @@ function ExternalAnchor({ href, className, children, label }) {
5054
5104
  target: "_blank",
5055
5105
  rel: "noreferrer noopener",
5056
5106
  "aria-label": label,
5057
- className: joinClasses("inline-flex items-center gap-1 text-xs font-medium text-neutral-700 hover:text-neutral-950 hover:underline", className),
5107
+ className: joinClasses("inline-flex items-center gap-1 text-xs font-medium text-strong hover:text-muted", className),
5058
5108
  children
5059
5109
  });
5060
5110
  }
@@ -5063,7 +5113,7 @@ function ShowAllToggle({ total, expanded, onToggle, copy }) {
5063
5113
  return /* @__PURE__ */ jsx("button", {
5064
5114
  type: "button",
5065
5115
  onClick: onToggle,
5066
- className: "w-full border-t border-neutral-200 px-3 py-2 text-left text-xs font-medium text-neutral-600 hover:bg-neutral-50 hover:text-neutral-950",
5116
+ className: "w-full border-t border-border px-3 py-2 text-left text-xs font-medium text-secondary hover:bg-surface-muted hover:text-foreground",
5067
5117
  children: expanded ? copy.showLess : fillCopy(copy.showAll, { count: total })
5068
5118
  });
5069
5119
  }
@@ -5074,24 +5124,24 @@ function MailRow({ message, locale, copy }) {
5074
5124
  children: [
5075
5125
  /* @__PURE__ */ jsx("span", {
5076
5126
  "aria-label": message.unread ? copy.unread : void 0,
5077
- className: joinClasses("h-2 w-2 shrink-0 self-center rounded-full", message.unread ? "bg-blue-600" : "bg-transparent")
5127
+ className: joinClasses("h-2 w-2 shrink-0 self-center rounded-full", message.unread ? "bg-info" : "bg-transparent")
5078
5128
  }),
5079
5129
  /* @__PURE__ */ jsx("span", {
5080
- className: joinClasses("min-w-0 flex-1 truncate text-sm", message.unread ? "font-semibold text-neutral-950" : "text-neutral-800"),
5130
+ className: joinClasses("min-w-0 flex-1 truncate text-sm", message.unread ? "font-semibold text-foreground" : "text-strong"),
5081
5131
  children: displayName(message.from) ?? "—"
5082
5132
  }),
5083
5133
  /* @__PURE__ */ jsx("span", {
5084
- className: "shrink-0 text-xs text-neutral-500",
5134
+ className: "shrink-0 text-xs text-muted",
5085
5135
  children: formatMailDate(message.date, locale)
5086
5136
  })
5087
5137
  ]
5088
5138
  }),
5089
5139
  /* @__PURE__ */ jsx("p", {
5090
- className: joinClasses("truncate pl-4 text-sm", message.unread ? "font-medium text-neutral-950" : "text-neutral-700"),
5140
+ className: joinClasses("truncate pl-4 text-sm", message.unread ? "font-medium text-foreground" : "text-strong"),
5091
5141
  children: text(message.subject) ?? copy.noSubject
5092
5142
  }),
5093
5143
  text(message.snippet) ? /* @__PURE__ */ jsx("p", {
5094
- className: "line-clamp-1 pl-4 text-xs text-neutral-500",
5144
+ className: "line-clamp-1 pl-4 text-xs text-muted",
5095
5145
  children: message.snippet
5096
5146
  }) : null
5097
5147
  ] });
@@ -5100,7 +5150,7 @@ function MailRow({ message, locale, copy }) {
5100
5150
  href: message.link,
5101
5151
  target: "_blank",
5102
5152
  rel: "noreferrer noopener",
5103
- className: joinClasses(className, "hover:bg-neutral-50"),
5153
+ className: joinClasses(className, "hover:bg-surface-muted"),
5104
5154
  children: content
5105
5155
  }) : /* @__PURE__ */ jsx("div", {
5106
5156
  className,
@@ -5110,11 +5160,11 @@ function MailRow({ message, locale, copy }) {
5110
5160
  function MailList({ messages, locale, copy }) {
5111
5161
  const [expanded, setExpanded] = useState(false);
5112
5162
  if (messages.length === 0) return /* @__PURE__ */ jsx("p", {
5113
- className: "px-3 py-3 text-sm text-neutral-600",
5163
+ className: "px-3 py-3 text-sm text-secondary",
5114
5164
  children: copy.noEmails
5115
5165
  });
5116
5166
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("ul", {
5117
- className: "divide-y divide-neutral-100",
5167
+ className: "divide-y divide-divider",
5118
5168
  children: (expanded ? messages : messages.slice(0, COLLAPSED_ITEMS)).map((message) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(MailRow, {
5119
5169
  message,
5120
5170
  locale,
@@ -5139,13 +5189,13 @@ function MailMessageView({ message, connector, locale, copy }) {
5139
5189
  className: "space-y-1",
5140
5190
  children: [
5141
5191
  /* @__PURE__ */ jsx("h4", {
5142
- className: "text-sm font-semibold text-neutral-950",
5192
+ className: "text-sm font-semibold text-foreground",
5143
5193
  children: text(message.subject) ?? copy.noSubject
5144
5194
  }),
5145
5195
  /* @__PURE__ */ jsxs("div", {
5146
- className: "flex items-baseline gap-2 text-xs text-neutral-600",
5196
+ className: "flex items-baseline gap-2 text-xs text-secondary",
5147
5197
  children: [/* @__PURE__ */ jsx("span", {
5148
- className: "min-w-0 flex-1 truncate font-medium text-neutral-800",
5198
+ className: "min-w-0 flex-1 truncate font-medium text-strong",
5149
5199
  children: message.from ?? "—"
5150
5200
  }), /* @__PURE__ */ jsx("span", {
5151
5201
  className: "shrink-0",
@@ -5153,7 +5203,7 @@ function MailMessageView({ message, connector, locale, copy }) {
5153
5203
  })]
5154
5204
  }),
5155
5205
  text(message.to) ? /* @__PURE__ */ jsxs("p", {
5156
- className: "truncate text-xs text-neutral-500",
5206
+ className: "truncate text-xs text-muted",
5157
5207
  children: [
5158
5208
  copy.to,
5159
5209
  ": ",
@@ -5161,7 +5211,7 @@ function MailMessageView({ message, connector, locale, copy }) {
5161
5211
  ]
5162
5212
  }) : null,
5163
5213
  text(message.cc) ? /* @__PURE__ */ jsxs("p", {
5164
- className: "truncate text-xs text-neutral-500",
5214
+ className: "truncate text-xs text-muted",
5165
5215
  children: [
5166
5216
  copy.cc,
5167
5217
  ": ",
@@ -5171,7 +5221,7 @@ function MailMessageView({ message, connector, locale, copy }) {
5171
5221
  ]
5172
5222
  }),
5173
5223
  shownBody ? /* @__PURE__ */ jsx("p", {
5174
- className: "whitespace-pre-wrap break-words text-sm leading-6 text-neutral-800",
5224
+ className: "whitespace-pre-wrap break-words text-sm leading-6 text-strong",
5175
5225
  children: shownBody
5176
5226
  }) : null,
5177
5227
  /* @__PURE__ */ jsxs("div", {
@@ -5179,11 +5229,11 @@ function MailMessageView({ message, connector, locale, copy }) {
5179
5229
  children: [long ? /* @__PURE__ */ jsx("button", {
5180
5230
  type: "button",
5181
5231
  onClick: () => setExpanded((value) => !value),
5182
- className: "text-xs font-medium text-neutral-600 hover:text-neutral-950",
5232
+ className: "text-xs font-medium text-secondary hover:text-foreground",
5183
5233
  children: expanded ? copy.showLess : copy.showMore
5184
5234
  }) : null, message.link ? /* @__PURE__ */ jsxs(ExternalAnchor, {
5185
5235
  href: message.link,
5186
- children: [fillCopy(copy.openIn, { service: connector?.label ?? "" }), /* @__PURE__ */ jsx(ExternalLink, {
5236
+ children: [fillCopy(copy.openIn, { service: connector?.label ?? "" }), /* @__PURE__ */ jsx(ArrowUpRight, {
5187
5237
  className: "h-3 w-3",
5188
5238
  "aria-hidden": "true"
5189
5239
  })]
@@ -5223,7 +5273,7 @@ function EventRow({ event, locale, copy }) {
5223
5273
  className: "flex gap-3 px-3 py-2",
5224
5274
  children: [
5225
5275
  /* @__PURE__ */ jsx("span", {
5226
- className: "w-24 shrink-0 pt-0.5 text-xs tabular-nums text-neutral-600",
5276
+ className: "w-24 shrink-0 pt-0.5 text-xs tabular-nums text-secondary",
5227
5277
  children: eventTime(event, locale, copy)
5228
5278
  }),
5229
5279
  /* @__PURE__ */ jsxs("div", {
@@ -5232,13 +5282,13 @@ function EventRow({ event, locale, copy }) {
5232
5282
  href: event.link,
5233
5283
  target: "_blank",
5234
5284
  rel: "noreferrer noopener",
5235
- className: "block truncate text-sm font-medium text-neutral-950 hover:underline",
5285
+ className: "block truncate text-sm font-medium text-foreground hover:underline",
5236
5286
  children: text(event.title) ?? copy.noSubject
5237
5287
  }) : /* @__PURE__ */ jsx("p", {
5238
- className: "truncate text-sm font-medium text-neutral-950",
5288
+ className: "truncate text-sm font-medium text-foreground",
5239
5289
  children: text(event.title) ?? copy.noSubject
5240
5290
  }), details.length > 0 ? /* @__PURE__ */ jsx("p", {
5241
- className: "truncate text-xs text-neutral-500",
5291
+ className: "truncate text-xs text-muted",
5242
5292
  children: details.join(" · ")
5243
5293
  }) : null]
5244
5294
  }),
@@ -5256,7 +5306,7 @@ function EventRow({ event, locale, copy }) {
5256
5306
  function Agenda({ events, locale, copy }) {
5257
5307
  const [expanded, setExpanded] = useState(false);
5258
5308
  if (events.length === 0) return /* @__PURE__ */ jsx("p", {
5259
- className: "px-3 py-3 text-sm text-neutral-600",
5309
+ className: "px-3 py-3 text-sm text-secondary",
5260
5310
  children: copy.noEvents
5261
5311
  });
5262
5312
  const visible = expanded ? events : events.slice(0, COLLAPSED_ITEMS);
@@ -5266,12 +5316,12 @@ function Agenda({ events, locale, copy }) {
5266
5316
  month: "long"
5267
5317
  });
5268
5318
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
5269
- className: "divide-y divide-neutral-100",
5319
+ className: "divide-y divide-divider",
5270
5320
  children: groupByDay(visible).map((group, index) => /* @__PURE__ */ jsxs("section", { children: [group.day ? /* @__PURE__ */ jsx("h4", {
5271
- className: "bg-neutral-50 px-3 py-1 text-xs font-medium capitalize text-neutral-600",
5321
+ className: "bg-surface-muted px-3 py-1 text-xs font-medium capitalize text-secondary",
5272
5322
  children: dayFormat.format(group.day)
5273
5323
  }) : null, /* @__PURE__ */ jsx("ul", {
5274
- className: "divide-y divide-neutral-100",
5324
+ className: "divide-y divide-divider",
5275
5325
  children: group.events.map((event) => /* @__PURE__ */ jsx(EventRow, {
5276
5326
  event,
5277
5327
  locale,
@@ -5292,12 +5342,12 @@ function CollapsibleBody({ body, copy }) {
5292
5342
  return /* @__PURE__ */ jsxs("div", {
5293
5343
  className: "space-y-1",
5294
5344
  children: [/* @__PURE__ */ jsx("p", {
5295
- className: "whitespace-pre-wrap break-words text-sm leading-6 text-neutral-800",
5345
+ className: "whitespace-pre-wrap break-words text-sm leading-6 text-strong",
5296
5346
  children: long && !expanded ? `${body.slice(0, COLLAPSED_BODY_CHARS).trimEnd()}…` : body
5297
5347
  }), long ? /* @__PURE__ */ jsx("button", {
5298
5348
  type: "button",
5299
5349
  onClick: () => setExpanded((value) => !value),
5300
- className: "text-xs font-medium text-neutral-600 hover:text-neutral-950",
5350
+ className: "text-xs font-medium text-secondary hover:text-foreground",
5301
5351
  children: expanded ? copy.showLess : copy.showMore
5302
5352
  }) : null]
5303
5353
  });
@@ -5310,15 +5360,15 @@ function DraftView({ view, copy }) {
5310
5360
  className: "space-y-1",
5311
5361
  children: [
5312
5362
  /* @__PURE__ */ jsx("p", {
5313
- className: "text-sm font-medium text-neutral-950",
5363
+ className: "text-sm font-medium text-foreground",
5314
5364
  children: copy.draftSaved
5315
5365
  }),
5316
5366
  view.subject ? /* @__PURE__ */ jsx("p", {
5317
- className: "truncate text-sm text-neutral-800",
5367
+ className: "truncate text-sm text-strong",
5318
5368
  children: view.subject
5319
5369
  }) : null,
5320
5370
  view.to.length > 0 ? /* @__PURE__ */ jsxs("p", {
5321
- className: "truncate text-xs text-neutral-500",
5371
+ className: "truncate text-xs text-muted",
5322
5372
  children: [
5323
5373
  copy.to,
5324
5374
  ": ",
@@ -5333,7 +5383,7 @@ function DraftView({ view, copy }) {
5333
5383
  }),
5334
5384
  view.link ? /* @__PURE__ */ jsxs(ExternalAnchor, {
5335
5385
  href: view.link,
5336
- children: [copy.openDraft, /* @__PURE__ */ jsx(ExternalLink, {
5386
+ children: [copy.openDraft, /* @__PURE__ */ jsx(ArrowUpRight, {
5337
5387
  className: "h-3 w-3",
5338
5388
  "aria-hidden": "true"
5339
5389
  })]
@@ -5348,10 +5398,10 @@ function Field({ label, children }) {
5348
5398
  return /* @__PURE__ */ jsxs("div", {
5349
5399
  className: "flex gap-3 text-sm",
5350
5400
  children: [/* @__PURE__ */ jsx("dt", {
5351
- className: "w-24 shrink-0 text-xs leading-5 text-neutral-500",
5401
+ className: "w-24 shrink-0 text-xs leading-5 text-muted",
5352
5402
  children: label
5353
5403
  }), /* @__PURE__ */ jsx("dd", {
5354
- className: "min-w-0 flex-1 break-words text-neutral-900",
5404
+ className: "min-w-0 flex-1 break-words text-foreground",
5355
5405
  children
5356
5406
  })]
5357
5407
  });
@@ -5384,11 +5434,11 @@ function PendingMailView({ pending, copy }) {
5384
5434
  ]
5385
5435
  }),
5386
5436
  text(mail.reply_to_message_id) ? /* @__PURE__ */ jsx("p", {
5387
- className: "text-xs text-neutral-500",
5437
+ className: "text-xs text-muted",
5388
5438
  children: copy.replyInThread
5389
5439
  }) : null,
5390
5440
  /* @__PURE__ */ jsx("div", {
5391
- className: "rounded-md border border-neutral-200 bg-neutral-50 px-3 py-2",
5441
+ className: "rounded-md border border-border bg-surface-muted px-3 py-2",
5392
5442
  children: /* @__PURE__ */ jsx(CollapsibleBody, {
5393
5443
  body: text(mail.body),
5394
5444
  copy
@@ -5420,7 +5470,7 @@ function Change({ before, after }) {
5420
5470
  className: "flex flex-wrap items-baseline gap-x-2",
5421
5471
  children: [
5422
5472
  /* @__PURE__ */ jsx("span", {
5423
- className: "text-neutral-500 line-through",
5473
+ className: "text-muted line-through",
5424
5474
  children: before
5425
5475
  }),
5426
5476
  /* @__PURE__ */ jsx("span", {
@@ -5439,19 +5489,19 @@ function PendingEventView({ operation, pending, locale, copy }) {
5439
5489
  className: "space-y-1 px-3 py-3",
5440
5490
  children: [
5441
5491
  /* @__PURE__ */ jsx("p", {
5442
- className: "text-xs font-medium uppercase tracking-wide text-rose-700",
5492
+ className: "text-xs font-medium capitalize tracking-wide text-danger-strong",
5443
5493
  children: copy.deleteEvent
5444
5494
  }),
5445
5495
  /* @__PURE__ */ jsx("p", {
5446
- className: "text-sm font-medium text-neutral-900 line-through",
5496
+ className: "text-sm font-medium text-foreground line-through",
5447
5497
  children: text(current?.title) ?? text(action.event_id) ?? copy.noSubject
5448
5498
  }),
5449
5499
  current ? /* @__PURE__ */ jsx("p", {
5450
- className: "text-xs text-neutral-500",
5500
+ className: "text-xs text-muted",
5451
5501
  children: formatRange(current.start, current.end, Boolean(current.all_day), locale, copy)
5452
5502
  }) : null,
5453
5503
  (current?.attendees?.length ?? 0) > 0 ? /* @__PURE__ */ jsx("p", {
5454
- className: "pt-1 text-xs text-neutral-600",
5504
+ className: "pt-1 text-xs text-secondary",
5455
5505
  children: copy.attendeesNotified
5456
5506
  }) : null
5457
5507
  ]
@@ -5466,7 +5516,7 @@ function PendingEventView({ operation, pending, locale, copy }) {
5466
5516
  className: "space-y-2 px-3 py-3",
5467
5517
  children: [
5468
5518
  /* @__PURE__ */ jsx("p", {
5469
- className: "text-xs font-medium uppercase tracking-wide text-neutral-500",
5519
+ className: "text-xs font-medium capitalize tracking-wide text-muted",
5470
5520
  children: isUpdate ? copy.eventChange : copy.newEvent
5471
5521
  }),
5472
5522
  /* @__PURE__ */ jsxs("dl", {
@@ -5519,7 +5569,7 @@ function PendingEventView({ operation, pending, locale, copy }) {
5519
5569
  ]
5520
5570
  }),
5521
5571
  attendees.length > 0 ? /* @__PURE__ */ jsx("p", {
5522
- className: "text-xs text-neutral-600",
5572
+ className: "text-xs text-secondary",
5523
5573
  children: copy.attendeesNotified
5524
5574
  }) : null
5525
5575
  ]
@@ -5541,24 +5591,24 @@ function ToolResultPersonalConnectorCard({ part, locale, className, toolConfirma
5541
5591
  const total = headerCount(view, copy);
5542
5592
  const isPending = view.kind === "pending-mail" || view.kind === "pending-event";
5543
5593
  return /* @__PURE__ */ jsxs("section", {
5544
- className: joinClasses("plai-tool-result-personal-connector-card overflow-hidden rounded-lg border border-neutral-200 bg-white text-neutral-950", className),
5594
+ className: joinClasses("plai-tool-result-personal-connector-card overflow-hidden rounded-lg border border-border bg-surface text-foreground", className),
5545
5595
  "data-tool-call-id": part.id,
5546
5596
  "data-tool-call-state": part.state,
5547
5597
  "data-connector-action": view.kind,
5548
5598
  children: [
5549
5599
  /* @__PURE__ */ jsxs("header", {
5550
- className: "flex items-center gap-2 border-b border-neutral-200 px-3 py-2 text-xs text-neutral-600",
5600
+ className: "flex items-center gap-2 border-b border-border px-3 py-2 text-xs text-secondary",
5551
5601
  children: [
5552
5602
  /* @__PURE__ */ jsx(Icon, {
5553
- className: "h-4 w-4 shrink-0 text-neutral-700",
5603
+ className: "h-4 w-4 shrink-0 text-strong",
5554
5604
  "aria-hidden": "true"
5555
5605
  }),
5556
5606
  /* @__PURE__ */ jsx("span", {
5557
- className: "shrink-0 font-medium text-neutral-900",
5607
+ className: "shrink-0 font-medium text-foreground",
5558
5608
  children: connector?.label
5559
5609
  }),
5560
5610
  connector?.account_email ? /* @__PURE__ */ jsx("span", {
5561
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
5611
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
5562
5612
  children: connector.account_email
5563
5613
  }) : null,
5564
5614
  isPending ? /* @__PURE__ */ jsx(ConfirmationBadge, {
@@ -5633,39 +5683,42 @@ function ConfirmedActionRow({ action, copy }) {
5633
5683
  "data-confirmation-status": action.status,
5634
5684
  children: [
5635
5685
  failed ? /* @__PURE__ */ jsx(XCircle, {
5636
- className: "mt-0.5 h-4 w-4 shrink-0 text-rose-600",
5686
+ className: "mt-0.5 h-4 w-4 shrink-0 text-danger",
5637
5687
  "aria-hidden": "true"
5638
5688
  }) : executed ? /* @__PURE__ */ jsx(CheckCircle2, {
5639
- className: "mt-0.5 h-4 w-4 shrink-0 text-emerald-600",
5689
+ className: "mt-0.5 h-4 w-4 shrink-0 text-success",
5640
5690
  "aria-hidden": "true"
5641
5691
  }) : /* @__PURE__ */ jsx(Clock, {
5642
- className: "mt-0.5 h-4 w-4 shrink-0 text-neutral-500",
5692
+ className: "mt-0.5 h-4 w-4 shrink-0 text-muted",
5643
5693
  "aria-hidden": "true"
5644
5694
  }),
5645
5695
  /* @__PURE__ */ jsxs("div", {
5646
5696
  className: "min-w-0 flex-1 space-y-0.5",
5647
5697
  children: [
5648
5698
  /* @__PURE__ */ jsx("p", {
5649
- className: "text-sm font-medium text-neutral-950",
5699
+ className: "text-sm font-medium text-foreground",
5650
5700
  children: title
5651
5701
  }),
5652
5702
  connector ? /* @__PURE__ */ jsxs("div", {
5653
- className: "flex items-center gap-2 truncate text-xs text-neutral-500",
5703
+ className: "flex items-center gap-2 truncate text-xs text-muted",
5654
5704
  children: [connector.label, connector.account_email ? /* @__PURE__ */ jsx("span", {
5655
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
5705
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
5656
5706
  children: connector.account_email
5657
5707
  }) : null]
5658
5708
  }) : null,
5659
5709
  failed && text(action.error) ? /* @__PURE__ */ jsx("p", {
5660
- className: "line-clamp-2 text-xs text-rose-700",
5710
+ className: "line-clamp-2 text-xs text-danger-strong",
5661
5711
  children: action.error
5662
5712
  }) : null
5663
5713
  ]
5664
5714
  }),
5665
- executed && link ? /* @__PURE__ */ jsx(ExternalAnchor, {
5715
+ executed && link ? /* @__PURE__ */ jsxs(ExternalAnchor, {
5666
5716
  href: link,
5667
5717
  className: "shrink-0",
5668
- children: operation === "send" ? copy.openEmail : copy.openEvent
5718
+ children: [operation === "send" ? copy.openEmail : copy.openEvent, /* @__PURE__ */ jsx(ArrowUpRight, {
5719
+ className: "h-3 w-3",
5720
+ "aria-hidden": "true"
5721
+ })]
5669
5722
  }) : null
5670
5723
  ]
5671
5724
  });
@@ -5675,7 +5728,7 @@ function ToolResultToolConfirmationCard({ part, locale, className }) {
5675
5728
  if (actions.length === 0) return null;
5676
5729
  const copy = getPersonalConnectorCopy(locale);
5677
5730
  return /* @__PURE__ */ jsx("ul", {
5678
- className: joinClasses("plai-tool-result-tool-confirmation-card divide-y divide-neutral-100 overflow-hidden rounded-lg border border-neutral-200 bg-white text-neutral-950", className),
5731
+ className: joinClasses("plai-tool-result-tool-confirmation-card divide-y divide-divider overflow-hidden rounded-lg border border-border bg-surface text-foreground", className),
5679
5732
  "data-tool-call-id": part.id,
5680
5733
  "data-tool-call-state": part.state,
5681
5734
  children: actions.map((action) => /* @__PURE__ */ jsx(ConfirmedActionRow, {
@@ -5700,14 +5753,14 @@ function ToolResultPendingConfirmationCard({ part, locale, className, toolConfir
5700
5753
  const copy = getPersonalConnectorCopy(locale);
5701
5754
  const entries = Object.entries(pending.action).filter(([key, value]) => key !== "operation" && value !== null && value !== void 0);
5702
5755
  return /* @__PURE__ */ jsxs("section", {
5703
- className: joinClasses("plai-tool-result-pending-confirmation-card overflow-hidden rounded-lg border border-neutral-200 bg-white text-neutral-950", className),
5756
+ className: joinClasses("plai-tool-result-pending-confirmation-card overflow-hidden rounded-lg border border-border bg-surface text-foreground", className),
5704
5757
  "data-tool-call-id": part.id,
5705
5758
  "data-tool-call-state": part.state,
5706
5759
  children: [
5707
5760
  /* @__PURE__ */ jsxs("header", {
5708
- className: "flex items-center gap-2 border-b border-neutral-200 px-3 py-2 text-xs text-neutral-600",
5761
+ className: "flex items-center gap-2 border-b border-border px-3 py-2 text-xs text-secondary",
5709
5762
  children: [/* @__PURE__ */ jsx("span", {
5710
- className: "truncate font-mono font-medium text-neutral-900",
5763
+ className: "truncate font-mono font-medium text-foreground",
5711
5764
  children: part.name
5712
5765
  }), /* @__PURE__ */ jsx(ConfirmationBadge, {
5713
5766
  state: confirmationState,
@@ -5770,12 +5823,12 @@ function ToolResultWorkflowDispatchCard({ part, className, locale }) {
5770
5823
  const error = formatToolErrorDetails(part.errorDetails);
5771
5824
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
5772
5825
  "aria-label": `${copy.workflow}: ${workflowName}`,
5773
- className: joinClasses("w-full rounded-lg border border-neutral-200 bg-white text-left font-normal text-neutral-950 transition-colors hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950", className),
5826
+ className: joinClasses("plai-tool-result-workflow-dispatch-card w-full rounded-lg border border-border bg-surface text-left font-normal text-foreground transition-colors hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", className),
5774
5827
  children: /* @__PURE__ */ jsxs("span", {
5775
5828
  className: "flex items-center gap-2 px-3 py-2 text-sm",
5776
5829
  children: [
5777
5830
  /* @__PURE__ */ jsx(Workflow, {
5778
- className: "h-4 w-4 shrink-0 text-neutral-500",
5831
+ className: "h-4 w-4 shrink-0 text-muted",
5779
5832
  "aria-hidden": "true"
5780
5833
  }),
5781
5834
  /* @__PURE__ */ jsx("span", {
@@ -5783,19 +5836,19 @@ function ToolResultWorkflowDispatchCard({ part, className, locale }) {
5783
5836
  children: copy.workflow
5784
5837
  }),
5785
5838
  /* @__PURE__ */ jsx("span", {
5786
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
5839
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
5787
5840
  children: workflowName
5788
5841
  }),
5789
5842
  /* @__PURE__ */ jsxs("span", {
5790
5843
  className: "ml-auto flex shrink-0 items-center gap-2",
5791
5844
  children: [/* @__PURE__ */ jsx("span", {
5792
- className: "text-xs text-neutral-500",
5845
+ className: "text-xs text-muted",
5793
5846
  children: status
5794
5847
  }), failed ? /* @__PURE__ */ jsx(XCircle, {
5795
- className: "h-4 w-4 text-rose-600",
5848
+ className: "h-4 w-4 text-danger",
5796
5849
  "aria-hidden": "true"
5797
5850
  }) : /* @__PURE__ */ jsx(CheckCircle2, {
5798
- className: "h-4 w-4 text-emerald-600",
5851
+ className: "h-4 w-4 text-success",
5799
5852
  "aria-hidden": "true"
5800
5853
  })]
5801
5854
  })
@@ -5814,22 +5867,22 @@ function ToolResultWorkflowDispatchCard({ part, className, locale }) {
5814
5867
  className: "grid gap-2 text-sm",
5815
5868
  children: [
5816
5869
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
5817
- className: "text-xs text-neutral-500",
5870
+ className: "text-xs text-muted",
5818
5871
  children: copy.workflow
5819
5872
  }), /* @__PURE__ */ jsx("dd", { children: workflowName })] }),
5820
5873
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
5821
- className: "text-xs text-neutral-500",
5874
+ className: "text-xs text-muted",
5822
5875
  children: copy.status
5823
5876
  }), /* @__PURE__ */ jsx("dd", { children: status })] }),
5824
5877
  result.executionId ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
5825
- className: "text-xs text-neutral-500",
5878
+ className: "text-xs text-muted",
5826
5879
  children: copy.executionId
5827
5880
  }), /* @__PURE__ */ jsx("dd", {
5828
5881
  className: "break-all",
5829
5882
  children: result.executionId
5830
5883
  })] }) : null,
5831
5884
  result.workflowId ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
5832
- className: "text-xs text-neutral-500",
5885
+ className: "text-xs text-muted",
5833
5886
  children: copy.workflowId
5834
5887
  }), /* @__PURE__ */ jsx("dd", {
5835
5888
  className: "break-all",
@@ -5841,11 +5894,11 @@ function ToolResultWorkflowDispatchCard({ part, className, locale }) {
5841
5894
  className: "mb-2 text-sm font-medium",
5842
5895
  children: copy.result
5843
5896
  }), /* @__PURE__ */ jsx("pre", {
5844
- className: "overflow-x-auto rounded-md border border-neutral-200 bg-neutral-50 p-3 text-xs leading-5",
5897
+ className: "overflow-x-auto rounded-md border border-border bg-surface-muted p-3 text-xs leading-5",
5845
5898
  children: output$1
5846
5899
  })] }) : null,
5847
5900
  error ? /* @__PURE__ */ jsxs("p", {
5848
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
5901
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
5849
5902
  children: [
5850
5903
  /* @__PURE__ */ jsxs("span", {
5851
5904
  className: "font-semibold",
@@ -6056,6 +6109,11 @@ function getDatasourceResources$1(part) {
6056
6109
  const resources = part.metadata.resources;
6057
6110
  return Array.isArray(resources) ? resources.filter(isDatasourceResource) : [];
6058
6111
  }
6112
+ function getDatasourceResourceLinks(part) {
6113
+ if (part.toolType !== "datasource" || !part.metadata) return [];
6114
+ const links = part.metadata.resource_links;
6115
+ return Array.isArray(links) ? links.filter(isResourceLink) : [];
6116
+ }
6059
6117
  function ToolResultCard({ part, className, detailsOpen = true, locale, onOpenAgentThread, getResourceDownloadUrl, memoryProposal, toolConfirmation }) {
6060
6118
  const copy = getUiCopy(locale);
6061
6119
  if (part.toolType === "memory_proposal") {
@@ -6092,6 +6150,7 @@ function ToolResultCard({ part, className, detailsOpen = true, locale, onOpenAge
6092
6150
  });
6093
6151
  const officeMediaFiles = getOfficeDocumentMediaFiles(part);
6094
6152
  const datasourceResources = getDatasourceResources$1(part);
6153
+ const datasourceResourceLinks = getDatasourceResourceLinks(part);
6095
6154
  if (part.toolType === "email_send") return /* @__PURE__ */ jsx(ToolResultEmailSendCard, {
6096
6155
  part,
6097
6156
  locale,
@@ -6146,85 +6205,88 @@ function ToolResultCard({ part, className, detailsOpen = true, locale, onOpenAge
6146
6205
  });
6147
6206
  if (datasourceResources.length > 0) return /* @__PURE__ */ jsx(DatasourceToolResources, {
6148
6207
  resources: datasourceResources,
6208
+ resourceLinks: datasourceResourceLinks,
6149
6209
  locale,
6150
6210
  className,
6151
6211
  getResourceDownloadUrl
6152
6212
  });
6153
6213
  if (part.toolType === "datasource") return null;
6154
6214
  return /* @__PURE__ */ jsxs("section", {
6155
- className: joinClasses("space-y-3 rounded-lg border border-slate-200 bg-slate-50 p-3", className),
6215
+ className: joinClasses("plai-tool-result-card overflow-hidden rounded-lg border border-border bg-surface-muted", className),
6156
6216
  "data-tool-call-id": part.id,
6157
6217
  "data-tool-call-state": part.state,
6158
- children: [
6159
- /* @__PURE__ */ jsxs("header", {
6160
- className: "flex items-center justify-between gap-2",
6161
- children: [/* @__PURE__ */ jsx("h4", {
6162
- className: "text-sm font-semibold text-slate-900",
6163
- children: part.name
6164
- }), /* @__PURE__ */ jsx("span", {
6165
- className: "rounded-full border uppercase border-emerald-200 bg-emerald-50 px-2 py-0.5 text-xs text-emerald-800",
6166
- children: copy.completed
6167
- })]
6168
- }),
6169
- part.toolType ? /* @__PURE__ */ jsxs("p", {
6170
- className: "text-xs text-slate-600",
6171
- children: [
6172
- /* @__PURE__ */ jsxs("span", {
6173
- className: "font-semibold",
6174
- children: [copy.type, ":"]
6175
- }),
6176
- " ",
6177
- part.toolType
6178
- ]
6179
- }) : null,
6180
- /* @__PURE__ */ jsxs("details", {
6181
- open: detailsOpen,
6182
- className: "space-y-2",
6183
- children: [/* @__PURE__ */ jsx("summary", {
6184
- className: "cursor-pointer text-xs font-semibold text-slate-600",
6185
- children: copy.input
6186
- }), /* @__PURE__ */ jsx("pre", {
6187
- className: "overflow-x-auto rounded bg-slate-900 p-2 text-xs text-slate-100",
6188
- children: formatJson(part.input)
6189
- })]
6190
- }),
6191
- part.result !== void 0 ? /* @__PURE__ */ jsxs("details", {
6192
- open: detailsOpen,
6193
- className: "space-y-2",
6194
- children: [
6195
- /* @__PURE__ */ jsx("summary", {
6196
- className: "cursor-pointer text-xs font-semibold text-slate-600",
6197
- children: copy.output
6198
- }),
6199
- officeMediaFiles.length > 0 ? /* @__PURE__ */ jsxs("div", {
6200
- className: "space-y-2 rounded border border-slate-200 bg-white p-3",
6201
- children: [/* @__PURE__ */ jsx("p", {
6202
- className: "text-xs font-semibold text-slate-700",
6203
- children: copy.generatedFiles
6204
- }), /* @__PURE__ */ jsx("ul", {
6205
- className: "space-y-1",
6206
- children: officeMediaFiles.map((file) => {
6207
- const label = file.name || file.pathname || file.id;
6208
- return /* @__PURE__ */ jsx("li", {
6209
- className: "text-xs text-slate-700",
6210
- children: file.url ? /* @__PURE__ */ jsx("a", {
6211
- href: file.url,
6212
- target: "_blank",
6213
- rel: "noreferrer noopener",
6214
- className: "hover:underline",
6215
- children: label
6216
- }) : /* @__PURE__ */ jsx("span", { children: label })
6217
- }, file.id);
6218
- })
6219
- })]
6220
- }) : null,
6221
- /* @__PURE__ */ jsx("pre", {
6222
- className: "overflow-x-auto rounded bg-slate-900 p-2 text-xs text-slate-100",
6223
- children: formatJson(part.result)
6224
- })
6225
- ]
6226
- }) : null
6227
- ]
6218
+ children: [/* @__PURE__ */ jsxs("header", {
6219
+ className: "flex items-center justify-between gap-2 border-b border-border px-3 py-2",
6220
+ children: [/* @__PURE__ */ jsx("h4", {
6221
+ className: "text-sm font-semibold text-foreground",
6222
+ children: part.name
6223
+ }), /* @__PURE__ */ jsx("span", {
6224
+ className: "rounded-full border capitalize border-success-border bg-success-subtle px-2 py-0.5 text-xs text-success-strong",
6225
+ children: copy.completed
6226
+ })]
6227
+ }), /* @__PURE__ */ jsxs("div", {
6228
+ className: "space-y-3 px-3 py-2",
6229
+ children: [
6230
+ part.toolType ? /* @__PURE__ */ jsxs("p", {
6231
+ className: "text-xs text-secondary",
6232
+ children: [
6233
+ /* @__PURE__ */ jsxs("span", {
6234
+ className: "font-semibold",
6235
+ children: [copy.type, ":"]
6236
+ }),
6237
+ " ",
6238
+ part.toolType
6239
+ ]
6240
+ }) : null,
6241
+ /* @__PURE__ */ jsxs("details", {
6242
+ open: detailsOpen,
6243
+ className: "space-y-2",
6244
+ children: [/* @__PURE__ */ jsx("summary", {
6245
+ className: "cursor-pointer text-xs font-semibold text-secondary",
6246
+ children: copy.input
6247
+ }), /* @__PURE__ */ jsx("pre", {
6248
+ className: "overflow-x-auto rounded bg-inverse p-2 text-xs text-inverse-foreground",
6249
+ children: formatJson(part.input)
6250
+ })]
6251
+ }),
6252
+ part.result !== void 0 ? /* @__PURE__ */ jsxs("details", {
6253
+ open: detailsOpen,
6254
+ className: "space-y-2",
6255
+ children: [
6256
+ /* @__PURE__ */ jsx("summary", {
6257
+ className: "cursor-pointer text-xs font-semibold text-secondary",
6258
+ children: copy.output
6259
+ }),
6260
+ officeMediaFiles.length > 0 ? /* @__PURE__ */ jsxs("div", {
6261
+ className: "space-y-2 rounded border border-border bg-surface p-3",
6262
+ children: [/* @__PURE__ */ jsx("p", {
6263
+ className: "text-xs font-semibold text-strong",
6264
+ children: copy.generatedFiles
6265
+ }), /* @__PURE__ */ jsx("ul", {
6266
+ className: "space-y-1",
6267
+ children: officeMediaFiles.map((file) => {
6268
+ const label = file.name || file.pathname || file.id;
6269
+ return /* @__PURE__ */ jsx("li", {
6270
+ className: "text-xs text-strong",
6271
+ children: file.url ? /* @__PURE__ */ jsx("a", {
6272
+ href: file.url,
6273
+ target: "_blank",
6274
+ rel: "noreferrer noopener",
6275
+ className: "hover:underline",
6276
+ children: label
6277
+ }) : /* @__PURE__ */ jsx("span", { children: label })
6278
+ }, file.id);
6279
+ })
6280
+ })]
6281
+ }) : null,
6282
+ /* @__PURE__ */ jsx("pre", {
6283
+ className: "overflow-x-auto rounded bg-inverse p-2 text-xs text-inverse-foreground",
6284
+ children: formatJson(part.result)
6285
+ })
6286
+ ]
6287
+ }) : null
6288
+ ]
6289
+ })]
6228
6290
  });
6229
6291
  }
6230
6292
 
@@ -6243,7 +6305,7 @@ function Thinking({ part, thinkingLabel, completedLabel, locale, defaultOpen, cl
6243
6305
  previousState.current = part.state;
6244
6306
  }, [isStreaming, part.state]);
6245
6307
  return /* @__PURE__ */ jsxs("section", {
6246
- className: joinClasses("text-sm text-neutral-600", className),
6308
+ className: joinClasses("text-sm text-secondary", className),
6247
6309
  "data-thinking-state": part.state,
6248
6310
  ...props,
6249
6311
  children: [
@@ -6253,7 +6315,7 @@ function Thinking({ part, thinkingLabel, completedLabel, locale, defaultOpen, cl
6253
6315
  "aria-expanded": hasContent ? isOpen : void 0,
6254
6316
  "aria-label": hasContent ? `${isOpen ? copy.collapse : copy.expand} ${label}` : label,
6255
6317
  disabled: !hasContent,
6256
- className: joinClasses("inline-flex items-center gap-2 rounded-md py-1 text-left font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950", hasContent ? "cursor-pointer hover:text-neutral-900" : "cursor-default"),
6318
+ className: joinClasses("inline-flex items-center gap-2 rounded-md py-1 text-left font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", hasContent ? "cursor-pointer hover:text-foreground" : "cursor-default"),
6257
6319
  onClick: () => setIsOpen((value) => !value),
6258
6320
  children: [
6259
6321
  isStreaming ? /* @__PURE__ */ jsx(LoaderCircle, {
@@ -6277,7 +6339,7 @@ function Thinking({ part, thinkingLabel, completedLabel, locale, defaultOpen, cl
6277
6339
  }),
6278
6340
  hasContent && isOpen ? /* @__PURE__ */ jsx("p", {
6279
6341
  id: contentId,
6280
- className: "mt-1 whitespace-pre-wrap border-l-2 border-neutral-200 pl-3 text-sm leading-6 text-neutral-600",
6342
+ className: "mt-1 whitespace-pre-wrap border-l-2 border-border pl-3 text-sm leading-6 text-secondary",
6281
6343
  children: part.thinking
6282
6344
  }) : null
6283
6345
  ]
@@ -6304,7 +6366,7 @@ function MessageAvatar({ src, fallback, alt = fallback, className, imageClassNam
6304
6366
  const showImage = src.trim().length > 0 && failedSrc !== src;
6305
6367
  const initials = getFallbackInitials(fallback);
6306
6368
  return /* @__PURE__ */ jsx("div", {
6307
- className: joinClasses("plai-message-avatar flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-full bg-neutral-200 text-xs font-semibold uppercase text-neutral-700", className),
6369
+ className: joinClasses("plai-message-avatar flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-full bg-surface-hover text-xs font-semibold uppercase text-strong", className),
6308
6370
  ...props,
6309
6371
  children: showImage ? /* @__PURE__ */ jsx("img", {
6310
6372
  src,
@@ -6326,7 +6388,7 @@ function MessageContent({ className,...props }) {
6326
6388
  }
6327
6389
  function MessageHeader({ className,...props }) {
6328
6390
  return /* @__PURE__ */ jsx("header", {
6329
- className: joinClasses("text-xs font-semibold uppercase tracking-wide text-neutral-500", className),
6391
+ className: joinClasses("text-xs font-semibold uppercase tracking-wide text-muted", className),
6330
6392
  ...props
6331
6393
  });
6332
6394
  }
@@ -6367,13 +6429,13 @@ function renderPart(part, index, message, isStreaming, onOpenAgentThread, getRes
6367
6429
  href: part.url,
6368
6430
  target: "_blank",
6369
6431
  rel: "noreferrer noopener",
6370
- className: "block w-fit rounded-lg border border-slate-200 bg-white p-2",
6432
+ className: "block w-fit rounded-lg border border-border bg-surface p-2",
6371
6433
  children: [/* @__PURE__ */ jsx("img", {
6372
6434
  src: part.url,
6373
6435
  alt: title || copy.uploadedImage,
6374
6436
  className: "max-h-56 rounded-md object-contain"
6375
6437
  }), title ? /* @__PURE__ */ jsx("p", {
6376
- className: "mt-2 max-w-xs truncate text-xs font-medium text-slate-700",
6438
+ className: "mt-2 max-w-xs truncate text-xs font-medium text-strong",
6377
6439
  children: title
6378
6440
  }) : null]
6379
6441
  }, `image-${index}`);
@@ -6385,17 +6447,17 @@ function renderPart(part, index, message, isStreaming, onOpenAgentThread, getRes
6385
6447
  href: part.fileUrl,
6386
6448
  target: "_blank",
6387
6449
  rel: "noreferrer noopener",
6388
- className: "flex w-fit items-center gap-3 rounded-lg border border-slate-200 bg-slate-50 px-3 py-2 text-left",
6450
+ className: "flex w-fit items-center gap-3 rounded-lg border border-border bg-surface-muted px-3 py-2 text-left",
6389
6451
  children: [/* @__PURE__ */ jsx("span", {
6390
- className: "rounded bg-slate-900 px-2 py-1 text-[10px] font-semibold uppercase tracking-wide text-white",
6452
+ className: "rounded bg-inverse px-2 py-1 text-[10px] font-semibold uppercase tracking-wide text-inverse-foreground",
6391
6453
  children: extension ?? copy.file
6392
6454
  }), /* @__PURE__ */ jsxs("div", {
6393
6455
  className: "min-w-0",
6394
6456
  children: [/* @__PURE__ */ jsx("p", {
6395
- className: "max-w-xs truncate text-sm font-medium text-slate-900",
6457
+ className: "max-w-xs truncate text-sm font-medium text-foreground",
6396
6458
  children: fileName
6397
6459
  }), part.mimeType ? /* @__PURE__ */ jsx("p", {
6398
- className: "text-xs text-slate-500",
6460
+ className: "text-xs text-muted",
6399
6461
  children: part.mimeType
6400
6462
  }) : null]
6401
6463
  })]
@@ -6422,7 +6484,7 @@ function renderPart(part, index, message, isStreaming, onOpenAgentThread, getRes
6422
6484
  }, `thinking-${index}`);
6423
6485
  }
6424
6486
  if (part.type === "guardrail") return /* @__PURE__ */ jsx("p", {
6425
- className: "rounded-lg border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-900",
6487
+ className: "rounded-lg border border-warning-border bg-warning-subtle px-3 py-2 text-sm text-warning-strong",
6426
6488
  children: part.content
6427
6489
  }, `guardrail-${index}`);
6428
6490
  return null;
@@ -6499,7 +6561,7 @@ function MessageParts({ message, collapseThreshold = DEFAULT_COLLAPSE_THRESHOLD,
6499
6561
  getResourceDownloadUrl
6500
6562
  }, `source-results-${item.index}`) : renderPart(item.part, item.index, message, isStreaming, onOpenAgentThread, getResourceDownloadUrl, locale, memoryProposal, renderText, renderToolCall, renderThinking, thinkingLabel, completedThinkingLabel, textClassName, toolConfirmation)), canCollapse ? /* @__PURE__ */ jsx("button", {
6501
6563
  type: "button",
6502
- className: "text-xs font-medium text-slate-600 hover:text-slate-900",
6564
+ className: "text-xs font-medium text-secondary hover:text-foreground",
6503
6565
  onClick: () => setIsExpanded((previous) => !previous),
6504
6566
  children: isExpanded ? readLessLabel ?? copy.readLess : readMoreLabel ?? copy.readMore
6505
6567
  }) : null]
@@ -6686,7 +6748,7 @@ function Clipboard({ text: text$2, onCopy, copiedDuration = 2e3, copyLabel, copi
6686
6748
  return /* @__PURE__ */ jsxs("button", {
6687
6749
  type,
6688
6750
  "aria-label": isCopied ? resolvedCopiedLabel : resolvedCopyLabel,
6689
- className: joinClasses("inline-flex size-9 shrink-0 items-center justify-center rounded-lg border border-neutral-200 bg-white text-neutral-700 transition-colors hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950 disabled:cursor-not-allowed disabled:opacity-40", className),
6751
+ className: joinClasses("inline-flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-surface text-strong transition-colors hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-40", className),
6690
6752
  disabled: disabled || isCopying,
6691
6753
  onClick: handleClick,
6692
6754
  ...props,
@@ -6710,7 +6772,7 @@ function ThumbButton({ label, icon, className, type = "button",...props }) {
6710
6772
  return /* @__PURE__ */ jsxs("button", {
6711
6773
  type,
6712
6774
  "aria-label": label,
6713
- className: joinClasses("inline-flex size-9 shrink-0 items-center justify-center rounded-lg border border-neutral-200 bg-white text-neutral-700 transition-colors hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950 disabled:cursor-not-allowed disabled:opacity-40 aria-pressed:border-neutral-950 aria-pressed:bg-neutral-950 aria-pressed:text-white", className),
6775
+ className: joinClasses("inline-flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-surface text-strong transition-colors hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-40 aria-pressed:border-inverse aria-pressed:bg-inverse aria-pressed:text-inverse-foreground", className),
6714
6776
  ...props,
6715
6777
  children: [icon, /* @__PURE__ */ jsx("span", {
6716
6778
  className: "sr-only",
@@ -6746,7 +6808,7 @@ function Reload({ label, locale, className, type = "button",...props }) {
6746
6808
  return /* @__PURE__ */ jsxs("button", {
6747
6809
  type,
6748
6810
  "aria-label": resolvedLabel,
6749
- className: joinClasses("inline-flex size-9 shrink-0 items-center justify-center rounded-lg border border-neutral-200 bg-white text-neutral-700 transition-colors hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950 disabled:cursor-not-allowed disabled:opacity-40", className),
6811
+ className: joinClasses("inline-flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-surface text-strong transition-colors hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-40", className),
6750
6812
  ...props,
6751
6813
  children: [/* @__PURE__ */ jsx(RotateCcw, {
6752
6814
  className: "size-4",
@@ -6833,7 +6895,7 @@ function PromptFormAttachButton({ onFilesSelected, onInvalidFiles, locale, accep
6833
6895
 
6834
6896
  //#endregion
6835
6897
  //#region src/components/prompt-form/prompt-form.tsx
6836
- const actionButtonClassName = "inline-flex size-8 shrink-0 items-center justify-center rounded-md bg-neutral-100 text-neutral-600 transition-colors hover:bg-neutral-200 disabled:cursor-not-allowed disabled:opacity-40";
6898
+ const actionButtonClassName = "inline-flex size-8 shrink-0 items-center justify-center rounded-md bg-surface-subtle text-secondary transition-colors hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-40";
6837
6899
  const defaultMaxRows = 4;
6838
6900
  function resizeTextarea(textarea, maxRows) {
6839
6901
  const styles = getComputedStyle(textarea);
@@ -6885,7 +6947,7 @@ function PromptForm({ value, onValueChange, onSubmit, status = "ready", locale,
6885
6947
  setFiles(files.filter((_, fileIndex) => fileIndex !== index));
6886
6948
  }
6887
6949
  return /* @__PURE__ */ jsxs("form", {
6888
- className: joinClasses("flex w-full flex-col overflow-hidden rounded-2xl border border-neutral-200 bg-white", className),
6950
+ className: joinClasses("flex w-full flex-col overflow-hidden rounded-2xl border border-border bg-surface", className),
6889
6951
  onSubmit: async (event) => {
6890
6952
  event.preventDefault();
6891
6953
  if (!canSubmit) return;
@@ -6917,7 +6979,7 @@ function PromptForm({ value, onValueChange, onSubmit, status = "ready", locale,
6917
6979
  /* @__PURE__ */ jsx("textarea", {
6918
6980
  ref: textareaRef,
6919
6981
  rows: 1,
6920
- className: joinClasses("min-h-10 flex-1 resize-none overflow-hidden border-0 bg-transparent px-0 py-1.5 text-sm leading-6 text-neutral-900 outline-none placeholder:text-neutral-400", textareaClassName),
6982
+ className: joinClasses("min-h-10 flex-1 resize-none overflow-hidden border-0 bg-transparent px-0 py-1.5 text-sm leading-6 text-foreground outline-none placeholder:text-muted", textareaClassName),
6921
6983
  value,
6922
6984
  onChange: (event) => {
6923
6985
  onValueChange(event.target.value);
@@ -6961,17 +7023,17 @@ function PromptForm({ value, onValueChange, onSubmit, status = "ready", locale,
6961
7023
  })
6962
7024
  ]
6963
7025
  }), files.length > 0 ? /* @__PURE__ */ jsxs("div", {
6964
- className: joinClasses("border-t border-neutral-200", attachmentsClassName),
7026
+ className: joinClasses("border-t border-border", attachmentsClassName),
6965
7027
  children: [/* @__PURE__ */ jsx("div", {
6966
7028
  className: "flex flex-wrap gap-2 px-4 py-2",
6967
7029
  children: files.map((file, index) => /* @__PURE__ */ jsxs("div", {
6968
- className: "flex max-w-full items-center gap-1.5 rounded-md bg-neutral-100 px-2 py-1 text-xs text-neutral-700",
7030
+ className: "flex max-w-full items-center gap-1.5 rounded-md bg-surface-subtle px-2 py-1 text-xs text-strong",
6969
7031
  children: [/* @__PURE__ */ jsx("span", {
6970
7032
  className: "max-w-[150px] truncate",
6971
7033
  children: file.name
6972
7034
  }), /* @__PURE__ */ jsx("button", {
6973
7035
  type: "button",
6974
- className: "text-neutral-500 transition-colors hover:text-neutral-800 disabled:cursor-not-allowed disabled:opacity-40",
7036
+ className: "text-muted transition-colors hover:text-strong disabled:cursor-not-allowed disabled:opacity-40",
6975
7037
  "aria-label": `${removeFileLabel}: ${file.name}`,
6976
7038
  disabled: isInteractionDisabled,
6977
7039
  onClick: () => removeFile(index),
@@ -6987,14 +7049,14 @@ function PromptForm({ value, onValueChange, onSubmit, status = "ready", locale,
6987
7049
  "aria-valuemin": 0,
6988
7050
  "aria-valuemax": 100,
6989
7051
  "aria-valuenow": Math.round(uploadState.progress),
6990
- className: joinClasses("h-1.5 overflow-hidden rounded-full bg-neutral-200", uploadProgressClassName),
7052
+ className: joinClasses("h-1.5 overflow-hidden rounded-full bg-surface-hover", uploadProgressClassName),
6991
7053
  children: /* @__PURE__ */ jsx("div", {
6992
- className: "h-full rounded-full bg-neutral-900 transition-[width] duration-150",
7054
+ className: "h-full rounded-full bg-inverse transition-[width] duration-150",
6993
7055
  style: { width: `${uploadState.progress}%` }
6994
7056
  })
6995
7057
  })
6996
7058
  }) : uploadState?.status === "error" ? /* @__PURE__ */ jsx("p", {
6997
- className: "px-4 pb-3 text-xs text-red-600",
7059
+ className: "px-4 pb-3 text-xs text-danger",
6998
7060
  children: uploadErrorLabel
6999
7061
  }) : null]
7000
7062
  }) : null]
@@ -7198,7 +7260,7 @@ function SpeechToTextToggle({ controller, onTranscriptionComplete, onTranscripti
7198
7260
  "aria-pressed": isListening,
7199
7261
  "aria-busy": isRequesting || isTranscribing,
7200
7262
  disabled: disabled || isRequesting || isTranscribing,
7201
- className: joinClasses(isListening && !isTranscribing ? "text-red-600" : void 0, className),
7263
+ className: joinClasses(isListening && !isTranscribing ? "text-danger" : void 0, className),
7202
7264
  onClick: (event) => {
7203
7265
  onClick?.(event);
7204
7266
  if (event.defaultPrevented) return;
@@ -7303,7 +7365,7 @@ function ConversationFilesList({ messages, locale, className }) {
7303
7365
  className: joinClasses("space-y-6", className),
7304
7366
  children: [
7305
7367
  uploaded.length === 0 && generated.length === 0 ? /* @__PURE__ */ jsx("p", {
7306
- className: "text-sm text-neutral-600",
7368
+ className: "text-sm text-secondary",
7307
7369
  children: copy.noConversationFiles
7308
7370
  }) : null,
7309
7371
  /* @__PURE__ */ jsx(FileSection, {
@@ -7325,7 +7387,7 @@ function FileSection({ title, files, copy }) {
7325
7387
  className: "space-y-3",
7326
7388
  "aria-label": title,
7327
7389
  children: [/* @__PURE__ */ jsxs("h3", {
7328
- className: "text-xs font-semibold uppercase tracking-wide text-neutral-500",
7390
+ className: "text-xs font-semibold uppercase tracking-wide text-muted",
7329
7391
  children: [
7330
7392
  title,
7331
7393
  " (",
@@ -7333,7 +7395,7 @@ function FileSection({ title, files, copy }) {
7333
7395
  ")"
7334
7396
  ]
7335
7397
  }), files.map((file) => /* @__PURE__ */ jsxs("div", {
7336
- className: "flex items-center gap-3 rounded-lg border border-neutral-200 bg-white p-3",
7398
+ className: "flex items-center gap-3 rounded-lg border border-border bg-surface p-3",
7337
7399
  children: [
7338
7400
  /* @__PURE__ */ jsx(File, {
7339
7401
  className: joinClasses("h-8 w-8 shrink-0", getFileIconClass(file.extension)),
@@ -7345,7 +7407,7 @@ function FileSection({ title, files, copy }) {
7345
7407
  className: "truncate text-sm font-medium",
7346
7408
  children: file.name
7347
7409
  }), file.extension ? /* @__PURE__ */ jsx("p", {
7348
- className: "text-[11px] uppercase text-neutral-500",
7410
+ className: "text-[11px] uppercase text-muted",
7349
7411
  children: file.extension
7350
7412
  }) : null]
7351
7413
  }),
@@ -7374,7 +7436,7 @@ function ConversationFilesSheet({ messages, locale, className, open, onOpenChang
7374
7436
  children: [showTrigger ? /* @__PURE__ */ jsxs(SheetTrigger, {
7375
7437
  "aria-label": `${copy.conversationFiles}: ${count$1}`,
7376
7438
  title: copy.conversationFiles,
7377
- className: joinClasses("inline-flex h-8 items-center gap-1.5 rounded-md border border-neutral-200 bg-white px-2 text-sm text-neutral-700 transition-colors hover:bg-neutral-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950", triggerClassName),
7439
+ className: joinClasses("inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-surface px-2 text-sm text-strong transition-colors hover:bg-surface-subtle focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", triggerClassName),
7378
7440
  children: [/* @__PURE__ */ jsx(Paperclip$1, {
7379
7441
  className: "h-4 w-4",
7380
7442
  "aria-hidden": "true"