@athenaintel/react 0.11.0 → 0.11.2

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
@@ -33,7 +33,7 @@ import { runsMaterialize, StatewireThread, useStatewireSendCommand, useStatewire
33
33
  import { useAuiState } from "@assistant-ui/store";
34
34
  import * as ReactDOM from "react-dom";
35
35
  import ReactDOM__default, { flushSync } from "react-dom";
36
- const version$1 = "0.11.0";
36
+ const version$1 = "0.11.2";
37
37
  const packageJson = {
38
38
  version: version$1
39
39
  };
@@ -12031,6 +12031,9 @@ function useDeepAgentThread({
12031
12031
  return statewireTransport(
12032
12032
  {
12033
12033
  url: `${baseUrl.replace(/\/+$/, "")}/${encodeURIComponent(threadId)}`,
12034
+ // A never-started chat has no server session yet: the transport
12035
+ // makes no network calls until the first command send.
12036
+ ...preloadRef.current.preload && { isNew: true },
12034
12037
  headers: (ctx) => headersRef.current(ctx),
12035
12038
  ...sessionStore && { sessionStore }
12036
12039
  },
@@ -16520,6 +16523,9 @@ function TooltipContent({
16520
16523
  "data-slot": "tooltip-content",
16521
16524
  sideOffset,
16522
16525
  className: cn(
16526
+ // Portaled outside the provider wrapper — carries the SDK scope
16527
+ // classes itself so tokens and the scoped reset still apply.
16528
+ "athena-sdk athena-sdk-chrome",
16523
16529
  "bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
16524
16530
  className
16525
16531
  ),
@@ -20979,10 +20985,14 @@ function AthenaProvider({
20979
20985
  );
20980
20986
  }
20981
20987
  let result = /* @__PURE__ */ jsx(PostHogProvider, { config: posthogConfig, children: inner });
20982
- if (themeStyleVars) {
20983
- result = /* @__PURE__ */ jsx("div", { className: "athena-themed", style: themeStyleVars, children: result });
20984
- }
20985
- return result;
20988
+ return /* @__PURE__ */ jsx(
20989
+ "div",
20990
+ {
20991
+ className: themeStyleVars ? "athena-sdk athena-themed" : "athena-sdk",
20992
+ style: themeStyleVars,
20993
+ children: result
20994
+ }
20995
+ );
20986
20996
  }
20987
20997
  function OrderedMap(content) {
20988
20998
  this.content = content;
@@ -55432,7 +55442,7 @@ const MentionSuggestionPopup = forwardRef(({ store, query, command: command2, cl
55432
55442
  {
55433
55443
  ref: refs.setFloating,
55434
55444
  style: floatingStyles,
55435
- className: "z-[9999]",
55445
+ className: "athena-sdk athena-sdk-chrome z-[9999]",
55436
55446
  onMouseDown: (e) => e.preventDefault(),
55437
55447
  children: /* @__PURE__ */ jsx(
55438
55448
  MentionSuggestionList,
@@ -55999,13 +56009,13 @@ const TiptapComposer = ({ tools = [], rootCategories }) => {
55999
56009
  });
56000
56010
  if (fullMessage) {
56001
56011
  aui.composer.setText(fullMessage);
56002
- aui.composer.send();
56012
+ aui.composer.send({ steer: false });
56003
56013
  clearAttachments();
56004
56014
  clearQuote();
56005
56015
  }
56006
56016
  } else {
56007
56017
  aui.composer.setText(markdown);
56008
- aui.composer.send();
56018
+ aui.composer.send({ steer: false });
56009
56019
  }
56010
56020
  editor2.commands.clearContent();
56011
56021
  }, [aui, clearAttachments, clearQuote, appUrl]);
@@ -56642,6 +56652,10 @@ const TOOL_META = {
56642
56652
  // Presentations
56643
56653
  create_powerpoint_deck: { displayName: "Building presentation", icon: Monitor },
56644
56654
  execute_presentation_code: { displayName: "Generating slides", icon: Monitor },
56655
+ execute_word_document_code: { displayName: "Editing Word document", icon: FileText },
56656
+ execute_spreadsheet_code: { displayName: "Editing spreadsheet", icon: ChartColumn },
56657
+ execute_spreadsheet_commands: { displayName: "Editing spreadsheet", icon: ChartColumn },
56658
+ unified_email_list_accounts: { displayName: "Checking email accounts", icon: Mail },
56645
56659
  // Code & Data
56646
56660
  run_python_code: { displayName: "Running analysis", icon: Code },
56647
56661
  run_sql_query_tool: { displayName: "Running SQL query", icon: Database, describer: (a) => a.sql_query ?? a.query ?? a.sql ? `"${truncateLine(a.sql_query ?? a.query ?? a.sql)}"` : "" },
@@ -56689,14 +56703,14 @@ function extractResultMessage(result) {
56689
56703
  return null;
56690
56704
  }
56691
56705
  function isResultSuccess(result) {
56692
- if (typeof result === "string") {
56693
- const parsed = tryParseJson$1(result);
56694
- if (parsed) return parsed.success === true;
56695
- }
56696
- if (typeof result === "object" && result !== null) {
56697
- return result.success === true;
56706
+ const obj = typeof result === "string" ? tryParseJson$1(result) : typeof result === "object" && result !== null ? result : null;
56707
+ if (obj) {
56708
+ if (obj.success === false || obj.ok === false) return false;
56709
+ if (typeof obj.error === "string" && obj.error.length > 0) return false;
56710
+ return true;
56698
56711
  }
56699
- return false;
56712
+ if (typeof result === "string") return !/^\s*error\b/i.test(result);
56713
+ return true;
56700
56714
  }
56701
56715
  function extractAssetId$1(result) {
56702
56716
  if (!result) return null;
@@ -56861,7 +56875,7 @@ function ToolFallbackTrigger({
56861
56875
  "span",
56862
56876
  {
56863
56877
  className: cn(
56864
- "relative inline-block leading-tight",
56878
+ "relative inline-block text-[13px] font-medium leading-tight",
56865
56879
  isCancelled && "text-muted-foreground line-through"
56866
56880
  ),
56867
56881
  children: [
@@ -57846,17 +57860,103 @@ BrowseToolUI.displayName = "BrowseToolUI";
57846
57860
  function parseEmailResults(data) {
57847
57861
  const results = data.limited_results ?? data.results ?? data.emails ?? data.messages;
57848
57862
  if (!Array.isArray(results)) return [];
57849
- return results.slice(0, 10).map((r2) => {
57850
- const item = r2;
57851
- return {
57852
- subject: item.subject ?? item.title,
57853
- from: item.from ?? item.sender ?? item.from_email,
57854
- date: item.date ?? item.received_at ?? item.sent_at,
57855
- snippet: item.snippet ?? item.preview ?? item.body_preview,
57856
- isDraft: Boolean(item.is_draft)
57857
- };
57863
+ return results.slice(0, 50).flatMap((r2) => {
57864
+ const item = asRecord(r2);
57865
+ if (!item) return [];
57866
+ return [
57867
+ {
57868
+ subject: asString(item.subject) ?? asString(item.title),
57869
+ from: asString(item.from) ?? asString(item.sender) ?? asString(item.from_email),
57870
+ date: asString(item.date) ?? asString(item.received_at) ?? asString(item.sent_at),
57871
+ snippet: asString(item.snippet) ?? asString(item.preview) ?? asString(item.body_preview),
57872
+ isDraft: item.is_draft === true
57873
+ }
57874
+ ];
57858
57875
  });
57859
57876
  }
57877
+ function formatEmailDate(raw) {
57878
+ if (!raw) return void 0;
57879
+ const dateOnly = /^(\d{4})-(\d{2})-(\d{2})$/.exec(raw.trim());
57880
+ const date2 = dateOnly ? new Date(Number(dateOnly[1]), Number(dateOnly[2]) - 1, Number(dateOnly[3])) : new Date(raw);
57881
+ if (Number.isNaN(date2.getTime())) return raw;
57882
+ const now = /* @__PURE__ */ new Date();
57883
+ if (!dateOnly && date2.toDateString() === now.toDateString()) {
57884
+ return date2.toLocaleTimeString(void 0, {
57885
+ hour: "numeric",
57886
+ minute: "2-digit"
57887
+ });
57888
+ }
57889
+ const sameYear = date2.getFullYear() === now.getFullYear();
57890
+ return date2.toLocaleDateString(void 0, {
57891
+ month: "short",
57892
+ day: "numeric",
57893
+ ...sameYear ? {} : { year: "numeric" }
57894
+ });
57895
+ }
57896
+ const EMAIL_QUERY_OPERATOR = /(?:^|\s)(received|after|before|from|to|subject|has|in|is):(?:"([^"]+)"|(\S+))/gi;
57897
+ function humanEmailDate(raw) {
57898
+ return formatEmailDate(raw.replace(/\//g, "-")) ?? raw;
57899
+ }
57900
+ function humanizeEmailQuery(query) {
57901
+ if (!query.trim()) return "";
57902
+ const phrases = [];
57903
+ let freeText = query;
57904
+ for (const match2 of query.matchAll(EMAIL_QUERY_OPERATOR)) {
57905
+ const [token, op, quoted, bare] = match2;
57906
+ const value = quoted ?? bare ?? "";
57907
+ freeText = freeText.replace(token, " ");
57908
+ switch (op.toLowerCase()) {
57909
+ case "received": {
57910
+ const [start, end] = value.split("..");
57911
+ phrases.push(
57912
+ end ? `${humanEmailDate(start)} – ${humanEmailDate(end)}` : humanEmailDate(start)
57913
+ );
57914
+ break;
57915
+ }
57916
+ case "after":
57917
+ phrases.push(`after ${humanEmailDate(value)}`);
57918
+ break;
57919
+ case "before":
57920
+ phrases.push(`before ${humanEmailDate(value)}`);
57921
+ break;
57922
+ case "from":
57923
+ phrases.push(`from ${value}`);
57924
+ break;
57925
+ case "to":
57926
+ phrases.push(`to ${value}`);
57927
+ break;
57928
+ case "subject":
57929
+ phrases.push(`subject “${value}”`);
57930
+ break;
57931
+ case "has":
57932
+ phrases.push(value === "attachment" ? "with attachments" : `has ${value}`);
57933
+ break;
57934
+ case "in":
57935
+ phrases.push(value === "drafts" ? "drafts only" : `in ${value}`);
57936
+ break;
57937
+ case "is":
57938
+ phrases.push(value);
57939
+ break;
57940
+ }
57941
+ }
57942
+ const remainder = freeText.trim().replace(/\s+/g, " ");
57943
+ if (remainder) phrases.push(`“${remainder}”`);
57944
+ return phrases.join(" · ");
57945
+ }
57946
+ const INLINE_EMAIL_ROWS = 3;
57947
+ function EmailResultRow({ email: email2 }) {
57948
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 py-2 first:pt-0 last:pb-0", children: [
57949
+ /* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-between gap-2", children: [
57950
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-baseline gap-1.5 text-[12px] font-medium text-foreground", children: [
57951
+ email2.isDraft && /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded bg-amber-100 px-1 py-px text-[9px] font-semibold uppercase tracking-wide text-amber-700", children: "Draft" }),
57952
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: email2.subject || "No subject" })
57953
+ ] }),
57954
+ email2.date && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: formatEmailDate(email2.date) })
57955
+ ] }),
57956
+ email2.from && /* @__PURE__ */ jsx("span", { className: "truncate text-[11px] text-muted-foreground", children: email2.from }),
57957
+ email2.snippet && /* @__PURE__ */ jsx("p", { className: "text-[11px] leading-relaxed text-muted-foreground/80", children: truncate(email2.snippet, 150) })
57958
+ ] });
57959
+ }
57860
57960
  const EmailSearchToolUIImpl = ({
57861
57961
  toolName,
57862
57962
  args,
@@ -57867,35 +57967,96 @@ const EmailSearchToolUIImpl = ({
57867
57967
  const query = (typedArgs == null ? void 0 : typedArgs.query) ?? (typedArgs == null ? void 0 : typedArgs.search_query) ?? "";
57868
57968
  const data = useMemo(() => normalizeResult(result), [result]);
57869
57969
  const emails = useMemo(() => data ? parseEmailResults(data) : [], [data]);
57970
+ const provider = typeof (data == null ? void 0 : data.provider) === "string" ? data.provider : void 0;
57971
+ const totalCount = typeof (data == null ? void 0 : data.count) === "number" ? data.count : emails.length;
57870
57972
  const isRunning = (status == null ? void 0 : status.type) === "running";
57871
57973
  const isComplete = (status == null ? void 0 : status.type) === "complete";
57872
57974
  const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
57975
+ const readableQuery = useMemo(() => humanizeEmailQuery(query), [query]);
57976
+ const inlineEmails = emails.slice(0, INLINE_EMAIL_ROWS);
57977
+ const overflowEmails = emails.slice(INLINE_EMAIL_ROWS);
57978
+ const countLabel = emails.length > 0 && totalCount > emails.length ? `${emails.length} of ${totalCount}` : `${totalCount}`;
57873
57979
  return /* @__PURE__ */ jsx(
57874
57980
  ToolCard,
57875
57981
  {
57876
57982
  icon: Mail,
57877
57983
  status: (status == null ? void 0 : status.type) ?? "complete",
57878
- title: isRunning ? "Searching emails..." : "Email search",
57879
- subtitle: query ? truncate(query, 80) : void 0,
57984
+ title: isRunning ? "Searching email…" : "Email search",
57985
+ subtitle: readableQuery ? truncate(readableQuery, 90) : void 0,
57880
57986
  toolName,
57881
57987
  args: typedArgs,
57882
57988
  result,
57883
- badge: isComplete && emails.length > 0 ? `${emails.length} emails` : void 0,
57989
+ badge: isComplete ? totalCount > 0 ? `${countLabel} email${totalCount === 1 ? "" : "s"}${provider ? ` · ${provider}` : ""}` : "No matches" : void 0,
57990
+ error: errorMsg,
57991
+ children: isComplete && emails.length > 0 && /* @__PURE__ */ jsxs("div", { className: "border-t border-border/40 px-4 py-2.5", children: [
57992
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col divide-y divide-border/30", children: inlineEmails.map((email2, i) => /* @__PURE__ */ jsx(EmailResultRow, { email: email2 }, i)) }),
57993
+ overflowEmails.length > 0 && /* @__PURE__ */ jsx(
57994
+ ExpandableSection,
57995
+ {
57996
+ label: `Show ${overflowEmails.length} more`,
57997
+ children: /* @__PURE__ */ jsx("div", { className: "flex flex-col divide-y divide-border/30", children: overflowEmails.map((email2, i) => /* @__PURE__ */ jsx(EmailResultRow, { email: email2 }, i)) })
57998
+ }
57999
+ )
58000
+ ] })
58001
+ }
58002
+ );
58003
+ };
58004
+ const EmailSearchToolUI = memo(
58005
+ EmailSearchToolUIImpl
58006
+ );
58007
+ EmailSearchToolUI.displayName = "EmailSearchToolUI";
58008
+ function parseEmailAccounts(data) {
58009
+ const accounts = data.accounts ?? data.results;
58010
+ if (!Array.isArray(accounts)) return [];
58011
+ return accounts.slice(0, 10).flatMap((raw) => {
58012
+ const item = asRecord(raw);
58013
+ if (!item) return [];
58014
+ const defaultFlag = typeof item.is_default === "boolean" ? item.is_default : item.default;
58015
+ return [
58016
+ {
58017
+ address: asString(item.email_address) ?? asString(item.email) ?? asString(item.address),
58018
+ provider: asString(item.provider) ?? asString(item.provider_name),
58019
+ name: asString(item.account_name) ?? asString(item.name),
58020
+ isDefault: defaultFlag === true
58021
+ }
58022
+ ];
58023
+ });
58024
+ }
58025
+ const EmailAccountsToolUIImpl = ({
58026
+ toolName,
58027
+ args,
58028
+ result,
58029
+ status
58030
+ }) => {
58031
+ const data = useMemo(() => normalizeResult(result), [result]);
58032
+ const accounts = useMemo(
58033
+ () => data ? parseEmailAccounts(data) : [],
58034
+ [data]
58035
+ );
58036
+ const isRunning = (status == null ? void 0 : status.type) === "running";
58037
+ const isComplete = (status == null ? void 0 : status.type) === "complete";
58038
+ const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
58039
+ return /* @__PURE__ */ jsx(
58040
+ ToolCard,
58041
+ {
58042
+ icon: Mail,
58043
+ status: (status == null ? void 0 : status.type) ?? "complete",
58044
+ title: isRunning ? "Checking connected email accounts…" : "Email accounts",
58045
+ toolName,
58046
+ args,
58047
+ result,
58048
+ badge: isComplete && accounts.length > 0 ? `${accounts.length} connected` : void 0,
57884
58049
  error: errorMsg,
57885
- children: isComplete && emails.length > 0 && /* @__PURE__ */ jsx(ExpandableSection, { label: "Show email results", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col divide-y divide-border/30", children: emails.map((email2, i) => /* @__PURE__ */ jsxs(
58050
+ children: isComplete && accounts.length > 0 && /* @__PURE__ */ jsx("div", { className: "border-t border-border/40 px-4 py-2.5", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col divide-y divide-border/30", children: accounts.map((account, i) => /* @__PURE__ */ jsxs(
57886
58051
  "div",
57887
58052
  {
57888
- className: cn("flex flex-col gap-0.5 py-2", i === 0 && "pt-0"),
58053
+ className: "flex items-center justify-between gap-2 py-1.5 first:pt-0 last:pb-0",
57889
58054
  children: [
57890
- /* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-between gap-2", children: [
57891
- /* @__PURE__ */ jsxs("span", { className: "flex items-baseline gap-1.5 text-[12px] font-medium text-foreground", children: [
57892
- email2.isDraft && /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded bg-amber-100 px-1 py-px text-[9px] font-semibold uppercase tracking-wide text-amber-700", children: "Draft" }),
57893
- email2.subject || "No subject"
57894
- ] }),
57895
- email2.date && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: email2.date })
57896
- ] }),
57897
- email2.from && /* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground", children: email2.from }),
57898
- email2.snippet && /* @__PURE__ */ jsx("p", { className: "text-[11px] leading-relaxed text-muted-foreground/80", children: truncate(email2.snippet, 150) })
58055
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-[12px] text-foreground", children: account.address || account.name || "Unknown account" }),
58056
+ /* @__PURE__ */ jsxs("span", { className: "flex shrink-0 items-center gap-1.5", children: [
58057
+ account.isDefault && /* @__PURE__ */ jsx("span", { className: "rounded-full bg-emerald-50 px-1.5 py-px text-[9px] font-semibold uppercase tracking-wide text-emerald-700", children: "Default" }),
58058
+ account.provider && /* @__PURE__ */ jsx("span", { className: "rounded-md bg-muted/60 px-1.5 py-0.5 text-[10px] text-muted-foreground", children: account.provider })
58059
+ ] })
57899
58060
  ]
57900
58061
  },
57901
58062
  i
@@ -57903,10 +58064,10 @@ const EmailSearchToolUIImpl = ({
57903
58064
  }
57904
58065
  );
57905
58066
  };
57906
- const EmailSearchToolUI = memo(
57907
- EmailSearchToolUIImpl
58067
+ const EmailAccountsToolUI = memo(
58068
+ EmailAccountsToolUIImpl
57908
58069
  );
57909
- EmailSearchToolUI.displayName = "EmailSearchToolUI";
58070
+ EmailAccountsToolUI.displayName = "EmailAccountsToolUI";
57910
58071
  function extractAssetId(result) {
57911
58072
  const data = normalizeResult(result);
57912
58073
  if (!data) return null;
@@ -57943,6 +58104,9 @@ function asRecord(value) {
57943
58104
  }
57944
58105
  return value;
57945
58106
  }
58107
+ function asString(value) {
58108
+ return typeof value === "string" ? value : void 0;
58109
+ }
57946
58110
  const PRESENTATION_CODE_SLIDE_NUMBER_KEYS = [
57947
58111
  "slideNumber",
57948
58112
  "slide_number",
@@ -58039,22 +58203,51 @@ function CreateAssetToolUIImpl({
58039
58203
  args: typedArgs,
58040
58204
  result,
58041
58205
  error: errorMsg,
58042
- children: assetId && isComplete && !isCancelled && /* @__PURE__ */ jsx("div", { className: "border-t border-border/40 px-4 py-2", children: /* @__PURE__ */ jsxs(
58206
+ children: assetId && isComplete && !isCancelled && /* @__PURE__ */ jsx("div", { className: "border-t border-border/40 px-4 py-2.5", children: /* @__PURE__ */ jsxs(
58043
58207
  "button",
58044
58208
  {
58045
58209
  type: "button",
58046
58210
  onClick: handleOpen,
58047
- className: "flex items-center gap-1.5 rounded-md border border-border/60 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground",
58211
+ className: "group flex w-full items-center gap-3 rounded-lg border border-border/60 bg-muted/20 px-3 py-2.5 text-left transition-colors hover:border-border hover:bg-muted/40",
58048
58212
  children: [
58049
- /* @__PURE__ */ jsx(ExternalLink, { className: "size-3" }),
58050
- "Open ",
58051
- assetType === "unknown" ? "asset" : assetType
58213
+ /* @__PURE__ */ jsx(
58214
+ "div",
58215
+ {
58216
+ className: cn(
58217
+ "flex size-10 shrink-0 items-center justify-center rounded-lg",
58218
+ ASSET_TILE_STYLE[assetType] ?? ASSET_TILE_STYLE.unknown
58219
+ ),
58220
+ children: /* @__PURE__ */ jsx(Icon2, { className: "size-5" })
58221
+ }
58222
+ ),
58223
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
58224
+ /* @__PURE__ */ jsx("div", { className: "truncate text-[13px] font-medium text-foreground", children: createdName || name || "Untitled" }),
58225
+ /* @__PURE__ */ jsxs("div", { className: "text-[11px] text-muted-foreground", children: [
58226
+ ASSET_TILE_LABEL[assetType] ?? "Asset",
58227
+ " · Click to open"
58228
+ ] })
58229
+ ] }),
58230
+ /* @__PURE__ */ jsx(ExternalLink, { className: "size-3.5 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100" })
58052
58231
  ]
58053
58232
  }
58054
58233
  ) })
58055
58234
  }
58056
58235
  );
58057
58236
  }
58237
+ const ASSET_TILE_STYLE = {
58238
+ document: "bg-blue-500/10 text-blue-600",
58239
+ spreadsheet: "bg-emerald-500/10 text-emerald-600",
58240
+ presentation: "bg-orange-500/10 text-orange-600",
58241
+ notebook: "bg-violet-500/10 text-violet-600",
58242
+ unknown: "bg-muted text-muted-foreground"
58243
+ };
58244
+ const ASSET_TILE_LABEL = {
58245
+ document: "Document",
58246
+ spreadsheet: "Spreadsheet",
58247
+ presentation: "Presentation",
58248
+ notebook: "Notebook",
58249
+ unknown: "Asset"
58250
+ };
58058
58251
  const CreateDocumentToolUIImpl = (props) => /* @__PURE__ */ jsx(
58059
58252
  CreateAssetToolUIImpl,
58060
58253
  {
@@ -60477,6 +60670,8 @@ const TOOL_UI_REGISTRY = {
60477
60670
  open_browser: OpenBrowserToolUI,
60478
60671
  search_email: EmailSearchToolUI,
60479
60672
  unified_email_search: EmailSearchToolUI,
60673
+ unified_email_list_accounts: EmailAccountsToolUI,
60674
+ email_list_accounts: EmailAccountsToolUI,
60480
60675
  create_email_draft: CreateEmailDraftToolUI,
60481
60676
  unified_email_create_draft: CreateEmailDraftToolUI,
60482
60677
  create_new_document: CreateDocumentToolUI,
@@ -61235,7 +61430,7 @@ function useSendMessage() {
61235
61430
  shouldReplace || !currentText ? text2 : `${currentText}
61236
61431
  ${text2}`
61237
61432
  );
61238
- await aui.composer.send();
61433
+ await aui.composer.send({ steer: false });
61239
61434
  },
61240
61435
  [aui]
61241
61436
  );
@@ -61835,13 +62030,13 @@ const ComposerSendWithQuote = () => {
61835
62030
  });
61836
62031
  if (!fullMessage) return;
61837
62032
  aui.composer.setText(fullMessage);
61838
- aui.composer.send();
62033
+ aui.composer.send({ steer: false });
61839
62034
  clearQuote();
61840
62035
  clearAttachments();
61841
62036
  } else {
61842
62037
  if (!userText) return;
61843
62038
  aui.composer.setText(userText);
61844
- aui.composer.send();
62039
+ aui.composer.send({ steer: false });
61845
62040
  }
61846
62041
  editor == null ? void 0 : editor.clear();
61847
62042
  }, [aui, quote, attachments, hasExtras, isUploading, isThreadRunning, clearQuote, clearAttachments, editorRef, appUrl]);
@@ -62554,7 +62749,7 @@ const AthenaAssetEmbed = ({
62554
62749
  if (error2) onError == null ? void 0 : onError(new Error(error2));
62555
62750
  }, [error2, onError]);
62556
62751
  if (isLoading) {
62557
- return loadingFallback ?? /* @__PURE__ */ jsxs("output", { className: "flex h-full w-full items-center justify-center", children: [
62752
+ return loadingFallback ?? /* @__PURE__ */ jsxs("output", { className: "athena-sdk-chrome flex h-full w-full items-center justify-center", children: [
62558
62753
  /* @__PURE__ */ jsx(LoaderCircle, { className: "size-6 animate-spin text-muted-foreground" }),
62559
62754
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Loading asset" })
62560
62755
  ] });
@@ -62565,7 +62760,7 @@ const AthenaAssetEmbed = ({
62565
62760
  return errorFallback ?? /* @__PURE__ */ jsxs(
62566
62761
  "div",
62567
62762
  {
62568
- className: "flex h-full w-full items-center justify-center gap-2 p-4 text-sm text-muted-foreground",
62763
+ className: "athena-sdk-chrome flex h-full w-full items-center justify-center gap-2 p-4 text-sm text-muted-foreground",
62569
62764
  role: "alert",
62570
62765
  children: [
62571
62766
  /* @__PURE__ */ jsx(CircleAlert, { className: "size-4 text-destructive" }),
@@ -62938,21 +63133,27 @@ const AthenaLayout = ({
62938
63133
  /* @__PURE__ */ jsx(
62939
63134
  "div",
62940
63135
  {
62941
- className: "flex h-full w-1 shrink-0 cursor-col-resize items-center bg-border/40 transition-colors hover:bg-border active:bg-primary/30",
63136
+ className: "athena-sdk-chrome flex h-full w-1 shrink-0 cursor-col-resize items-center bg-border/40 transition-colors hover:bg-border active:bg-primary/30",
62942
63137
  onPointerDown,
62943
63138
  onPointerMove,
62944
63139
  onPointerUp
62945
63140
  }
62946
63141
  ),
62947
- /* @__PURE__ */ jsx("div", { className: "flex h-full flex-1 flex-col overflow-hidden", children: /* @__PURE__ */ jsx(AssetPanel, { manageAssetPanelHostRegistration: false }) })
63142
+ /* @__PURE__ */ jsx("div", { className: "athena-sdk-chrome flex h-full flex-1 flex-col overflow-hidden", children: /* @__PURE__ */ jsx(AssetPanel, { manageAssetPanelHostRegistration: false }) })
62948
63143
  ] });
62949
63144
  };
62950
63145
  function ThreadList({ className }) {
62951
63146
  const statewireList = useAthenaStatewireThreadList();
62952
63147
  if (statewireList) {
62953
- return /* @__PURE__ */ jsx(StatewireThreadList, { list: statewireList, className });
63148
+ return /* @__PURE__ */ jsx(
63149
+ StatewireThreadList,
63150
+ {
63151
+ list: statewireList,
63152
+ className: cn("athena-sdk-chrome", className)
63153
+ }
63154
+ );
62954
63155
  }
62955
- return /* @__PURE__ */ jsx(LegacyThreadList, { className });
63156
+ return /* @__PURE__ */ jsx(LegacyThreadList, { className: cn("athena-sdk-chrome", className) });
62956
63157
  }
62957
63158
  function LegacyThreadList({ className }) {
62958
63159
  const refresh = useRefreshThreadList();