@plaisolutions/react 0.15.0 → 0.17.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,8 +1,73 @@
1
- import { HttpStatusError, PlaiChat } from "@plaisolutions/client";
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, Check, CheckCircle2, ChevronDown, CircleAlert, CircleX, Copy, Database, File, FileText, Globe, LoaderCircle, MessageSquare, Minus, Plug, Plus, RotateCcw, ThumbsDown, ThumbsUp, Workflow, XCircle } from "lucide-react";
3
+ import { Bot, Brain, CalendarDays, Check, CheckCircle2, ChevronDown, CircleAlert, CircleX, Clock, Copy, Database, ExternalLink, File, FileText, Globe, LoaderCircle, Mail, MessageSquare, Minus, Plug, Plus, RotateCcw, ThumbsDown, ThumbsUp, Video, Workflow, XCircle } from "lucide-react";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
 
6
+ //#region src/use-tool-confirmations.ts
7
+ /** State of the chat's actions awaiting confirmation, for the cards. */
8
+ function useToolConfirmations(chat) {
9
+ const subscribe = useCallback((onStoreChange) => chat.toolConfirmations.subscribe(onStoreChange), [chat]);
10
+ const getSnapshot = useCallback(() => chat.toolConfirmations.getSnapshot(), [chat]);
11
+ return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
12
+ }
13
+ /**
14
+ * Keeps the cards' state in line with the server: on mount and history loads,
15
+ * when the tab regains focus or the connection, and periodically while some
16
+ * action can still change. A stream already updates the store by itself.
17
+ */
18
+ function useToolConfirmationSync(chat, { enabled = true, intervalMs = 15e3 } = {}) {
19
+ const [error, setError] = useState(null);
20
+ const inFlight = useRef(null);
21
+ const snapshot = useToolConfirmations(chat);
22
+ const shownIds = pendingActionIds(useSyncExternalStore(useCallback((onStoreChange) => chat.subscribe(onStoreChange), [chat]), useCallback(() => chat.getState().messages, [chat]), useCallback(() => chat.getInitialState().messages, [chat]))).join(",");
23
+ const refresh = useCallback(async () => {
24
+ if (!enabled) return;
25
+ if (inFlight.current) return inFlight.current;
26
+ const run = chat.refreshToolConfirmations().then(() => setError(null)).catch((reason) => setError(reason)).finally(() => {
27
+ inFlight.current = null;
28
+ });
29
+ inFlight.current = run;
30
+ return run;
31
+ }, [chat, enabled]);
32
+ useEffect(() => {
33
+ if (shownIds) refresh();
34
+ }, [refresh, shownIds]);
35
+ useEffect(() => {
36
+ if (!enabled || typeof window === "undefined") return;
37
+ const onVisible = () => {
38
+ if (document.visibilityState === "visible") refresh();
39
+ };
40
+ const onOnline = () => void refresh();
41
+ window.addEventListener("focus", onOnline);
42
+ window.addEventListener("online", onOnline);
43
+ document.addEventListener("visibilitychange", onVisible);
44
+ return () => {
45
+ window.removeEventListener("focus", onOnline);
46
+ window.removeEventListener("online", onOnline);
47
+ document.removeEventListener("visibilitychange", onVisible);
48
+ };
49
+ }, [enabled, refresh]);
50
+ const hasOpen = shownIds.length > 0 && shownIds.split(",").some((actionId) => {
51
+ const item = snapshot.items[actionId];
52
+ return !item || OPEN_TOOL_CONFIRMATION_STATUSES.has(item.status);
53
+ });
54
+ useEffect(() => {
55
+ if (!enabled || !hasOpen || intervalMs <= 0) return;
56
+ const timer = setInterval(() => void refresh(), intervalMs);
57
+ return () => clearInterval(timer);
58
+ }, [
59
+ enabled,
60
+ hasOpen,
61
+ intervalMs,
62
+ refresh
63
+ ]);
64
+ return {
65
+ error,
66
+ refresh
67
+ };
68
+ }
69
+
70
+ //#endregion
6
71
  //#region src/use-chat.ts
7
72
  function useChat(options) {
8
73
  const optionsRef = useRef(options);
@@ -25,6 +90,7 @@ function useChat(options) {
25
90
  ]);
26
91
  const chat = external ?? owned;
27
92
  const state = useSyncExternalStore(useCallback((onStoreChange) => chat.subscribe(onStoreChange), [chat]), useCallback(() => chat.getState(), [chat]), useCallback(() => chat.getInitialState(), [chat]));
93
+ const toolConfirmations = useToolConfirmations(chat);
28
94
  useEffect(() => {
29
95
  if (!owned) return;
30
96
  return () => {
@@ -33,6 +99,8 @@ function useChat(options) {
33
99
  }, [owned]);
34
100
  const actions = useMemo(() => ({
35
101
  sendMessage: chat.sendMessage.bind(chat),
102
+ decideToolActions: chat.decideToolActions.bind(chat),
103
+ refreshToolConfirmations: chat.refreshToolConfirmations.bind(chat),
36
104
  rateMessage: chat.rateMessage.bind(chat),
37
105
  getMemoryProposal: chat.getMemoryProposal.bind(chat),
38
106
  acceptMemoryProposal: chat.acceptMemoryProposal.bind(chat),
@@ -47,11 +115,13 @@ function useChat(options) {
47
115
  clearError: chat.clearError.bind(chat)
48
116
  }), [chat]);
49
117
  return {
118
+ chat,
50
119
  messages: state.messages,
51
120
  status: state.status,
52
121
  error: state.error,
53
122
  usage: state.usage,
54
123
  uploadState: state.uploadState,
124
+ toolConfirmations,
55
125
  ...actions
56
126
  };
57
127
  }
@@ -2449,7 +2519,7 @@ function SourceCard({ source, locale, variant = "card" }) {
2449
2519
  });
2450
2520
  }
2451
2521
  function getTotalSourceCount(cards) {
2452
- return cards.reduce((count, source) => count + (source.kind === "web" ? getWebSearchResults(source.part).length : 1), 0);
2522
+ return cards.reduce((count$1, source) => count$1 + (source.kind === "web" ? getWebSearchResults(source.part).length : 1), 0);
2453
2523
  }
2454
2524
  function AggregatedSourceResults({ parts, locale, maxVisible = 3, className, getResourceDownloadUrl }) {
2455
2525
  const cards = getAggregatedCards(parts, locale, getResourceDownloadUrl);
@@ -2501,7 +2571,7 @@ function AggregatedSourceResults({ parts, locale, maxVisible = 3, className, get
2501
2571
 
2502
2572
  //#endregion
2503
2573
  //#region src/components/memory-proposal-card.tsx
2504
- const COPY = {
2574
+ const COPY$1 = {
2505
2575
  en: {
2506
2576
  title: "Memory proposal",
2507
2577
  user: "Personal memory",
@@ -2725,7 +2795,7 @@ const COPY = {
2725
2795
  };
2726
2796
  const REDACTED = "[redacted]";
2727
2797
  function MemoryProposalCard({ proposal: initial, actions, activeAgentId, locale, className }) {
2728
- const copy = COPY[getSupportedToolLocale(locale)];
2798
+ const copy = COPY$1[getSupportedToolLocale(locale)];
2729
2799
  const [proposal, setProposal] = useState(initial);
2730
2800
  const [resolving, setResolving] = useState(false);
2731
2801
  const [error, setError] = useState(null);
@@ -3036,7 +3106,7 @@ function ToolResultAgentInvocationCard({ part, className, onOpenThread, locale }
3036
3106
  children: copy.agent
3037
3107
  }),
3038
3108
  /* @__PURE__ */ jsx("span", {
3039
- className: "min-w-0 truncate text-neutral-600",
3109
+ className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
3040
3110
  children: agentName
3041
3111
  }),
3042
3112
  /* @__PURE__ */ jsx("span", {
@@ -3164,9 +3234,7 @@ function ToolResultBrowserCard({ part, className, locale }) {
3164
3234
  const preview = getPreview(toOutput(part.result));
3165
3235
  const url = getUrl(part.input);
3166
3236
  const error = formatToolErrorDetails(part.errorDetails);
3167
- const scraperLabel = metadata?.scraper_type ? SCRAPER_LABELS[metadata.scraper_type] : null;
3168
- const credits = metadata?.scraper_api_tokens ?? metadata?.firecrawl_credits;
3169
- const subtitle = [scraperLabel, typeof credits === "number" ? `${credits} ${credits === 1 ? copy.credit : copy.credits}` : null].filter(Boolean).join(" · ");
3237
+ const subtitle = metadata?.scraper_type ? SCRAPER_LABELS[metadata.scraper_type] : null;
3170
3238
  const failed = part.state === "error";
3171
3239
  const pending = part.state === "pending";
3172
3240
  const canExpand = Boolean(preview || error || url);
@@ -3185,7 +3253,7 @@ function ToolResultBrowserCard({ part, className, locale }) {
3185
3253
  children: copy.browser
3186
3254
  }),
3187
3255
  subtitle ? /* @__PURE__ */ jsx("span", {
3188
- className: "min-w-0 truncate text-xs text-neutral-500",
3256
+ className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
3189
3257
  children: subtitle
3190
3258
  }) : null,
3191
3259
  /* @__PURE__ */ jsxs("span", {
@@ -3323,7 +3391,7 @@ function ToolResultEmailSendCard({ part, className, locale }) {
3323
3391
  }), /* @__PURE__ */ jsxs("div", {
3324
3392
  className: "flex items-center gap-2",
3325
3393
  children: [/* @__PURE__ */ jsx("span", {
3326
- className: joinClasses("rounded-full border px-2 py-0.5 text-xs font-medium", statusClass),
3394
+ className: joinClasses("rounded-full uppercase border px-2 py-0.5 text-xs", statusClass),
3327
3395
  children: getUiStatusLabel(part.state, copy)
3328
3396
  }), /* @__PURE__ */ jsx("button", {
3329
3397
  type: "button",
@@ -3332,28 +3400,31 @@ function ToolResultEmailSendCard({ part, className, locale }) {
3332
3400
  "aria-controls": `tool-email-details-${part.id}`,
3333
3401
  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",
3334
3402
  onClick: () => setIsExpanded((previous) => !previous),
3335
- children: /* @__PURE__ */ jsx("span", {
3336
- className: "inline-block",
3337
- children: isExpanded ? "^" : "v"
3403
+ children: isExpanded ? /* @__PURE__ */ jsx(Minus, {
3404
+ className: "h-3 w-3",
3405
+ "aria-hidden": "true"
3406
+ }) : /* @__PURE__ */ jsx(Plus, {
3407
+ className: "h-3 w-3",
3408
+ "aria-hidden": "true"
3338
3409
  })
3339
3410
  })]
3340
3411
  })]
3341
3412
  }),
3342
3413
  emailInput.subject ? /* @__PURE__ */ jsxs("div", {
3343
- className: "space-y-1",
3344
- children: [/* @__PURE__ */ jsx("p", {
3414
+ className: "flex items-center gap-1",
3415
+ children: [/* @__PURE__ */ jsxs("p", {
3345
3416
  className: "text-xs font-semibold text-slate-600",
3346
- children: copy.subject
3417
+ children: [copy.subject, ":"]
3347
3418
  }), /* @__PURE__ */ jsx("p", {
3348
- className: "text-sm text-slate-900",
3419
+ className: "text-xs text-slate-900",
3349
3420
  children: emailInput.subject
3350
3421
  })]
3351
3422
  }) : null,
3352
3423
  /* @__PURE__ */ jsxs("div", {
3353
- className: "space-y-1",
3354
- children: [/* @__PURE__ */ jsx("p", {
3424
+ className: "flex items-center gap-1",
3425
+ children: [/* @__PURE__ */ jsxs("p", {
3355
3426
  className: "text-xs font-semibold text-slate-600",
3356
- children: copy.to
3427
+ children: [copy.to, ":"]
3357
3428
  }), emailInput.to.length > 0 ? /* @__PURE__ */ jsx("div", {
3358
3429
  className: "flex flex-wrap gap-2",
3359
3430
  children: emailInput.to.map((recipient) => /* @__PURE__ */ jsx("span", {
@@ -3361,7 +3432,7 @@ function ToolResultEmailSendCard({ part, className, locale }) {
3361
3432
  children: recipient
3362
3433
  }, recipient))
3363
3434
  }) : /* @__PURE__ */ jsx("p", {
3364
- className: "text-sm text-slate-500",
3435
+ className: "text-xs text-slate-500",
3365
3436
  children: copy.noRecipientsProvided
3366
3437
  })]
3367
3438
  }),
@@ -3371,22 +3442,22 @@ function ToolResultEmailSendCard({ part, className, locale }) {
3371
3442
  className: joinClasses(isExpanded ? "block space-y-4" : "hidden"),
3372
3443
  children: [emailInput.text ? /* @__PURE__ */ jsxs("div", {
3373
3444
  className: "space-y-1",
3374
- children: [/* @__PURE__ */ jsx("p", {
3445
+ children: [/* @__PURE__ */ jsxs("p", {
3375
3446
  className: "text-xs font-semibold text-slate-600",
3376
- children: copy.body
3447
+ children: [copy.body, ":"]
3377
3448
  }), /* @__PURE__ */ jsx("p", {
3378
- className: "whitespace-pre-wrap rounded border border-slate-200 bg-slate-50 p-2 text-sm text-slate-700",
3449
+ className: "whitespace-pre-wrap rounded border border-slate-200 bg-white p-2 text-sm text-slate-700",
3379
3450
  children: emailInput.text
3380
3451
  })]
3381
3452
  }) : null, part.result !== void 0 ? /* @__PURE__ */ jsxs("div", {
3382
- className: "space-y-2 rounded border border-slate-200 bg-white p-3",
3453
+ className: "space-y-2 rounded border border-slate-200 bg-slate-50 p-3",
3383
3454
  children: [
3384
3455
  /* @__PURE__ */ jsx("p", {
3385
3456
  className: "text-xs font-semibold uppercase tracking-wide text-slate-500",
3386
3457
  children: copy.delivery
3387
3458
  }),
3388
3459
  emailResult.status ? /* @__PURE__ */ jsxs("p", {
3389
- className: "text-sm text-slate-700",
3460
+ className: "text-xs text-slate-700",
3390
3461
  children: [
3391
3462
  /* @__PURE__ */ jsxs("span", {
3392
3463
  className: "font-semibold text-slate-900",
@@ -3397,7 +3468,7 @@ function ToolResultEmailSendCard({ part, className, locale }) {
3397
3468
  ]
3398
3469
  }) : null,
3399
3470
  emailResult.recipientsCount !== null ? /* @__PURE__ */ jsxs("p", {
3400
- className: "text-sm text-slate-700",
3471
+ className: "text-xs text-slate-700",
3401
3472
  children: [
3402
3473
  /* @__PURE__ */ jsxs("span", {
3403
3474
  className: "font-semibold text-slate-900",
@@ -3408,7 +3479,7 @@ function ToolResultEmailSendCard({ part, className, locale }) {
3408
3479
  ]
3409
3480
  }) : null,
3410
3481
  emailResult.receiptProvider ? /* @__PURE__ */ jsxs("p", {
3411
- className: "text-sm text-slate-700",
3482
+ className: "text-xs text-slate-700",
3412
3483
  children: [
3413
3484
  /* @__PURE__ */ jsxs("span", {
3414
3485
  className: "font-semibold text-slate-900",
@@ -3419,7 +3490,7 @@ function ToolResultEmailSendCard({ part, className, locale }) {
3419
3490
  ]
3420
3491
  }) : null,
3421
3492
  emailResult.receiptMessageId ? /* @__PURE__ */ jsxs("p", {
3422
- className: "break-all text-sm text-slate-700",
3493
+ className: "break-all text-xs text-slate-700",
3423
3494
  children: [
3424
3495
  /* @__PURE__ */ jsxs("span", {
3425
3496
  className: "font-semibold text-slate-900",
@@ -3430,7 +3501,7 @@ function ToolResultEmailSendCard({ part, className, locale }) {
3430
3501
  ]
3431
3502
  }) : null,
3432
3503
  emailResult.receiptRawStatus ? /* @__PURE__ */ jsxs("p", {
3433
- className: "text-sm text-slate-700",
3504
+ className: "text-xs text-slate-700",
3434
3505
  children: [
3435
3506
  /* @__PURE__ */ jsxs("span", {
3436
3507
  className: "font-semibold text-slate-900",
@@ -3441,7 +3512,7 @@ function ToolResultEmailSendCard({ part, className, locale }) {
3441
3512
  ]
3442
3513
  }) : null,
3443
3514
  emailResult.raw ? /* @__PURE__ */ jsx("p", {
3444
- className: "whitespace-pre-wrap text-sm text-slate-700",
3515
+ className: "whitespace-pre-wrap text-xs text-slate-700",
3445
3516
  children: emailResult.raw
3446
3517
  }) : null
3447
3518
  ]
@@ -3754,7 +3825,7 @@ function ToolResultHttpRequestCard({ part, className, locale }) {
3754
3825
 
3755
3826
  //#endregion
3756
3827
  //#region src/components/tool-result-mcp-card.tsx
3757
- function text(value) {
3828
+ function text$1(value) {
3758
3829
  if (typeof value === "string") return value;
3759
3830
  if (value == null) return null;
3760
3831
  try {
@@ -3768,7 +3839,7 @@ function ToolResultMcpCard({ part, className, locale }) {
3768
3839
  const meta = part.metadata;
3769
3840
  const server = meta?.mcp_server_url ?? meta?.server_name;
3770
3841
  const tool = meta?.mcp_tool_name ?? meta?.tool_name ?? part.name;
3771
- const result = text(part.result);
3842
+ const result = text$1(part.result);
3772
3843
  const error = formatToolErrorDetails(part.errorDetails);
3773
3844
  const failed = part.state === "error";
3774
3845
  return /* @__PURE__ */ jsxs(Sheet, { children: [/* @__PURE__ */ jsx(SheetTrigger, {
@@ -3786,7 +3857,7 @@ function ToolResultMcpCard({ part, className, locale }) {
3786
3857
  children: "MCP"
3787
3858
  }),
3788
3859
  /* @__PURE__ */ jsx("span", {
3789
- className: "min-w-0 truncate text-neutral-600",
3860
+ className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
3790
3861
  children: tool
3791
3862
  }),
3792
3863
  /* @__PURE__ */ jsx("span", {
@@ -3895,7 +3966,7 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
3895
3966
  children: copy.officeDocuments
3896
3967
  }),
3897
3968
  /* @__PURE__ */ jsx("span", {
3898
- className: "truncate text-xs text-neutral-500",
3969
+ className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
3899
3970
  children: part.state === "pending" ? copy.pending : `${files.length} ${fileLabel}`
3900
3971
  }),
3901
3972
  /* @__PURE__ */ jsx("span", {
@@ -3970,6 +4041,1694 @@ function ToolResultOfficeDocumentsCard({ part, className, locale }) {
3970
4041
  })] });
3971
4042
  }
3972
4043
 
4044
+ //#endregion
4045
+ //#region src/components/internal/personal-connector-copy.ts
4046
+ const ENGLISH = {
4047
+ searchingMail: "Searching {{service}}",
4048
+ readingMail: "Reading an email in {{service}}",
4049
+ checkingCalendar: "Checking {{service}}",
4050
+ savingDraft: "Saving a draft in {{service}}",
4051
+ preparingMail: "Preparing an email in {{service}}",
4052
+ preparingEvent: "Preparing a change in {{service}}",
4053
+ runningConfirmed: "Running the confirmed actions",
4054
+ openIn: "Open in {{service}}",
4055
+ emailCountOne: "1 email",
4056
+ emailCountOther: "{{count}} emails",
4057
+ eventCountOne: "1 event",
4058
+ eventCountOther: "{{count}} events",
4059
+ noEmails: "No emails found",
4060
+ noEvents: "No events in this period",
4061
+ showAll: "Show all ({{count}})",
4062
+ showLess: "Show less",
4063
+ showMore: "Show more",
4064
+ allDay: "All day",
4065
+ to: "To",
4066
+ cc: "Cc",
4067
+ draftSaved: "Draft saved",
4068
+ openDraft: "Open draft",
4069
+ attendeesOne: "1 attendee",
4070
+ attendeesOther: "{{count}} attendees",
4071
+ noSubject: "(no subject)",
4072
+ unread: "Unread",
4073
+ joinMeeting: "Join",
4074
+ awaitingConfirmation: "Awaiting your confirmation",
4075
+ confirmHint: "Reply “yes” to confirm, or tell the agent what to change.",
4076
+ subject: "Subject",
4077
+ newEvent: "New event",
4078
+ eventChange: "Event change",
4079
+ deleteEvent: "Delete event",
4080
+ attendeesNotified: "Attendees will be notified.",
4081
+ title: "Title",
4082
+ when: "When",
4083
+ location: "Location",
4084
+ attendees: "Attendees",
4085
+ description: "Description",
4086
+ emailSent: "Email sent",
4087
+ eventCreated: "Event created",
4088
+ eventUpdated: "Event updated",
4089
+ eventDeleted: "Event deleted",
4090
+ actionDone: "{{tool}} done",
4091
+ actionFailed: "Failed",
4092
+ openEmail: "Open email",
4093
+ openEvent: "Open event",
4094
+ replyInThread: "Reply in the same thread",
4095
+ confirmSend: "Send",
4096
+ confirmCreate: "Create",
4097
+ confirmUpdate: "Save changes",
4098
+ confirmDelete: "Delete",
4099
+ confirmGeneric: "Confirm",
4100
+ cancel: "Cancel",
4101
+ confirming: "Confirming…",
4102
+ cancelling: "Cancelling…",
4103
+ verifying: "Checking status…",
4104
+ expiresIn: "Expires in {{minutes}} min",
4105
+ expiresSoon: "Expires in less than a minute",
4106
+ statusExecuting: "Running…",
4107
+ statusExecuted: "Done",
4108
+ statusRejected: "Cancelled",
4109
+ statusExpired: "Expired: ask again in the chat",
4110
+ statusSuperseded: "Replaced by a newer version",
4111
+ statusInvalidated: "Can no longer run: ask again",
4112
+ statusFailed: "Failed",
4113
+ statusUnknown: "Outcome unknown: check before trying again",
4114
+ statusNotFound: "Not available in this conversation",
4115
+ toolUnavailable: "The tool for this action isn’t available right now",
4116
+ decisionError: "Your decision couldn’t be sent. Try again."
4117
+ };
4118
+ const COPY = {
4119
+ en: {},
4120
+ es: {
4121
+ searchingMail: "Buscando en {{service}}",
4122
+ readingMail: "Leyendo un correo en {{service}}",
4123
+ checkingCalendar: "Consultando {{service}}",
4124
+ savingDraft: "Guardando un borrador en {{service}}",
4125
+ preparingMail: "Preparando un correo en {{service}}",
4126
+ preparingEvent: "Preparando un cambio en {{service}}",
4127
+ runningConfirmed: "Ejecutando las acciones confirmadas",
4128
+ openIn: "Abrir en {{service}}",
4129
+ emailCountOne: "1 correo",
4130
+ emailCountOther: "{{count}} correos",
4131
+ eventCountOne: "1 evento",
4132
+ eventCountOther: "{{count}} eventos",
4133
+ noEmails: "No se han encontrado correos",
4134
+ noEvents: "No hay eventos en este periodo",
4135
+ showAll: "Ver todos ({{count}})",
4136
+ showLess: "Ver menos",
4137
+ showMore: "Ver más",
4138
+ allDay: "Todo el día",
4139
+ to: "Para",
4140
+ cc: "CC",
4141
+ draftSaved: "Borrador guardado",
4142
+ openDraft: "Abrir borrador",
4143
+ attendeesOne: "1 asistente",
4144
+ attendeesOther: "{{count}} asistentes",
4145
+ noSubject: "(sin asunto)",
4146
+ unread: "No leído",
4147
+ joinMeeting: "Unirse",
4148
+ awaitingConfirmation: "Pendiente de tu confirmación",
4149
+ confirmHint: "Responde «sí» para confirmar, o dile al agente qué cambiar.",
4150
+ subject: "Asunto",
4151
+ newEvent: "Nuevo evento",
4152
+ eventChange: "Cambio en el evento",
4153
+ deleteEvent: "Borrar evento",
4154
+ attendeesNotified: "Se avisará a los asistentes.",
4155
+ title: "Título",
4156
+ when: "Cuándo",
4157
+ location: "Ubicación",
4158
+ attendees: "Asistentes",
4159
+ description: "Descripción",
4160
+ emailSent: "Correo enviado",
4161
+ eventCreated: "Evento creado",
4162
+ eventUpdated: "Evento actualizado",
4163
+ eventDeleted: "Evento borrado",
4164
+ actionDone: "{{tool}} hecho",
4165
+ actionFailed: "Error",
4166
+ openEmail: "Abrir correo",
4167
+ openEvent: "Abrir evento",
4168
+ replyInThread: "Respuesta en el mismo hilo",
4169
+ confirmSend: "Enviar",
4170
+ confirmCreate: "Crear",
4171
+ confirmUpdate: "Guardar cambios",
4172
+ confirmDelete: "Eliminar",
4173
+ confirmGeneric: "Confirmar",
4174
+ cancel: "Cancelar",
4175
+ confirming: "Confirmando…",
4176
+ cancelling: "Cancelando…",
4177
+ verifying: "Comprobando el estado…",
4178
+ expiresIn: "Caduca en {{minutes}} min",
4179
+ expiresSoon: "Caduca en menos de un minuto",
4180
+ statusExecuting: "Ejecutando…",
4181
+ statusExecuted: "Hecho",
4182
+ statusRejected: "Cancelada",
4183
+ statusExpired: "Caducada: pídelo de nuevo en el chat",
4184
+ statusSuperseded: "Sustituida por una versión más reciente",
4185
+ statusInvalidated: "Ya no se puede ejecutar: pídelo de nuevo",
4186
+ statusFailed: "No se pudo completar",
4187
+ statusUnknown: "Resultado desconocido: compruébalo antes de repetirlo",
4188
+ statusNotFound: "No disponible en esta conversación",
4189
+ toolUnavailable: "La herramienta de esta acción no está disponible ahora",
4190
+ decisionError: "No se pudo enviar tu decisión. Inténtalo de nuevo."
4191
+ },
4192
+ ca: {
4193
+ searchingMail: "Cercant a {{service}}",
4194
+ readingMail: "Llegint un correu a {{service}}",
4195
+ checkingCalendar: "Consultant {{service}}",
4196
+ savingDraft: "Desant un esborrany a {{service}}",
4197
+ preparingMail: "Preparant un correu a {{service}}",
4198
+ preparingEvent: "Preparant un canvi a {{service}}",
4199
+ runningConfirmed: "Executant les accions confirmades",
4200
+ openIn: "Obre a {{service}}",
4201
+ emailCountOne: "1 correu",
4202
+ emailCountOther: "{{count}} correus",
4203
+ eventCountOne: "1 esdeveniment",
4204
+ eventCountOther: "{{count}} esdeveniments",
4205
+ noEmails: "No s’han trobat correus",
4206
+ noEvents: "No hi ha esdeveniments en aquest període",
4207
+ showAll: "Mostra-ho tot ({{count}})",
4208
+ showLess: "Mostra’n menys",
4209
+ showMore: "Mostra’n més",
4210
+ allDay: "Tot el dia",
4211
+ to: "Per a",
4212
+ cc: "CC",
4213
+ draftSaved: "Esborrany desat",
4214
+ openDraft: "Obre l’esborrany",
4215
+ attendeesOne: "1 assistent",
4216
+ attendeesOther: "{{count}} assistents",
4217
+ noSubject: "(sense assumpte)",
4218
+ unread: "No llegit",
4219
+ joinMeeting: "Uneix-t’hi",
4220
+ awaitingConfirmation: "Pendent de la teva confirmació",
4221
+ confirmHint: "Respon «sí» per confirmar, o digues a l’agent què ha de canviar.",
4222
+ subject: "Assumpte",
4223
+ newEvent: "Nou esdeveniment",
4224
+ eventChange: "Canvi a l’esdeveniment",
4225
+ deleteEvent: "Esborrar esdeveniment",
4226
+ attendeesNotified: "S’avisarà els assistents.",
4227
+ title: "Títol",
4228
+ when: "Quan",
4229
+ location: "Ubicació",
4230
+ attendees: "Assistents",
4231
+ description: "Descripció",
4232
+ emailSent: "Correu enviat",
4233
+ eventCreated: "Esdeveniment creat",
4234
+ eventUpdated: "Esdeveniment actualitzat",
4235
+ eventDeleted: "Esdeveniment esborrat",
4236
+ actionDone: "{{tool}} fet",
4237
+ actionFailed: "Error",
4238
+ openEmail: "Obre el correu",
4239
+ openEvent: "Obre l’esdeveniment",
4240
+ replyInThread: "Resposta al mateix fil",
4241
+ confirmSend: "Envia",
4242
+ confirmCreate: "Crea",
4243
+ confirmUpdate: "Desa els canvis",
4244
+ confirmDelete: "Elimina",
4245
+ confirmGeneric: "Confirma",
4246
+ cancel: "Cancel·la",
4247
+ confirming: "Confirmant…",
4248
+ cancelling: "Cancel·lant…",
4249
+ verifying: "Comprovant l’estat…",
4250
+ expiresIn: "Caduca d’aquí a {{minutes}} min",
4251
+ expiresSoon: "Caduca en menys d’un minut",
4252
+ statusExecuting: "Executant…",
4253
+ statusExecuted: "Fet",
4254
+ statusRejected: "Cancel·lada",
4255
+ statusExpired: "Caducada: torna-ho a demanar al xat",
4256
+ statusSuperseded: "Substituïda per una versió més recent",
4257
+ statusInvalidated: "Ja no es pot executar: torna-ho a demanar",
4258
+ statusFailed: "No s’ha pogut completar",
4259
+ statusUnknown: "Resultat desconegut: comprova-ho abans de repetir-ho",
4260
+ statusNotFound: "No disponible en aquesta conversa",
4261
+ toolUnavailable: "L’eina d’aquesta acció no està disponible ara",
4262
+ decisionError: "No s’ha pogut enviar la teva decisió. Torna-ho a provar."
4263
+ },
4264
+ fr: {
4265
+ searchingMail: "Recherche dans {{service}}",
4266
+ readingMail: "Lecture d’un e-mail dans {{service}}",
4267
+ checkingCalendar: "Consultation de {{service}}",
4268
+ savingDraft: "Enregistrement d’un brouillon dans {{service}}",
4269
+ preparingMail: "Préparation d’un e-mail dans {{service}}",
4270
+ preparingEvent: "Préparation d’une modification dans {{service}}",
4271
+ runningConfirmed: "Exécution des actions confirmées",
4272
+ openIn: "Ouvrir dans {{service}}",
4273
+ emailCountOne: "1 e-mail",
4274
+ emailCountOther: "{{count}} e-mails",
4275
+ eventCountOne: "1 événement",
4276
+ eventCountOther: "{{count}} événements",
4277
+ noEmails: "Aucun e-mail trouvé",
4278
+ noEvents: "Aucun événement sur cette période",
4279
+ showAll: "Tout afficher ({{count}})",
4280
+ showLess: "Afficher moins",
4281
+ showMore: "Afficher plus",
4282
+ allDay: "Toute la journée",
4283
+ to: "À",
4284
+ cc: "Cc",
4285
+ draftSaved: "Brouillon enregistré",
4286
+ openDraft: "Ouvrir le brouillon",
4287
+ attendeesOne: "1 participant",
4288
+ attendeesOther: "{{count}} participants",
4289
+ noSubject: "(sans objet)",
4290
+ unread: "Non lu",
4291
+ joinMeeting: "Rejoindre",
4292
+ awaitingConfirmation: "En attente de votre confirmation",
4293
+ confirmHint: "Répondez « oui » pour confirmer, ou dites à l’agent quoi modifier.",
4294
+ subject: "Objet",
4295
+ newEvent: "Nouvel événement",
4296
+ eventChange: "Modification de l’événement",
4297
+ deleteEvent: "Supprimer l’événement",
4298
+ attendeesNotified: "Les participants seront prévenus.",
4299
+ title: "Titre",
4300
+ when: "Quand",
4301
+ location: "Lieu",
4302
+ attendees: "Participants",
4303
+ description: "Description",
4304
+ emailSent: "E-mail envoyé",
4305
+ eventCreated: "Événement créé",
4306
+ eventUpdated: "Événement mis à jour",
4307
+ eventDeleted: "Événement supprimé",
4308
+ actionDone: "{{tool}} terminé",
4309
+ actionFailed: "Échec",
4310
+ openEmail: "Ouvrir l’e-mail",
4311
+ openEvent: "Ouvrir l’événement",
4312
+ replyInThread: "Réponse dans le même fil",
4313
+ confirmSend: "Envoyer",
4314
+ confirmCreate: "Créer",
4315
+ confirmUpdate: "Enregistrer les modifications",
4316
+ confirmDelete: "Supprimer",
4317
+ confirmGeneric: "Confirmer",
4318
+ cancel: "Annuler",
4319
+ confirming: "Confirmation…",
4320
+ cancelling: "Annulation…",
4321
+ verifying: "Vérification de l’état…",
4322
+ expiresIn: "Expire dans {{minutes}} min",
4323
+ expiresSoon: "Expire dans moins d’une minute",
4324
+ statusExecuting: "En cours…",
4325
+ statusExecuted: "Terminé",
4326
+ statusRejected: "Annulée",
4327
+ statusExpired: "Expirée : redemandez-la dans le chat",
4328
+ statusSuperseded: "Remplacée par une version plus récente",
4329
+ statusInvalidated: "Ne peut plus être exécutée : redemandez-la",
4330
+ statusFailed: "Échec",
4331
+ statusUnknown: "Résultat inconnu : vérifiez avant de réessayer",
4332
+ statusNotFound: "Indisponible dans cette conversation",
4333
+ toolUnavailable: "L’outil de cette action n’est pas disponible pour le moment",
4334
+ decisionError: "Impossible d’envoyer votre décision. Réessayez."
4335
+ },
4336
+ it: {
4337
+ searchingMail: "Ricerca in {{service}}",
4338
+ readingMail: "Lettura di un’email in {{service}}",
4339
+ checkingCalendar: "Consultazione di {{service}}",
4340
+ savingDraft: "Salvataggio di una bozza in {{service}}",
4341
+ preparingMail: "Preparazione di un’email in {{service}}",
4342
+ preparingEvent: "Preparazione di una modifica in {{service}}",
4343
+ runningConfirmed: "Esecuzione delle azioni confermate",
4344
+ openIn: "Apri in {{service}}",
4345
+ emailCountOne: "1 email",
4346
+ emailCountOther: "{{count}} email",
4347
+ eventCountOne: "1 evento",
4348
+ eventCountOther: "{{count}} eventi",
4349
+ noEmails: "Nessuna email trovata",
4350
+ noEvents: "Nessun evento in questo periodo",
4351
+ showAll: "Mostra tutto ({{count}})",
4352
+ showLess: "Mostra meno",
4353
+ showMore: "Mostra di più",
4354
+ allDay: "Tutto il giorno",
4355
+ to: "A",
4356
+ cc: "Cc",
4357
+ draftSaved: "Bozza salvata",
4358
+ openDraft: "Apri bozza",
4359
+ attendeesOne: "1 partecipante",
4360
+ attendeesOther: "{{count}} partecipanti",
4361
+ noSubject: "(nessun oggetto)",
4362
+ unread: "Non letta",
4363
+ joinMeeting: "Partecipa",
4364
+ awaitingConfirmation: "In attesa della tua conferma",
4365
+ confirmHint: "Rispondi «sì» per confermare, o di’ all’agente cosa cambiare.",
4366
+ subject: "Oggetto",
4367
+ newEvent: "Nuovo evento",
4368
+ eventChange: "Modifica dell’evento",
4369
+ deleteEvent: "Elimina evento",
4370
+ attendeesNotified: "I partecipanti verranno avvisati.",
4371
+ title: "Titolo",
4372
+ when: "Quando",
4373
+ location: "Luogo",
4374
+ attendees: "Partecipanti",
4375
+ description: "Descrizione",
4376
+ emailSent: "Email inviata",
4377
+ eventCreated: "Evento creato",
4378
+ eventUpdated: "Evento aggiornato",
4379
+ eventDeleted: "Evento eliminato",
4380
+ actionDone: "{{tool}} completato",
4381
+ actionFailed: "Errore",
4382
+ openEmail: "Apri email",
4383
+ openEvent: "Apri evento",
4384
+ replyInThread: "Risposta nello stesso thread",
4385
+ confirmSend: "Invia",
4386
+ confirmCreate: "Crea",
4387
+ confirmUpdate: "Salva modifiche",
4388
+ confirmDelete: "Elimina",
4389
+ confirmGeneric: "Conferma",
4390
+ cancel: "Annulla",
4391
+ confirming: "Conferma in corso…",
4392
+ cancelling: "Annullamento in corso…",
4393
+ verifying: "Verifica dello stato…",
4394
+ expiresIn: "Scade tra {{minutes}} min",
4395
+ expiresSoon: "Scade tra meno di un minuto",
4396
+ statusExecuting: "In esecuzione…",
4397
+ statusExecuted: "Fatto",
4398
+ statusRejected: "Annullata",
4399
+ statusExpired: "Scaduta: richiedila di nuovo nella chat",
4400
+ statusSuperseded: "Sostituita da una versione più recente",
4401
+ statusInvalidated: "Non può più essere eseguita: richiedila di nuovo",
4402
+ statusFailed: "Non riuscita",
4403
+ statusUnknown: "Esito sconosciuto: verifica prima di riprovare",
4404
+ statusNotFound: "Non disponibile in questa conversazione",
4405
+ toolUnavailable: "Lo strumento di questa azione non è disponibile ora",
4406
+ decisionError: "Impossibile inviare la tua decisione. Riprova."
4407
+ },
4408
+ de: {
4409
+ searchingMail: "Suche in {{service}}",
4410
+ readingMail: "E-Mail in {{service}} wird gelesen",
4411
+ checkingCalendar: "{{service}} wird abgefragt",
4412
+ savingDraft: "Entwurf wird in {{service}} gespeichert",
4413
+ preparingMail: "E-Mail in {{service}} wird vorbereitet",
4414
+ preparingEvent: "Änderung in {{service}} wird vorbereitet",
4415
+ runningConfirmed: "Bestätigte Aktionen werden ausgeführt",
4416
+ openIn: "In {{service}} öffnen",
4417
+ emailCountOne: "1 E-Mail",
4418
+ emailCountOther: "{{count}} E-Mails",
4419
+ eventCountOne: "1 Termin",
4420
+ eventCountOther: "{{count}} Termine",
4421
+ noEmails: "Keine E-Mails gefunden",
4422
+ noEvents: "Keine Termine in diesem Zeitraum",
4423
+ showAll: "Alle anzeigen ({{count}})",
4424
+ showLess: "Weniger anzeigen",
4425
+ showMore: "Mehr anzeigen",
4426
+ allDay: "Ganztägig",
4427
+ to: "An",
4428
+ cc: "Cc",
4429
+ draftSaved: "Entwurf gespeichert",
4430
+ openDraft: "Entwurf öffnen",
4431
+ attendeesOne: "1 Teilnehmer",
4432
+ attendeesOther: "{{count}} Teilnehmer",
4433
+ noSubject: "(kein Betreff)",
4434
+ unread: "Ungelesen",
4435
+ joinMeeting: "Teilnehmen",
4436
+ awaitingConfirmation: "Wartet auf deine Bestätigung",
4437
+ confirmHint: "Antworte mit „ja“, um zu bestätigen, oder sag dem Agenten, was er ändern soll.",
4438
+ subject: "Betreff",
4439
+ newEvent: "Neuer Termin",
4440
+ eventChange: "Terminänderung",
4441
+ deleteEvent: "Termin löschen",
4442
+ attendeesNotified: "Die Teilnehmer werden benachrichtigt.",
4443
+ title: "Titel",
4444
+ when: "Wann",
4445
+ location: "Ort",
4446
+ attendees: "Teilnehmer",
4447
+ description: "Beschreibung",
4448
+ emailSent: "E-Mail gesendet",
4449
+ eventCreated: "Termin erstellt",
4450
+ eventUpdated: "Termin aktualisiert",
4451
+ eventDeleted: "Termin gelöscht",
4452
+ actionDone: "{{tool}} erledigt",
4453
+ actionFailed: "Fehlgeschlagen",
4454
+ openEmail: "E-Mail öffnen",
4455
+ openEvent: "Termin öffnen",
4456
+ replyInThread: "Antwort im selben Verlauf",
4457
+ confirmSend: "Senden",
4458
+ confirmCreate: "Erstellen",
4459
+ confirmUpdate: "Änderungen speichern",
4460
+ confirmDelete: "Löschen",
4461
+ confirmGeneric: "Bestätigen",
4462
+ cancel: "Abbrechen",
4463
+ confirming: "Wird bestätigt…",
4464
+ cancelling: "Wird abgebrochen…",
4465
+ verifying: "Status wird geprüft…",
4466
+ expiresIn: "Läuft in {{minutes}} Min. ab",
4467
+ expiresSoon: "Läuft in weniger als einer Minute ab",
4468
+ statusExecuting: "Wird ausgeführt…",
4469
+ statusExecuted: "Erledigt",
4470
+ statusRejected: "Abgebrochen",
4471
+ statusExpired: "Abgelaufen: bitte im Chat erneut anfragen",
4472
+ statusSuperseded: "Durch eine neuere Version ersetzt",
4473
+ statusInvalidated: "Kann nicht mehr ausgeführt werden: bitte erneut anfragen",
4474
+ statusFailed: "Fehlgeschlagen",
4475
+ statusUnknown: "Ergebnis unbekannt: vor dem Wiederholen prüfen",
4476
+ statusNotFound: "In dieser Unterhaltung nicht verfügbar",
4477
+ toolUnavailable: "Das Tool für diese Aktion ist gerade nicht verfügbar",
4478
+ decisionError: "Deine Entscheidung konnte nicht gesendet werden. Versuche es erneut."
4479
+ },
4480
+ da: {
4481
+ searchingMail: "Søger i {{service}}",
4482
+ readingMail: "Læser en e-mail i {{service}}",
4483
+ checkingCalendar: "Tjekker {{service}}",
4484
+ savingDraft: "Gemmer en kladde i {{service}}",
4485
+ preparingMail: "Forbereder en e-mail i {{service}}",
4486
+ preparingEvent: "Forbereder en ændring i {{service}}",
4487
+ runningConfirmed: "Udfører de bekræftede handlinger",
4488
+ openIn: "Åbn i {{service}}",
4489
+ emailCountOne: "1 e-mail",
4490
+ emailCountOther: "{{count}} e-mails",
4491
+ eventCountOne: "1 begivenhed",
4492
+ eventCountOther: "{{count}} begivenheder",
4493
+ noEmails: "Ingen e-mails fundet",
4494
+ noEvents: "Ingen begivenheder i denne periode",
4495
+ showAll: "Vis alle ({{count}})",
4496
+ showLess: "Vis mindre",
4497
+ showMore: "Vis mere",
4498
+ allDay: "Hele dagen",
4499
+ to: "Til",
4500
+ cc: "Cc",
4501
+ draftSaved: "Kladde gemt",
4502
+ openDraft: "Åbn kladde",
4503
+ attendeesOne: "1 deltager",
4504
+ attendeesOther: "{{count}} deltagere",
4505
+ noSubject: "(intet emne)",
4506
+ unread: "Ulæst",
4507
+ joinMeeting: "Deltag",
4508
+ awaitingConfirmation: "Afventer din bekræftelse",
4509
+ confirmHint: "Svar “ja” for at bekræfte, eller fortæl agenten, hvad der skal ændres.",
4510
+ subject: "Emne",
4511
+ newEvent: "Ny begivenhed",
4512
+ eventChange: "Ændring af begivenhed",
4513
+ deleteEvent: "Slet begivenhed",
4514
+ attendeesNotified: "Deltagerne får besked.",
4515
+ title: "Titel",
4516
+ when: "Hvornår",
4517
+ location: "Sted",
4518
+ attendees: "Deltagere",
4519
+ description: "Beskrivelse",
4520
+ emailSent: "E-mail sendt",
4521
+ eventCreated: "Begivenhed oprettet",
4522
+ eventUpdated: "Begivenhed opdateret",
4523
+ eventDeleted: "Begivenhed slettet",
4524
+ actionDone: "{{tool}} udført",
4525
+ actionFailed: "Mislykkedes",
4526
+ openEmail: "Åbn e-mail",
4527
+ openEvent: "Åbn begivenhed",
4528
+ replyInThread: "Svar i samme tråd",
4529
+ confirmSend: "Send",
4530
+ confirmCreate: "Opret",
4531
+ confirmUpdate: "Gem ændringer",
4532
+ confirmDelete: "Slet",
4533
+ confirmGeneric: "Bekræft",
4534
+ cancel: "Annuller",
4535
+ confirming: "Bekræfter…",
4536
+ cancelling: "Annullerer…",
4537
+ verifying: "Tjekker status…",
4538
+ expiresIn: "Udløber om {{minutes}} min.",
4539
+ expiresSoon: "Udløber om under et minut",
4540
+ statusExecuting: "Kører…",
4541
+ statusExecuted: "Udført",
4542
+ statusRejected: "Annulleret",
4543
+ statusExpired: "Udløbet: bed om det igen i chatten",
4544
+ statusSuperseded: "Erstattet af en nyere version",
4545
+ statusInvalidated: "Kan ikke længere udføres: bed om det igen",
4546
+ statusFailed: "Mislykkedes",
4547
+ statusUnknown: "Ukendt resultat: tjek før du prøver igen",
4548
+ statusNotFound: "Ikke tilgængelig i denne samtale",
4549
+ toolUnavailable: "Værktøjet til denne handling er ikke tilgængeligt lige nu",
4550
+ decisionError: "Din beslutning kunne ikke sendes. Prøv igen."
4551
+ },
4552
+ sv: {
4553
+ searchingMail: "Söker i {{service}}",
4554
+ readingMail: "Läser ett mejl i {{service}}",
4555
+ checkingCalendar: "Kollar {{service}}",
4556
+ savingDraft: "Sparar ett utkast i {{service}}",
4557
+ preparingMail: "Förbereder ett mejl i {{service}}",
4558
+ preparingEvent: "Förbereder en ändring i {{service}}",
4559
+ runningConfirmed: "Utför de bekräftade åtgärderna",
4560
+ openIn: "Öppna i {{service}}",
4561
+ emailCountOne: "1 mejl",
4562
+ emailCountOther: "{{count}} mejl",
4563
+ eventCountOne: "1 händelse",
4564
+ eventCountOther: "{{count}} händelser",
4565
+ noEmails: "Inga mejl hittades",
4566
+ noEvents: "Inga händelser under perioden",
4567
+ showAll: "Visa alla ({{count}})",
4568
+ showLess: "Visa mindre",
4569
+ showMore: "Visa mer",
4570
+ allDay: "Heldag",
4571
+ to: "Till",
4572
+ cc: "Kopia",
4573
+ draftSaved: "Utkast sparat",
4574
+ openDraft: "Öppna utkast",
4575
+ attendeesOne: "1 deltagare",
4576
+ attendeesOther: "{{count}} deltagare",
4577
+ noSubject: "(inget ämne)",
4578
+ unread: "Oläst",
4579
+ joinMeeting: "Anslut",
4580
+ awaitingConfirmation: "Väntar på din bekräftelse",
4581
+ confirmHint: "Svara ”ja” för att bekräfta, eller säg till agenten vad som ska ändras.",
4582
+ subject: "Ämne",
4583
+ newEvent: "Ny händelse",
4584
+ eventChange: "Ändring av händelse",
4585
+ deleteEvent: "Ta bort händelse",
4586
+ attendeesNotified: "Deltagarna meddelas.",
4587
+ title: "Titel",
4588
+ when: "När",
4589
+ location: "Plats",
4590
+ attendees: "Deltagare",
4591
+ description: "Beskrivning",
4592
+ emailSent: "Mejl skickat",
4593
+ eventCreated: "Händelse skapad",
4594
+ eventUpdated: "Händelse uppdaterad",
4595
+ eventDeleted: "Händelse borttagen",
4596
+ actionDone: "{{tool}} klar",
4597
+ actionFailed: "Misslyckades",
4598
+ openEmail: "Öppna mejl",
4599
+ openEvent: "Öppna händelse",
4600
+ replyInThread: "Svar i samma tråd",
4601
+ confirmSend: "Skicka",
4602
+ confirmCreate: "Skapa",
4603
+ confirmUpdate: "Spara ändringar",
4604
+ confirmDelete: "Ta bort",
4605
+ confirmGeneric: "Bekräfta",
4606
+ cancel: "Avbryt",
4607
+ confirming: "Bekräftar…",
4608
+ cancelling: "Avbryter…",
4609
+ verifying: "Kontrollerar status…",
4610
+ expiresIn: "Går ut om {{minutes}} min",
4611
+ expiresSoon: "Går ut om mindre än en minut",
4612
+ statusExecuting: "Körs…",
4613
+ statusExecuted: "Klart",
4614
+ statusRejected: "Avbruten",
4615
+ statusExpired: "Utgången: be om det igen i chatten",
4616
+ statusSuperseded: "Ersatt av en nyare version",
4617
+ statusInvalidated: "Kan inte längre köras: be om det igen",
4618
+ statusFailed: "Misslyckades",
4619
+ statusUnknown: "Okänt resultat: kontrollera innan du försöker igen",
4620
+ statusNotFound: "Inte tillgänglig i den här konversationen",
4621
+ toolUnavailable: "Verktyget för den här åtgärden är inte tillgängligt just nu",
4622
+ decisionError: "Ditt beslut kunde inte skickas. Försök igen."
4623
+ },
4624
+ no: {
4625
+ searchingMail: "Søker i {{service}}",
4626
+ readingMail: "Leser en e-post i {{service}}",
4627
+ checkingCalendar: "Sjekker {{service}}",
4628
+ savingDraft: "Lagrer et utkast i {{service}}",
4629
+ preparingMail: "Forbereder en e-post i {{service}}",
4630
+ preparingEvent: "Forbereder en endring i {{service}}",
4631
+ runningConfirmed: "Utfører de bekreftede handlingene",
4632
+ openIn: "Åpne i {{service}}",
4633
+ emailCountOne: "1 e-post",
4634
+ emailCountOther: "{{count}} e-poster",
4635
+ eventCountOne: "1 hendelse",
4636
+ eventCountOther: "{{count}} hendelser",
4637
+ noEmails: "Fant ingen e-poster",
4638
+ noEvents: "Ingen hendelser i denne perioden",
4639
+ showAll: "Vis alle ({{count}})",
4640
+ showLess: "Vis mindre",
4641
+ showMore: "Vis mer",
4642
+ allDay: "Hele dagen",
4643
+ to: "Til",
4644
+ cc: "Kopi",
4645
+ draftSaved: "Utkast lagret",
4646
+ openDraft: "Åpne utkast",
4647
+ attendeesOne: "1 deltaker",
4648
+ attendeesOther: "{{count}} deltakere",
4649
+ noSubject: "(intet emne)",
4650
+ unread: "Ulest",
4651
+ joinMeeting: "Bli med",
4652
+ awaitingConfirmation: "Venter på bekreftelsen din",
4653
+ confirmHint: "Svar «ja» for å bekrefte, eller si til agenten hva som skal endres.",
4654
+ subject: "Emne",
4655
+ newEvent: "Ny hendelse",
4656
+ eventChange: "Endring av hendelse",
4657
+ deleteEvent: "Slett hendelse",
4658
+ attendeesNotified: "Deltakerne blir varslet.",
4659
+ title: "Tittel",
4660
+ when: "Når",
4661
+ location: "Sted",
4662
+ attendees: "Deltakere",
4663
+ description: "Beskrivelse",
4664
+ emailSent: "E-post sendt",
4665
+ eventCreated: "Hendelse opprettet",
4666
+ eventUpdated: "Hendelse oppdatert",
4667
+ eventDeleted: "Hendelse slettet",
4668
+ actionDone: "{{tool}} fullført",
4669
+ actionFailed: "Mislyktes",
4670
+ openEmail: "Åpne e-post",
4671
+ openEvent: "Åpne hendelse",
4672
+ replyInThread: "Svar i samme tråd",
4673
+ confirmSend: "Send",
4674
+ confirmCreate: "Opprett",
4675
+ confirmUpdate: "Lagre endringer",
4676
+ confirmDelete: "Slett",
4677
+ confirmGeneric: "Bekreft",
4678
+ cancel: "Avbryt",
4679
+ confirming: "Bekrefter…",
4680
+ cancelling: "Avbryter…",
4681
+ verifying: "Sjekker status…",
4682
+ expiresIn: "Utløper om {{minutes}} min",
4683
+ expiresSoon: "Utløper om under ett minutt",
4684
+ statusExecuting: "Kjører…",
4685
+ statusExecuted: "Fullført",
4686
+ statusRejected: "Avbrutt",
4687
+ statusExpired: "Utløpt: be om det igjen i chatten",
4688
+ statusSuperseded: "Erstattet av en nyere versjon",
4689
+ statusInvalidated: "Kan ikke lenger utføres: be om det igjen",
4690
+ statusFailed: "Mislyktes",
4691
+ statusUnknown: "Ukjent resultat: sjekk før du prøver igjen",
4692
+ statusNotFound: "Ikke tilgjengelig i denne samtalen",
4693
+ toolUnavailable: "Verktøyet for denne handlingen er ikke tilgjengelig nå",
4694
+ decisionError: "Beslutningen din kunne ikke sendes. Prøv igjen."
4695
+ },
4696
+ pt: {
4697
+ searchingMail: "Pesquisando no {{service}}",
4698
+ readingMail: "Lendo um e-mail no {{service}}",
4699
+ checkingCalendar: "Consultando o {{service}}",
4700
+ savingDraft: "Salvando um rascunho no {{service}}",
4701
+ preparingMail: "Preparando um e-mail no {{service}}",
4702
+ preparingEvent: "Preparando uma alteração no {{service}}",
4703
+ runningConfirmed: "Executando as ações confirmadas",
4704
+ openIn: "Abrir no {{service}}",
4705
+ emailCountOne: "1 e-mail",
4706
+ emailCountOther: "{{count}} e-mails",
4707
+ eventCountOne: "1 evento",
4708
+ eventCountOther: "{{count}} eventos",
4709
+ noEmails: "Nenhum e-mail encontrado",
4710
+ noEvents: "Nenhum evento neste período",
4711
+ showAll: "Ver todos ({{count}})",
4712
+ showLess: "Ver menos",
4713
+ showMore: "Ver mais",
4714
+ allDay: "Dia inteiro",
4715
+ to: "Para",
4716
+ cc: "Cc",
4717
+ draftSaved: "Rascunho salvo",
4718
+ openDraft: "Abrir rascunho",
4719
+ attendeesOne: "1 participante",
4720
+ attendeesOther: "{{count}} participantes",
4721
+ noSubject: "(sem assunto)",
4722
+ unread: "Não lido",
4723
+ joinMeeting: "Entrar",
4724
+ awaitingConfirmation: "Aguardando sua confirmação",
4725
+ confirmHint: "Responda “sim” para confirmar, ou diga ao agente o que mudar.",
4726
+ subject: "Assunto",
4727
+ newEvent: "Novo evento",
4728
+ eventChange: "Alteração do evento",
4729
+ deleteEvent: "Excluir evento",
4730
+ attendeesNotified: "Os participantes serão avisados.",
4731
+ title: "Título",
4732
+ when: "Quando",
4733
+ location: "Local",
4734
+ attendees: "Participantes",
4735
+ description: "Descrição",
4736
+ emailSent: "E-mail enviado",
4737
+ eventCreated: "Evento criado",
4738
+ eventUpdated: "Evento atualizado",
4739
+ eventDeleted: "Evento excluído",
4740
+ actionDone: "{{tool}} concluído",
4741
+ actionFailed: "Falhou",
4742
+ openEmail: "Abrir e-mail",
4743
+ openEvent: "Abrir evento",
4744
+ replyInThread: "Resposta na mesma conversa",
4745
+ confirmSend: "Enviar",
4746
+ confirmCreate: "Criar",
4747
+ confirmUpdate: "Salvar alterações",
4748
+ confirmDelete: "Excluir",
4749
+ confirmGeneric: "Confirmar",
4750
+ cancel: "Cancelar",
4751
+ confirming: "Confirmando…",
4752
+ cancelling: "Cancelando…",
4753
+ verifying: "Verificando o status…",
4754
+ expiresIn: "Expira em {{minutes}} min",
4755
+ expiresSoon: "Expira em menos de um minuto",
4756
+ statusExecuting: "Executando…",
4757
+ statusExecuted: "Concluído",
4758
+ statusRejected: "Cancelada",
4759
+ statusExpired: "Expirada: peça novamente no chat",
4760
+ statusSuperseded: "Substituída por uma versão mais recente",
4761
+ statusInvalidated: "Não pode mais ser executada: peça novamente",
4762
+ statusFailed: "Falhou",
4763
+ statusUnknown: "Resultado desconhecido: verifique antes de tentar de novo",
4764
+ statusNotFound: "Indisponível nesta conversa",
4765
+ toolUnavailable: "A ferramenta desta ação não está disponível agora",
4766
+ decisionError: "Não foi possível enviar sua decisão. Tente novamente."
4767
+ }
4768
+ };
4769
+ function getPersonalConnectorCopy(locale) {
4770
+ return {
4771
+ ...ENGLISH,
4772
+ ...COPY[getSupportedToolLocale(locale)]
4773
+ };
4774
+ }
4775
+ function fillCopy(template, values) {
4776
+ return template.replace(/\{\{(\w+)\}\}/g, (match, key) => key in values ? String(values[key]) : match);
4777
+ }
4778
+
4779
+ //#endregion
4780
+ //#region src/components/tool-confirmation-controls.tsx
4781
+ const MINUTE = 6e4;
4782
+ /** Re-renders every `intervalMs` while `active`, for countdowns. */
4783
+ function useNow(active, intervalMs = 15e3) {
4784
+ const [now, setNow] = useState(() => Date.now());
4785
+ useEffect(() => {
4786
+ if (!active) return;
4787
+ setNow(Date.now());
4788
+ const timer = setInterval(() => setNow(Date.now()), intervalMs);
4789
+ return () => clearInterval(timer);
4790
+ }, [active, intervalMs]);
4791
+ return now;
4792
+ }
4793
+ /** Server state of a held action, with expiry kept current. */
4794
+ function useToolConfirmationState(pending, toolConfirmation) {
4795
+ const now = useNow((pending ? toolConfirmation?.states.items[pending.action_id] : void 0)?.status === "pending");
4796
+ return toolConfirmation && pending ? toolConfirmationAt(toolConfirmation.states, pending.action_id, now) : void 0;
4797
+ }
4798
+ function verbFor(operation, copy) {
4799
+ switch (operation) {
4800
+ case "send": return copy.confirmSend;
4801
+ case "create": return copy.confirmCreate;
4802
+ case "update": return copy.confirmUpdate;
4803
+ case "delete": return copy.confirmDelete;
4804
+ default: return copy.confirmGeneric;
4805
+ }
4806
+ }
4807
+ const STATUS_COPY = {
4808
+ executing: "statusExecuting",
4809
+ executed: "statusExecuted",
4810
+ rejected: "statusRejected",
4811
+ expired: "statusExpired",
4812
+ superseded: "statusSuperseded",
4813
+ invalidated: "statusInvalidated",
4814
+ failed: "statusFailed",
4815
+ unknown: "statusUnknown",
4816
+ not_found: "statusNotFound"
4817
+ };
4818
+ function statusLabel(status, copy) {
4819
+ const key = STATUS_COPY[status];
4820
+ return key ? copy[key] : null;
4821
+ }
4822
+ const BADGE_TONE = {
4823
+ pending: "border-amber-200 bg-amber-50 text-amber-800",
4824
+ executing: "border-sky-200 bg-sky-50 text-sky-800",
4825
+ executed: "border-emerald-200 bg-emerald-50 text-emerald-800",
4826
+ failed: "border-rose-200 bg-rose-50 text-rose-800",
4827
+ unknown: "border-amber-300 bg-amber-50 text-amber-900"
4828
+ };
4829
+ /** Header badge of a held action: "Awaiting your confirmation" or its outcome. */
4830
+ function ConfirmationBadge({ state, copy }) {
4831
+ const status = state?.status ?? "pending";
4832
+ const label = status === "pending" ? copy.awaitingConfirmation : statusLabel(status, copy);
4833
+ const Icon = status === "executed" ? CheckCircle2 : status === "failed" ? XCircle : status === "executing" ? LoaderCircle : Clock;
4834
+ return /* @__PURE__ */ jsxs("span", {
4835
+ 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"),
4836
+ "data-confirmation-status": status,
4837
+ children: [/* @__PURE__ */ jsx(Icon, {
4838
+ className: joinClasses("h-3 w-3", status === "executing" ? "animate-spin" : void 0),
4839
+ "aria-hidden": "true"
4840
+ }), label]
4841
+ });
4842
+ }
4843
+ function expiryText(state, serverOffsetMs, now, copy) {
4844
+ if (!state.expiresAt) return null;
4845
+ const left = Date.parse(state.expiresAt) - (now + serverOffsetMs);
4846
+ if (Number.isNaN(left) || left <= 0) return null;
4847
+ return left < MINUTE ? copy.expiresSoon : fillCopy(copy.expiresIn, { minutes: Math.floor(left / MINUTE) });
4848
+ }
4849
+ /**
4850
+ * Footer of a held action. Without `toolConfirmation` it keeps the text hint
4851
+ * (reply "yes"); with it, buttons once the server state is known.
4852
+ */
4853
+ function PendingConfirmationFooter({ pending, toolConfirmation, copy }) {
4854
+ const state = useToolConfirmationState(pending, toolConfirmation);
4855
+ const now = useNow(state?.status === "pending");
4856
+ const [sending, setSending] = useState(null);
4857
+ const [failed, setFailed] = useState(false);
4858
+ if (!toolConfirmation) return /* @__PURE__ */ jsx("p", {
4859
+ className: "border-t border-amber-100 bg-amber-50/60 px-3 py-2 text-xs text-neutral-700",
4860
+ children: copy.confirmHint
4861
+ });
4862
+ if (!state) return /* @__PURE__ */ jsx("p", {
4863
+ className: "border-t border-neutral-100 bg-neutral-50 px-3 py-2 text-xs text-neutral-500",
4864
+ "aria-live": "polite",
4865
+ children: copy.verifying
4866
+ });
4867
+ if (state.status !== "pending") {
4868
+ const label = statusLabel(state.status, copy);
4869
+ return label ? /* @__PURE__ */ jsxs("p", {
4870
+ className: "border-t border-neutral-100 bg-neutral-50 px-3 py-2 text-xs text-neutral-700",
4871
+ "aria-live": "polite",
4872
+ children: [label, state.status === "failed" && state.error ? `: ${state.error}` : null]
4873
+ }) : null;
4874
+ }
4875
+ const decide = async (decision) => {
4876
+ setSending(decision);
4877
+ setFailed(false);
4878
+ try {
4879
+ await toolConfirmation.decide([{
4880
+ action_id: pending.action_id,
4881
+ decision
4882
+ }]);
4883
+ } catch {
4884
+ setFailed(true);
4885
+ } finally {
4886
+ setSending(null);
4887
+ }
4888
+ };
4889
+ const disabled = Boolean(toolConfirmation.disabled) || sending !== null;
4890
+ const destructive = pending.operation === "delete";
4891
+ const expiry = expiryText(state, toolConfirmation.states.serverOffsetMs, now, copy);
4892
+ const unavailable = state.error === "tool_unavailable";
4893
+ return /* @__PURE__ */ jsxs("div", {
4894
+ className: "flex flex-wrap items-center gap-2 border-t border-amber-100 bg-amber-50/60 px-3 py-2",
4895
+ "data-confirmation-actions": pending.action_id,
4896
+ children: [
4897
+ state.canConfirm ? /* @__PURE__ */ jsxs("button", {
4898
+ type: "button",
4899
+ disabled,
4900
+ onClick: () => void decide("confirm"),
4901
+ 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"),
4902
+ children: [sending === "confirm" ? /* @__PURE__ */ jsx(LoaderCircle, {
4903
+ className: "mr-2 size-3 animate-spin",
4904
+ "aria-hidden": "true"
4905
+ }) : null, sending === "confirm" ? copy.confirming : verbFor(pending.operation, copy)]
4906
+ }) : null,
4907
+ state.canReject ? /* @__PURE__ */ jsxs("button", {
4908
+ type: "button",
4909
+ disabled,
4910
+ onClick: () => void decide("reject"),
4911
+ 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",
4912
+ children: [sending === "reject" ? /* @__PURE__ */ jsx(LoaderCircle, {
4913
+ className: "mr-2 size-3 animate-spin",
4914
+ "aria-hidden": "true"
4915
+ }) : null, sending === "reject" ? copy.cancelling : copy.cancel]
4916
+ }) : null,
4917
+ /* @__PURE__ */ jsx("span", {
4918
+ className: "ml-auto text-xs text-neutral-600",
4919
+ "aria-live": "polite",
4920
+ children: failed ? copy.decisionError : unavailable ? copy.toolUnavailable : expiry
4921
+ })
4922
+ ]
4923
+ });
4924
+ }
4925
+
4926
+ //#endregion
4927
+ //#region src/components/tool-result-personal-connector-card.tsx
4928
+ const COLLAPSED_ITEMS = 5;
4929
+ const COLLAPSED_BODY_CHARS = 600;
4930
+ const EVENT_OPERATIONS = [
4931
+ "create_event",
4932
+ "update_event",
4933
+ "delete_event"
4934
+ ];
4935
+ function isEventOperation(value) {
4936
+ return EVENT_OPERATIONS.includes(value);
4937
+ }
4938
+ function asRecord(value) {
4939
+ return value && typeof value === "object" && !Array.isArray(value) ? value : null;
4940
+ }
4941
+ function text(value) {
4942
+ return typeof value === "string" && value.trim().length > 0 ? value : null;
4943
+ }
4944
+ function hasId(value) {
4945
+ return typeof asRecord(value)?.id === "string";
4946
+ }
4947
+ function getView(part) {
4948
+ const metadata = asRecord(part.metadata);
4949
+ if (!metadata || metadata.error) return null;
4950
+ const result = metadata.result;
4951
+ const pending = asRecord(metadata.pending_confirmation);
4952
+ if (pending) {
4953
+ const confirmation = pending;
4954
+ if (!asRecord(confirmation.action)) return null;
4955
+ if (metadata.action === "send") return {
4956
+ kind: "pending-mail",
4957
+ pending: confirmation
4958
+ };
4959
+ return isEventOperation(metadata.action) ? {
4960
+ kind: "pending-event",
4961
+ operation: metadata.action,
4962
+ pending: confirmation
4963
+ } : null;
4964
+ }
4965
+ switch (metadata.action) {
4966
+ case "search": return Array.isArray(result) ? {
4967
+ kind: "mail-list",
4968
+ messages: result.filter(hasId)
4969
+ } : null;
4970
+ case "read": return hasId(result) ? {
4971
+ kind: "mail",
4972
+ message: result
4973
+ } : null;
4974
+ case "list_events": return Array.isArray(result) ? {
4975
+ kind: "events",
4976
+ events: result.filter(hasId)
4977
+ } : null;
4978
+ case "create_draft": {
4979
+ const input = asRecord(part.input);
4980
+ return {
4981
+ kind: "draft",
4982
+ link: text(asRecord(result)?.link),
4983
+ to: Array.isArray(input?.to) ? input.to.filter((item) => typeof item === "string") : [],
4984
+ subject: text(input?.subject),
4985
+ body: text(input?.body)
4986
+ };
4987
+ }
4988
+ default: return null;
4989
+ }
4990
+ }
4991
+ /** Whether the part has a dedicated view; otherwise the generic card renders it. */
4992
+ function hasPersonalConnectorView(part) {
4993
+ return part.state === "completed" && getView(part) !== null;
4994
+ }
4995
+ function getConnector(part) {
4996
+ const connector = asRecord(asRecord(part.metadata)?.connector);
4997
+ return connector && typeof connector.label === "string" ? connector : null;
4998
+ }
4999
+ function isCalendar(connector) {
5000
+ return connector?.capability.includes("calendar") ?? false;
5001
+ }
5002
+ function dateFormatter(locale, options) {
5003
+ try {
5004
+ return new Intl.DateTimeFormat(locale ?? void 0, options);
5005
+ } catch {
5006
+ return new Intl.DateTimeFormat(void 0, options);
5007
+ }
5008
+ }
5009
+ /** All-day values come as "YYYY-MM-DD": read them as local dates, not UTC. */
5010
+ function parseDate(value) {
5011
+ if (!value) return null;
5012
+ const dateOnly = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
5013
+ const date = dateOnly ? new Date(Number(dateOnly[1]), Number(dateOnly[2]) - 1, Number(dateOnly[3])) : new Date(value);
5014
+ return Number.isNaN(date.getTime()) ? null : date;
5015
+ }
5016
+ function isSameDay(a, b) {
5017
+ return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
5018
+ }
5019
+ function formatMailDate(value, locale) {
5020
+ const date = parseDate(value);
5021
+ if (!date) return value ?? null;
5022
+ return isSameDay(date, /* @__PURE__ */ new Date()) ? dateFormatter(locale, {
5023
+ hour: "2-digit",
5024
+ minute: "2-digit"
5025
+ }).format(date) : dateFormatter(locale, {
5026
+ day: "numeric",
5027
+ month: "short"
5028
+ }).format(date);
5029
+ }
5030
+ function formatFullDate(value, locale) {
5031
+ const date = parseDate(value);
5032
+ if (!date) return value ?? null;
5033
+ return dateFormatter(locale, {
5034
+ dateStyle: "medium",
5035
+ timeStyle: "short"
5036
+ }).format(date);
5037
+ }
5038
+ /** "Ana Pérez <ana@acme.com>" → "Ana Pérez". */
5039
+ function displayName(address) {
5040
+ if (!address) return null;
5041
+ const match = /^\s*"?([^"<]+?)"?\s*<[^>]+>\s*$/.exec(address);
5042
+ return match ? match[1] : address;
5043
+ }
5044
+ function count(copy, n, one, other) {
5045
+ return n === 1 ? one : fillCopy(other, { count: n });
5046
+ }
5047
+ function ExternalAnchor({ href, className, children, label }) {
5048
+ return /* @__PURE__ */ jsx("a", {
5049
+ href,
5050
+ target: "_blank",
5051
+ rel: "noreferrer noopener",
5052
+ "aria-label": label,
5053
+ className: joinClasses("inline-flex items-center gap-1 text-xs font-medium text-neutral-700 hover:text-neutral-950 hover:underline", className),
5054
+ children
5055
+ });
5056
+ }
5057
+ function ShowAllToggle({ total, expanded, onToggle, copy }) {
5058
+ if (total <= COLLAPSED_ITEMS) return null;
5059
+ return /* @__PURE__ */ jsx("button", {
5060
+ type: "button",
5061
+ onClick: onToggle,
5062
+ 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",
5063
+ children: expanded ? copy.showLess : fillCopy(copy.showAll, { count: total })
5064
+ });
5065
+ }
5066
+ function MailRow({ message, locale, copy }) {
5067
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
5068
+ /* @__PURE__ */ jsxs("div", {
5069
+ className: "flex items-baseline gap-2",
5070
+ children: [
5071
+ /* @__PURE__ */ jsx("span", {
5072
+ "aria-label": message.unread ? copy.unread : void 0,
5073
+ className: joinClasses("h-2 w-2 shrink-0 self-center rounded-full", message.unread ? "bg-blue-600" : "bg-transparent")
5074
+ }),
5075
+ /* @__PURE__ */ jsx("span", {
5076
+ className: joinClasses("min-w-0 flex-1 truncate text-sm", message.unread ? "font-semibold text-neutral-950" : "text-neutral-800"),
5077
+ children: displayName(message.from) ?? "—"
5078
+ }),
5079
+ /* @__PURE__ */ jsx("span", {
5080
+ className: "shrink-0 text-xs text-neutral-500",
5081
+ children: formatMailDate(message.date, locale)
5082
+ })
5083
+ ]
5084
+ }),
5085
+ /* @__PURE__ */ jsx("p", {
5086
+ className: joinClasses("truncate pl-4 text-sm", message.unread ? "font-medium text-neutral-950" : "text-neutral-700"),
5087
+ children: text(message.subject) ?? copy.noSubject
5088
+ }),
5089
+ text(message.snippet) ? /* @__PURE__ */ jsx("p", {
5090
+ className: "line-clamp-1 pl-4 text-xs text-neutral-500",
5091
+ children: message.snippet
5092
+ }) : null
5093
+ ] });
5094
+ const className = "block space-y-0.5 px-3 py-2";
5095
+ return message.link ? /* @__PURE__ */ jsx("a", {
5096
+ href: message.link,
5097
+ target: "_blank",
5098
+ rel: "noreferrer noopener",
5099
+ className: joinClasses(className, "hover:bg-neutral-50"),
5100
+ children: content
5101
+ }) : /* @__PURE__ */ jsx("div", {
5102
+ className,
5103
+ children: content
5104
+ });
5105
+ }
5106
+ function MailList({ messages, locale, copy }) {
5107
+ const [expanded, setExpanded] = useState(false);
5108
+ if (messages.length === 0) return /* @__PURE__ */ jsx("p", {
5109
+ className: "px-3 py-3 text-sm text-neutral-600",
5110
+ children: copy.noEmails
5111
+ });
5112
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("ul", {
5113
+ className: "divide-y divide-neutral-100",
5114
+ children: (expanded ? messages : messages.slice(0, COLLAPSED_ITEMS)).map((message) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(MailRow, {
5115
+ message,
5116
+ locale,
5117
+ copy
5118
+ }) }, message.id))
5119
+ }), /* @__PURE__ */ jsx(ShowAllToggle, {
5120
+ total: messages.length,
5121
+ expanded,
5122
+ onToggle: () => setExpanded((value) => !value),
5123
+ copy
5124
+ })] });
5125
+ }
5126
+ function MailMessageView({ message, connector, locale, copy }) {
5127
+ const [expanded, setExpanded] = useState(false);
5128
+ const body = text(message.body);
5129
+ const long = (body?.length ?? 0) > COLLAPSED_BODY_CHARS;
5130
+ const shownBody = body && long && !expanded ? `${body.slice(0, COLLAPSED_BODY_CHARS).trimEnd()}…` : body;
5131
+ return /* @__PURE__ */ jsxs("div", {
5132
+ className: "space-y-3 px-3 py-3",
5133
+ children: [
5134
+ /* @__PURE__ */ jsxs("div", {
5135
+ className: "space-y-1",
5136
+ children: [
5137
+ /* @__PURE__ */ jsx("h4", {
5138
+ className: "text-sm font-semibold text-neutral-950",
5139
+ children: text(message.subject) ?? copy.noSubject
5140
+ }),
5141
+ /* @__PURE__ */ jsxs("div", {
5142
+ className: "flex items-baseline gap-2 text-xs text-neutral-600",
5143
+ children: [/* @__PURE__ */ jsx("span", {
5144
+ className: "min-w-0 flex-1 truncate font-medium text-neutral-800",
5145
+ children: message.from ?? "—"
5146
+ }), /* @__PURE__ */ jsx("span", {
5147
+ className: "shrink-0",
5148
+ children: formatFullDate(message.date, locale)
5149
+ })]
5150
+ }),
5151
+ text(message.to) ? /* @__PURE__ */ jsxs("p", {
5152
+ className: "truncate text-xs text-neutral-500",
5153
+ children: [
5154
+ copy.to,
5155
+ ": ",
5156
+ message.to
5157
+ ]
5158
+ }) : null,
5159
+ text(message.cc) ? /* @__PURE__ */ jsxs("p", {
5160
+ className: "truncate text-xs text-neutral-500",
5161
+ children: [
5162
+ copy.cc,
5163
+ ": ",
5164
+ message.cc
5165
+ ]
5166
+ }) : null
5167
+ ]
5168
+ }),
5169
+ shownBody ? /* @__PURE__ */ jsx("p", {
5170
+ className: "whitespace-pre-wrap break-words text-sm leading-6 text-neutral-800",
5171
+ children: shownBody
5172
+ }) : null,
5173
+ /* @__PURE__ */ jsxs("div", {
5174
+ className: "flex items-center gap-4",
5175
+ children: [long ? /* @__PURE__ */ jsx("button", {
5176
+ type: "button",
5177
+ onClick: () => setExpanded((value) => !value),
5178
+ className: "text-xs font-medium text-neutral-600 hover:text-neutral-950",
5179
+ children: expanded ? copy.showLess : copy.showMore
5180
+ }) : null, message.link ? /* @__PURE__ */ jsxs(ExternalAnchor, {
5181
+ href: message.link,
5182
+ children: [fillCopy(copy.openIn, { service: connector?.label ?? "" }), /* @__PURE__ */ jsx(ExternalLink, {
5183
+ className: "h-3 w-3",
5184
+ "aria-hidden": "true"
5185
+ })]
5186
+ }) : null]
5187
+ })
5188
+ ]
5189
+ });
5190
+ }
5191
+ function eventTime(event, locale, copy) {
5192
+ if (event.all_day) return copy.allDay;
5193
+ const start = parseDate(event.start);
5194
+ const end = parseDate(event.end);
5195
+ if (!start) return null;
5196
+ const time = dateFormatter(locale, {
5197
+ hour: "2-digit",
5198
+ minute: "2-digit"
5199
+ });
5200
+ return end ? `${time.format(start)} – ${time.format(end)}` : time.format(start);
5201
+ }
5202
+ function groupByDay(events) {
5203
+ const groups = [];
5204
+ for (const event of events) {
5205
+ const day = parseDate(event.start);
5206
+ const last = groups[groups.length - 1];
5207
+ if (last && (last.day && day && isSameDay(last.day, day) || !last.day && !day)) last.events.push(event);
5208
+ else groups.push({
5209
+ day,
5210
+ events: [event]
5211
+ });
5212
+ }
5213
+ return groups;
5214
+ }
5215
+ function EventRow({ event, locale, copy }) {
5216
+ const attendees = event.attendees?.length ?? 0;
5217
+ const details = [text(event.location), attendees > 0 ? count(copy, attendees, copy.attendeesOne, copy.attendeesOther) : null].filter(Boolean);
5218
+ return /* @__PURE__ */ jsxs("li", {
5219
+ className: "flex gap-3 px-3 py-2",
5220
+ children: [
5221
+ /* @__PURE__ */ jsx("span", {
5222
+ className: "w-24 shrink-0 pt-0.5 text-xs tabular-nums text-neutral-600",
5223
+ children: eventTime(event, locale, copy)
5224
+ }),
5225
+ /* @__PURE__ */ jsxs("div", {
5226
+ className: "min-w-0 flex-1 space-y-0.5",
5227
+ children: [event.link ? /* @__PURE__ */ jsx("a", {
5228
+ href: event.link,
5229
+ target: "_blank",
5230
+ rel: "noreferrer noopener",
5231
+ className: "block truncate text-sm font-medium text-neutral-950 hover:underline",
5232
+ children: text(event.title) ?? copy.noSubject
5233
+ }) : /* @__PURE__ */ jsx("p", {
5234
+ className: "truncate text-sm font-medium text-neutral-950",
5235
+ children: text(event.title) ?? copy.noSubject
5236
+ }), details.length > 0 ? /* @__PURE__ */ jsx("p", {
5237
+ className: "truncate text-xs text-neutral-500",
5238
+ children: details.join(" · ")
5239
+ }) : null]
5240
+ }),
5241
+ event.online_meeting_url ? /* @__PURE__ */ jsxs(ExternalAnchor, {
5242
+ href: event.online_meeting_url,
5243
+ className: "shrink-0 self-start",
5244
+ children: [/* @__PURE__ */ jsx(Video, {
5245
+ className: "h-3.5 w-3.5",
5246
+ "aria-hidden": "true"
5247
+ }), copy.joinMeeting]
5248
+ }) : null
5249
+ ]
5250
+ });
5251
+ }
5252
+ function Agenda({ events, locale, copy }) {
5253
+ const [expanded, setExpanded] = useState(false);
5254
+ if (events.length === 0) return /* @__PURE__ */ jsx("p", {
5255
+ className: "px-3 py-3 text-sm text-neutral-600",
5256
+ children: copy.noEvents
5257
+ });
5258
+ const visible = expanded ? events : events.slice(0, COLLAPSED_ITEMS);
5259
+ const dayFormat = dateFormatter(locale, {
5260
+ weekday: "long",
5261
+ day: "numeric",
5262
+ month: "long"
5263
+ });
5264
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
5265
+ className: "divide-y divide-neutral-100",
5266
+ children: groupByDay(visible).map((group, index) => /* @__PURE__ */ jsxs("section", { children: [group.day ? /* @__PURE__ */ jsx("h4", {
5267
+ className: "bg-neutral-50 px-3 py-1 text-xs font-medium capitalize text-neutral-600",
5268
+ children: dayFormat.format(group.day)
5269
+ }) : null, /* @__PURE__ */ jsx("ul", {
5270
+ className: "divide-y divide-neutral-100",
5271
+ children: group.events.map((event) => /* @__PURE__ */ jsx(EventRow, {
5272
+ event,
5273
+ locale,
5274
+ copy
5275
+ }, event.id))
5276
+ })] }, group.day?.toISOString() ?? `undated-${index}`))
5277
+ }), /* @__PURE__ */ jsx(ShowAllToggle, {
5278
+ total: events.length,
5279
+ expanded,
5280
+ onToggle: () => setExpanded((value) => !value),
5281
+ copy
5282
+ })] });
5283
+ }
5284
+ function CollapsibleBody({ body, copy }) {
5285
+ const [expanded, setExpanded] = useState(false);
5286
+ if (!body) return null;
5287
+ const long = body.length > COLLAPSED_BODY_CHARS;
5288
+ return /* @__PURE__ */ jsxs("div", {
5289
+ className: "space-y-1",
5290
+ children: [/* @__PURE__ */ jsx("p", {
5291
+ className: "whitespace-pre-wrap break-words text-sm leading-6 text-neutral-800",
5292
+ children: long && !expanded ? `${body.slice(0, COLLAPSED_BODY_CHARS).trimEnd()}…` : body
5293
+ }), long ? /* @__PURE__ */ jsx("button", {
5294
+ type: "button",
5295
+ onClick: () => setExpanded((value) => !value),
5296
+ className: "text-xs font-medium text-neutral-600 hover:text-neutral-950",
5297
+ children: expanded ? copy.showLess : copy.showMore
5298
+ }) : null]
5299
+ });
5300
+ }
5301
+ function DraftView({ view, copy }) {
5302
+ return /* @__PURE__ */ jsxs("div", {
5303
+ className: "space-y-2 px-3 py-3",
5304
+ children: [
5305
+ /* @__PURE__ */ jsxs("div", {
5306
+ className: "space-y-1",
5307
+ children: [
5308
+ /* @__PURE__ */ jsx("p", {
5309
+ className: "text-sm font-medium text-neutral-950",
5310
+ children: copy.draftSaved
5311
+ }),
5312
+ view.subject ? /* @__PURE__ */ jsx("p", {
5313
+ className: "truncate text-sm text-neutral-800",
5314
+ children: view.subject
5315
+ }) : null,
5316
+ view.to.length > 0 ? /* @__PURE__ */ jsxs("p", {
5317
+ className: "truncate text-xs text-neutral-500",
5318
+ children: [
5319
+ copy.to,
5320
+ ": ",
5321
+ view.to.join(", ")
5322
+ ]
5323
+ }) : null
5324
+ ]
5325
+ }),
5326
+ /* @__PURE__ */ jsx(CollapsibleBody, {
5327
+ body: view.body,
5328
+ copy
5329
+ }),
5330
+ view.link ? /* @__PURE__ */ jsxs(ExternalAnchor, {
5331
+ href: view.link,
5332
+ children: [copy.openDraft, /* @__PURE__ */ jsx(ExternalLink, {
5333
+ className: "h-3 w-3",
5334
+ "aria-hidden": "true"
5335
+ })]
5336
+ }) : null
5337
+ ]
5338
+ });
5339
+ }
5340
+ function strings(value) {
5341
+ return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
5342
+ }
5343
+ function Field({ label, children }) {
5344
+ return /* @__PURE__ */ jsxs("div", {
5345
+ className: "flex gap-3 text-sm",
5346
+ children: [/* @__PURE__ */ jsx("dt", {
5347
+ className: "w-24 shrink-0 text-xs leading-5 text-neutral-500",
5348
+ children: label
5349
+ }), /* @__PURE__ */ jsx("dd", {
5350
+ className: "min-w-0 flex-1 break-words text-neutral-900",
5351
+ children
5352
+ })]
5353
+ });
5354
+ }
5355
+ function PendingMailView({ pending, copy }) {
5356
+ const mail = pending.action;
5357
+ const to = strings(mail.to);
5358
+ const cc = strings(mail.cc);
5359
+ return /* @__PURE__ */ jsxs("div", {
5360
+ className: "space-y-3 px-3 py-3",
5361
+ children: [
5362
+ /* @__PURE__ */ jsxs("dl", {
5363
+ className: "space-y-1.5",
5364
+ children: [
5365
+ /* @__PURE__ */ jsx(Field, {
5366
+ label: copy.to,
5367
+ children: to.join(", ") || "—"
5368
+ }),
5369
+ cc.length > 0 ? /* @__PURE__ */ jsx(Field, {
5370
+ label: copy.cc,
5371
+ children: cc.join(", ")
5372
+ }) : null,
5373
+ /* @__PURE__ */ jsx(Field, {
5374
+ label: copy.subject,
5375
+ children: /* @__PURE__ */ jsx("span", {
5376
+ className: "font-medium",
5377
+ children: text(mail.subject) ?? copy.noSubject
5378
+ })
5379
+ })
5380
+ ]
5381
+ }),
5382
+ text(mail.reply_to_message_id) ? /* @__PURE__ */ jsx("p", {
5383
+ className: "text-xs text-neutral-500",
5384
+ children: copy.replyInThread
5385
+ }) : null,
5386
+ /* @__PURE__ */ jsx("div", {
5387
+ className: "rounded-md border border-neutral-200 bg-neutral-50 px-3 py-2",
5388
+ children: /* @__PURE__ */ jsx(CollapsibleBody, {
5389
+ body: text(mail.body),
5390
+ copy
5391
+ })
5392
+ })
5393
+ ]
5394
+ });
5395
+ }
5396
+ function formatRange(start, end, allDay, locale, copy) {
5397
+ const from = parseDate(text(start));
5398
+ if (!from) return null;
5399
+ const day = dateFormatter(locale, {
5400
+ weekday: "short",
5401
+ day: "numeric",
5402
+ month: "short"
5403
+ }).format(from);
5404
+ if (allDay) return `${day} · ${copy.allDay}`;
5405
+ const time = dateFormatter(locale, {
5406
+ hour: "2-digit",
5407
+ minute: "2-digit"
5408
+ });
5409
+ const to = parseDate(text(end));
5410
+ return to ? `${day} · ${time.format(from)} – ${time.format(to)}` : `${day} · ${time.format(from)}`;
5411
+ }
5412
+ /** Old value struck through next to the new one; only the new one if unknown. */
5413
+ function Change({ before, after }) {
5414
+ if (before === null || before === void 0 || before === after) return /* @__PURE__ */ jsx(Fragment, { children: after });
5415
+ return /* @__PURE__ */ jsxs("span", {
5416
+ className: "flex flex-wrap items-baseline gap-x-2",
5417
+ children: [
5418
+ /* @__PURE__ */ jsx("span", {
5419
+ className: "text-neutral-500 line-through",
5420
+ children: before
5421
+ }),
5422
+ /* @__PURE__ */ jsx("span", {
5423
+ "aria-hidden": "true",
5424
+ children: "→"
5425
+ }),
5426
+ /* @__PURE__ */ jsx("span", { children: after })
5427
+ ]
5428
+ });
5429
+ }
5430
+ function PendingEventView({ operation, pending, locale, copy }) {
5431
+ const action = pending.action;
5432
+ const current = asRecord(pending.current);
5433
+ const has = (key) => action[key] !== void 0 && action[key] !== null;
5434
+ if (operation === "delete_event") return /* @__PURE__ */ jsxs("div", {
5435
+ className: "space-y-1 px-3 py-3",
5436
+ children: [
5437
+ /* @__PURE__ */ jsx("p", {
5438
+ className: "text-xs font-medium uppercase tracking-wide text-rose-700",
5439
+ children: copy.deleteEvent
5440
+ }),
5441
+ /* @__PURE__ */ jsx("p", {
5442
+ className: "text-sm font-medium text-neutral-900 line-through",
5443
+ children: text(current?.title) ?? text(action.event_id) ?? copy.noSubject
5444
+ }),
5445
+ current ? /* @__PURE__ */ jsx("p", {
5446
+ className: "text-xs text-neutral-500",
5447
+ children: formatRange(current.start, current.end, Boolean(current.all_day), locale, copy)
5448
+ }) : null,
5449
+ (current?.attendees?.length ?? 0) > 0 ? /* @__PURE__ */ jsx("p", {
5450
+ className: "pt-1 text-xs text-neutral-600",
5451
+ children: copy.attendeesNotified
5452
+ }) : null
5453
+ ]
5454
+ });
5455
+ const isUpdate = operation === "update_event";
5456
+ const before = (key) => isUpdate && current ? current[key] : null;
5457
+ const attendees = strings(action.attendees);
5458
+ const timesChanged = has("start") || has("end");
5459
+ const newWhen = formatRange(action.start ?? current?.start, action.end ?? current?.end, Boolean(current?.all_day) && !timesChanged, locale, copy);
5460
+ const oldWhen = isUpdate && current && timesChanged ? formatRange(current.start, current.end, Boolean(current.all_day), locale, copy) : null;
5461
+ return /* @__PURE__ */ jsxs("div", {
5462
+ className: "space-y-2 px-3 py-3",
5463
+ children: [
5464
+ /* @__PURE__ */ jsx("p", {
5465
+ className: "text-xs font-medium uppercase tracking-wide text-neutral-500",
5466
+ children: isUpdate ? copy.eventChange : copy.newEvent
5467
+ }),
5468
+ /* @__PURE__ */ jsxs("dl", {
5469
+ className: "space-y-1.5",
5470
+ children: [
5471
+ has("title") || !isUpdate ? /* @__PURE__ */ jsx(Field, {
5472
+ label: copy.title,
5473
+ children: /* @__PURE__ */ jsx("span", {
5474
+ className: "font-medium",
5475
+ children: /* @__PURE__ */ jsx(Change, {
5476
+ before: text(before("title")),
5477
+ after: text(action.title) ?? copy.noSubject
5478
+ })
5479
+ })
5480
+ }) : current ? /* @__PURE__ */ jsx(Field, {
5481
+ label: copy.title,
5482
+ children: /* @__PURE__ */ jsx("span", {
5483
+ className: "font-medium",
5484
+ children: text(current.title)
5485
+ })
5486
+ }) : null,
5487
+ newWhen && (timesChanged || !isUpdate) ? /* @__PURE__ */ jsx(Field, {
5488
+ label: copy.when,
5489
+ children: /* @__PURE__ */ jsx(Change, {
5490
+ before: oldWhen,
5491
+ after: newWhen
5492
+ })
5493
+ }) : null,
5494
+ has("location") ? /* @__PURE__ */ jsx(Field, {
5495
+ label: copy.location,
5496
+ children: /* @__PURE__ */ jsx(Change, {
5497
+ before: text(before("location")),
5498
+ after: text(action.location)
5499
+ })
5500
+ }) : null,
5501
+ has("attendees") ? /* @__PURE__ */ jsx(Field, {
5502
+ label: copy.attendees,
5503
+ children: /* @__PURE__ */ jsx(Change, {
5504
+ before: strings(before("attendees")).join(", ") || null,
5505
+ after: attendees.join(", ") || "—"
5506
+ })
5507
+ }) : null,
5508
+ has("description") ? /* @__PURE__ */ jsx(Field, {
5509
+ label: copy.description,
5510
+ children: /* @__PURE__ */ jsx("span", {
5511
+ className: "whitespace-pre-wrap",
5512
+ children: text(action.description)
5513
+ })
5514
+ }) : null
5515
+ ]
5516
+ }),
5517
+ attendees.length > 0 ? /* @__PURE__ */ jsx("p", {
5518
+ className: "text-xs text-neutral-600",
5519
+ children: copy.attendeesNotified
5520
+ }) : null
5521
+ ]
5522
+ });
5523
+ }
5524
+ function headerCount(view, copy) {
5525
+ if (view.kind === "mail-list") return count(copy, view.messages.length, copy.emailCountOne, copy.emailCountOther);
5526
+ if (view.kind === "events") return count(copy, view.events.length, copy.eventCountOne, copy.eventCountOther);
5527
+ return null;
5528
+ }
5529
+ function ToolResultPersonalConnectorCard({ part, locale, className, toolConfirmation }) {
5530
+ const view = getView(part);
5531
+ const pending = view?.kind === "pending-mail" || view?.kind === "pending-event" ? view.pending : null;
5532
+ const confirmationState = useToolConfirmationState(pending, toolConfirmation);
5533
+ if (!view) return null;
5534
+ const copy = getPersonalConnectorCopy(locale);
5535
+ const connector = getConnector(part);
5536
+ const Icon = isCalendar(connector) ? CalendarDays : Mail;
5537
+ const total = headerCount(view, copy);
5538
+ const isPending = view.kind === "pending-mail" || view.kind === "pending-event";
5539
+ return /* @__PURE__ */ jsxs("section", {
5540
+ className: joinClasses("plai-tool-result-personal-connector-card overflow-hidden rounded-lg border border-neutral-200 bg-white text-neutral-950", className),
5541
+ "data-tool-call-id": part.id,
5542
+ "data-tool-call-state": part.state,
5543
+ "data-connector-action": view.kind,
5544
+ children: [
5545
+ /* @__PURE__ */ jsxs("header", {
5546
+ className: "flex items-center gap-2 border-b border-neutral-200 px-3 py-2 text-xs text-neutral-600",
5547
+ children: [
5548
+ /* @__PURE__ */ jsx(Icon, {
5549
+ className: "h-4 w-4 shrink-0 text-neutral-700",
5550
+ "aria-hidden": "true"
5551
+ }),
5552
+ /* @__PURE__ */ jsx("span", {
5553
+ className: "shrink-0 font-medium text-neutral-900",
5554
+ children: connector?.label
5555
+ }),
5556
+ connector?.account_email ? /* @__PURE__ */ jsx("span", {
5557
+ className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
5558
+ children: connector.account_email
5559
+ }) : null,
5560
+ isPending ? /* @__PURE__ */ jsx(ConfirmationBadge, {
5561
+ state: confirmationState,
5562
+ copy
5563
+ }) : total ? /* @__PURE__ */ jsx("span", {
5564
+ className: "ml-auto shrink-0",
5565
+ children: total
5566
+ }) : null
5567
+ ]
5568
+ }),
5569
+ view.kind === "mail-list" ? /* @__PURE__ */ jsx(MailList, {
5570
+ messages: view.messages,
5571
+ locale,
5572
+ copy
5573
+ }) : view.kind === "mail" ? /* @__PURE__ */ jsx(MailMessageView, {
5574
+ message: view.message,
5575
+ connector,
5576
+ locale,
5577
+ copy
5578
+ }) : view.kind === "events" ? /* @__PURE__ */ jsx(Agenda, {
5579
+ events: view.events,
5580
+ locale,
5581
+ copy
5582
+ }) : view.kind === "pending-mail" ? /* @__PURE__ */ jsx(PendingMailView, {
5583
+ pending: view.pending,
5584
+ copy
5585
+ }) : view.kind === "pending-event" ? /* @__PURE__ */ jsx(PendingEventView, {
5586
+ operation: view.operation,
5587
+ pending: view.pending,
5588
+ locale,
5589
+ copy
5590
+ }) : /* @__PURE__ */ jsx(DraftView, {
5591
+ view,
5592
+ copy
5593
+ }),
5594
+ pending ? /* @__PURE__ */ jsx(PendingConfirmationFooter, {
5595
+ pending,
5596
+ toolConfirmation,
5597
+ copy
5598
+ }) : null
5599
+ ]
5600
+ });
5601
+ }
5602
+ const DONE_LABELS = {
5603
+ send: "emailSent",
5604
+ create_event: "eventCreated",
5605
+ update_event: "eventUpdated",
5606
+ delete_event: "eventDeleted"
5607
+ };
5608
+ function getConfirmedActions(part) {
5609
+ const actions = asRecord(part.metadata)?.actions;
5610
+ return Array.isArray(actions) ? actions.filter((action) => typeof asRecord(action)?.action_id === "string") : [];
5611
+ }
5612
+ /** Whether the confirmation result can be shown as a list of outcomes. */
5613
+ function hasToolConfirmationView(part) {
5614
+ return part.state !== "pending" && getConfirmedActions(part).length > 0;
5615
+ }
5616
+ function ConfirmedActionRow({ action, copy }) {
5617
+ const metadata = asRecord(action.metadata);
5618
+ const connector = asRecord(metadata?.connector);
5619
+ const operation = typeof metadata?.action === "string" ? metadata.action : "";
5620
+ const doneKey = DONE_LABELS[operation];
5621
+ const failed = action.status === "failed";
5622
+ const executed = action.status === "executed";
5623
+ const label = doneKey ? copy[doneKey] : fillCopy(copy.actionDone, { tool: action.tool_name ?? "" });
5624
+ const link = text(asRecord(metadata?.result)?.link);
5625
+ const outcome = action.error === "tool_unavailable" ? copy.toolUnavailable : statusLabel(action.status, copy);
5626
+ const title = executed ? label : failed ? `${copy.actionFailed}: ${label}` : action.tool_name ? `${outcome}: ${action.tool_name}` : outcome;
5627
+ return /* @__PURE__ */ jsxs("li", {
5628
+ className: "flex items-start gap-2 px-3 py-2",
5629
+ "data-confirmation-status": action.status,
5630
+ children: [
5631
+ failed ? /* @__PURE__ */ jsx(XCircle, {
5632
+ className: "mt-0.5 h-4 w-4 shrink-0 text-rose-600",
5633
+ "aria-hidden": "true"
5634
+ }) : executed ? /* @__PURE__ */ jsx(CheckCircle2, {
5635
+ className: "mt-0.5 h-4 w-4 shrink-0 text-emerald-600",
5636
+ "aria-hidden": "true"
5637
+ }) : /* @__PURE__ */ jsx(Clock, {
5638
+ className: "mt-0.5 h-4 w-4 shrink-0 text-neutral-500",
5639
+ "aria-hidden": "true"
5640
+ }),
5641
+ /* @__PURE__ */ jsxs("div", {
5642
+ className: "min-w-0 flex-1 space-y-0.5",
5643
+ children: [
5644
+ /* @__PURE__ */ jsx("p", {
5645
+ className: "text-sm font-medium text-neutral-950",
5646
+ children: title
5647
+ }),
5648
+ connector ? /* @__PURE__ */ jsxs("div", {
5649
+ className: "flex items-center gap-2 truncate text-xs text-neutral-500",
5650
+ children: [connector.label, connector.account_email ? /* @__PURE__ */ jsx("span", {
5651
+ className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
5652
+ children: connector.account_email
5653
+ }) : null]
5654
+ }) : null,
5655
+ failed && text(action.error) ? /* @__PURE__ */ jsx("p", {
5656
+ className: "line-clamp-2 text-xs text-rose-700",
5657
+ children: action.error
5658
+ }) : null
5659
+ ]
5660
+ }),
5661
+ executed && link ? /* @__PURE__ */ jsx(ExternalAnchor, {
5662
+ href: link,
5663
+ className: "shrink-0",
5664
+ children: operation === "send" ? copy.openEmail : copy.openEvent
5665
+ }) : null
5666
+ ]
5667
+ });
5668
+ }
5669
+ function ToolResultToolConfirmationCard({ part, locale, className }) {
5670
+ const actions = getConfirmedActions(part);
5671
+ if (actions.length === 0) return null;
5672
+ const copy = getPersonalConnectorCopy(locale);
5673
+ return /* @__PURE__ */ jsx("ul", {
5674
+ 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),
5675
+ "data-tool-call-id": part.id,
5676
+ "data-tool-call-state": part.state,
5677
+ children: actions.map((action) => /* @__PURE__ */ jsx(ConfirmedActionRow, {
5678
+ action,
5679
+ copy
5680
+ }, action.action_id))
5681
+ });
5682
+ }
5683
+ function getPendingConfirmation(part) {
5684
+ const pending = asRecord(asRecord(part.metadata)?.pending_confirmation);
5685
+ return pending && asRecord(pending.action) ? pending : null;
5686
+ }
5687
+ function formatValue(value) {
5688
+ if (typeof value === "string") return value;
5689
+ return JSON.stringify(value, null, 2);
5690
+ }
5691
+ /** Generic preview of a held tool call: its name and the exact arguments. */
5692
+ function ToolResultPendingConfirmationCard({ part, locale, className, toolConfirmation }) {
5693
+ const pending = getPendingConfirmation(part);
5694
+ const confirmationState = useToolConfirmationState(pending, toolConfirmation);
5695
+ if (!pending) return null;
5696
+ const copy = getPersonalConnectorCopy(locale);
5697
+ const entries = Object.entries(pending.action).filter(([key, value]) => key !== "operation" && value !== null && value !== void 0);
5698
+ return /* @__PURE__ */ jsxs("section", {
5699
+ className: joinClasses("plai-tool-result-pending-confirmation-card overflow-hidden rounded-lg border border-neutral-200 bg-white text-neutral-950", className),
5700
+ "data-tool-call-id": part.id,
5701
+ "data-tool-call-state": part.state,
5702
+ children: [
5703
+ /* @__PURE__ */ jsxs("header", {
5704
+ className: "flex items-center gap-2 border-b border-neutral-200 px-3 py-2 text-xs text-neutral-600",
5705
+ children: [/* @__PURE__ */ jsx("span", {
5706
+ className: "truncate font-mono font-medium text-neutral-900",
5707
+ children: part.name
5708
+ }), /* @__PURE__ */ jsx(ConfirmationBadge, {
5709
+ state: confirmationState,
5710
+ copy
5711
+ })]
5712
+ }),
5713
+ entries.length > 0 ? /* @__PURE__ */ jsx("dl", {
5714
+ className: "space-y-1.5 px-3 py-3",
5715
+ children: entries.map(([key, value]) => /* @__PURE__ */ jsx(Field, {
5716
+ label: key,
5717
+ children: /* @__PURE__ */ jsx("span", {
5718
+ className: "whitespace-pre-wrap font-mono text-xs",
5719
+ children: formatValue(value)
5720
+ })
5721
+ }, key))
5722
+ }) : null,
5723
+ /* @__PURE__ */ jsx(PendingConfirmationFooter, {
5724
+ pending,
5725
+ toolConfirmation,
5726
+ copy
5727
+ })
5728
+ ]
5729
+ });
5730
+ }
5731
+
3973
5732
  //#endregion
3974
5733
  //#region src/components/tool-result-workflow-dispatch-card.tsx
3975
5734
  function parseResult(value) {
@@ -4020,7 +5779,7 @@ function ToolResultWorkflowDispatchCard({ part, className, locale }) {
4020
5779
  children: copy.workflow
4021
5780
  }),
4022
5781
  /* @__PURE__ */ jsx("span", {
4023
- className: "min-w-0 truncate text-neutral-600",
5782
+ className: "min-w-0 truncate border-neutral-500 border px-2 py-0.5 rounded-md text-xs text-neutral-500",
4024
5783
  children: workflowName
4025
5784
  }),
4026
5785
  /* @__PURE__ */ jsxs("span", {
@@ -4111,7 +5870,9 @@ const TOOL_USE_ACTIONS = {
4111
5870
  mcp_tool: "request",
4112
5871
  office_documents: "documents",
4113
5872
  perplexity: "web",
5873
+ personal_connector: "tool",
4114
5874
  structured_datasource: "query",
5875
+ tool_confirmation: "tool",
4115
5876
  workflow_dispatch: "workflow",
4116
5877
  unknown: "tool"
4117
5878
  };
@@ -4227,7 +5988,35 @@ const TOOL_USE_TRANSLATIONS = {
4227
5988
  workflow: "Executando o fluxo {{toolName}}"
4228
5989
  }
4229
5990
  };
5991
+ const PERSONAL_CONNECTOR_SERVICES = {
5992
+ gmail: "Gmail",
5993
+ google_calendar: "Google Calendar",
5994
+ outlook_mail: "Outlook Mail",
5995
+ outlook_calendar: "Outlook Calendar"
5996
+ };
5997
+ const PERSONAL_CONNECTOR_ACTIONS = {
5998
+ search: "searchingMail",
5999
+ read: "readingMail",
6000
+ list_events: "checkingCalendar",
6001
+ create_draft: "savingDraft",
6002
+ send: "preparingMail",
6003
+ create_event: "preparingEvent",
6004
+ update_event: "preparingEvent",
6005
+ delete_event: "preparingEvent"
6006
+ };
6007
+ const PERSONAL_CONNECTOR_TOOL_NAME = /^(gmail|google_calendar|outlook_mail|outlook_calendar)_(.+?)(?:_\d+)?$/;
6008
+ function getPersonalConnectorLabel(name, locale) {
6009
+ const match = PERSONAL_CONNECTOR_TOOL_NAME.exec(name);
6010
+ const key = match ? PERSONAL_CONNECTOR_ACTIONS[match[2]] : void 0;
6011
+ if (!match || !key) return null;
6012
+ return fillCopy(getPersonalConnectorCopy(locale)[key], { service: PERSONAL_CONNECTOR_SERVICES[match[1]] });
6013
+ }
4230
6014
  function getToolUseLabel(part, locale) {
6015
+ if (part.toolType === "personal_connector") {
6016
+ const label = getPersonalConnectorLabel(part.name, locale);
6017
+ if (label) return label;
6018
+ }
6019
+ if (part.toolType === "tool_confirmation") return getPersonalConnectorCopy(locale).runningConfirmed;
4231
6020
  const action = part.toolType ? TOOL_USE_ACTIONS[part.toolType] ?? "tool" : "tool";
4232
6021
  return TOOL_USE_TRANSLATIONS[getSupportedToolLocale(locale)][action].replaceAll("{{toolName}}", part.name);
4233
6022
  }
@@ -4263,7 +6052,7 @@ function getDatasourceResources$1(part) {
4263
6052
  const resources = part.metadata.resources;
4264
6053
  return Array.isArray(resources) ? resources.filter(isDatasourceResource) : [];
4265
6054
  }
4266
- function ToolResultCard({ part, className, detailsOpen = true, locale, onOpenAgentThread, getResourceDownloadUrl, memoryProposal }) {
6055
+ function ToolResultCard({ part, className, detailsOpen = true, locale, onOpenAgentThread, getResourceDownloadUrl, memoryProposal, toolConfirmation }) {
4267
6056
  const copy = getUiCopy(locale);
4268
6057
  if (part.toolType === "memory_proposal") {
4269
6058
  const proposal = part.metadata?.proposal;
@@ -4281,11 +6070,22 @@ function ToolResultCard({ part, className, detailsOpen = true, locale, onOpenAge
4281
6070
  locale,
4282
6071
  className
4283
6072
  });
6073
+ if (part.toolType === "tool_confirmation" && hasToolConfirmationView(part)) return /* @__PURE__ */ jsx(ToolResultToolConfirmationCard, {
6074
+ part,
6075
+ locale,
6076
+ className
6077
+ });
4284
6078
  if (part.state === "error") return /* @__PURE__ */ jsx(ToolError, {
4285
6079
  part,
4286
6080
  locale,
4287
6081
  className
4288
6082
  });
6083
+ if (part.toolType !== "personal_connector" && getPendingConfirmation(part)) return /* @__PURE__ */ jsx(ToolResultPendingConfirmationCard, {
6084
+ part,
6085
+ locale,
6086
+ className,
6087
+ toolConfirmation
6088
+ });
4289
6089
  const officeMediaFiles = getOfficeDocumentMediaFiles(part);
4290
6090
  const datasourceResources = getDatasourceResources$1(part);
4291
6091
  if (part.toolType === "email_send") return /* @__PURE__ */ jsx(ToolResultEmailSendCard, {
@@ -4324,6 +6124,12 @@ function ToolResultCard({ part, className, detailsOpen = true, locale, onOpenAge
4324
6124
  locale,
4325
6125
  className
4326
6126
  });
6127
+ if (part.toolType === "personal_connector" && hasPersonalConnectorView(part)) return /* @__PURE__ */ jsx(ToolResultPersonalConnectorCard, {
6128
+ part,
6129
+ locale,
6130
+ className,
6131
+ toolConfirmation
6132
+ });
4327
6133
  if (part.toolType === "workflow_dispatch") return /* @__PURE__ */ jsx(ToolResultWorkflowDispatchCard, {
4328
6134
  part,
4329
6135
  locale,
@@ -4352,7 +6158,7 @@ function ToolResultCard({ part, className, detailsOpen = true, locale, onOpenAge
4352
6158
  className: "text-sm font-semibold text-slate-900",
4353
6159
  children: part.name
4354
6160
  }), /* @__PURE__ */ jsx("span", {
4355
- className: "rounded-full border border-emerald-200 bg-emerald-50 px-2 py-0.5 text-xs font-medium text-emerald-800",
6161
+ className: "rounded-full border uppercase border-emerald-200 bg-emerald-50 px-2 py-0.5 text-xs text-emerald-800",
4356
6162
  children: copy.completed
4357
6163
  })]
4358
6164
  }),
@@ -4547,7 +6353,7 @@ function getMessageTextClassName(role) {
4547
6353
  function getMessageTextAlignmentClassName(role) {
4548
6354
  return role === "user" ? "text-right" : "text-left";
4549
6355
  }
4550
- function renderPart(part, index, message, isStreaming, onOpenAgentThread, getResourceDownloadUrl, locale, memoryProposal, renderText, renderToolCall, renderThinking, thinkingLabel, completedThinkingLabel, textClassName) {
6356
+ function renderPart(part, index, message, isStreaming, onOpenAgentThread, getResourceDownloadUrl, locale, memoryProposal, renderText, renderToolCall, renderThinking, thinkingLabel, completedThinkingLabel, textClassName, toolConfirmation) {
4551
6357
  const copy = getUiCopy(locale);
4552
6358
  if (part.type === "text") {
4553
6359
  if (renderText) return /* @__PURE__ */ jsx("div", { children: renderText(part, {
@@ -4606,7 +6412,8 @@ function renderPart(part, index, message, isStreaming, onOpenAgentThread, getRes
4606
6412
  locale,
4607
6413
  onOpenAgentThread,
4608
6414
  getResourceDownloadUrl,
4609
- memoryProposal
6415
+ memoryProposal,
6416
+ toolConfirmation
4610
6417
  }, `tool-${part.id}-${index}`);
4611
6418
  }
4612
6419
  if (part.type === "thinking") {
@@ -4663,7 +6470,7 @@ function aggregateSourceToolParts(parts, position) {
4663
6470
  ...remainingParts.slice(insertionIndex)
4664
6471
  ];
4665
6472
  }
4666
- function MessageParts({ message, collapseThreshold = DEFAULT_COLLAPSE_THRESHOLD, sourceToolResultsLayout = "aggregated", sourceToolResultsPosition, maxVisibleSourceCards = 3, datasourceToolResultsPosition, onOpenAgentThread, getResourceDownloadUrl, locale, memoryProposal, renderText, renderToolCall, renderThinking, isStreaming = false, thinkingLabel, completedThinkingLabel, readMoreLabel, readLessLabel, className,...props }) {
6473
+ function MessageParts({ message, collapseThreshold = DEFAULT_COLLAPSE_THRESHOLD, sourceToolResultsLayout = "aggregated", sourceToolResultsPosition, maxVisibleSourceCards = 3, datasourceToolResultsPosition, onOpenAgentThread, getResourceDownloadUrl, locale, memoryProposal, toolConfirmation, renderText, renderToolCall, renderThinking, isStreaming = false, thinkingLabel, completedThinkingLabel, readMoreLabel, readLessLabel, className,...props }) {
4667
6474
  const copy = getUiCopy(locale);
4668
6475
  const [isExpanded, setIsExpanded] = useState(false);
4669
6476
  const textContent = useMemo(() => message.parts.filter((part) => part.type === "text").map((part) => part.text).join("\n"), [message.parts]);
@@ -4694,7 +6501,7 @@ function MessageParts({ message, collapseThreshold = DEFAULT_COLLAPSE_THRESHOLD,
4694
6501
  locale,
4695
6502
  maxVisible: maxVisibleSourceCards,
4696
6503
  getResourceDownloadUrl
4697
- }, `source-results-${item.index}`) : renderPart(item.part, item.index, message, isStreaming, onOpenAgentThread, getResourceDownloadUrl, locale, memoryProposal, renderText, renderToolCall, renderThinking, thinkingLabel, completedThinkingLabel, textClassName)), canCollapse ? /* @__PURE__ */ jsx("button", {
6504
+ }, `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", {
4698
6505
  type: "button",
4699
6506
  className: "text-xs font-medium text-slate-600 hover:text-slate-900",
4700
6507
  onClick: () => setIsExpanded((previous) => !previous),
@@ -4784,6 +6591,7 @@ function isRoutedMessageProps(props) {
4784
6591
  function Message(props) {
4785
6592
  if (!isRoutedMessageProps(props)) return /* @__PURE__ */ jsx(MessageRoot, { ...props });
4786
6593
  const { message, avatar, footer, messageClassName, contentClassName, partsClassName, toolResultsClassName, toolPartsClassName, messagePartsProps, getResourceDownloadUrl, className,...rootProps } = props;
6594
+ if (isHiddenMessage(message)) return null;
4787
6595
  const routedMessagePartsProps = getResourceDownloadUrl ? {
4788
6596
  ...messagePartsProps,
4789
6597
  getResourceDownloadUrl
@@ -4828,14 +6636,14 @@ function Message(props) {
4828
6636
 
4829
6637
  //#endregion
4830
6638
  //#region src/components/clipboard.tsx
4831
- async function writeTextToClipboard(text$1) {
6639
+ async function writeTextToClipboard(text$2) {
4832
6640
  if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
4833
- await navigator.clipboard.writeText(text$1);
6641
+ await navigator.clipboard.writeText(text$2);
4834
6642
  return;
4835
6643
  }
4836
6644
  if (typeof document === "undefined") throw new Error("Clipboard is not available in this environment.");
4837
6645
  const textarea = document.createElement("textarea");
4838
- textarea.value = text$1;
6646
+ textarea.value = text$2;
4839
6647
  textarea.setAttribute("readonly", "");
4840
6648
  textarea.style.position = "fixed";
4841
6649
  textarea.style.opacity = "0";
@@ -4847,7 +6655,7 @@ async function writeTextToClipboard(text$1) {
4847
6655
  textarea.remove();
4848
6656
  }
4849
6657
  }
4850
- function Clipboard({ text: text$1, onCopy, copiedDuration = 2e3, copyLabel, copiedLabel, locale, children, className, disabled, onClick, type = "button",...props }) {
6658
+ function Clipboard({ text: text$2, onCopy, copiedDuration = 2e3, copyLabel, copiedLabel, locale, children, className, disabled, onClick, type = "button",...props }) {
4851
6659
  const copy = getUiCopy(locale);
4852
6660
  const resolvedCopyLabel = copyLabel ?? copy.copy;
4853
6661
  const resolvedCopiedLabel = copiedLabel ?? copy.copied;
@@ -4862,12 +6670,12 @@ function Clipboard({ text: text$1, onCopy, copiedDuration = 2e3, copyLabel, copi
4862
6670
  if (event.defaultPrevented || disabled || isCopying) return;
4863
6671
  setIsCopying(true);
4864
6672
  try {
4865
- await writeTextToClipboard(text$1);
6673
+ await writeTextToClipboard(text$2);
4866
6674
  setIsCopied(true);
4867
6675
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4868
6676
  timeoutRef.current = setTimeout(() => setIsCopied(false), copiedDuration);
4869
6677
  try {
4870
- await onCopy?.(text$1);
6678
+ await onCopy?.(text$2);
4871
6679
  } catch {}
4872
6680
  } catch {
4873
6681
  setIsCopied(false);
@@ -5087,10 +6895,10 @@ function PromptForm({ value, onValueChange, onSubmit, status = "ready", locale,
5087
6895
  if (!canSubmit) return;
5088
6896
  setIsSubmitting(true);
5089
6897
  try {
5090
- const text$1 = value.trim();
6898
+ const text$2 = value.trim();
5091
6899
  const selectedFiles = [...files];
5092
6900
  await onSubmit({
5093
- text: text$1,
6901
+ text: text$2,
5094
6902
  ...enabledTools ? { enabledTools } : {},
5095
6903
  files: selectedFiles
5096
6904
  });
@@ -5317,10 +7125,10 @@ function useSpeechToText({ transcribe, onTranscriptionComplete, onTranscriptionE
5317
7125
  if (operationIdRef.current !== operationId) return null;
5318
7126
  const transcription = await optionsRef.current.transcribe(audio, abortController.signal);
5319
7127
  if (operationIdRef.current !== operationId) return null;
5320
- const text$1 = transcription.trim();
5321
- if (!text$1) return null;
5322
- optionsRef.current.onTranscriptionComplete?.(text$1);
5323
- return text$1;
7128
+ const text$2 = transcription.trim();
7129
+ if (!text$2) return null;
7130
+ optionsRef.current.onTranscriptionComplete?.(text$2);
7131
+ return text$2;
5324
7132
  } catch (error) {
5325
7133
  if (operationIdRef.current !== operationId || abortController.signal.aborted || isAbortError(error)) return null;
5326
7134
  optionsRef.current.onTranscriptionError?.(normalizeError(error, "Transcription failed"));
@@ -5424,5 +7232,5 @@ async function dummyTranscribeAudio(_audio, signal) {
5424
7232
  }
5425
7233
 
5426
7234
  //#endregion
5427
- export { AggregatedSourceResults, ArrowUp, AssistantMessage, ChatError, Clipboard, DatasourceFolderCard, DatasourceToolResources, DatasourceToolResultCard, Loader, MemoryProposalCard, Message, MessageAvatar, MessageContent, MessageFooter, MessageHeader, MessageParts, MessageRoot, Microphone, PROMPT_FORM_FILE_ACCEPT, Paperclip, PromptForm, PromptFormAttachButton, PromptFormIconButton, Reload, ResourceCard, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SpeechToTextToggle, Stop, Thinking, ThumbDown, ThumbUp, ToolError, ToolResultAgentInvocationCard, ToolResultBrowserCard, ToolResultCard, ToolResultExternalDatasourceCard, ToolResultHttpRequestCard, ToolResultMcpCard, ToolResultOfficeDocumentsCard, ToolResultWebSearchCard, ToolResultWorkflowDispatchCard, ToolUseIndicator, UserMessage, X, dummyTranscribeAudio, getLocalizedOpenGraphValue, getResourceDescription, getResourceIcon, getResourceOpenGraphImage, getResourceOpenGraphType, getResourceTitle, getResourceType, getResourceUrl, getToolUseLabel, isAllowedPromptFormFile, partitionPromptFormFiles, useChat, useChatRegistryBusy, useOwnedChatRegistry, useRegistryChat, useSpeechToText, useStreamCoordinator };
7235
+ export { AggregatedSourceResults, ArrowUp, AssistantMessage, ChatError, Clipboard, DatasourceFolderCard, DatasourceToolResources, DatasourceToolResultCard, Loader, MemoryProposalCard, Message, MessageAvatar, MessageContent, MessageFooter, MessageHeader, MessageParts, MessageRoot, Microphone, PROMPT_FORM_FILE_ACCEPT, Paperclip, PromptForm, PromptFormAttachButton, PromptFormIconButton, Reload, ResourceCard, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SpeechToTextToggle, Stop, Thinking, ThumbDown, ThumbUp, ToolError, ToolResultAgentInvocationCard, ToolResultBrowserCard, ToolResultCard, ToolResultExternalDatasourceCard, ToolResultHttpRequestCard, ToolResultMcpCard, ToolResultOfficeDocumentsCard, ToolResultPendingConfirmationCard, ToolResultPersonalConnectorCard, ToolResultToolConfirmationCard, ToolResultWebSearchCard, ToolResultWorkflowDispatchCard, ToolUseIndicator, UserMessage, X, dummyTranscribeAudio, getLocalizedOpenGraphValue, getResourceDescription, getResourceIcon, getResourceOpenGraphImage, getResourceOpenGraphType, getResourceTitle, getResourceType, getResourceUrl, getToolUseLabel, isAllowedPromptFormFile, partitionPromptFormFiles, useChat, useChatRegistryBusy, useOwnedChatRegistry, useRegistryChat, useSpeechToText, useStreamCoordinator, useToolConfirmationSync, useToolConfirmations };
5428
7236
  //# sourceMappingURL=index.js.map