@plaisolutions/react 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { HttpStatusError, OPEN_TOOL_CONFIRMATION_STATUSES, PlaiChat, isHiddenMessage, pendingActionIds, toolConfirmationAt } from "@plaisolutions/client";
2
2
  import { createContext, forwardRef, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
3
- 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";
3
+ 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";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
 
6
6
  //#region src/use-tool-confirmations.ts
@@ -371,7 +371,7 @@ function ChatError({ error, locale, title, children, className,...props }) {
371
371
  return /* @__PURE__ */ jsxs("div", {
372
372
  role: "alert",
373
373
  ...props,
374
- 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),
374
+ 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),
375
375
  children: [/* @__PURE__ */ jsx(CircleAlert, {
376
376
  "aria-hidden": "true",
377
377
  className: "mt-0.5 size-4 shrink-0"
@@ -1539,7 +1539,7 @@ function DatasourceToolResultCardContent({ title, description, type, icon, resou
1539
1539
  children: description
1540
1540
  }),
1541
1541
  resourceCount === void 0 ? null : /* @__PURE__ */ jsxs("p", {
1542
- className: "mt-2 text-xs leading-4 text-neutral-600",
1542
+ className: "mt-2 text-xs leading-4 text-secondary",
1543
1543
  children: [
1544
1544
  resourceCount,
1545
1545
  " ",
@@ -1551,7 +1551,7 @@ function DatasourceToolResultCardContent({ title, description, type, icon, resou
1551
1551
  function DatasourceToolResultCard(props) {
1552
1552
  return /* @__PURE__ */ jsx("article", {
1553
1553
  "aria-label": `${props.type}: ${props.title}`,
1554
- className: "w-46.5 rounded-lg bg-neutral-100 p-4 text-neutral-950",
1554
+ className: "plai-datasource-tool-result-card w-46.5 rounded-lg bg-surface-subtle p-4 text-foreground",
1555
1555
  children: /* @__PURE__ */ jsx(DatasourceToolResultCardContent, { ...props })
1556
1556
  });
1557
1557
  }
@@ -1584,7 +1584,7 @@ function ResourceCardContent({ icon, type, title, description, variant = "card"
1584
1584
  children: bodyTitle
1585
1585
  }) : null,
1586
1586
  bodyDescription ? /* @__PURE__ */ jsx("p", {
1587
- className: "mt-2 line-clamp-2 text-xs leading-4 text-neutral-600",
1587
+ className: "mt-2 line-clamp-2 text-xs leading-4 text-secondary",
1588
1588
  children: bodyDescription
1589
1589
  }) : null
1590
1590
  ] });
@@ -1594,8 +1594,8 @@ function ResourceCard(props) {
1594
1594
  const copy = getUiCopy(locale);
1595
1595
  const [downloadState, setDownloadState] = useState("idle");
1596
1596
  const abortControllerRef = useRef(null);
1597
- 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);
1598
- const interactiveClassName = `${className} transition-colors hover:bg-neutral-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-950`;
1597
+ 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);
1598
+ const interactiveClassName = `${className} transition-colors hover:bg-surface-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`;
1599
1599
  useEffect(() => () => {
1600
1600
  abortControllerRef.current?.abort();
1601
1601
  }, []);
@@ -1641,12 +1641,12 @@ function ResourceCard(props) {
1641
1641
  variant
1642
1642
  }),
1643
1643
  downloadState === "loading" ? /* @__PURE__ */ jsx("span", {
1644
- className: "mt-2 block text-xs text-neutral-600",
1644
+ className: "mt-2 block text-xs text-secondary",
1645
1645
  "aria-live": "polite",
1646
1646
  children: copy.openingResource
1647
1647
  }) : null,
1648
1648
  downloadState === "error" ? /* @__PURE__ */ jsx("span", {
1649
- className: "mt-2 block text-xs text-red-700",
1649
+ className: "mt-2 block text-xs text-danger-strong",
1650
1650
  role: "alert",
1651
1651
  children: copy.resourceOpenFailed
1652
1652
  }) : null
@@ -1940,7 +1940,7 @@ const SheetContent = forwardRef(function SheetContent$1({ children, className, s
1940
1940
  "aria-label": ariaLabel,
1941
1941
  "aria-labelledby": ariaLabelledBy ?? labelledBy,
1942
1942
  "aria-describedby": ariaDescribedBy ?? describedBy,
1943
- 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",
1943
+ 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",
1944
1944
  onCancel: (event) => {
1945
1945
  onCancel?.(event);
1946
1946
  if (!event.defaultPrevented) {
@@ -1956,13 +1956,13 @@ const SheetContent = forwardRef(function SheetContent$1({ children, className, s
1956
1956
  "data-slot": "sheet-content",
1957
1957
  "data-state": state,
1958
1958
  "data-side": side,
1959
- 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),
1959
+ 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),
1960
1960
  onAnimationEnd: (event) => {
1961
1961
  if (event.currentTarget === event.target && !open) setPresent(false);
1962
1962
  },
1963
1963
  children: [showCloseButton ? /* @__PURE__ */ jsx(SheetClose, {
1964
1964
  "aria-label": closeLabel ?? getUiCopy(locale).close,
1965
- 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",
1965
+ 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",
1966
1966
  children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
1967
1967
  }) : null, children]
1968
1968
  })
@@ -2016,7 +2016,7 @@ const SheetDescription = forwardRef(function SheetDescription$1({ className, id,
2016
2016
  ref: forwardedRef,
2017
2017
  id: resolvedId,
2018
2018
  "data-slot": "sheet-description",
2019
- className: joinClasses("text-sm text-neutral-600", className)
2019
+ className: joinClasses("text-sm text-secondary", className)
2020
2020
  });
2021
2021
  });
2022
2022
 
@@ -2026,7 +2026,7 @@ function DatasourceFolderCard({ icon, title, description, type, url, resources,
2026
2026
  const copy = getUiCopy(locale);
2027
2027
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
2028
2028
  "aria-label": `${type}: ${title}`,
2029
- 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`,
2029
+ 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`,
2030
2030
  children: /* @__PURE__ */ jsx(DatasourceToolResultCardContent, {
2031
2031
  icon,
2032
2032
  title,
@@ -2059,7 +2059,7 @@ function DatasourceFolderCard({ icon, title, description, type, url, resources,
2059
2059
  href: url,
2060
2060
  target: "_blank",
2061
2061
  rel: "noreferrer noopener",
2062
- className: "text-xs font-medium text-neutral-700 underline underline-offset-2",
2062
+ className: "text-xs font-medium text-strong underline underline-offset-2",
2063
2063
  children: copy.view
2064
2064
  }) : null
2065
2065
  ]
@@ -2406,18 +2406,18 @@ function WebSearchResultItem({ result }) {
2406
2406
  const imageUrl = toStringOrNull$2(result.image_url);
2407
2407
  const faviconUrl = getFaviconUrl(result.url);
2408
2408
  return /* @__PURE__ */ jsx("article", {
2409
- className: "rounded-lg border border-neutral-200 bg-white p-4",
2409
+ className: "rounded-lg border border-border bg-surface p-4",
2410
2410
  children: /* @__PURE__ */ jsxs("div", {
2411
2411
  className: "flex items-start gap-3",
2412
2412
  children: [/* @__PURE__ */ jsxs("span", {
2413
2413
  "aria-hidden": "true",
2414
- 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",
2414
+ 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",
2415
2415
  children: [/* @__PURE__ */ jsx(Globe, { className: "h-4 w-4" }), faviconUrl ? /* @__PURE__ */ jsx("img", {
2416
2416
  src: faviconUrl,
2417
2417
  alt: "",
2418
2418
  width: "16",
2419
2419
  height: "16",
2420
- className: "absolute h-4 w-4 bg-white",
2420
+ className: "absolute h-4 w-4 bg-surface",
2421
2421
  onError: (event) => {
2422
2422
  event.currentTarget.style.display = "none";
2423
2423
  }
@@ -2429,28 +2429,28 @@ function WebSearchResultItem({ result }) {
2429
2429
  href: result.url,
2430
2430
  target: "_blank",
2431
2431
  rel: "noreferrer noopener",
2432
- className: "block line-clamp-2 text-sm font-medium leading-5 text-neutral-950 hover:underline",
2432
+ className: "block line-clamp-2 text-sm font-medium leading-5 text-foreground hover:underline",
2433
2433
  children: result.title
2434
2434
  }),
2435
2435
  /* @__PURE__ */ jsxs("div", {
2436
- className: "flex flex-wrap items-center gap-1.5 text-xs text-neutral-500",
2436
+ className: "flex flex-wrap items-center gap-1.5 text-xs text-muted",
2437
2437
  children: [
2438
2438
  date ? /* @__PURE__ */ jsx("span", { children: date }) : null,
2439
2439
  source ? /* @__PURE__ */ jsx("span", {
2440
- className: "rounded-full bg-neutral-100 px-1.5 py-0.5 capitalize text-neutral-600",
2440
+ className: "rounded-full bg-surface-subtle px-1.5 py-0.5 capitalize text-secondary",
2441
2441
  children: source
2442
2442
  }) : null,
2443
2443
  !date && !source && hostname ? /* @__PURE__ */ jsx("span", { children: hostname }) : null
2444
2444
  ]
2445
2445
  }),
2446
2446
  snippet ? /* @__PURE__ */ jsx("p", {
2447
- className: "line-clamp-2 text-xs leading-5 text-neutral-600",
2447
+ className: "line-clamp-2 text-xs leading-5 text-secondary",
2448
2448
  children: snippet
2449
2449
  }) : null,
2450
2450
  imageUrl ? /* @__PURE__ */ jsx("img", {
2451
2451
  src: imageUrl,
2452
2452
  alt: "",
2453
- className: "max-h-64 w-full rounded-md border border-neutral-200 object-contain",
2453
+ className: "max-h-64 w-full rounded-md border border-border object-contain",
2454
2454
  loading: "lazy"
2455
2455
  }) : null
2456
2456
  ]
@@ -2467,7 +2467,7 @@ function ToolResultWebSearchCard({ part, locale, className }) {
2467
2467
  const sourceLabel = searchResults.length === 1 ? copy.singularSource : copy.pluralSources;
2468
2468
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsxs(SheetTrigger, {
2469
2469
  "aria-label": `Web: ${copy.webSearchTitle}, ${searchResults.length} ${sourceLabel}`,
2470
- 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),
2470
+ 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),
2471
2471
  children: [
2472
2472
  /* @__PURE__ */ jsxs("header", {
2473
2473
  className: "flex items-center gap-3",
@@ -2484,7 +2484,7 @@ function ToolResultWebSearchCard({ part, locale, className }) {
2484
2484
  children: copy.webSearchTitle
2485
2485
  }),
2486
2486
  /* @__PURE__ */ jsx("p", {
2487
- className: "mt-2 text-xs leading-4 text-neutral-600",
2487
+ className: "mt-2 text-xs leading-4 text-secondary",
2488
2488
  children: part.state === "pending" ? uiCopy.searching : `${searchResults.length} ${sourceLabel}`
2489
2489
  })
2490
2490
  ]
@@ -2511,13 +2511,13 @@ function ToolResultWebSearchResults({ part, searchResults = getWebSearchResults(
2511
2511
  className: "space-y-3",
2512
2512
  children: searchResults.map((result, index) => /* @__PURE__ */ jsx(WebSearchResultItem, { result }, `${result.url}-${index}`))
2513
2513
  }) : part.state === "pending" ? /* @__PURE__ */ jsx("p", {
2514
- className: "text-sm text-neutral-600",
2514
+ className: "text-sm text-secondary",
2515
2515
  children: copy.searchingForSources
2516
2516
  }) : /* @__PURE__ */ jsx("p", {
2517
- className: "text-sm text-neutral-600",
2517
+ className: "text-sm text-secondary",
2518
2518
  children: copy.noSourcesReturned
2519
2519
  }), errorDetails ? /* @__PURE__ */ jsxs("p", {
2520
- className: "mt-4 rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
2520
+ className: "mt-4 rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
2521
2521
  children: [
2522
2522
  /* @__PURE__ */ jsxs("span", {
2523
2523
  className: "font-semibold",
@@ -2562,7 +2562,7 @@ function SourceCard({ source, locale, variant = "card" }) {
2562
2562
  locale
2563
2563
  });
2564
2564
  return /* @__PURE__ */ jsxs("section", {
2565
- className: "rounded-lg bg-neutral-100 p-4",
2565
+ className: "rounded-lg bg-surface-subtle p-4",
2566
2566
  children: [/* @__PURE__ */ jsxs("header", {
2567
2567
  className: "mb-4 flex items-center gap-3",
2568
2568
  children: [/* @__PURE__ */ jsx(Globe, {
@@ -2600,7 +2600,7 @@ function AggregatedSourceResults({ parts, locale, maxVisible = 3, className, get
2600
2600
  locale
2601
2601
  }, source.key)), overflowCount > 0 ? /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsxs(SheetTrigger, {
2602
2602
  "aria-label": `+${overflowCount} ${overflowLabel}`,
2603
- 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",
2603
+ 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",
2604
2604
  children: [/* @__PURE__ */ jsxs("span", {
2605
2605
  className: "text-2xl font-medium leading-7",
2606
2606
  children: ["+", overflowCount]
@@ -2653,15 +2653,15 @@ function getFileExtension(name, contentType) {
2653
2653
  return null;
2654
2654
  }
2655
2655
  function getFileIconClass(extension) {
2656
- if (extension === "pdf") return "text-rose-500";
2657
- if (["doc", "docx"].includes(extension ?? "")) return "text-blue-600";
2656
+ if (extension === "pdf") return "text-danger";
2657
+ if (["doc", "docx"].includes(extension ?? "")) return "text-info";
2658
2658
  if ([
2659
2659
  "xls",
2660
2660
  "xlsx",
2661
2661
  "csv"
2662
- ].includes(extension ?? "")) return "text-emerald-600";
2663
- if (["ppt", "pptx"].includes(extension ?? "")) return "text-orange-600";
2664
- return "text-neutral-500";
2662
+ ].includes(extension ?? "")) return "text-success";
2663
+ if (["ppt", "pptx"].includes(extension ?? "")) return "text-warning";
2664
+ return "text-muted";
2665
2665
  }
2666
2666
 
2667
2667
  //#endregion
@@ -2917,88 +2917,94 @@ function MemoryProposalCard({ proposal: initial, actions, activeAgentId, locale,
2917
2917
  const statusCopy = proposal.status === "ACCEPTED" ? copy.accepted : proposal.status === "REJECTED" ? copy.rejected : proposal.status === "EXPIRED" ? copy.expired : proposal.status === "CONFLICTED" ? copy.conflicted : null;
2918
2918
  const operation = proposal.operation === "CREATE" ? copy.create : proposal.operation === "UPDATE" ? copy.update : copy.delete;
2919
2919
  return /* @__PURE__ */ jsxs("section", {
2920
- className: joinClasses("space-y-3 rounded-lg border border-emerald-200 bg-emerald-50/30 p-4 text-left", className),
2920
+ className: joinClasses("plai-memory-proposal-card overflow-hidden rounded-lg border border-success-border bg-success-subtle/30 text-left", className),
2921
2921
  "data-memory-proposal-id": proposal.id,
2922
- children: [
2923
- /* @__PURE__ */ jsxs("header", {
2924
- className: "space-y-2",
2922
+ children: [/* @__PURE__ */ jsx("header", {
2923
+ className: "border-b border-success-border px-3 py-2",
2924
+ children: /* @__PURE__ */ jsxs("div", {
2925
+ className: "flex items-center gap-2",
2925
2926
  children: [/* @__PURE__ */ jsxs("h4", {
2926
- className: "flex items-center gap-2 text-sm font-semibold text-slate-900",
2927
- children: [/* @__PURE__ */ jsx(Brain, { className: "size-4" }), copy.title]
2927
+ className: "flex items-center gap-2 text-sm font-semibold text-foreground",
2928
+ children: [/* @__PURE__ */ jsx(Brain, { className: "size-4" }), proposal.scope === "USER" ? copy.user : copy.project]
2928
2929
  }), /* @__PURE__ */ jsxs("div", {
2930
+ "aria-label": "type",
2929
2931
  className: "flex flex-wrap gap-2 text-xs",
2930
- children: [
2931
- /* @__PURE__ */ jsx("span", {
2932
- className: "rounded-full border border-slate-300 bg-white px-2 py-0.5",
2933
- children: proposal.scope === "USER" ? copy.user : copy.project
2934
- }),
2935
- /* @__PURE__ */ jsx("span", {
2936
- className: "rounded-full bg-slate-100 px-2 py-0.5",
2937
- children: operation
2938
- }),
2939
- /* @__PURE__ */ jsx("span", {
2940
- className: "rounded-full bg-slate-100 px-2 py-0.5",
2941
- children: formatCategory(proposal.category)
2942
- })
2943
- ]
2944
- })]
2945
- }),
2946
- proposal.previous_content && proposal.previous_content !== REDACTED ? /* @__PURE__ */ jsxs("div", {
2947
- className: "rounded-md bg-slate-100 p-3 text-sm",
2948
- children: [/* @__PURE__ */ jsx("span", {
2949
- className: "mb-1 block text-xs font-medium text-slate-500",
2950
- children: copy.previous
2951
- }), /* @__PURE__ */ jsx("p", {
2952
- className: "whitespace-pre-wrap break-words",
2953
- children: proposal.previous_content
2954
- })]
2955
- }) : null,
2956
- proposal.content && proposal.content !== REDACTED ? /* @__PURE__ */ jsxs("div", {
2957
- className: "text-sm",
2958
- children: [/* @__PURE__ */ jsx("span", {
2959
- className: "mb-1 block text-xs font-medium text-slate-500",
2960
- children: copy.proposed
2961
- }), /* @__PURE__ */ jsx("p", {
2962
- className: "whitespace-pre-wrap break-words",
2963
- children: proposal.content
2964
- })]
2965
- }) : null,
2966
- canResolve ? /* @__PURE__ */ jsxs("div", {
2967
- className: "flex gap-2",
2968
- children: [/* @__PURE__ */ jsxs("button", {
2969
- type: "button",
2970
- disabled: resolving,
2971
- onClick: () => void resolve(true),
2972
- className: "inline-flex items-center rounded-md bg-slate-900 px-3 py-1.5 text-xs font-medium text-white disabled:opacity-50",
2973
- children: [resolving ? /* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 size-3 animate-spin" }) : null, copy.accept]
2974
- }), /* @__PURE__ */ jsx("button", {
2975
- type: "button",
2976
- disabled: resolving,
2977
- onClick: () => void resolve(false),
2978
- className: "rounded-md border border-slate-300 bg-white px-3 py-1.5 text-xs font-medium disabled:opacity-50",
2979
- children: copy.reject
2980
- })]
2981
- }) : null,
2982
- proposal.status === "PENDING" && !canResolve ? /* @__PURE__ */ jsx("p", {
2983
- className: "text-xs font-medium text-slate-500",
2984
- children: proposal.scope === "PROJECT" ? copy.review : copy.unavailable
2985
- }) : null,
2986
- proposal.status === "ACCEPTED" && statusCopy ? /* @__PURE__ */ jsxs("span", {
2987
- 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",
2988
- children: [statusCopy, /* @__PURE__ */ jsx(Check, {
2989
- className: "size-3.5 stroke-[2.5] text-emerald-600",
2990
- "aria-hidden": "true"
2932
+ children: [/* @__PURE__ */ jsx("span", {
2933
+ className: "rounded-full bg-surface-subtle px-2 py-0.5",
2934
+ children: operation
2935
+ }), /* @__PURE__ */ jsx("span", {
2936
+ className: "rounded-full bg-surface-subtle px-2 py-0.5",
2937
+ children: formatCategory(proposal.category)
2938
+ })]
2991
2939
  })]
2992
- }) : null,
2993
- statusCopy && proposal.status !== "ACCEPTED" ? /* @__PURE__ */ jsx("p", {
2994
- className: "text-xs font-medium text-slate-500",
2995
- children: statusCopy
2996
- }) : null,
2997
- error ? /* @__PURE__ */ jsx("p", {
2998
- className: "text-xs text-red-600",
2999
- children: error
3000
- }) : null
3001
- ]
2940
+ })
2941
+ }), /* @__PURE__ */ jsxs("div", {
2942
+ className: "space-y-3 px-3 py-2",
2943
+ children: [
2944
+ " ",
2945
+ proposal.previous_content && proposal.previous_content !== REDACTED ? /* @__PURE__ */ jsxs("div", {
2946
+ className: "rounded-md bg-surface-subtle p-3 text-sm",
2947
+ children: [/* @__PURE__ */ jsx("span", {
2948
+ className: "mb-1 block text-xs font-medium text-muted",
2949
+ children: copy.previous
2950
+ }), /* @__PURE__ */ jsx("p", {
2951
+ className: "whitespace-pre-wrap break-words",
2952
+ children: proposal.previous_content
2953
+ })]
2954
+ }) : null,
2955
+ proposal.content && proposal.content !== REDACTED ? /* @__PURE__ */ jsxs("div", {
2956
+ className: "text-sm",
2957
+ children: [/* @__PURE__ */ jsx("span", {
2958
+ className: "mb-1 block text-xs font-medium text-muted",
2959
+ children: copy.proposed
2960
+ }), /* @__PURE__ */ jsx("p", {
2961
+ className: "whitespace-pre-wrap break-words",
2962
+ children: proposal.content
2963
+ })]
2964
+ }) : null,
2965
+ canResolve ? /* @__PURE__ */ jsxs("div", {
2966
+ className: "flex gap-2",
2967
+ children: [/* @__PURE__ */ jsxs("button", {
2968
+ type: "button",
2969
+ disabled: resolving,
2970
+ onClick: () => void resolve(true),
2971
+ className: "inline-flex items-center rounded-md bg-inverse px-3 py-1.5 text-xs font-medium text-inverse-foreground disabled:opacity-50",
2972
+ children: [resolving ? /* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 size-3 animate-spin" }) : null, copy.accept]
2973
+ }), /* @__PURE__ */ jsx("button", {
2974
+ type: "button",
2975
+ disabled: resolving,
2976
+ onClick: () => void resolve(false),
2977
+ className: "rounded-md border border-border-strong bg-surface px-3 py-1.5 text-xs font-medium disabled:opacity-50",
2978
+ children: copy.reject
2979
+ })]
2980
+ }) : null,
2981
+ proposal.status === "PENDING" && !canResolve ? /* @__PURE__ */ jsxs("span", {
2982
+ className: "inline-flex items-center gap-1.5 rounded-full border bg-surface px-3 py-1 text-xs font-medium text-foreground",
2983
+ children: [proposal.scope === "PROJECT" ? copy.review : copy.unavailable, /* @__PURE__ */ jsx(Clock, {
2984
+ className: "size-3.5 stroke-[2.5] text-muted",
2985
+ "aria-hidden": "true"
2986
+ })]
2987
+ }) : null,
2988
+ proposal.status === "ACCEPTED" && statusCopy ? /* @__PURE__ */ jsxs("span", {
2989
+ className: "inline-flex items-center gap-1.5 rounded-full border bg-surface px-3 py-1 text-xs font-medium text-foreground",
2990
+ children: [statusCopy, /* @__PURE__ */ jsx(Check, {
2991
+ className: "size-3.5 stroke-[2.5] text-success",
2992
+ "aria-hidden": "true"
2993
+ })]
2994
+ }) : null,
2995
+ statusCopy && proposal.status !== "ACCEPTED" ? /* @__PURE__ */ jsxs("span", {
2996
+ 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",
2997
+ children: [statusCopy, /* @__PURE__ */ jsx(X$1, {
2998
+ className: "size-3.5 stroke-[2.5]",
2999
+ "aria-hidden": "true"
3000
+ })]
3001
+ }) : null,
3002
+ error ? /* @__PURE__ */ jsx("p", {
3003
+ className: "text-xs text-danger",
3004
+ children: error
3005
+ }) : null
3006
+ ]
3007
+ })]
3002
3008
  });
3003
3009
  }
3004
3010
  function mergeProposal(current, incoming) {
@@ -3105,7 +3111,7 @@ function ToolError({ part, locale, defaultOpen = false, className,...props }) {
3105
3111
  const copy = getToolErrorCopy(part, locale);
3106
3112
  const errorDetails = formatToolErrorDetails(part.errorDetails);
3107
3113
  return /* @__PURE__ */ jsxs("section", {
3108
- className: joinClasses("text-sm text-neutral-600", className),
3114
+ className: joinClasses("text-sm text-secondary", className),
3109
3115
  "data-tool-call-id": part.id,
3110
3116
  "data-tool-call-state": part.state,
3111
3117
  ...props,
@@ -3113,14 +3119,17 @@ function ToolError({ part, locale, defaultOpen = false, className,...props }) {
3113
3119
  type: "button",
3114
3120
  "aria-controls": contentId,
3115
3121
  "aria-expanded": isOpen,
3116
- 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",
3122
+ 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",
3117
3123
  onClick: () => setIsOpen((value) => !value),
3118
3124
  children: [
3119
3125
  /* @__PURE__ */ jsx(CircleX, {
3120
3126
  className: "size-4 shrink-0",
3121
3127
  "aria-hidden": "true"
3122
3128
  }),
3123
- /* @__PURE__ */ jsx("span", { children: copy.summary }),
3129
+ /* @__PURE__ */ jsx("span", {
3130
+ className: "line-clamp-1",
3131
+ children: copy.summary
3132
+ }),
3124
3133
  /* @__PURE__ */ jsx(ChevronDown, {
3125
3134
  className: joinClasses("size-4 shrink-0 transition-transform motion-reduce:transition-none", isOpen ? "rotate-180" : void 0),
3126
3135
  "aria-hidden": "true"
@@ -3128,27 +3137,27 @@ function ToolError({ part, locale, defaultOpen = false, className,...props }) {
3128
3137
  ]
3129
3138
  }), isOpen ? /* @__PURE__ */ jsxs("div", {
3130
3139
  id: contentId,
3131
- className: "mt-2 space-y-3 border-l-2 border-rose-200 pl-3",
3140
+ className: "mt-2 space-y-3 border-l-2 border-danger-border pl-3",
3132
3141
  children: [
3133
3142
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
3134
- className: "mb-2 text-xs font-semibold text-neutral-700",
3143
+ className: "mb-2 text-xs font-semibold text-strong",
3135
3144
  children: copy.input
3136
3145
  }), /* @__PURE__ */ jsx("pre", {
3137
- className: "overflow-x-auto whitespace-pre-wrap rounded-md bg-neutral-100 p-3 text-xs leading-5 text-neutral-800",
3146
+ className: "overflow-x-auto whitespace-pre-wrap rounded-md bg-surface-subtle p-3 text-xs leading-5 text-strong",
3138
3147
  children: formatJson$1(part.input)
3139
3148
  })] }),
3140
3149
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
3141
- className: "mb-2 text-xs font-semibold text-neutral-700",
3150
+ className: "mb-2 text-xs font-semibold text-strong",
3142
3151
  children: copy.output
3143
3152
  }), /* @__PURE__ */ jsx("pre", {
3144
- className: "overflow-x-auto whitespace-pre-wrap rounded-md bg-neutral-100 p-3 text-xs leading-5 text-neutral-800",
3153
+ className: "overflow-x-auto whitespace-pre-wrap rounded-md bg-surface-subtle p-3 text-xs leading-5 text-strong",
3145
3154
  children: part.result === void 0 ? copy.noOutput : formatJson$1(part.result)
3146
3155
  })] }),
3147
3156
  errorDetails ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
3148
- className: "mb-2 text-xs font-semibold text-rose-700",
3157
+ className: "mb-2 text-xs font-semibold text-danger-strong",
3149
3158
  children: copy.details
3150
3159
  }), /* @__PURE__ */ jsx("p", {
3151
- className: "whitespace-pre-wrap text-xs leading-5 text-rose-700",
3160
+ className: "whitespace-pre-wrap text-xs leading-5 text-danger-strong",
3152
3161
  children: errorDetails
3153
3162
  })] }) : null
3154
3163
  ]
@@ -3188,12 +3197,12 @@ function ToolResultAgentInvocationCard({ part, className, onOpenThread, locale }
3188
3197
  const pending = part.state === "pending";
3189
3198
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
3190
3199
  "aria-label": `${copy.agent}: ${agentName}`,
3191
- 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),
3200
+ 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),
3192
3201
  children: /* @__PURE__ */ jsxs("span", {
3193
3202
  className: "flex items-center gap-2 px-3 py-2 text-sm",
3194
3203
  children: [
3195
3204
  /* @__PURE__ */ jsx(Bot, {
3196
- className: "h-4 w-4 shrink-0 text-neutral-500",
3205
+ className: "h-4 w-4 shrink-0 text-muted",
3197
3206
  "aria-hidden": "true"
3198
3207
  }),
3199
3208
  /* @__PURE__ */ jsx("span", {
@@ -3201,19 +3210,19 @@ function ToolResultAgentInvocationCard({ part, className, onOpenThread, locale }
3201
3210
  children: copy.agent
3202
3211
  }),
3203
3212
  /* @__PURE__ */ jsx("span", {
3204
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
3213
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
3205
3214
  children: agentName
3206
3215
  }),
3207
3216
  /* @__PURE__ */ jsx("span", {
3208
3217
  className: "ml-auto shrink-0",
3209
3218
  children: pending ? /* @__PURE__ */ jsx(LoaderCircle, {
3210
- className: "h-4 w-4 animate-spin text-amber-600",
3219
+ className: "h-4 w-4 animate-spin text-warning",
3211
3220
  "aria-label": copy.pending
3212
3221
  }) : failed ? /* @__PURE__ */ jsx(XCircle, {
3213
- className: "h-4 w-4 text-rose-600",
3222
+ className: "h-4 w-4 text-danger",
3214
3223
  "aria-hidden": "true"
3215
3224
  }) : /* @__PURE__ */ jsx(CheckCircle2, {
3216
- className: "h-4 w-4 text-emerald-600",
3225
+ className: "h-4 w-4 text-success",
3217
3226
  "aria-hidden": "true"
3218
3227
  })
3219
3228
  })
@@ -3232,25 +3241,25 @@ function ToolResultAgentInvocationCard({ part, className, onOpenThread, locale }
3232
3241
  className: "grid gap-2 text-sm",
3233
3242
  children: [
3234
3243
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3235
- className: "text-xs text-neutral-500",
3244
+ className: "text-xs text-muted",
3236
3245
  children: copy.status
3237
3246
  }), /* @__PURE__ */ jsx("dd", { children: getUiStatusLabel(part.state, copy) })] }),
3238
3247
  metadata?.agent_id ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3239
- className: "text-xs text-neutral-500",
3248
+ className: "text-xs text-muted",
3240
3249
  children: copy.agentId
3241
3250
  }), /* @__PURE__ */ jsx("dd", {
3242
3251
  className: "break-all",
3243
3252
  children: metadata.agent_id
3244
3253
  })] }) : null,
3245
3254
  metadata?.tracked_execution_id ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3246
- className: "text-xs text-neutral-500",
3255
+ className: "text-xs text-muted",
3247
3256
  children: copy.executionId
3248
3257
  }), /* @__PURE__ */ jsx("dd", {
3249
3258
  className: "break-all",
3250
3259
  children: metadata.tracked_execution_id
3251
3260
  })] }) : null,
3252
3261
  threadId ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3253
- className: "text-xs text-neutral-500",
3262
+ className: "text-xs text-muted",
3254
3263
  children: copy.threadId
3255
3264
  }), /* @__PURE__ */ jsx("dd", {
3256
3265
  className: "break-all",
@@ -3262,19 +3271,19 @@ function ToolResultAgentInvocationCard({ part, className, onOpenThread, locale }
3262
3271
  className: "mb-2 text-sm font-medium",
3263
3272
  children: copy.prompt
3264
3273
  }), /* @__PURE__ */ jsx("p", {
3265
- className: "whitespace-pre-wrap rounded-md border border-neutral-200 bg-neutral-50 p-3 text-sm leading-6",
3274
+ className: "whitespace-pre-wrap rounded-md border border-border bg-surface-muted p-3 text-sm leading-6",
3266
3275
  children: prompt
3267
3276
  })] }) : null,
3268
3277
  output$1 ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
3269
3278
  className: "mb-2 text-sm font-medium",
3270
3279
  children: copy.result
3271
3280
  }), /* @__PURE__ */ jsx("pre", {
3272
- className: "overflow-x-auto whitespace-pre-wrap rounded-md border border-neutral-200 bg-neutral-50 p-3 text-xs leading-5",
3281
+ className: "overflow-x-auto whitespace-pre-wrap rounded-md border border-border bg-surface-muted p-3 text-xs leading-5",
3273
3282
  children: output$1
3274
3283
  })] }) : null,
3275
3284
  threadId && onOpenThread ? /* @__PURE__ */ jsxs("button", {
3276
3285
  type: "button",
3277
- 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",
3286
+ 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",
3278
3287
  onClick: () => onOpenThread(threadId),
3279
3288
  children: [/* @__PURE__ */ jsx(MessageSquare, {
3280
3289
  className: "h-4 w-4",
@@ -3282,7 +3291,7 @@ function ToolResultAgentInvocationCard({ part, className, onOpenThread, locale }
3282
3291
  }), copy.openConversation]
3283
3292
  }) : null,
3284
3293
  error ? /* @__PURE__ */ jsxs("p", {
3285
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
3294
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
3286
3295
  children: [
3287
3296
  /* @__PURE__ */ jsxs("span", {
3288
3297
  className: "font-semibold",
@@ -3334,66 +3343,67 @@ function ToolResultBrowserCard({ part, className, locale }) {
3334
3343
  const pending = part.state === "pending";
3335
3344
  const canExpand = Boolean(preview || error || url);
3336
3345
  return /* @__PURE__ */ jsxs("section", {
3337
- className: joinClasses("overflow-hidden rounded-lg border border-neutral-200 bg-white", className),
3346
+ className: joinClasses("plai-tool-result-browser-card overflow-hidden rounded-lg border border-border bg-surface", className),
3338
3347
  "aria-label": copy.browserResult,
3339
- children: [/* @__PURE__ */ jsxs("div", {
3340
- className: "flex items-center gap-2 px-3 py-2 text-sm",
3341
- children: [
3342
- /* @__PURE__ */ jsx(Globe, {
3343
- className: "h-4 w-4 shrink-0 text-neutral-500",
3344
- "aria-hidden": "true"
3345
- }),
3346
- /* @__PURE__ */ jsx("span", {
3347
- className: "font-medium text-neutral-800",
3348
- children: copy.browser
3349
- }),
3350
- subtitle ? /* @__PURE__ */ jsx("span", {
3351
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
3352
- children: subtitle
3353
- }) : null,
3354
- /* @__PURE__ */ jsxs("span", {
3355
- className: "ml-auto flex shrink-0 items-center gap-2",
3356
- children: [pending ? /* @__PURE__ */ jsx(LoaderCircle, {
3357
- className: "h-4 w-4 animate-spin text-amber-600",
3358
- "aria-label": copy.pending
3359
- }) : failed ? /* @__PURE__ */ jsx(XCircle, {
3360
- className: "h-4 w-4 text-rose-600",
3361
- "aria-hidden": "true"
3362
- }) : /* @__PURE__ */ jsx(CheckCircle2, {
3363
- className: "h-4 w-4 text-emerald-600",
3348
+ children: [/* @__PURE__ */ jsx("header", {
3349
+ className: "flex items-center gap-2 border-b border-border px-3 py-2 text-xs text-secondary",
3350
+ children: /* @__PURE__ */ jsxs("button", {
3351
+ type: "button",
3352
+ disabled: !canExpand,
3353
+ "aria-label": expanded ? copy.collapseBrowserResult : copy.expandBrowserResult,
3354
+ "aria-expanded": canExpand ? expanded : void 0,
3355
+ 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",
3356
+ onClick: () => setExpanded((value) => !value),
3357
+ children: [
3358
+ /* @__PURE__ */ jsx(Globe, {
3359
+ className: "h-4 w-4 shrink-0 text-muted",
3364
3360
  "aria-hidden": "true"
3365
- }), canExpand ? /* @__PURE__ */ jsx("button", {
3366
- type: "button",
3367
- "aria-label": expanded ? copy.collapseBrowserResult : copy.expandBrowserResult,
3368
- "aria-expanded": expanded,
3369
- 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",
3370
- onClick: () => setExpanded((value) => !value),
3371
- children: expanded ? /* @__PURE__ */ jsx(Minus, {
3372
- className: "h-3 w-3",
3361
+ }),
3362
+ /* @__PURE__ */ jsx("span", {
3363
+ className: "font-medium text-strong",
3364
+ children: copy.browser
3365
+ }),
3366
+ subtitle ? /* @__PURE__ */ jsx("span", {
3367
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
3368
+ children: subtitle
3369
+ }) : null,
3370
+ /* @__PURE__ */ jsxs("span", {
3371
+ className: "ml-auto flex shrink-0 items-center gap-2",
3372
+ children: [pending ? /* @__PURE__ */ jsx(LoaderCircle, {
3373
+ className: "h-4 w-4 animate-spin text-warning",
3374
+ "aria-label": copy.pending
3375
+ }) : failed ? /* @__PURE__ */ jsx(XCircle, {
3376
+ className: "h-4 w-4 text-danger",
3373
3377
  "aria-hidden": "true"
3374
- }) : /* @__PURE__ */ jsx(Plus, {
3375
- className: "h-3 w-3",
3378
+ }) : /* @__PURE__ */ jsx(CheckCircle2, {
3379
+ className: "h-4 w-4 text-success",
3376
3380
  "aria-hidden": "true"
3377
- })
3378
- }) : null]
3379
- })
3380
- ]
3381
+ }), canExpand ? expanded ? /* @__PURE__ */ jsx(ChevronUp, {
3382
+ className: "h-4 w-4 text-muted",
3383
+ "aria-hidden": "true"
3384
+ }) : /* @__PURE__ */ jsx(ChevronDown, {
3385
+ className: "h-4 w-4 text-muted",
3386
+ "aria-hidden": "true"
3387
+ }) : null]
3388
+ })
3389
+ ]
3390
+ })
3381
3391
  }), expanded ? /* @__PURE__ */ jsxs("div", {
3382
- className: "space-y-3 border-t border-neutral-200 bg-neutral-50 p-3",
3392
+ className: "space-y-3 border-t border-border bg-surface-muted p-3",
3383
3393
  children: [
3384
3394
  url ? /* @__PURE__ */ jsx("a", {
3385
3395
  href: url,
3386
3396
  target: "_blank",
3387
3397
  rel: "noreferrer noopener",
3388
- className: "block truncate text-xs text-blue-700 underline underline-offset-2 hover:text-blue-900",
3398
+ className: "block truncate text-xs text-info-strong underline underline-offset-2 hover:text-info-strong",
3389
3399
  children: url
3390
3400
  }) : null,
3391
3401
  preview ? /* @__PURE__ */ jsx("p", {
3392
- className: "whitespace-pre-wrap text-xs leading-5 text-neutral-600",
3402
+ className: "whitespace-pre-wrap text-xs leading-5 text-secondary",
3393
3403
  children: preview
3394
3404
  }) : null,
3395
3405
  error ? /* @__PURE__ */ jsxs("p", {
3396
- className: "text-xs text-rose-700",
3406
+ className: "text-xs text-danger-strong",
3397
3407
  children: [
3398
3408
  /* @__PURE__ */ jsxs("span", {
3399
3409
  className: "font-semibold",
@@ -3472,159 +3482,161 @@ function ToolResultEmailSendCard({ part, className, locale }) {
3472
3482
  const emailInput = parseEmailSendInput(part);
3473
3483
  const emailResult = parseEmailSendResult(part);
3474
3484
  const errorDetails = formatToolErrorDetails(part.errorDetails);
3475
- 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";
3485
+ 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";
3476
3486
  return /* @__PURE__ */ jsxs("section", {
3477
- className: joinClasses("space-y-4 rounded-lg border border-slate-200 bg-slate-50 p-3", className),
3487
+ className: joinClasses("plai-tool-result-email-send-card overflow-hidden rounded-lg border border-border bg-surface-muted", className),
3478
3488
  "data-tool-call-id": part.id,
3479
3489
  "data-tool-call-state": part.state,
3480
- children: [
3481
- /* @__PURE__ */ jsxs("header", {
3482
- className: "flex items-center justify-between gap-2",
3483
- children: [/* @__PURE__ */ jsx("h4", {
3484
- className: "text-sm font-semibold text-slate-900",
3490
+ children: [/* @__PURE__ */ jsx("header", {
3491
+ className: "flex items-center gap-2 border-b border-border px-3 py-2 text-xs text-secondary",
3492
+ children: /* @__PURE__ */ jsxs("button", {
3493
+ type: "button",
3494
+ "aria-expanded": isExpanded,
3495
+ "aria-label": isExpanded ? copy.collapse : copy.expand,
3496
+ "aria-controls": `tool-email-details-${part.id}`,
3497
+ 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",
3498
+ onClick: () => setIsExpanded((previous) => !previous),
3499
+ children: [/* @__PURE__ */ jsx("span", {
3500
+ className: "text-sm font-semibold text-foreground",
3485
3501
  children: copy.email
3486
- }), /* @__PURE__ */ jsxs("div", {
3502
+ }), /* @__PURE__ */ jsxs("span", {
3487
3503
  className: "flex items-center gap-2",
3488
3504
  children: [/* @__PURE__ */ jsx("span", {
3489
- className: joinClasses("rounded-full uppercase border px-2 py-0.5 text-xs", statusClass),
3505
+ className: joinClasses("rounded-full border capitalize px-2 py-0.5 text-xs", statusClass),
3490
3506
  children: getUiStatusLabel(part.state, copy)
3491
- }), /* @__PURE__ */ jsx("button", {
3492
- type: "button",
3493
- "aria-expanded": isExpanded,
3494
- "aria-label": isExpanded ? copy.collapse : copy.expand,
3495
- "aria-controls": `tool-email-details-${part.id}`,
3496
- 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",
3497
- onClick: () => setIsExpanded((previous) => !previous),
3498
- children: isExpanded ? /* @__PURE__ */ jsx(Minus, {
3499
- className: "h-3 w-3",
3500
- "aria-hidden": "true"
3501
- }) : /* @__PURE__ */ jsx(Plus, {
3502
- className: "h-3 w-3",
3503
- "aria-hidden": "true"
3504
- })
3507
+ }), isExpanded ? /* @__PURE__ */ jsx(ChevronUp, {
3508
+ className: "h-4 w-4 text-muted",
3509
+ "aria-hidden": "true"
3510
+ }) : /* @__PURE__ */ jsx(ChevronDown, {
3511
+ className: "h-4 w-4 text-muted",
3512
+ "aria-hidden": "true"
3505
3513
  })]
3506
3514
  })]
3507
- }),
3508
- emailInput.subject ? /* @__PURE__ */ jsxs("div", {
3509
- className: "flex items-center gap-1",
3510
- children: [/* @__PURE__ */ jsxs("p", {
3511
- className: "text-xs font-semibold text-slate-600",
3512
- children: [copy.subject, ":"]
3513
- }), /* @__PURE__ */ jsx("p", {
3514
- className: "text-xs text-slate-900",
3515
- children: emailInput.subject
3516
- })]
3517
- }) : null,
3518
- /* @__PURE__ */ jsxs("div", {
3519
- className: "flex items-center gap-1",
3520
- children: [/* @__PURE__ */ jsxs("p", {
3521
- className: "text-xs font-semibold text-slate-600",
3522
- children: [copy.to, ":"]
3523
- }), emailInput.to.length > 0 ? /* @__PURE__ */ jsx("div", {
3524
- className: "flex flex-wrap gap-2",
3525
- children: emailInput.to.map((recipient) => /* @__PURE__ */ jsx("span", {
3526
- className: "rounded-full border border-slate-300 bg-slate-100 px-2 py-0.5 text-xs text-slate-700",
3527
- children: recipient
3528
- }, recipient))
3529
- }) : /* @__PURE__ */ jsx("p", {
3530
- className: "text-xs text-slate-500",
3531
- children: copy.noRecipientsProvided
3532
- })]
3533
- }),
3534
- /* @__PURE__ */ jsxs("div", {
3535
- id: `tool-email-details-${part.id}`,
3536
- "data-testid": "email-send-details",
3537
- className: joinClasses(isExpanded ? "block space-y-4" : "hidden"),
3538
- children: [emailInput.text ? /* @__PURE__ */ jsxs("div", {
3539
- className: "space-y-1",
3515
+ })
3516
+ }), /* @__PURE__ */ jsxs("div", {
3517
+ className: "space-y-4 px-3 py-2",
3518
+ children: [
3519
+ emailInput.subject ? /* @__PURE__ */ jsxs("div", {
3520
+ className: "flex items-center gap-1",
3540
3521
  children: [/* @__PURE__ */ jsxs("p", {
3541
- className: "text-xs font-semibold text-slate-600",
3542
- children: [copy.body, ":"]
3522
+ className: "text-xs font-semibold text-secondary",
3523
+ children: [copy.subject, ":"]
3543
3524
  }), /* @__PURE__ */ jsx("p", {
3544
- className: "whitespace-pre-wrap rounded border border-slate-200 bg-white p-2 text-sm text-slate-700",
3545
- children: emailInput.text
3525
+ className: "text-xs text-foreground",
3526
+ children: emailInput.subject
3546
3527
  })]
3547
- }) : null, part.result !== void 0 ? /* @__PURE__ */ jsxs("div", {
3548
- className: "space-y-2 rounded border border-slate-200 bg-slate-50 p-3",
3528
+ }) : null,
3529
+ /* @__PURE__ */ jsxs("div", {
3530
+ className: "flex items-center gap-1",
3531
+ children: [/* @__PURE__ */ jsxs("p", {
3532
+ className: "text-xs font-semibold text-secondary",
3533
+ children: [copy.to, ":"]
3534
+ }), emailInput.to.length > 0 ? /* @__PURE__ */ jsx("div", {
3535
+ className: "flex flex-wrap gap-2",
3536
+ children: emailInput.to.map((recipient) => /* @__PURE__ */ jsx("span", {
3537
+ className: "rounded-full border border-border-strong bg-surface-subtle px-2 py-0.5 text-xs text-strong",
3538
+ children: recipient
3539
+ }, recipient))
3540
+ }) : /* @__PURE__ */ jsx("p", {
3541
+ className: "text-xs text-muted",
3542
+ children: copy.noRecipientsProvided
3543
+ })]
3544
+ }),
3545
+ /* @__PURE__ */ jsxs("div", {
3546
+ id: `tool-email-details-${part.id}`,
3547
+ "data-testid": "email-send-details",
3548
+ className: joinClasses(isExpanded ? "block space-y-4" : "hidden"),
3549
+ children: [emailInput.text ? /* @__PURE__ */ jsxs("div", {
3550
+ className: "space-y-1",
3551
+ children: [/* @__PURE__ */ jsxs("p", {
3552
+ className: "text-xs font-semibold text-secondary",
3553
+ children: [copy.body, ":"]
3554
+ }), /* @__PURE__ */ jsx("p", {
3555
+ className: "whitespace-pre-wrap rounded border border-border bg-surface p-2 text-sm text-strong",
3556
+ children: emailInput.text
3557
+ })]
3558
+ }) : null, part.result !== void 0 ? /* @__PURE__ */ jsxs("div", {
3559
+ className: "space-y-2 rounded border border-border bg-surface-muted p-3",
3560
+ children: [
3561
+ /* @__PURE__ */ jsx("p", {
3562
+ className: "text-xs font-semibold capitalize tracking-wide text-muted",
3563
+ children: copy.delivery
3564
+ }),
3565
+ emailResult.status ? /* @__PURE__ */ jsxs("p", {
3566
+ className: "text-xs text-strong",
3567
+ children: [
3568
+ /* @__PURE__ */ jsxs("span", {
3569
+ className: "font-semibold text-foreground",
3570
+ children: [copy.status, ":"]
3571
+ }),
3572
+ " ",
3573
+ emailResult.status
3574
+ ]
3575
+ }) : null,
3576
+ emailResult.recipientsCount !== null ? /* @__PURE__ */ jsxs("p", {
3577
+ className: "text-xs text-strong",
3578
+ children: [
3579
+ /* @__PURE__ */ jsxs("span", {
3580
+ className: "font-semibold text-foreground",
3581
+ children: [copy.recipients, ":"]
3582
+ }),
3583
+ " ",
3584
+ emailResult.recipientsCount
3585
+ ]
3586
+ }) : null,
3587
+ emailResult.receiptProvider ? /* @__PURE__ */ jsxs("p", {
3588
+ className: "text-xs text-strong",
3589
+ children: [
3590
+ /* @__PURE__ */ jsxs("span", {
3591
+ className: "font-semibold text-foreground",
3592
+ children: [copy.provider, ":"]
3593
+ }),
3594
+ " ",
3595
+ emailResult.receiptProvider
3596
+ ]
3597
+ }) : null,
3598
+ emailResult.receiptMessageId ? /* @__PURE__ */ jsxs("p", {
3599
+ className: "break-all text-xs text-strong",
3600
+ children: [
3601
+ /* @__PURE__ */ jsxs("span", {
3602
+ className: "font-semibold text-foreground",
3603
+ children: [copy.messageId, ":"]
3604
+ }),
3605
+ " ",
3606
+ emailResult.receiptMessageId
3607
+ ]
3608
+ }) : null,
3609
+ emailResult.receiptRawStatus ? /* @__PURE__ */ jsxs("p", {
3610
+ className: "text-xs text-strong",
3611
+ children: [
3612
+ /* @__PURE__ */ jsxs("span", {
3613
+ className: "font-semibold text-foreground",
3614
+ children: [copy.rawStatus, ":"]
3615
+ }),
3616
+ " ",
3617
+ emailResult.receiptRawStatus
3618
+ ]
3619
+ }) : null,
3620
+ emailResult.raw ? /* @__PURE__ */ jsx("p", {
3621
+ className: "whitespace-pre-wrap text-xs text-strong",
3622
+ children: emailResult.raw
3623
+ }) : null
3624
+ ]
3625
+ }) : null]
3626
+ }),
3627
+ errorDetails ? /* @__PURE__ */ jsxs("p", {
3628
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
3549
3629
  children: [
3550
- /* @__PURE__ */ jsx("p", {
3551
- className: "text-xs font-semibold uppercase tracking-wide text-slate-500",
3552
- children: copy.delivery
3630
+ /* @__PURE__ */ jsxs("span", {
3631
+ className: "font-semibold",
3632
+ children: [copy.errorDetails, ":"]
3553
3633
  }),
3554
- emailResult.status ? /* @__PURE__ */ jsxs("p", {
3555
- className: "text-xs text-slate-700",
3556
- children: [
3557
- /* @__PURE__ */ jsxs("span", {
3558
- className: "font-semibold text-slate-900",
3559
- children: [copy.status, ":"]
3560
- }),
3561
- " ",
3562
- emailResult.status
3563
- ]
3564
- }) : null,
3565
- emailResult.recipientsCount !== null ? /* @__PURE__ */ jsxs("p", {
3566
- className: "text-xs text-slate-700",
3567
- children: [
3568
- /* @__PURE__ */ jsxs("span", {
3569
- className: "font-semibold text-slate-900",
3570
- children: [copy.recipients, ":"]
3571
- }),
3572
- " ",
3573
- emailResult.recipientsCount
3574
- ]
3575
- }) : null,
3576
- emailResult.receiptProvider ? /* @__PURE__ */ jsxs("p", {
3577
- className: "text-xs text-slate-700",
3578
- children: [
3579
- /* @__PURE__ */ jsxs("span", {
3580
- className: "font-semibold text-slate-900",
3581
- children: [copy.provider, ":"]
3582
- }),
3583
- " ",
3584
- emailResult.receiptProvider
3585
- ]
3586
- }) : null,
3587
- emailResult.receiptMessageId ? /* @__PURE__ */ jsxs("p", {
3588
- className: "break-all text-xs text-slate-700",
3589
- children: [
3590
- /* @__PURE__ */ jsxs("span", {
3591
- className: "font-semibold text-slate-900",
3592
- children: [copy.messageId, ":"]
3593
- }),
3594
- " ",
3595
- emailResult.receiptMessageId
3596
- ]
3597
- }) : null,
3598
- emailResult.receiptRawStatus ? /* @__PURE__ */ jsxs("p", {
3599
- className: "text-xs text-slate-700",
3600
- children: [
3601
- /* @__PURE__ */ jsxs("span", {
3602
- className: "font-semibold text-slate-900",
3603
- children: [copy.rawStatus, ":"]
3604
- }),
3605
- " ",
3606
- emailResult.receiptRawStatus
3607
- ]
3608
- }) : null,
3609
- emailResult.raw ? /* @__PURE__ */ jsx("p", {
3610
- className: "whitespace-pre-wrap text-xs text-slate-700",
3611
- children: emailResult.raw
3612
- }) : null
3634
+ " ",
3635
+ errorDetails
3613
3636
  ]
3614
- }) : null]
3615
- }),
3616
- errorDetails ? /* @__PURE__ */ jsxs("p", {
3617
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
3618
- children: [
3619
- /* @__PURE__ */ jsxs("span", {
3620
- className: "font-semibold",
3621
- children: [copy.errorDetails, ":"]
3622
- }),
3623
- " ",
3624
- errorDetails
3625
- ]
3626
- }) : null
3627
- ]
3637
+ }) : null
3638
+ ]
3639
+ })]
3628
3640
  });
3629
3641
  }
3630
3642
 
@@ -3699,15 +3711,15 @@ function ToolResultExternalDatasourceCard({ part, className, locale }) {
3699
3711
  const sqlQuery = toStringOrNull(part.metadata?.sql_query);
3700
3712
  const table = normalizeTable(getTableValue(part), copy);
3701
3713
  const errorDetails = formatToolErrorDetails(part.errorDetails);
3702
- const statusClass = part.state === "error" ? "text-rose-600" : part.state === "pending" ? "text-amber-600" : "text-emerald-600";
3714
+ const statusClass = part.state === "error" ? "text-danger" : part.state === "pending" ? "text-warning" : "text-success";
3703
3715
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
3704
3716
  "aria-label": `${copy.externalDatasource}: ${getUiStatusLabel(part.state, copy)}`,
3705
- 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),
3717
+ 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),
3706
3718
  children: /* @__PURE__ */ jsxs("span", {
3707
3719
  className: "flex items-center gap-2 px-3 py-2 text-sm",
3708
3720
  children: [
3709
3721
  /* @__PURE__ */ jsx(Database, {
3710
- className: "h-4 w-4 shrink-0 text-neutral-500",
3722
+ className: "h-4 w-4 shrink-0 text-muted",
3711
3723
  "aria-hidden": "true"
3712
3724
  }),
3713
3725
  /* @__PURE__ */ jsx("span", {
@@ -3743,14 +3755,14 @@ function ToolResultExternalDatasourceCard({ part, className, locale }) {
3743
3755
  children: [/* @__PURE__ */ jsxs("div", {
3744
3756
  className: "flex items-center gap-2",
3745
3757
  children: [/* @__PURE__ */ jsx(Database, {
3746
- className: "h-5 w-5 text-blue-500",
3758
+ className: "h-5 w-5 text-info",
3747
3759
  "aria-hidden": "true"
3748
3760
  }), /* @__PURE__ */ jsx("h3", {
3749
3761
  className: "text-sm font-medium",
3750
3762
  children: copy.sqlQuery
3751
3763
  })]
3752
3764
  }), /* @__PURE__ */ jsx("pre", {
3753
- className: "overflow-x-auto rounded-md border border-neutral-200 bg-neutral-50 p-3 text-xs leading-5 text-neutral-800",
3765
+ className: "overflow-x-auto rounded-md border border-border bg-surface-muted p-3 text-xs leading-5 text-strong",
3754
3766
  children: sqlQuery
3755
3767
  })]
3756
3768
  }) : null,
@@ -3760,22 +3772,22 @@ function ToolResultExternalDatasourceCard({ part, className, locale }) {
3760
3772
  className: "text-sm font-medium",
3761
3773
  children: copy.queryResults
3762
3774
  }), /* @__PURE__ */ jsx("div", {
3763
- className: "overflow-x-auto rounded-md border border-neutral-200",
3775
+ className: "overflow-x-auto rounded-md border border-border",
3764
3776
  children: /* @__PURE__ */ jsxs("table", {
3765
3777
  className: "w-full border-collapse text-left text-xs",
3766
3778
  children: [/* @__PURE__ */ jsx("thead", {
3767
- className: "bg-neutral-50 text-neutral-600",
3779
+ className: "bg-surface-muted text-secondary",
3768
3780
  children: /* @__PURE__ */ jsx("tr", { children: table.columns.map((column) => /* @__PURE__ */ jsx("th", {
3769
- className: "max-w-56 truncate border-b border-neutral-200 px-3 py-2 font-medium",
3781
+ className: "max-w-56 truncate border-b border-border px-3 py-2 font-medium",
3770
3782
  title: column,
3771
3783
  children: column
3772
3784
  }, column)) })
3773
3785
  }), /* @__PURE__ */ jsx("tbody", { children: table.rows.map((row) => /* @__PURE__ */ jsx("tr", {
3774
- className: "border-b border-neutral-100 last:border-0",
3786
+ className: "border-b border-divider last:border-0",
3775
3787
  children: table.columns.map((column, columnIndex) => {
3776
3788
  const value = formatCell(row[columnIndex]);
3777
3789
  return /* @__PURE__ */ jsx("td", {
3778
- className: "max-w-56 truncate px-3 py-2 text-neutral-700",
3790
+ className: "max-w-56 truncate px-3 py-2 text-strong",
3779
3791
  title: value,
3780
3792
  children: value
3781
3793
  }, column);
@@ -3784,11 +3796,11 @@ function ToolResultExternalDatasourceCard({ part, className, locale }) {
3784
3796
  })
3785
3797
  })]
3786
3798
  }) : part.state === "completed" && !errorDetails ? /* @__PURE__ */ jsx("p", {
3787
- className: "text-sm text-neutral-600",
3799
+ className: "text-sm text-secondary",
3788
3800
  children: copy.noDataToDisplay
3789
3801
  }) : null,
3790
3802
  errorDetails ? /* @__PURE__ */ jsxs("p", {
3791
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
3803
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
3792
3804
  children: [
3793
3805
  /* @__PURE__ */ jsxs("span", {
3794
3806
  className: "font-semibold",
@@ -3824,12 +3836,12 @@ function ToolResultHttpRequestCard({ part, className, locale }) {
3824
3836
  const status = statusCode ? `${statusCode}${metadata?.status_reason ? ` ${metadata.status_reason}` : ""}` : getUiStatusLabel(part.state, copy);
3825
3837
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
3826
3838
  "aria-label": `${copy.httpRequest}: ${status}`,
3827
- 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),
3839
+ 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),
3828
3840
  children: /* @__PURE__ */ jsxs("span", {
3829
3841
  className: "flex items-center gap-2 px-3 py-2 text-sm",
3830
3842
  children: [
3831
3843
  /* @__PURE__ */ jsx(Globe, {
3832
- className: "h-4 w-4 shrink-0 text-neutral-500",
3844
+ className: "h-4 w-4 shrink-0 text-muted",
3833
3845
  "aria-hidden": "true"
3834
3846
  }),
3835
3847
  /* @__PURE__ */ jsx("span", {
@@ -3837,11 +3849,11 @@ function ToolResultHttpRequestCard({ part, className, locale }) {
3837
3849
  children: metadata?.method ?? "HTTP"
3838
3850
  }),
3839
3851
  /* @__PURE__ */ jsx("span", {
3840
- className: "min-w-0 truncate text-neutral-600",
3852
+ className: "min-w-0 truncate text-secondary",
3841
3853
  children: metadata?.url ?? part.name
3842
3854
  }),
3843
3855
  /* @__PURE__ */ jsx("span", {
3844
- className: joinClasses("ml-auto shrink-0", failed ? "text-rose-600" : "text-emerald-600"),
3856
+ className: joinClasses("ml-auto shrink-0", failed ? "text-danger" : "text-success"),
3845
3857
  children: failed ? /* @__PURE__ */ jsx(XCircle, {
3846
3858
  className: "h-4 w-4",
3847
3859
  "aria-hidden": "true"
@@ -3865,25 +3877,25 @@ function ToolResultHttpRequestCard({ part, className, locale }) {
3865
3877
  className: "grid gap-2 text-sm",
3866
3878
  children: [
3867
3879
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3868
- className: "text-xs text-neutral-500",
3880
+ className: "text-xs text-muted",
3869
3881
  children: copy.status
3870
3882
  }), /* @__PURE__ */ jsx("dd", { children: status })] }),
3871
3883
  metadata?.url ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3872
- className: "text-xs text-neutral-500",
3884
+ className: "text-xs text-muted",
3873
3885
  children: copy.requestUrl
3874
3886
  }), /* @__PURE__ */ jsx("dd", {
3875
3887
  className: "break-all",
3876
3888
  children: metadata.url
3877
3889
  })] }) : null,
3878
3890
  metadata?.response_url && metadata.response_url !== metadata.url ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3879
- className: "text-xs text-neutral-500",
3891
+ className: "text-xs text-muted",
3880
3892
  children: copy.responseUrl
3881
3893
  }), /* @__PURE__ */ jsx("dd", {
3882
3894
  className: "break-all",
3883
3895
  children: metadata.response_url
3884
3896
  })] }) : null,
3885
3897
  metadata?.content_type ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3886
- className: "text-xs text-neutral-500",
3898
+ className: "text-xs text-muted",
3887
3899
  children: copy.contentType
3888
3900
  }), /* @__PURE__ */ jsx("dd", { children: metadata.content_type })] }) : null
3889
3901
  ]
@@ -3892,18 +3904,18 @@ function ToolResultHttpRequestCard({ part, className, locale }) {
3892
3904
  className: "mb-2 text-sm font-medium",
3893
3905
  children: copy.response
3894
3906
  }), /* @__PURE__ */ jsx("pre", {
3895
- className: "overflow-x-auto rounded-md border border-neutral-200 bg-neutral-50 p-3 text-xs leading-5",
3907
+ className: "overflow-x-auto rounded-md border border-border bg-surface-muted p-3 text-xs leading-5",
3896
3908
  children: response
3897
3909
  })] }) : null,
3898
3910
  metadata?.response_headers && Object.keys(metadata.response_headers).length ? /* @__PURE__ */ jsxs("details", { children: [/* @__PURE__ */ jsx("summary", {
3899
3911
  className: "cursor-pointer text-sm font-medium",
3900
3912
  children: copy.responseHeaders
3901
3913
  }), /* @__PURE__ */ jsx("pre", {
3902
- className: "mt-2 overflow-x-auto rounded-md border border-neutral-200 bg-neutral-50 p-3 text-xs",
3914
+ className: "mt-2 overflow-x-auto rounded-md border border-border bg-surface-muted p-3 text-xs",
3903
3915
  children: JSON.stringify(metadata.response_headers, null, 2)
3904
3916
  })] }) : null,
3905
3917
  errorDetails ? /* @__PURE__ */ jsxs("p", {
3906
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
3918
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
3907
3919
  children: [
3908
3920
  /* @__PURE__ */ jsxs("span", {
3909
3921
  className: "font-semibold",
@@ -3939,12 +3951,12 @@ function ToolResultMcpCard({ part, className, locale }) {
3939
3951
  const failed = part.state === "error";
3940
3952
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
3941
3953
  "aria-label": `${copy.mcpTool}: ${tool}`,
3942
- 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),
3954
+ 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),
3943
3955
  children: /* @__PURE__ */ jsxs("span", {
3944
3956
  className: "flex items-center gap-2 px-3 py-2 text-sm",
3945
3957
  children: [
3946
3958
  /* @__PURE__ */ jsx(Plug, {
3947
- className: "h-4 w-4 shrink-0 text-neutral-500",
3959
+ className: "h-4 w-4 shrink-0 text-muted",
3948
3960
  "aria-hidden": "true"
3949
3961
  }),
3950
3962
  /* @__PURE__ */ jsx("span", {
@@ -3952,11 +3964,11 @@ function ToolResultMcpCard({ part, className, locale }) {
3952
3964
  children: "MCP"
3953
3965
  }),
3954
3966
  /* @__PURE__ */ jsx("span", {
3955
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
3967
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
3956
3968
  children: tool
3957
3969
  }),
3958
3970
  /* @__PURE__ */ jsx("span", {
3959
- className: joinClasses("ml-auto shrink-0", failed ? "text-rose-600" : "text-emerald-600"),
3971
+ className: joinClasses("ml-auto shrink-0", failed ? "text-danger" : "text-success"),
3960
3972
  children: failed ? /* @__PURE__ */ jsx(XCircle, {
3961
3973
  className: "h-4 w-4",
3962
3974
  "aria-hidden": "true"
@@ -3979,10 +3991,10 @@ function ToolResultMcpCard({ part, className, locale }) {
3979
3991
  /* @__PURE__ */ jsxs("dl", {
3980
3992
  className: "grid gap-2 text-sm",
3981
3993
  children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3982
- className: "text-xs text-neutral-500",
3994
+ className: "text-xs text-muted",
3983
3995
  children: copy.tool
3984
3996
  }), /* @__PURE__ */ jsx("dd", { children: tool })] }), server ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
3985
- className: "text-xs text-neutral-500",
3997
+ className: "text-xs text-muted",
3986
3998
  children: copy.server
3987
3999
  }), /* @__PURE__ */ jsx("dd", {
3988
4000
  className: "break-all",
@@ -3993,11 +4005,11 @@ function ToolResultMcpCard({ part, className, locale }) {
3993
4005
  className: "mb-2 text-sm font-medium",
3994
4006
  children: copy.result
3995
4007
  }), /* @__PURE__ */ jsx("pre", {
3996
- className: "overflow-x-auto rounded-md border border-neutral-200 bg-neutral-50 p-3 text-xs leading-5",
4008
+ className: "overflow-x-auto rounded-md border border-border bg-surface-muted p-3 text-xs leading-5",
3997
4009
  children: result
3998
4010
  })] }) : null,
3999
4011
  error ? /* @__PURE__ */ jsxs("p", {
4000
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
4012
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
4001
4013
  children: [
4002
4014
  /* @__PURE__ */ jsxs("span", {
4003
4015
  className: "font-semibold",
@@ -4069,7 +4081,7 @@ function FileDownloadButton({ file, label, copy, className }) {
4069
4081
  className: "ml-auto flex shrink-0 items-center gap-2",
4070
4082
  children: [state === "error" ? /* @__PURE__ */ jsx("span", {
4071
4083
  role: "alert",
4072
- className: "text-xs text-rose-600",
4084
+ className: "text-xs text-danger",
4073
4085
  children: copy.downloadFailed
4074
4086
  }) : null, /* @__PURE__ */ jsx("button", {
4075
4087
  type: "button",
@@ -4077,7 +4089,7 @@ function FileDownloadButton({ file, label, copy, className }) {
4077
4089
  disabled: isDownloading,
4078
4090
  "aria-label": `${isDownloading ? copy.downloading : copy.download}: ${label}`,
4079
4091
  title: isDownloading ? copy.downloading : copy.download,
4080
- 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),
4092
+ 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),
4081
4093
  children: isDownloading ? /* @__PURE__ */ jsx(LoaderCircle, {
4082
4094
  className: "h-4 w-4 animate-spin",
4083
4095
  "aria-hidden": "true"
@@ -4106,14 +4118,14 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
4106
4118
  const files = getFiles(part);
4107
4119
  const errorDetails = formatToolErrorDetails(part.errorDetails);
4108
4120
  const fileLabel = files.length === 1 ? copy.file : copy.files;
4109
- const statusClass = part.state === "error" ? "text-rose-600" : part.state === "pending" ? "text-amber-600" : "text-emerald-600";
4121
+ const statusClass = part.state === "error" ? "text-danger" : part.state === "pending" ? "text-warning" : "text-success";
4110
4122
  const singleFile = part.state === "completed" && files.length === 1 && !errorDetails ? files[0] : void 0;
4111
4123
  if (singleFile) {
4112
4124
  const extension = getExtension(singleFile);
4113
4125
  const label = getLabel(singleFile);
4114
4126
  return /* @__PURE__ */ jsxs("section", {
4115
4127
  "aria-label": `${copy.officeDocuments}: ${label}`,
4116
- 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),
4128
+ 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),
4117
4129
  children: [
4118
4130
  /* @__PURE__ */ jsx(File, {
4119
4131
  className: joinClasses("h-6 w-6 shrink-0", getFileIconClass(extension)),
@@ -4125,7 +4137,7 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
4125
4137
  className: "truncate text-sm font-medium",
4126
4138
  children: label
4127
4139
  }), /* @__PURE__ */ jsxs("p", {
4128
- className: "truncate text-[11px] text-neutral-500",
4140
+ className: "truncate text-[11px] text-muted",
4129
4141
  children: [copy.officeDocuments, extension ? ` · ${extension.toUpperCase()}` : null]
4130
4142
  })]
4131
4143
  }),
@@ -4137,7 +4149,7 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
4137
4149
  label,
4138
4150
  copy
4139
4151
  }) : /* @__PURE__ */ jsx(CheckCircle2, {
4140
- className: "ml-auto h-4 w-4 shrink-0 text-emerald-600",
4152
+ className: "ml-auto h-4 w-4 shrink-0 text-success",
4141
4153
  "aria-hidden": "true"
4142
4154
  })
4143
4155
  ]
@@ -4145,12 +4157,12 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
4145
4157
  }
4146
4158
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
4147
4159
  "aria-label": `${copy.officeDocuments}: ${files.length} ${fileLabel}`,
4148
- 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),
4160
+ 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),
4149
4161
  children: /* @__PURE__ */ jsxs("span", {
4150
4162
  className: "flex items-center gap-2 px-3 py-2 text-sm",
4151
4163
  children: [
4152
4164
  /* @__PURE__ */ jsx(FileText, {
4153
- className: "h-4 w-4 shrink-0 text-neutral-500",
4165
+ className: "h-4 w-4 shrink-0 text-muted",
4154
4166
  "aria-hidden": "true"
4155
4167
  }),
4156
4168
  /* @__PURE__ */ jsx("span", {
@@ -4158,7 +4170,7 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
4158
4170
  children: copy.officeDocuments
4159
4171
  }),
4160
4172
  /* @__PURE__ */ jsx("span", {
4161
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
4173
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
4162
4174
  children: part.state === "pending" ? copy.pending : `${files.length} ${fileLabel}`
4163
4175
  }),
4164
4176
  /* @__PURE__ */ jsx("span", {
@@ -4186,7 +4198,7 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
4186
4198
  const extension = getExtension(file);
4187
4199
  const label = getLabel(file);
4188
4200
  return /* @__PURE__ */ jsxs("div", {
4189
- className: "flex items-center gap-3 rounded-lg border border-neutral-200 bg-white p-3",
4201
+ className: "flex items-center gap-3 rounded-lg border border-border bg-surface p-3",
4190
4202
  children: [
4191
4203
  /* @__PURE__ */ jsx(File, {
4192
4204
  className: joinClasses("h-8 w-8 shrink-0", getFileIconClass(extension)),
@@ -4198,7 +4210,7 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
4198
4210
  className: "truncate text-sm font-medium",
4199
4211
  children: label
4200
4212
  }), extension ? /* @__PURE__ */ jsx("p", {
4201
- className: "text-[11px] uppercase text-neutral-500",
4213
+ className: "text-[11px] uppercase text-muted",
4202
4214
  children: extension
4203
4215
  }) : null]
4204
4216
  }),
@@ -4214,15 +4226,15 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
4214
4226
  }, file.id);
4215
4227
  }),
4216
4228
  files.length === 0 && part.state === "pending" ? /* @__PURE__ */ jsx("p", {
4217
- className: "text-sm text-neutral-600",
4229
+ className: "text-sm text-secondary",
4218
4230
  children: copy.creatingDocuments
4219
4231
  }) : null,
4220
4232
  files.length === 0 && part.state === "completed" && !errorDetails ? /* @__PURE__ */ jsx("p", {
4221
- className: "text-sm text-neutral-600",
4233
+ className: "text-sm text-secondary",
4222
4234
  children: copy.noFilesGenerated
4223
4235
  }) : null,
4224
4236
  errorDetails ? /* @__PURE__ */ jsxs("p", {
4225
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
4237
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
4226
4238
  children: [
4227
4239
  /* @__PURE__ */ jsxs("span", {
4228
4240
  className: "font-semibold",
@@ -5016,11 +5028,11 @@ function statusLabel(status, copy) {
5016
5028
  return key ? copy[key] : null;
5017
5029
  }
5018
5030
  const BADGE_TONE = {
5019
- pending: "border-amber-200 bg-amber-50 text-amber-800",
5031
+ pending: "border-warning-border bg-warning-subtle text-warning-strong",
5020
5032
  executing: "border-sky-200 bg-sky-50 text-sky-800",
5021
- executed: "border-emerald-200 bg-emerald-50 text-emerald-800",
5022
- failed: "border-rose-200 bg-rose-50 text-rose-800",
5023
- unknown: "border-amber-300 bg-amber-50 text-amber-900"
5033
+ executed: "border-success-border bg-success-subtle text-success-strong",
5034
+ failed: "border-danger-border bg-danger-subtle text-danger-strong",
5035
+ unknown: "border-warning-border bg-warning-subtle text-warning-strong"
5024
5036
  };
5025
5037
  /** Header badge of a held action: "Awaiting your confirmation" or its outcome. */
5026
5038
  function ConfirmationBadge({ state, copy }) {
@@ -5028,7 +5040,7 @@ function ConfirmationBadge({ state, copy }) {
5028
5040
  const label = status === "pending" ? copy.awaitingConfirmation : statusLabel(status, copy);
5029
5041
  const Icon = status === "executed" ? CheckCircle2 : status === "failed" ? XCircle : status === "executing" ? LoaderCircle : Clock;
5030
5042
  return /* @__PURE__ */ jsxs("span", {
5031
- 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"),
5043
+ 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"),
5032
5044
  "data-confirmation-status": status,
5033
5045
  children: [/* @__PURE__ */ jsx(Icon, {
5034
5046
  className: joinClasses("h-3 w-3", status === "executing" ? "animate-spin" : void 0),
@@ -5052,18 +5064,18 @@ function PendingConfirmationFooter({ pending, toolConfirmation, copy }) {
5052
5064
  const [sending, setSending] = useState(null);
5053
5065
  const [failed, setFailed] = useState(false);
5054
5066
  if (!toolConfirmation) return /* @__PURE__ */ jsx("p", {
5055
- className: "border-t border-amber-100 bg-amber-50/60 px-3 py-2 text-xs text-neutral-700",
5067
+ className: "border-t border-border bg-warning-subtle/60 px-3 py-2 text-xs text-strong",
5056
5068
  children: copy.confirmHint
5057
5069
  });
5058
5070
  if (!state) return /* @__PURE__ */ jsx("p", {
5059
- className: "border-t border-neutral-100 bg-neutral-50 px-3 py-2 text-xs text-neutral-500",
5071
+ className: "border-t border-divider bg-surface-muted px-3 py-2 text-xs text-muted",
5060
5072
  "aria-live": "polite",
5061
5073
  children: copy.verifying
5062
5074
  });
5063
5075
  if (state.status !== "pending") {
5064
5076
  const label = statusLabel(state.status, copy);
5065
5077
  return label ? /* @__PURE__ */ jsxs("p", {
5066
- className: "border-t border-neutral-100 bg-neutral-50 px-3 py-2 text-xs text-neutral-700",
5078
+ className: "border-t border-divider bg-surface-muted px-3 py-2 text-xs text-strong",
5067
5079
  "aria-live": "polite",
5068
5080
  children: [label, state.status === "failed" && state.error ? `: ${state.error}` : null]
5069
5081
  }) : null;
@@ -5087,14 +5099,14 @@ function PendingConfirmationFooter({ pending, toolConfirmation, copy }) {
5087
5099
  const expiry = expiryText(state, toolConfirmation.states.serverOffsetMs, now, copy);
5088
5100
  const unavailable = state.error === "tool_unavailable";
5089
5101
  return /* @__PURE__ */ jsxs("div", {
5090
- className: "flex flex-wrap items-center gap-2 border-t border-amber-100 bg-amber-50/60 px-3 py-2",
5102
+ className: "flex flex-wrap items-center gap-2 border-t border-border bg-warning-subtle/60 px-3 py-2",
5091
5103
  "data-confirmation-actions": pending.action_id,
5092
5104
  children: [
5093
5105
  state.canConfirm ? /* @__PURE__ */ jsxs("button", {
5094
5106
  type: "button",
5095
5107
  disabled,
5096
5108
  onClick: () => void decide("confirm"),
5097
- 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"),
5109
+ 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"),
5098
5110
  children: [sending === "confirm" ? /* @__PURE__ */ jsx(LoaderCircle, {
5099
5111
  className: "mr-2 size-3 animate-spin",
5100
5112
  "aria-hidden": "true"
@@ -5104,14 +5116,14 @@ function PendingConfirmationFooter({ pending, toolConfirmation, copy }) {
5104
5116
  type: "button",
5105
5117
  disabled,
5106
5118
  onClick: () => void decide("reject"),
5107
- 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",
5119
+ 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",
5108
5120
  children: [sending === "reject" ? /* @__PURE__ */ jsx(LoaderCircle, {
5109
5121
  className: "mr-2 size-3 animate-spin",
5110
5122
  "aria-hidden": "true"
5111
5123
  }) : null, sending === "reject" ? copy.cancelling : copy.cancel]
5112
5124
  }) : null,
5113
5125
  /* @__PURE__ */ jsx("span", {
5114
- className: "ml-auto text-xs text-neutral-600",
5126
+ className: "ml-auto text-xs text-secondary",
5115
5127
  "aria-live": "polite",
5116
5128
  children: failed ? copy.decisionError : unavailable ? copy.toolUnavailable : expiry
5117
5129
  })
@@ -5246,7 +5258,7 @@ function ExternalAnchor({ href, className, children, label }) {
5246
5258
  target: "_blank",
5247
5259
  rel: "noreferrer noopener",
5248
5260
  "aria-label": label,
5249
- className: joinClasses("inline-flex items-center gap-1 text-xs font-medium text-neutral-700 hover:text-neutral-950 hover:underline", className),
5261
+ className: joinClasses("inline-flex items-center gap-1 text-xs font-medium text-strong hover:text-muted", className),
5250
5262
  children
5251
5263
  });
5252
5264
  }
@@ -5255,7 +5267,7 @@ function ShowAllToggle({ total, expanded, onToggle, copy }) {
5255
5267
  return /* @__PURE__ */ jsx("button", {
5256
5268
  type: "button",
5257
5269
  onClick: onToggle,
5258
- 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",
5270
+ 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",
5259
5271
  children: expanded ? copy.showLess : fillCopy(copy.showAll, { count: total })
5260
5272
  });
5261
5273
  }
@@ -5266,24 +5278,24 @@ function MailRow({ message, locale, copy }) {
5266
5278
  children: [
5267
5279
  /* @__PURE__ */ jsx("span", {
5268
5280
  "aria-label": message.unread ? copy.unread : void 0,
5269
- className: joinClasses("h-2 w-2 shrink-0 self-center rounded-full", message.unread ? "bg-blue-600" : "bg-transparent")
5281
+ className: joinClasses("h-2 w-2 shrink-0 self-center rounded-full", message.unread ? "bg-info" : "bg-transparent")
5270
5282
  }),
5271
5283
  /* @__PURE__ */ jsx("span", {
5272
- className: joinClasses("min-w-0 flex-1 truncate text-sm", message.unread ? "font-semibold text-neutral-950" : "text-neutral-800"),
5284
+ className: joinClasses("min-w-0 flex-1 truncate text-sm", message.unread ? "font-semibold text-foreground" : "text-strong"),
5273
5285
  children: displayName(message.from) ?? "—"
5274
5286
  }),
5275
5287
  /* @__PURE__ */ jsx("span", {
5276
- className: "shrink-0 text-xs text-neutral-500",
5288
+ className: "shrink-0 text-xs text-muted",
5277
5289
  children: formatMailDate(message.date, locale)
5278
5290
  })
5279
5291
  ]
5280
5292
  }),
5281
5293
  /* @__PURE__ */ jsx("p", {
5282
- className: joinClasses("truncate pl-4 text-sm", message.unread ? "font-medium text-neutral-950" : "text-neutral-700"),
5294
+ className: joinClasses("truncate pl-4 text-sm", message.unread ? "font-medium text-foreground" : "text-strong"),
5283
5295
  children: text(message.subject) ?? copy.noSubject
5284
5296
  }),
5285
5297
  text(message.snippet) ? /* @__PURE__ */ jsx("p", {
5286
- className: "line-clamp-1 pl-4 text-xs text-neutral-500",
5298
+ className: "line-clamp-1 pl-4 text-xs text-muted",
5287
5299
  children: message.snippet
5288
5300
  }) : null
5289
5301
  ] });
@@ -5292,7 +5304,7 @@ function MailRow({ message, locale, copy }) {
5292
5304
  href: message.link,
5293
5305
  target: "_blank",
5294
5306
  rel: "noreferrer noopener",
5295
- className: joinClasses(className, "hover:bg-neutral-50"),
5307
+ className: joinClasses(className, "hover:bg-surface-muted"),
5296
5308
  children: content
5297
5309
  }) : /* @__PURE__ */ jsx("div", {
5298
5310
  className,
@@ -5302,11 +5314,11 @@ function MailRow({ message, locale, copy }) {
5302
5314
  function MailList({ messages, locale, copy }) {
5303
5315
  const [expanded, setExpanded] = useState(false);
5304
5316
  if (messages.length === 0) return /* @__PURE__ */ jsx("p", {
5305
- className: "px-3 py-3 text-sm text-neutral-600",
5317
+ className: "px-3 py-3 text-sm text-secondary",
5306
5318
  children: copy.noEmails
5307
5319
  });
5308
5320
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("ul", {
5309
- className: "divide-y divide-neutral-100",
5321
+ className: "divide-y divide-divider",
5310
5322
  children: (expanded ? messages : messages.slice(0, COLLAPSED_ITEMS)).map((message) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(MailRow, {
5311
5323
  message,
5312
5324
  locale,
@@ -5331,13 +5343,13 @@ function MailMessageView({ message, connector, locale, copy }) {
5331
5343
  className: "space-y-1",
5332
5344
  children: [
5333
5345
  /* @__PURE__ */ jsx("h4", {
5334
- className: "text-sm font-semibold text-neutral-950",
5346
+ className: "text-sm font-semibold text-foreground",
5335
5347
  children: text(message.subject) ?? copy.noSubject
5336
5348
  }),
5337
5349
  /* @__PURE__ */ jsxs("div", {
5338
- className: "flex items-baseline gap-2 text-xs text-neutral-600",
5350
+ className: "flex items-baseline gap-2 text-xs text-secondary",
5339
5351
  children: [/* @__PURE__ */ jsx("span", {
5340
- className: "min-w-0 flex-1 truncate font-medium text-neutral-800",
5352
+ className: "min-w-0 flex-1 truncate font-medium text-strong",
5341
5353
  children: message.from ?? "—"
5342
5354
  }), /* @__PURE__ */ jsx("span", {
5343
5355
  className: "shrink-0",
@@ -5345,7 +5357,7 @@ function MailMessageView({ message, connector, locale, copy }) {
5345
5357
  })]
5346
5358
  }),
5347
5359
  text(message.to) ? /* @__PURE__ */ jsxs("p", {
5348
- className: "truncate text-xs text-neutral-500",
5360
+ className: "truncate text-xs text-muted",
5349
5361
  children: [
5350
5362
  copy.to,
5351
5363
  ": ",
@@ -5353,7 +5365,7 @@ function MailMessageView({ message, connector, locale, copy }) {
5353
5365
  ]
5354
5366
  }) : null,
5355
5367
  text(message.cc) ? /* @__PURE__ */ jsxs("p", {
5356
- className: "truncate text-xs text-neutral-500",
5368
+ className: "truncate text-xs text-muted",
5357
5369
  children: [
5358
5370
  copy.cc,
5359
5371
  ": ",
@@ -5363,7 +5375,7 @@ function MailMessageView({ message, connector, locale, copy }) {
5363
5375
  ]
5364
5376
  }),
5365
5377
  shownBody ? /* @__PURE__ */ jsx("p", {
5366
- className: "whitespace-pre-wrap break-words text-sm leading-6 text-neutral-800",
5378
+ className: "whitespace-pre-wrap break-words text-sm leading-6 text-strong",
5367
5379
  children: shownBody
5368
5380
  }) : null,
5369
5381
  /* @__PURE__ */ jsxs("div", {
@@ -5371,11 +5383,11 @@ function MailMessageView({ message, connector, locale, copy }) {
5371
5383
  children: [long ? /* @__PURE__ */ jsx("button", {
5372
5384
  type: "button",
5373
5385
  onClick: () => setExpanded((value) => !value),
5374
- className: "text-xs font-medium text-neutral-600 hover:text-neutral-950",
5386
+ className: "text-xs font-medium text-secondary hover:text-foreground",
5375
5387
  children: expanded ? copy.showLess : copy.showMore
5376
5388
  }) : null, message.link ? /* @__PURE__ */ jsxs(ExternalAnchor, {
5377
5389
  href: message.link,
5378
- children: [fillCopy(copy.openIn, { service: connector?.label ?? "" }), /* @__PURE__ */ jsx(ExternalLink, {
5390
+ children: [fillCopy(copy.openIn, { service: connector?.label ?? "" }), /* @__PURE__ */ jsx(ArrowUpRight, {
5379
5391
  className: "h-3 w-3",
5380
5392
  "aria-hidden": "true"
5381
5393
  })]
@@ -5415,7 +5427,7 @@ function EventRow({ event, locale, copy }) {
5415
5427
  className: "flex gap-3 px-3 py-2",
5416
5428
  children: [
5417
5429
  /* @__PURE__ */ jsx("span", {
5418
- className: "w-24 shrink-0 pt-0.5 text-xs tabular-nums text-neutral-600",
5430
+ className: "w-24 shrink-0 pt-0.5 text-xs tabular-nums text-secondary",
5419
5431
  children: eventTime(event, locale, copy)
5420
5432
  }),
5421
5433
  /* @__PURE__ */ jsxs("div", {
@@ -5424,13 +5436,13 @@ function EventRow({ event, locale, copy }) {
5424
5436
  href: event.link,
5425
5437
  target: "_blank",
5426
5438
  rel: "noreferrer noopener",
5427
- className: "block truncate text-sm font-medium text-neutral-950 hover:underline",
5439
+ className: "block truncate text-sm font-medium text-foreground hover:underline",
5428
5440
  children: text(event.title) ?? copy.noSubject
5429
5441
  }) : /* @__PURE__ */ jsx("p", {
5430
- className: "truncate text-sm font-medium text-neutral-950",
5442
+ className: "truncate text-sm font-medium text-foreground",
5431
5443
  children: text(event.title) ?? copy.noSubject
5432
5444
  }), details.length > 0 ? /* @__PURE__ */ jsx("p", {
5433
- className: "truncate text-xs text-neutral-500",
5445
+ className: "truncate text-xs text-muted",
5434
5446
  children: details.join(" · ")
5435
5447
  }) : null]
5436
5448
  }),
@@ -5448,7 +5460,7 @@ function EventRow({ event, locale, copy }) {
5448
5460
  function Agenda({ events, locale, copy }) {
5449
5461
  const [expanded, setExpanded] = useState(false);
5450
5462
  if (events.length === 0) return /* @__PURE__ */ jsx("p", {
5451
- className: "px-3 py-3 text-sm text-neutral-600",
5463
+ className: "px-3 py-3 text-sm text-secondary",
5452
5464
  children: copy.noEvents
5453
5465
  });
5454
5466
  const visible = expanded ? events : events.slice(0, COLLAPSED_ITEMS);
@@ -5458,12 +5470,12 @@ function Agenda({ events, locale, copy }) {
5458
5470
  month: "long"
5459
5471
  });
5460
5472
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
5461
- className: "divide-y divide-neutral-100",
5473
+ className: "divide-y divide-divider",
5462
5474
  children: groupByDay(visible).map((group, index) => /* @__PURE__ */ jsxs("section", { children: [group.day ? /* @__PURE__ */ jsx("h4", {
5463
- className: "bg-neutral-50 px-3 py-1 text-xs font-medium capitalize text-neutral-600",
5475
+ className: "bg-surface-muted px-3 py-1 text-xs font-medium capitalize text-secondary",
5464
5476
  children: dayFormat.format(group.day)
5465
5477
  }) : null, /* @__PURE__ */ jsx("ul", {
5466
- className: "divide-y divide-neutral-100",
5478
+ className: "divide-y divide-divider",
5467
5479
  children: group.events.map((event) => /* @__PURE__ */ jsx(EventRow, {
5468
5480
  event,
5469
5481
  locale,
@@ -5484,12 +5496,12 @@ function CollapsibleBody({ body, copy }) {
5484
5496
  return /* @__PURE__ */ jsxs("div", {
5485
5497
  className: "space-y-1",
5486
5498
  children: [/* @__PURE__ */ jsx("p", {
5487
- className: "whitespace-pre-wrap break-words text-sm leading-6 text-neutral-800",
5499
+ className: "whitespace-pre-wrap break-words text-sm leading-6 text-strong",
5488
5500
  children: long && !expanded ? `${body.slice(0, COLLAPSED_BODY_CHARS).trimEnd()}…` : body
5489
5501
  }), long ? /* @__PURE__ */ jsx("button", {
5490
5502
  type: "button",
5491
5503
  onClick: () => setExpanded((value) => !value),
5492
- className: "text-xs font-medium text-neutral-600 hover:text-neutral-950",
5504
+ className: "text-xs font-medium text-secondary hover:text-foreground",
5493
5505
  children: expanded ? copy.showLess : copy.showMore
5494
5506
  }) : null]
5495
5507
  });
@@ -5502,15 +5514,15 @@ function DraftView({ view, copy }) {
5502
5514
  className: "space-y-1",
5503
5515
  children: [
5504
5516
  /* @__PURE__ */ jsx("p", {
5505
- className: "text-sm font-medium text-neutral-950",
5517
+ className: "text-sm font-medium text-foreground",
5506
5518
  children: copy.draftSaved
5507
5519
  }),
5508
5520
  view.subject ? /* @__PURE__ */ jsx("p", {
5509
- className: "truncate text-sm text-neutral-800",
5521
+ className: "truncate text-sm text-strong",
5510
5522
  children: view.subject
5511
5523
  }) : null,
5512
5524
  view.to.length > 0 ? /* @__PURE__ */ jsxs("p", {
5513
- className: "truncate text-xs text-neutral-500",
5525
+ className: "truncate text-xs text-muted",
5514
5526
  children: [
5515
5527
  copy.to,
5516
5528
  ": ",
@@ -5525,7 +5537,7 @@ function DraftView({ view, copy }) {
5525
5537
  }),
5526
5538
  view.link ? /* @__PURE__ */ jsxs(ExternalAnchor, {
5527
5539
  href: view.link,
5528
- children: [copy.openDraft, /* @__PURE__ */ jsx(ExternalLink, {
5540
+ children: [copy.openDraft, /* @__PURE__ */ jsx(ArrowUpRight, {
5529
5541
  className: "h-3 w-3",
5530
5542
  "aria-hidden": "true"
5531
5543
  })]
@@ -5540,10 +5552,10 @@ function Field({ label, children }) {
5540
5552
  return /* @__PURE__ */ jsxs("div", {
5541
5553
  className: "flex gap-3 text-sm",
5542
5554
  children: [/* @__PURE__ */ jsx("dt", {
5543
- className: "w-24 shrink-0 text-xs leading-5 text-neutral-500",
5555
+ className: "w-24 shrink-0 text-xs leading-5 text-muted",
5544
5556
  children: label
5545
5557
  }), /* @__PURE__ */ jsx("dd", {
5546
- className: "min-w-0 flex-1 break-words text-neutral-900",
5558
+ className: "min-w-0 flex-1 break-words text-foreground",
5547
5559
  children
5548
5560
  })]
5549
5561
  });
@@ -5576,11 +5588,11 @@ function PendingMailView({ pending, copy }) {
5576
5588
  ]
5577
5589
  }),
5578
5590
  text(mail.reply_to_message_id) ? /* @__PURE__ */ jsx("p", {
5579
- className: "text-xs text-neutral-500",
5591
+ className: "text-xs text-muted",
5580
5592
  children: copy.replyInThread
5581
5593
  }) : null,
5582
5594
  /* @__PURE__ */ jsx("div", {
5583
- className: "rounded-md border border-neutral-200 bg-neutral-50 px-3 py-2",
5595
+ className: "rounded-md border border-border bg-surface-muted px-3 py-2",
5584
5596
  children: /* @__PURE__ */ jsx(CollapsibleBody, {
5585
5597
  body: text(mail.body),
5586
5598
  copy
@@ -5612,7 +5624,7 @@ function Change({ before, after }) {
5612
5624
  className: "flex flex-wrap items-baseline gap-x-2",
5613
5625
  children: [
5614
5626
  /* @__PURE__ */ jsx("span", {
5615
- className: "text-neutral-500 line-through",
5627
+ className: "text-muted line-through",
5616
5628
  children: before
5617
5629
  }),
5618
5630
  /* @__PURE__ */ jsx("span", {
@@ -5631,19 +5643,19 @@ function PendingEventView({ operation, pending, locale, copy }) {
5631
5643
  className: "space-y-1 px-3 py-3",
5632
5644
  children: [
5633
5645
  /* @__PURE__ */ jsx("p", {
5634
- className: "text-xs font-medium uppercase tracking-wide text-rose-700",
5646
+ className: "text-xs font-medium capitalize tracking-wide text-danger-strong",
5635
5647
  children: copy.deleteEvent
5636
5648
  }),
5637
5649
  /* @__PURE__ */ jsx("p", {
5638
- className: "text-sm font-medium text-neutral-900 line-through",
5650
+ className: "text-sm font-medium text-foreground line-through",
5639
5651
  children: text(current?.title) ?? text(action.event_id) ?? copy.noSubject
5640
5652
  }),
5641
5653
  current ? /* @__PURE__ */ jsx("p", {
5642
- className: "text-xs text-neutral-500",
5654
+ className: "text-xs text-muted",
5643
5655
  children: formatRange(current.start, current.end, Boolean(current.all_day), locale, copy)
5644
5656
  }) : null,
5645
5657
  (current?.attendees?.length ?? 0) > 0 ? /* @__PURE__ */ jsx("p", {
5646
- className: "pt-1 text-xs text-neutral-600",
5658
+ className: "pt-1 text-xs text-secondary",
5647
5659
  children: copy.attendeesNotified
5648
5660
  }) : null
5649
5661
  ]
@@ -5658,7 +5670,7 @@ function PendingEventView({ operation, pending, locale, copy }) {
5658
5670
  className: "space-y-2 px-3 py-3",
5659
5671
  children: [
5660
5672
  /* @__PURE__ */ jsx("p", {
5661
- className: "text-xs font-medium uppercase tracking-wide text-neutral-500",
5673
+ className: "text-xs font-medium capitalize tracking-wide text-muted",
5662
5674
  children: isUpdate ? copy.eventChange : copy.newEvent
5663
5675
  }),
5664
5676
  /* @__PURE__ */ jsxs("dl", {
@@ -5711,7 +5723,7 @@ function PendingEventView({ operation, pending, locale, copy }) {
5711
5723
  ]
5712
5724
  }),
5713
5725
  attendees.length > 0 ? /* @__PURE__ */ jsx("p", {
5714
- className: "text-xs text-neutral-600",
5726
+ className: "text-xs text-secondary",
5715
5727
  children: copy.attendeesNotified
5716
5728
  }) : null
5717
5729
  ]
@@ -5733,24 +5745,24 @@ function ToolResultPersonalConnectorCard({ part, locale, className, toolConfirma
5733
5745
  const total = headerCount(view, copy);
5734
5746
  const isPending = view.kind === "pending-mail" || view.kind === "pending-event";
5735
5747
  return /* @__PURE__ */ jsxs("section", {
5736
- className: joinClasses("plai-tool-result-personal-connector-card overflow-hidden rounded-lg border border-neutral-200 bg-white text-neutral-950", className),
5748
+ className: joinClasses("plai-tool-result-personal-connector-card overflow-hidden rounded-lg border border-border bg-surface text-foreground", className),
5737
5749
  "data-tool-call-id": part.id,
5738
5750
  "data-tool-call-state": part.state,
5739
5751
  "data-connector-action": view.kind,
5740
5752
  children: [
5741
5753
  /* @__PURE__ */ jsxs("header", {
5742
- className: "flex items-center gap-2 border-b border-neutral-200 px-3 py-2 text-xs text-neutral-600",
5754
+ className: "flex items-center gap-2 border-b border-border px-3 py-2 text-xs text-secondary",
5743
5755
  children: [
5744
5756
  /* @__PURE__ */ jsx(Icon, {
5745
- className: "h-4 w-4 shrink-0 text-neutral-700",
5757
+ className: "h-4 w-4 shrink-0 text-strong",
5746
5758
  "aria-hidden": "true"
5747
5759
  }),
5748
5760
  /* @__PURE__ */ jsx("span", {
5749
- className: "shrink-0 font-medium text-neutral-900",
5761
+ className: "shrink-0 font-medium text-foreground",
5750
5762
  children: connector?.label
5751
5763
  }),
5752
5764
  connector?.account_email ? /* @__PURE__ */ jsx("span", {
5753
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
5765
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
5754
5766
  children: connector.account_email
5755
5767
  }) : null,
5756
5768
  isPending ? /* @__PURE__ */ jsx(ConfirmationBadge, {
@@ -5825,39 +5837,42 @@ function ConfirmedActionRow({ action, copy }) {
5825
5837
  "data-confirmation-status": action.status,
5826
5838
  children: [
5827
5839
  failed ? /* @__PURE__ */ jsx(XCircle, {
5828
- className: "mt-0.5 h-4 w-4 shrink-0 text-rose-600",
5840
+ className: "mt-0.5 h-4 w-4 shrink-0 text-danger",
5829
5841
  "aria-hidden": "true"
5830
5842
  }) : executed ? /* @__PURE__ */ jsx(CheckCircle2, {
5831
- className: "mt-0.5 h-4 w-4 shrink-0 text-emerald-600",
5843
+ className: "mt-0.5 h-4 w-4 shrink-0 text-success",
5832
5844
  "aria-hidden": "true"
5833
5845
  }) : /* @__PURE__ */ jsx(Clock, {
5834
- className: "mt-0.5 h-4 w-4 shrink-0 text-neutral-500",
5846
+ className: "mt-0.5 h-4 w-4 shrink-0 text-muted",
5835
5847
  "aria-hidden": "true"
5836
5848
  }),
5837
5849
  /* @__PURE__ */ jsxs("div", {
5838
5850
  className: "min-w-0 flex-1 space-y-0.5",
5839
5851
  children: [
5840
5852
  /* @__PURE__ */ jsx("p", {
5841
- className: "text-sm font-medium text-neutral-950",
5853
+ className: "text-sm font-medium text-foreground",
5842
5854
  children: title
5843
5855
  }),
5844
5856
  connector ? /* @__PURE__ */ jsxs("div", {
5845
- className: "flex items-center gap-2 truncate text-xs text-neutral-500",
5857
+ className: "flex items-center gap-2 truncate text-xs text-muted",
5846
5858
  children: [connector.label, connector.account_email ? /* @__PURE__ */ jsx("span", {
5847
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
5859
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
5848
5860
  children: connector.account_email
5849
5861
  }) : null]
5850
5862
  }) : null,
5851
5863
  failed && text(action.error) ? /* @__PURE__ */ jsx("p", {
5852
- className: "line-clamp-2 text-xs text-rose-700",
5864
+ className: "line-clamp-2 text-xs text-danger-strong",
5853
5865
  children: action.error
5854
5866
  }) : null
5855
5867
  ]
5856
5868
  }),
5857
- executed && link ? /* @__PURE__ */ jsx(ExternalAnchor, {
5869
+ executed && link ? /* @__PURE__ */ jsxs(ExternalAnchor, {
5858
5870
  href: link,
5859
5871
  className: "shrink-0",
5860
- children: operation === "send" ? copy.openEmail : copy.openEvent
5872
+ children: [operation === "send" ? copy.openEmail : copy.openEvent, /* @__PURE__ */ jsx(ArrowUpRight, {
5873
+ className: "h-3 w-3",
5874
+ "aria-hidden": "true"
5875
+ })]
5861
5876
  }) : null
5862
5877
  ]
5863
5878
  });
@@ -5867,7 +5882,7 @@ function ToolResultToolConfirmationCard({ part, locale, className }) {
5867
5882
  if (actions.length === 0) return null;
5868
5883
  const copy = getPersonalConnectorCopy(locale);
5869
5884
  return /* @__PURE__ */ jsx("ul", {
5870
- 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),
5885
+ className: joinClasses("plai-tool-result-tool-confirmation-card divide-y divide-divider overflow-hidden rounded-lg border border-border bg-surface text-foreground", className),
5871
5886
  "data-tool-call-id": part.id,
5872
5887
  "data-tool-call-state": part.state,
5873
5888
  children: actions.map((action) => /* @__PURE__ */ jsx(ConfirmedActionRow, {
@@ -5892,14 +5907,14 @@ function ToolResultPendingConfirmationCard({ part, locale, className, toolConfir
5892
5907
  const copy = getPersonalConnectorCopy(locale);
5893
5908
  const entries = Object.entries(pending.action).filter(([key, value]) => key !== "operation" && value !== null && value !== void 0);
5894
5909
  return /* @__PURE__ */ jsxs("section", {
5895
- className: joinClasses("plai-tool-result-pending-confirmation-card overflow-hidden rounded-lg border border-neutral-200 bg-white text-neutral-950", className),
5910
+ className: joinClasses("plai-tool-result-pending-confirmation-card overflow-hidden rounded-lg border border-border bg-surface text-foreground", className),
5896
5911
  "data-tool-call-id": part.id,
5897
5912
  "data-tool-call-state": part.state,
5898
5913
  children: [
5899
5914
  /* @__PURE__ */ jsxs("header", {
5900
- className: "flex items-center gap-2 border-b border-neutral-200 px-3 py-2 text-xs text-neutral-600",
5915
+ className: "flex items-center gap-2 border-b border-border px-3 py-2 text-xs text-secondary",
5901
5916
  children: [/* @__PURE__ */ jsx("span", {
5902
- className: "truncate font-mono font-medium text-neutral-900",
5917
+ className: "truncate font-mono font-medium text-foreground",
5903
5918
  children: part.name
5904
5919
  }), /* @__PURE__ */ jsx(ConfirmationBadge, {
5905
5920
  state: confirmationState,
@@ -5962,12 +5977,12 @@ function ToolResultWorkflowDispatchCard({ part, className, locale }) {
5962
5977
  const error = formatToolErrorDetails(part.errorDetails);
5963
5978
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
5964
5979
  "aria-label": `${copy.workflow}: ${workflowName}`,
5965
- 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),
5980
+ 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),
5966
5981
  children: /* @__PURE__ */ jsxs("span", {
5967
5982
  className: "flex items-center gap-2 px-3 py-2 text-sm",
5968
5983
  children: [
5969
5984
  /* @__PURE__ */ jsx(Workflow, {
5970
- className: "h-4 w-4 shrink-0 text-neutral-500",
5985
+ className: "h-4 w-4 shrink-0 text-muted",
5971
5986
  "aria-hidden": "true"
5972
5987
  }),
5973
5988
  /* @__PURE__ */ jsx("span", {
@@ -5975,19 +5990,19 @@ function ToolResultWorkflowDispatchCard({ part, className, locale }) {
5975
5990
  children: copy.workflow
5976
5991
  }),
5977
5992
  /* @__PURE__ */ jsx("span", {
5978
- className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
5993
+ className: "min-w-0 truncate border-border-strong border px-2 py-0.5 rounded-md text-xs text-muted",
5979
5994
  children: workflowName
5980
5995
  }),
5981
5996
  /* @__PURE__ */ jsxs("span", {
5982
5997
  className: "ml-auto flex shrink-0 items-center gap-2",
5983
5998
  children: [/* @__PURE__ */ jsx("span", {
5984
- className: "text-xs text-neutral-500",
5999
+ className: "text-xs text-muted",
5985
6000
  children: status
5986
6001
  }), failed ? /* @__PURE__ */ jsx(XCircle, {
5987
- className: "h-4 w-4 text-rose-600",
6002
+ className: "h-4 w-4 text-danger",
5988
6003
  "aria-hidden": "true"
5989
6004
  }) : /* @__PURE__ */ jsx(CheckCircle2, {
5990
- className: "h-4 w-4 text-emerald-600",
6005
+ className: "h-4 w-4 text-success",
5991
6006
  "aria-hidden": "true"
5992
6007
  })]
5993
6008
  })
@@ -6006,22 +6021,22 @@ function ToolResultWorkflowDispatchCard({ part, className, locale }) {
6006
6021
  className: "grid gap-2 text-sm",
6007
6022
  children: [
6008
6023
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
6009
- className: "text-xs text-neutral-500",
6024
+ className: "text-xs text-muted",
6010
6025
  children: copy.workflow
6011
6026
  }), /* @__PURE__ */ jsx("dd", { children: workflowName })] }),
6012
6027
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
6013
- className: "text-xs text-neutral-500",
6028
+ className: "text-xs text-muted",
6014
6029
  children: copy.status
6015
6030
  }), /* @__PURE__ */ jsx("dd", { children: status })] }),
6016
6031
  result.executionId ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
6017
- className: "text-xs text-neutral-500",
6032
+ className: "text-xs text-muted",
6018
6033
  children: copy.executionId
6019
6034
  }), /* @__PURE__ */ jsx("dd", {
6020
6035
  className: "break-all",
6021
6036
  children: result.executionId
6022
6037
  })] }) : null,
6023
6038
  result.workflowId ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
6024
- className: "text-xs text-neutral-500",
6039
+ className: "text-xs text-muted",
6025
6040
  children: copy.workflowId
6026
6041
  }), /* @__PURE__ */ jsx("dd", {
6027
6042
  className: "break-all",
@@ -6033,11 +6048,11 @@ function ToolResultWorkflowDispatchCard({ part, className, locale }) {
6033
6048
  className: "mb-2 text-sm font-medium",
6034
6049
  children: copy.result
6035
6050
  }), /* @__PURE__ */ jsx("pre", {
6036
- className: "overflow-x-auto rounded-md border border-neutral-200 bg-neutral-50 p-3 text-xs leading-5",
6051
+ className: "overflow-x-auto rounded-md border border-border bg-surface-muted p-3 text-xs leading-5",
6037
6052
  children: output$1
6038
6053
  })] }) : null,
6039
6054
  error ? /* @__PURE__ */ jsxs("p", {
6040
- className: "rounded border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-700",
6055
+ className: "rounded border border-danger-border bg-danger-subtle px-3 py-2 text-xs text-danger-strong",
6041
6056
  children: [
6042
6057
  /* @__PURE__ */ jsxs("span", {
6043
6058
  className: "font-semibold",
@@ -6344,79 +6359,81 @@ function ToolResultCard({ part, className, detailsOpen = true, locale, onOpenAge
6344
6359
  });
6345
6360
  if (part.toolType === "datasource") return null;
6346
6361
  return /* @__PURE__ */ jsxs("section", {
6347
- className: joinClasses("space-y-3 rounded-lg border border-slate-200 bg-slate-50 p-3", className),
6362
+ className: joinClasses("plai-tool-result-card overflow-hidden rounded-lg border border-border bg-surface-muted", className),
6348
6363
  "data-tool-call-id": part.id,
6349
6364
  "data-tool-call-state": part.state,
6350
- children: [
6351
- /* @__PURE__ */ jsxs("header", {
6352
- className: "flex items-center justify-between gap-2",
6353
- children: [/* @__PURE__ */ jsx("h4", {
6354
- className: "text-sm font-semibold text-slate-900",
6355
- children: part.name
6356
- }), /* @__PURE__ */ jsx("span", {
6357
- className: "rounded-full border uppercase border-emerald-200 bg-emerald-50 px-2 py-0.5 text-xs text-emerald-800",
6358
- children: copy.completed
6359
- })]
6360
- }),
6361
- part.toolType ? /* @__PURE__ */ jsxs("p", {
6362
- className: "text-xs text-slate-600",
6363
- children: [
6364
- /* @__PURE__ */ jsxs("span", {
6365
- className: "font-semibold",
6366
- children: [copy.type, ":"]
6367
- }),
6368
- " ",
6369
- part.toolType
6370
- ]
6371
- }) : null,
6372
- /* @__PURE__ */ jsxs("details", {
6373
- open: detailsOpen,
6374
- className: "space-y-2",
6375
- children: [/* @__PURE__ */ jsx("summary", {
6376
- className: "cursor-pointer text-xs font-semibold text-slate-600",
6377
- children: copy.input
6378
- }), /* @__PURE__ */ jsx("pre", {
6379
- className: "overflow-x-auto rounded bg-slate-900 p-2 text-xs text-slate-100",
6380
- children: formatJson(part.input)
6381
- })]
6382
- }),
6383
- part.result !== void 0 ? /* @__PURE__ */ jsxs("details", {
6384
- open: detailsOpen,
6385
- className: "space-y-2",
6386
- children: [
6387
- /* @__PURE__ */ jsx("summary", {
6388
- className: "cursor-pointer text-xs font-semibold text-slate-600",
6389
- children: copy.output
6390
- }),
6391
- officeMediaFiles.length > 0 ? /* @__PURE__ */ jsxs("div", {
6392
- className: "space-y-2 rounded border border-slate-200 bg-white p-3",
6393
- children: [/* @__PURE__ */ jsx("p", {
6394
- className: "text-xs font-semibold text-slate-700",
6395
- children: copy.generatedFiles
6396
- }), /* @__PURE__ */ jsx("ul", {
6397
- className: "space-y-1",
6398
- children: officeMediaFiles.map((file) => {
6399
- const label = file.name || file.pathname || file.id;
6400
- return /* @__PURE__ */ jsx("li", {
6401
- className: "text-xs text-slate-700",
6402
- children: file.url ? /* @__PURE__ */ jsx("a", {
6403
- href: file.url,
6404
- target: "_blank",
6405
- rel: "noreferrer noopener",
6406
- className: "hover:underline",
6407
- children: label
6408
- }) : /* @__PURE__ */ jsx("span", { children: label })
6409
- }, file.id);
6410
- })
6411
- })]
6412
- }) : null,
6413
- /* @__PURE__ */ jsx("pre", {
6414
- className: "overflow-x-auto rounded bg-slate-900 p-2 text-xs text-slate-100",
6415
- children: formatJson(part.result)
6416
- })
6417
- ]
6418
- }) : null
6419
- ]
6365
+ children: [/* @__PURE__ */ jsxs("header", {
6366
+ className: "flex items-center justify-between gap-2 border-b border-border px-3 py-2",
6367
+ children: [/* @__PURE__ */ jsx("h4", {
6368
+ className: "text-sm font-semibold text-foreground",
6369
+ children: part.name
6370
+ }), /* @__PURE__ */ jsx("span", {
6371
+ className: "rounded-full border capitalize border-success-border bg-success-subtle px-2 py-0.5 text-xs text-success-strong",
6372
+ children: copy.completed
6373
+ })]
6374
+ }), /* @__PURE__ */ jsxs("div", {
6375
+ className: "space-y-3 px-3 py-2",
6376
+ children: [
6377
+ part.toolType ? /* @__PURE__ */ jsxs("p", {
6378
+ className: "text-xs text-secondary",
6379
+ children: [
6380
+ /* @__PURE__ */ jsxs("span", {
6381
+ className: "font-semibold",
6382
+ children: [copy.type, ":"]
6383
+ }),
6384
+ " ",
6385
+ part.toolType
6386
+ ]
6387
+ }) : null,
6388
+ /* @__PURE__ */ jsxs("details", {
6389
+ open: detailsOpen,
6390
+ className: "space-y-2",
6391
+ children: [/* @__PURE__ */ jsx("summary", {
6392
+ className: "cursor-pointer text-xs font-semibold text-secondary",
6393
+ children: copy.input
6394
+ }), /* @__PURE__ */ jsx("pre", {
6395
+ className: "overflow-x-auto rounded bg-inverse p-2 text-xs text-inverse-foreground",
6396
+ children: formatJson(part.input)
6397
+ })]
6398
+ }),
6399
+ part.result !== void 0 ? /* @__PURE__ */ jsxs("details", {
6400
+ open: detailsOpen,
6401
+ className: "space-y-2",
6402
+ children: [
6403
+ /* @__PURE__ */ jsx("summary", {
6404
+ className: "cursor-pointer text-xs font-semibold text-secondary",
6405
+ children: copy.output
6406
+ }),
6407
+ officeMediaFiles.length > 0 ? /* @__PURE__ */ jsxs("div", {
6408
+ className: "space-y-2 rounded border border-border bg-surface p-3",
6409
+ children: [/* @__PURE__ */ jsx("p", {
6410
+ className: "text-xs font-semibold text-strong",
6411
+ children: copy.generatedFiles
6412
+ }), /* @__PURE__ */ jsx("ul", {
6413
+ className: "space-y-1",
6414
+ children: officeMediaFiles.map((file) => {
6415
+ const label = file.name || file.pathname || file.id;
6416
+ return /* @__PURE__ */ jsx("li", {
6417
+ className: "text-xs text-strong",
6418
+ children: file.url ? /* @__PURE__ */ jsx("a", {
6419
+ href: file.url,
6420
+ target: "_blank",
6421
+ rel: "noreferrer noopener",
6422
+ className: "hover:underline",
6423
+ children: label
6424
+ }) : /* @__PURE__ */ jsx("span", { children: label })
6425
+ }, file.id);
6426
+ })
6427
+ })]
6428
+ }) : null,
6429
+ /* @__PURE__ */ jsx("pre", {
6430
+ className: "overflow-x-auto rounded bg-inverse p-2 text-xs text-inverse-foreground",
6431
+ children: formatJson(part.result)
6432
+ })
6433
+ ]
6434
+ }) : null
6435
+ ]
6436
+ })]
6420
6437
  });
6421
6438
  }
6422
6439
 
@@ -6435,7 +6452,7 @@ function Thinking({ part, thinkingLabel, completedLabel, locale, defaultOpen, cl
6435
6452
  previousState.current = part.state;
6436
6453
  }, [isStreaming, part.state]);
6437
6454
  return /* @__PURE__ */ jsxs("section", {
6438
- className: joinClasses("text-sm text-neutral-600", className),
6455
+ className: joinClasses("text-sm text-secondary", className),
6439
6456
  "data-thinking-state": part.state,
6440
6457
  ...props,
6441
6458
  children: [
@@ -6445,7 +6462,7 @@ function Thinking({ part, thinkingLabel, completedLabel, locale, defaultOpen, cl
6445
6462
  "aria-expanded": hasContent ? isOpen : void 0,
6446
6463
  "aria-label": hasContent ? `${isOpen ? copy.collapse : copy.expand} ${label}` : label,
6447
6464
  disabled: !hasContent,
6448
- 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"),
6465
+ 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"),
6449
6466
  onClick: () => setIsOpen((value) => !value),
6450
6467
  children: [
6451
6468
  isStreaming ? /* @__PURE__ */ jsx(LoaderCircle, {
@@ -6469,7 +6486,7 @@ function Thinking({ part, thinkingLabel, completedLabel, locale, defaultOpen, cl
6469
6486
  }),
6470
6487
  hasContent && isOpen ? /* @__PURE__ */ jsx("p", {
6471
6488
  id: contentId,
6472
- className: "mt-1 whitespace-pre-wrap border-l-2 border-neutral-200 pl-3 text-sm leading-6 text-neutral-600",
6489
+ className: "mt-1 whitespace-pre-wrap border-l-2 border-border pl-3 text-sm leading-6 text-secondary",
6473
6490
  children: part.thinking
6474
6491
  }) : null
6475
6492
  ]
@@ -6496,7 +6513,7 @@ function MessageAvatar({ src, fallback, alt = fallback, className, imageClassNam
6496
6513
  const showImage = src.trim().length > 0 && failedSrc !== src;
6497
6514
  const initials = getFallbackInitials(fallback);
6498
6515
  return /* @__PURE__ */ jsx("div", {
6499
- 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),
6516
+ 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),
6500
6517
  ...props,
6501
6518
  children: showImage ? /* @__PURE__ */ jsx("img", {
6502
6519
  src,
@@ -6518,7 +6535,7 @@ function MessageContent({ className,...props }) {
6518
6535
  }
6519
6536
  function MessageHeader({ className,...props }) {
6520
6537
  return /* @__PURE__ */ jsx("header", {
6521
- className: joinClasses("text-xs font-semibold uppercase tracking-wide text-neutral-500", className),
6538
+ className: joinClasses("text-xs font-semibold uppercase tracking-wide text-muted", className),
6522
6539
  ...props
6523
6540
  });
6524
6541
  }
@@ -6559,13 +6576,13 @@ function renderPart(part, index, message, isStreaming, onOpenAgentThread, getRes
6559
6576
  href: part.url,
6560
6577
  target: "_blank",
6561
6578
  rel: "noreferrer noopener",
6562
- className: "block w-fit rounded-lg border border-slate-200 bg-white p-2",
6579
+ className: "block w-fit rounded-lg border border-border bg-surface p-2",
6563
6580
  children: [/* @__PURE__ */ jsx("img", {
6564
6581
  src: part.url,
6565
6582
  alt: title || copy.uploadedImage,
6566
6583
  className: "max-h-56 rounded-md object-contain"
6567
6584
  }), title ? /* @__PURE__ */ jsx("p", {
6568
- className: "mt-2 max-w-xs truncate text-xs font-medium text-slate-700",
6585
+ className: "mt-2 max-w-xs truncate text-xs font-medium text-strong",
6569
6586
  children: title
6570
6587
  }) : null]
6571
6588
  }, `image-${index}`);
@@ -6577,17 +6594,17 @@ function renderPart(part, index, message, isStreaming, onOpenAgentThread, getRes
6577
6594
  href: part.fileUrl,
6578
6595
  target: "_blank",
6579
6596
  rel: "noreferrer noopener",
6580
- className: "flex w-fit items-center gap-3 rounded-lg border border-slate-200 bg-slate-50 px-3 py-2 text-left",
6597
+ className: "flex w-fit items-center gap-3 rounded-lg border border-border bg-surface-muted px-3 py-2 text-left",
6581
6598
  children: [/* @__PURE__ */ jsx("span", {
6582
- className: "rounded bg-slate-900 px-2 py-1 text-[10px] font-semibold uppercase tracking-wide text-white",
6599
+ className: "rounded bg-inverse px-2 py-1 text-[10px] font-semibold uppercase tracking-wide text-inverse-foreground",
6583
6600
  children: extension ?? copy.file
6584
6601
  }), /* @__PURE__ */ jsxs("div", {
6585
6602
  className: "min-w-0",
6586
6603
  children: [/* @__PURE__ */ jsx("p", {
6587
- className: "max-w-xs truncate text-sm font-medium text-slate-900",
6604
+ className: "max-w-xs truncate text-sm font-medium text-foreground",
6588
6605
  children: fileName
6589
6606
  }), part.mimeType ? /* @__PURE__ */ jsx("p", {
6590
- className: "text-xs text-slate-500",
6607
+ className: "text-xs text-muted",
6591
6608
  children: part.mimeType
6592
6609
  }) : null]
6593
6610
  })]
@@ -6614,7 +6631,7 @@ function renderPart(part, index, message, isStreaming, onOpenAgentThread, getRes
6614
6631
  }, `thinking-${index}`);
6615
6632
  }
6616
6633
  if (part.type === "guardrail") return /* @__PURE__ */ jsx("p", {
6617
- className: "rounded-lg border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-900",
6634
+ className: "rounded-lg border border-warning-border bg-warning-subtle px-3 py-2 text-sm text-warning-strong",
6618
6635
  children: part.content
6619
6636
  }, `guardrail-${index}`);
6620
6637
  return null;
@@ -6691,7 +6708,7 @@ function MessageParts({ message, collapseThreshold = DEFAULT_COLLAPSE_THRESHOLD,
6691
6708
  getResourceDownloadUrl
6692
6709
  }, `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", {
6693
6710
  type: "button",
6694
- className: "text-xs font-medium text-slate-600 hover:text-slate-900",
6711
+ className: "text-xs font-medium text-secondary hover:text-foreground",
6695
6712
  onClick: () => setIsExpanded((previous) => !previous),
6696
6713
  children: isExpanded ? readLessLabel ?? copy.readLess : readMoreLabel ?? copy.readMore
6697
6714
  }) : null]
@@ -6878,7 +6895,7 @@ function Clipboard({ text: text$2, onCopy, copiedDuration = 2e3, copyLabel, copi
6878
6895
  return /* @__PURE__ */ jsxs("button", {
6879
6896
  type,
6880
6897
  "aria-label": isCopied ? resolvedCopiedLabel : resolvedCopyLabel,
6881
- 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),
6898
+ 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),
6882
6899
  disabled: disabled || isCopying,
6883
6900
  onClick: handleClick,
6884
6901
  ...props,
@@ -6902,7 +6919,7 @@ function ThumbButton({ label, icon, className, type = "button",...props }) {
6902
6919
  return /* @__PURE__ */ jsxs("button", {
6903
6920
  type,
6904
6921
  "aria-label": label,
6905
- 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),
6922
+ 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),
6906
6923
  ...props,
6907
6924
  children: [icon, /* @__PURE__ */ jsx("span", {
6908
6925
  className: "sr-only",
@@ -6938,7 +6955,7 @@ function Reload({ label, locale, className, type = "button",...props }) {
6938
6955
  return /* @__PURE__ */ jsxs("button", {
6939
6956
  type,
6940
6957
  "aria-label": resolvedLabel,
6941
- 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),
6958
+ 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),
6942
6959
  ...props,
6943
6960
  children: [/* @__PURE__ */ jsx(RotateCcw, {
6944
6961
  className: "size-4",
@@ -7025,7 +7042,7 @@ function PromptFormAttachButton({ onFilesSelected, onInvalidFiles, locale, accep
7025
7042
 
7026
7043
  //#endregion
7027
7044
  //#region src/components/prompt-form/prompt-form.tsx
7028
- 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";
7045
+ 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";
7029
7046
  const defaultMaxRows = 4;
7030
7047
  function resizeTextarea(textarea, maxRows) {
7031
7048
  const styles = getComputedStyle(textarea);
@@ -7077,7 +7094,7 @@ function PromptForm({ value, onValueChange, onSubmit, status = "ready", locale,
7077
7094
  setFiles(files.filter((_, fileIndex) => fileIndex !== index));
7078
7095
  }
7079
7096
  return /* @__PURE__ */ jsxs("form", {
7080
- className: joinClasses("flex w-full flex-col overflow-hidden rounded-2xl border border-neutral-200 bg-white", className),
7097
+ className: joinClasses("flex w-full flex-col overflow-hidden rounded-2xl border border-border bg-surface", className),
7081
7098
  onSubmit: async (event) => {
7082
7099
  event.preventDefault();
7083
7100
  if (!canSubmit) return;
@@ -7109,7 +7126,7 @@ function PromptForm({ value, onValueChange, onSubmit, status = "ready", locale,
7109
7126
  /* @__PURE__ */ jsx("textarea", {
7110
7127
  ref: textareaRef,
7111
7128
  rows: 1,
7112
- 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),
7129
+ 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),
7113
7130
  value,
7114
7131
  onChange: (event) => {
7115
7132
  onValueChange(event.target.value);
@@ -7153,17 +7170,17 @@ function PromptForm({ value, onValueChange, onSubmit, status = "ready", locale,
7153
7170
  })
7154
7171
  ]
7155
7172
  }), files.length > 0 ? /* @__PURE__ */ jsxs("div", {
7156
- className: joinClasses("border-t border-neutral-200", attachmentsClassName),
7173
+ className: joinClasses("border-t border-border", attachmentsClassName),
7157
7174
  children: [/* @__PURE__ */ jsx("div", {
7158
7175
  className: "flex flex-wrap gap-2 px-4 py-2",
7159
7176
  children: files.map((file, index) => /* @__PURE__ */ jsxs("div", {
7160
- className: "flex max-w-full items-center gap-1.5 rounded-md bg-neutral-100 px-2 py-1 text-xs text-neutral-700",
7177
+ className: "flex max-w-full items-center gap-1.5 rounded-md bg-surface-subtle px-2 py-1 text-xs text-strong",
7161
7178
  children: [/* @__PURE__ */ jsx("span", {
7162
7179
  className: "max-w-[150px] truncate",
7163
7180
  children: file.name
7164
7181
  }), /* @__PURE__ */ jsx("button", {
7165
7182
  type: "button",
7166
- className: "text-neutral-500 transition-colors hover:text-neutral-800 disabled:cursor-not-allowed disabled:opacity-40",
7183
+ className: "text-muted transition-colors hover:text-strong disabled:cursor-not-allowed disabled:opacity-40",
7167
7184
  "aria-label": `${removeFileLabel}: ${file.name}`,
7168
7185
  disabled: isInteractionDisabled,
7169
7186
  onClick: () => removeFile(index),
@@ -7179,14 +7196,14 @@ function PromptForm({ value, onValueChange, onSubmit, status = "ready", locale,
7179
7196
  "aria-valuemin": 0,
7180
7197
  "aria-valuemax": 100,
7181
7198
  "aria-valuenow": Math.round(uploadState.progress),
7182
- className: joinClasses("h-1.5 overflow-hidden rounded-full bg-neutral-200", uploadProgressClassName),
7199
+ className: joinClasses("h-1.5 overflow-hidden rounded-full bg-surface-hover", uploadProgressClassName),
7183
7200
  children: /* @__PURE__ */ jsx("div", {
7184
- className: "h-full rounded-full bg-neutral-900 transition-[width] duration-150",
7201
+ className: "h-full rounded-full bg-inverse transition-[width] duration-150",
7185
7202
  style: { width: `${uploadState.progress}%` }
7186
7203
  })
7187
7204
  })
7188
7205
  }) : uploadState?.status === "error" ? /* @__PURE__ */ jsx("p", {
7189
- className: "px-4 pb-3 text-xs text-red-600",
7206
+ className: "px-4 pb-3 text-xs text-danger",
7190
7207
  children: uploadErrorLabel
7191
7208
  }) : null]
7192
7209
  }) : null]
@@ -7390,7 +7407,7 @@ function SpeechToTextToggle({ controller, onTranscriptionComplete, onTranscripti
7390
7407
  "aria-pressed": isListening,
7391
7408
  "aria-busy": isRequesting || isTranscribing,
7392
7409
  disabled: disabled || isRequesting || isTranscribing,
7393
- className: joinClasses(isListening && !isTranscribing ? "text-red-600" : void 0, className),
7410
+ className: joinClasses(isListening && !isTranscribing ? "text-danger" : void 0, className),
7394
7411
  onClick: (event) => {
7395
7412
  onClick?.(event);
7396
7413
  if (event.defaultPrevented) return;
@@ -7495,7 +7512,7 @@ function ConversationFilesList({ messages, locale, className }) {
7495
7512
  className: joinClasses("space-y-6", className),
7496
7513
  children: [
7497
7514
  uploaded.length === 0 && generated.length === 0 ? /* @__PURE__ */ jsx("p", {
7498
- className: "text-sm text-neutral-600",
7515
+ className: "text-sm text-secondary",
7499
7516
  children: copy.noConversationFiles
7500
7517
  }) : null,
7501
7518
  /* @__PURE__ */ jsx(FileSection, {
@@ -7517,7 +7534,7 @@ function FileSection({ title, files, copy }) {
7517
7534
  className: "space-y-3",
7518
7535
  "aria-label": title,
7519
7536
  children: [/* @__PURE__ */ jsxs("h3", {
7520
- className: "text-xs font-semibold uppercase tracking-wide text-neutral-500",
7537
+ className: "text-xs font-semibold uppercase tracking-wide text-muted",
7521
7538
  children: [
7522
7539
  title,
7523
7540
  " (",
@@ -7525,7 +7542,7 @@ function FileSection({ title, files, copy }) {
7525
7542
  ")"
7526
7543
  ]
7527
7544
  }), files.map((file) => /* @__PURE__ */ jsxs("div", {
7528
- className: "flex items-center gap-3 rounded-lg border border-neutral-200 bg-white p-3",
7545
+ className: "flex items-center gap-3 rounded-lg border border-border bg-surface p-3",
7529
7546
  children: [
7530
7547
  /* @__PURE__ */ jsx(File, {
7531
7548
  className: joinClasses("h-8 w-8 shrink-0", getFileIconClass(file.extension)),
@@ -7537,7 +7554,7 @@ function FileSection({ title, files, copy }) {
7537
7554
  className: "truncate text-sm font-medium",
7538
7555
  children: file.name
7539
7556
  }), file.extension ? /* @__PURE__ */ jsx("p", {
7540
- className: "text-[11px] uppercase text-neutral-500",
7557
+ className: "text-[11px] uppercase text-muted",
7541
7558
  children: file.extension
7542
7559
  }) : null]
7543
7560
  }),
@@ -7566,7 +7583,7 @@ function ConversationFilesSheet({ messages, locale, className, open, onOpenChang
7566
7583
  children: [showTrigger ? /* @__PURE__ */ jsxs(SheetTrigger, {
7567
7584
  "aria-label": `${copy.conversationFiles}: ${count$1}`,
7568
7585
  title: copy.conversationFiles,
7569
- 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),
7586
+ 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),
7570
7587
  children: [/* @__PURE__ */ jsx(Paperclip$1, {
7571
7588
  className: "h-4 w-4",
7572
7589
  "aria-hidden": "true"