@supyagent/sdk 0.1.11 → 0.1.13

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/react.cjs CHANGED
@@ -48,6 +48,7 @@ __export(react_exports, {
48
48
  LinearFormatter: () => LinearFormatter,
49
49
  LinkedInFormatter: () => LinkedInFormatter,
50
50
  NotionFormatter: () => NotionFormatter,
51
+ PROVIDER_LABELS: () => PROVIDER_LABELS,
51
52
  PipedriveFormatter: () => PipedriveFormatter,
52
53
  ProviderIcon: () => ProviderIcon,
53
54
  ResendFormatter: () => ResendFormatter,
@@ -64,20 +65,23 @@ __export(react_exports, {
64
65
  ToolInput: () => ToolInput,
65
66
  TwilioFormatter: () => TwilioFormatter,
66
67
  TwitterFormatter: () => TwitterFormatter,
68
+ extractArgs: () => extractArgs,
69
+ extractResult: () => extractResult,
70
+ extractState: () => extractState,
71
+ extractToolName: () => extractToolName,
72
+ getFormatterType: () => getFormatterType,
67
73
  getProviderFromToolName: () => getProviderFromToolName,
68
74
  getProviderLabel: () => getProviderLabel,
69
75
  getSummary: () => getSummary,
70
- humanizeToolName: () => humanizeToolName
76
+ humanizeToolName: () => humanizeToolName,
77
+ maybeNormalize: () => maybeNormalize,
78
+ normalizeMicrosoftCalendar: () => normalizeMicrosoftCalendar,
79
+ normalizeMicrosoftDrive: () => normalizeMicrosoftDrive,
80
+ normalizeMicrosoftMail: () => normalizeMicrosoftMail,
81
+ unwrapSupyagentResult: () => unwrapSupyagentResult
71
82
  });
72
83
  module.exports = __toCommonJS(react_exports);
73
84
 
74
- // src/ui/tool-call.tsx
75
- var import_react = require("react");
76
- var import_lucide_react2 = require("lucide-react");
77
-
78
- // src/ui/provider-icon.tsx
79
- var import_lucide_react = require("lucide-react");
80
-
81
85
  // src/ui/utils.ts
82
86
  function getProviderFromToolName(toolName) {
83
87
  const idx = toolName.indexOf("_");
@@ -197,7 +201,12 @@ function getFormatterType(toolName) {
197
201
  }
198
202
  }
199
203
 
204
+ // src/ui/collapsible-result.tsx
205
+ var import_react = require("react");
206
+ var import_lucide_react2 = require("lucide-react");
207
+
200
208
  // src/ui/provider-icon.tsx
209
+ var import_lucide_react = require("lucide-react");
201
210
  var import_jsx_runtime = require("react/jsx-runtime");
202
211
  var ICON_MAP = {
203
212
  gmail: import_lucide_react.Mail,
@@ -236,78 +245,8 @@ function ProviderIcon({ toolName, className = "h-4 w-4" }) {
236
245
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className });
237
246
  }
238
247
 
239
- // src/ui/tool-call.tsx
240
- var import_jsx_runtime2 = require("react/jsx-runtime");
241
- function extractToolName(part) {
242
- if (part.type.startsWith("tool-") && part.type !== "tool-invocation") {
243
- return part.type.slice(5);
244
- }
245
- if (part.type === "dynamic-tool" && part.toolName) {
246
- return part.toolName;
247
- }
248
- if (part.toolName) return part.toolName;
249
- if (part.toolInvocation?.toolName) return part.toolInvocation.toolName;
250
- return "unknown";
251
- }
252
- function extractState(part) {
253
- return part.state || part.toolInvocation?.state || "input-available";
254
- }
255
- function extractArgs(part) {
256
- return part.input || part.args || part.toolInvocation?.args;
257
- }
258
- function SupyagentToolCall({ part }) {
259
- const [expanded, setExpanded] = (0, import_react.useState)(false);
260
- const toolName = extractToolName(part);
261
- const state = extractState(part);
262
- const args = extractArgs(part);
263
- const provider = getProviderFromToolName(toolName);
264
- const providerLabel = getProviderLabel(provider);
265
- const actionLabel = humanizeToolName(toolName);
266
- const isStreaming = state === "input-streaming";
267
- const isError = state === "output-error";
268
- const isDone = state === "output-available";
269
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
270
- "div",
271
- {
272
- className: "rounded-lg border border-border bg-card overflow-hidden",
273
- "data-state": isDone ? "done" : isError ? "error" : isStreaming ? "streaming" : "pending",
274
- children: [
275
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
276
- "button",
277
- {
278
- type: "button",
279
- onClick: () => args && setExpanded(!expanded),
280
- className: "flex items-center gap-2 w-full px-3 py-2 text-left hover:bg-muted transition-colors",
281
- children: [
282
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "relative", children: [
283
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ProviderIcon, { toolName, className: "h-4 w-4 text-muted-foreground" }),
284
- isStreaming && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.Loader2, { className: "absolute -top-1 -right-1 h-3 w-3 text-primary animate-spin" })
285
- ] }),
286
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-xs text-muted-foreground", children: providerLabel }),
287
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-sm text-foreground flex-1", children: actionLabel }),
288
- isDone && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "inline-flex items-center gap-1 rounded-full bg-green-500/10 px-2 py-0.5 text-xs text-green-500", children: [
289
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.Check, { className: "h-3 w-3" }),
290
- "Completed"
291
- ] }),
292
- isError && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-xs text-destructive", children: [
293
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.AlertCircle, { className: "h-3 w-3" }),
294
- "Error"
295
- ] }),
296
- isStreaming && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-xs text-primary animate-pulse", children: "Calling..." }),
297
- args && (expanded ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.ChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.ChevronRight, { className: "h-3.5 w-3.5 text-muted-foreground" }))
298
- ]
299
- }
300
- ),
301
- expanded && args && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "border-t border-border px-3 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("pre", { className: "text-xs text-muted-foreground overflow-x-auto", children: JSON.stringify(args, null, 2) }) })
302
- ]
303
- }
304
- );
305
- }
306
-
307
248
  // src/ui/collapsible-result.tsx
308
- var import_react2 = require("react");
309
- var import_lucide_react3 = require("lucide-react");
310
- var import_jsx_runtime3 = require("react/jsx-runtime");
249
+ var import_jsx_runtime2 = require("react/jsx-runtime");
311
250
  var BADGE_STYLES = {
312
251
  default: "bg-muted text-muted-foreground",
313
252
  success: "bg-green-500/10 text-green-500",
@@ -321,37 +260,37 @@ function CollapsibleResult({
321
260
  defaultExpanded = false,
322
261
  children
323
262
  }) {
324
- const [expanded, setExpanded] = (0, import_react2.useState)(defaultExpanded);
263
+ const [expanded, setExpanded] = (0, import_react.useState)(defaultExpanded);
325
264
  const provider = getProviderFromToolName(toolName);
326
265
  const providerLabel = getProviderLabel(provider);
327
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "rounded-lg border border-border bg-card overflow-hidden", children: [
328
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
266
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "rounded-lg border border-border bg-card overflow-hidden", children: [
267
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
329
268
  "button",
330
269
  {
331
270
  type: "button",
332
271
  onClick: () => setExpanded(!expanded),
333
272
  className: "flex items-center gap-2 w-full px-3 py-2 text-left hover:bg-muted transition-colors",
334
273
  children: [
335
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ProviderIcon, { toolName, className: "h-4 w-4 text-muted-foreground" }),
336
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-xs text-muted-foreground", children: providerLabel }),
337
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-sm text-foreground flex-1 truncate", children: summary }),
338
- badge && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
274
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ProviderIcon, { toolName, className: "h-4 w-4 text-muted-foreground" }),
275
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-xs text-muted-foreground", children: providerLabel }),
276
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-sm text-foreground flex-1 truncate", children: summary }),
277
+ badge && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
339
278
  "span",
340
279
  {
341
280
  className: `inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${BADGE_STYLES[badge.variant || "default"]}`,
342
281
  children: badge.text
343
282
  }
344
283
  ),
345
- expanded ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react3.ChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react3.ChevronRight, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" })
284
+ expanded ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.ChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.ChevronRight, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" })
346
285
  ]
347
286
  }
348
287
  ),
349
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
288
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
350
289
  "div",
351
290
  {
352
291
  className: "grid transition-[grid-template-rows] duration-200 ease-out",
353
292
  style: { gridTemplateRows: expanded ? "1fr" : "0fr" },
354
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "border-t border-border px-3 py-2", children }) })
293
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "border-t border-border px-3 py-2", children }) })
355
294
  }
356
295
  )
357
296
  ] });
@@ -475,9 +414,15 @@ function getSlidesSummary(data) {
475
414
  return { text: "Slides result" };
476
415
  }
477
416
  function getHubspotSummary(data, toolName) {
478
- const isCompany = toolName.toLowerCase().includes("compan");
479
- const n = countItems(data, "results");
480
- if (n > 0) return { text: isCompany ? `Listed ${n} companies` : `Listed ${n} contacts`, badge: countBadge(n) };
417
+ const tl = toolName.toLowerCase();
418
+ const isDeal = tl.includes("deal");
419
+ const isCompany = tl.includes("compan");
420
+ const n = countItems(data, "results", "contacts", "companies", "deals");
421
+ if (n > 0) {
422
+ const label = isDeal ? "deals" : isCompany ? "companies" : "contacts";
423
+ return { text: `Listed ${n} ${label}`, badge: countBadge(n) };
424
+ }
425
+ if (isDeal) return { text: "Deal result" };
481
426
  return { text: isCompany ? "Company result" : "Contact result" };
482
427
  }
483
428
  function getLinearSummary(data, toolName) {
@@ -787,8 +732,8 @@ function normalizeMicrosoftDrive(data) {
787
732
  }
788
733
 
789
734
  // src/ui/formatters/email.tsx
790
- var import_lucide_react4 = require("lucide-react");
791
- var import_jsx_runtime4 = require("react/jsx-runtime");
735
+ var import_lucide_react3 = require("lucide-react");
736
+ var import_jsx_runtime3 = require("react/jsx-runtime");
792
737
  function isEmailData(data) {
793
738
  return typeof data === "object" && data !== null && ("subject" in data || "from" in data || "snippet" in data);
794
739
  }
@@ -829,44 +774,44 @@ function resolveLabels(email) {
829
774
  function EmailCard({ email }) {
830
775
  const recipients = formatRecipients(email.to);
831
776
  const labels = resolveLabels(email);
832
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-2", children: [
833
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-start gap-2", children: [
834
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react4.Mail, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
835
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "min-w-0 flex-1", children: [
836
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-sm font-medium text-foreground truncate", children: email.subject || "No subject" }),
837
- email.from && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-xs text-muted-foreground truncate", children: email.from }),
838
- recipients && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("p", { className: "text-xs text-muted-foreground truncate", children: [
777
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-2", children: [
778
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-start gap-2", children: [
779
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react3.Mail, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
780
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "min-w-0 flex-1", children: [
781
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm font-medium text-foreground truncate", children: email.subject || "No subject" }),
782
+ email.from && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-muted-foreground truncate", children: email.from }),
783
+ recipients && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("p", { className: "text-xs text-muted-foreground truncate", children: [
839
784
  "To: ",
840
785
  recipients
841
786
  ] })
842
787
  ] }),
843
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-1.5 shrink-0", children: [
844
- email.hasAttachments && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react4.Paperclip, { className: "h-3.5 w-3.5 text-muted-foreground" }),
845
- email.date && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-xs text-muted-foreground", children: formatRelativeDate(email.date) })
788
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-1.5 shrink-0", children: [
789
+ email.hasAttachments && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react3.Paperclip, { className: "h-3.5 w-3.5 text-muted-foreground" }),
790
+ email.date && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-xs text-muted-foreground", children: formatRelativeDate(email.date) })
846
791
  ] })
847
792
  ] }),
848
- labels.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex items-center gap-1.5 flex-wrap", children: labels.map((label) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
793
+ labels.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex items-center gap-1.5 flex-wrap", children: labels.map((label) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
849
794
  "span",
850
795
  {
851
796
  className: "inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground",
852
797
  children: [
853
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react4.Tag, { className: "h-2.5 w-2.5" }),
798
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react3.Tag, { className: "h-2.5 w-2.5" }),
854
799
  label
855
800
  ]
856
801
  },
857
802
  label
858
803
  )) }),
859
- (email.snippet || email.body) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-3", children: email.snippet || email.body })
804
+ (email.snippet || email.body) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-3", children: email.snippet || email.body })
860
805
  ] });
861
806
  }
862
807
  function EmailFormatter({ data }) {
863
808
  if (isEmailData(data)) {
864
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(EmailCard, { email: data });
809
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(EmailCard, { email: data });
865
810
  }
866
811
  if (Array.isArray(data)) {
867
812
  const emails = data.filter(isEmailData);
868
813
  if (emails.length > 0) {
869
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "space-y-2", children: emails.map((email, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(EmailCard, { email }, email.id || i)) });
814
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "space-y-2", children: emails.map((email, i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(EmailCard, { email }, email.id || i)) });
870
815
  }
871
816
  }
872
817
  if (typeof data === "object" && data !== null && "messages" in data) {
@@ -874,16 +819,16 @@ function EmailFormatter({ data }) {
874
819
  if (Array.isArray(messages)) {
875
820
  const emails = messages.filter(isEmailData);
876
821
  if (emails.length > 0) {
877
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "space-y-2", children: emails.map((email, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(EmailCard, { email }, email.id || i)) });
822
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "space-y-2", children: emails.map((email, i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(EmailCard, { email }, email.id || i)) });
878
823
  }
879
824
  }
880
825
  }
881
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
826
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
882
827
  }
883
828
 
884
829
  // src/ui/formatters/calendar-event.tsx
885
- var import_lucide_react5 = require("lucide-react");
886
- var import_jsx_runtime5 = require("react/jsx-runtime");
830
+ var import_lucide_react4 = require("lucide-react");
831
+ var import_jsx_runtime4 = require("react/jsx-runtime");
887
832
  function isCalendarEvent(data) {
888
833
  return typeof data === "object" && data !== null && ("summary" in data || "start" in data);
889
834
  }
@@ -918,37 +863,37 @@ function formatRelativeDateTime(dt) {
918
863
  function ResponseStatusIcon({ status }) {
919
864
  switch (status) {
920
865
  case "accepted":
921
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react5.Check, { className: "h-3 w-3 text-green-500" });
866
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react4.Check, { className: "h-3 w-3 text-green-500" });
922
867
  case "declined":
923
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react5.X, { className: "h-3 w-3 text-destructive" });
868
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react4.X, { className: "h-3 w-3 text-destructive" });
924
869
  case "tentative":
925
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react5.HelpCircle, { className: "h-3 w-3 text-yellow-500" });
870
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react4.HelpCircle, { className: "h-3 w-3 text-yellow-500" });
926
871
  default:
927
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react5.HelpCircle, { className: "h-3 w-3 text-muted-foreground" });
872
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react4.HelpCircle, { className: "h-3 w-3 text-muted-foreground" });
928
873
  }
929
874
  }
930
875
  function EventCard({ event }) {
931
876
  const startStr = formatRelativeDateTime(event.start);
932
877
  const endStr = formatRelativeDateTime(event.end);
933
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-2", children: [
934
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-start gap-2", children: [
935
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react5.Calendar, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
936
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "min-w-0 flex-1", children: [
937
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm font-medium text-foreground", children: event.summary || "Untitled event" }),
938
- startStr && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
878
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-2", children: [
879
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-start gap-2", children: [
880
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react4.Calendar, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
881
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "min-w-0 flex-1", children: [
882
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-sm font-medium text-foreground", children: event.summary || "Untitled event" }),
883
+ startStr && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
939
884
  startStr,
940
885
  endStr ? ` \u2192 ${endStr}` : ""
941
886
  ] })
942
887
  ] })
943
888
  ] }),
944
- event.location && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
945
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react5.MapPin, { className: "h-3 w-3 shrink-0" }),
946
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "truncate", children: event.location })
889
+ event.location && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
890
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react4.MapPin, { className: "h-3 w-3 shrink-0" }),
891
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "truncate", children: event.location })
947
892
  ] }),
948
- event.attendees && event.attendees.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-start gap-1.5 text-xs text-muted-foreground", children: [
949
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react5.Users, { className: "h-3 w-3 shrink-0 mt-0.5" }),
950
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-wrap gap-x-3 gap-y-1", children: event.attendees.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "inline-flex items-center gap-1", children: [
951
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ResponseStatusIcon, { status: a.responseStatus }),
893
+ event.attendees && event.attendees.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-start gap-1.5 text-xs text-muted-foreground", children: [
894
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react4.Users, { className: "h-3 w-3 shrink-0 mt-0.5" }),
895
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex flex-wrap gap-x-3 gap-y-1", children: event.attendees.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "inline-flex items-center gap-1", children: [
896
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ResponseStatusIcon, { status: a.responseStatus }),
952
897
  a.displayName || a.email
953
898
  ] }, i)) })
954
899
  ] })
@@ -956,12 +901,12 @@ function EventCard({ event }) {
956
901
  }
957
902
  function CalendarEventFormatter({ data }) {
958
903
  if (isCalendarEvent(data)) {
959
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EventCard, { event: data });
904
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(EventCard, { event: data });
960
905
  }
961
906
  if (Array.isArray(data)) {
962
907
  const events = data.filter(isCalendarEvent);
963
908
  if (events.length > 0) {
964
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "space-y-2", children: events.map((event, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EventCard, { event }, event.id || i)) });
909
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "space-y-2", children: events.map((event, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(EventCard, { event }, event.id || i)) });
965
910
  }
966
911
  }
967
912
  if (typeof data === "object" && data !== null && "events" in data) {
@@ -969,16 +914,16 @@ function CalendarEventFormatter({ data }) {
969
914
  if (Array.isArray(events)) {
970
915
  const calEvents = events.filter(isCalendarEvent);
971
916
  if (calEvents.length > 0) {
972
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "space-y-2", children: calEvents.map((event, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EventCard, { event }, event.id || i)) });
917
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "space-y-2", children: calEvents.map((event, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(EventCard, { event }, event.id || i)) });
973
918
  }
974
919
  }
975
920
  }
976
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
921
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
977
922
  }
978
923
 
979
924
  // src/ui/formatters/slack-message.tsx
980
- var import_lucide_react6 = require("lucide-react");
981
- var import_jsx_runtime6 = require("react/jsx-runtime");
925
+ var import_lucide_react5 = require("lucide-react");
926
+ var import_jsx_runtime5 = require("react/jsx-runtime");
982
927
  function isSlackMessage(data) {
983
928
  return typeof data === "object" && data !== null && ("text" in data || "channel" in data);
984
929
  }
@@ -986,21 +931,21 @@ function isChannelList(data) {
986
931
  return typeof data === "object" && data !== null && "channels" in data && Array.isArray(data.channels);
987
932
  }
988
933
  function MessageBubble({ message }) {
989
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
990
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2", children: [
991
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react6.MessageSquare, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
992
- message.channel && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "flex items-center gap-0.5 text-xs text-muted-foreground", children: [
993
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react6.Hash, { className: "h-3 w-3" }),
934
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
935
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-2", children: [
936
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react5.MessageSquare, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
937
+ message.channel && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "flex items-center gap-0.5 text-xs text-muted-foreground", children: [
938
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react5.Hash, { className: "h-3 w-3" }),
994
939
  message.channel
995
940
  ] }),
996
- message.user && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-xs font-medium text-foreground", children: message.user }),
997
- message.thread_ts && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
998
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react6.Reply, { className: "h-3 w-3" }),
941
+ message.user && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-xs font-medium text-foreground", children: message.user }),
942
+ message.thread_ts && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
943
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react5.Reply, { className: "h-3 w-3" }),
999
944
  message.reply_count ? `${message.reply_count} replies` : "Thread"
1000
945
  ] })
1001
946
  ] }),
1002
- message.text && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm text-foreground", children: message.text }),
1003
- message.reactions && message.reactions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex flex-wrap gap-1.5 pt-1", children: message.reactions.map((reaction) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
947
+ message.text && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm text-foreground", children: message.text }),
948
+ message.reactions && message.reactions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-wrap gap-1.5 pt-1", children: message.reactions.map((reaction) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1004
949
  "span",
1005
950
  {
1006
951
  className: "inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground",
@@ -1008,7 +953,7 @@ function MessageBubble({ message }) {
1008
953
  ":",
1009
954
  reaction.name,
1010
955
  ":",
1011
- reaction.count && reaction.count > 1 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "font-medium", children: reaction.count })
956
+ reaction.count && reaction.count > 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-medium", children: reaction.count })
1012
957
  ]
1013
958
  },
1014
959
  reaction.name
@@ -1017,10 +962,10 @@ function MessageBubble({ message }) {
1017
962
  }
1018
963
  function ChannelCard({ channel }) {
1019
964
  const members = channel.num_members ?? channel.memberCount;
1020
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-card p-3", children: [
1021
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react6.Hash, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
1022
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-sm text-foreground flex-1", children: channel.name || channel.id }),
1023
- members !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
965
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-card p-3", children: [
966
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react5.Hash, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
967
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-sm text-foreground flex-1", children: channel.name || channel.id }),
968
+ members !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
1024
969
  members,
1025
970
  " members"
1026
971
  ] })
@@ -1029,15 +974,15 @@ function ChannelCard({ channel }) {
1029
974
  function SlackMessageFormatter({ data }) {
1030
975
  if (isChannelList(data)) {
1031
976
  const channels = data.channels;
1032
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "space-y-1.5", children: channels.map((ch, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ChannelCard, { channel: ch }, ch.id || i)) });
977
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "space-y-1.5", children: channels.map((ch, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ChannelCard, { channel: ch }, ch.id || i)) });
1033
978
  }
1034
979
  if (isSlackMessage(data)) {
1035
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MessageBubble, { message: data });
980
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MessageBubble, { message: data });
1036
981
  }
1037
982
  if (Array.isArray(data)) {
1038
983
  const messages = data.filter(isSlackMessage);
1039
984
  if (messages.length > 0) {
1040
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "space-y-2", children: messages.map((msg, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MessageBubble, { message: msg }, msg.ts || i)) });
985
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "space-y-2", children: messages.map((msg, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MessageBubble, { message: msg }, msg.ts || i)) });
1041
986
  }
1042
987
  }
1043
988
  if (typeof data === "object" && data !== null && "messages" in data) {
@@ -1045,16 +990,16 @@ function SlackMessageFormatter({ data }) {
1045
990
  if (Array.isArray(messages)) {
1046
991
  const slackMsgs = messages.filter(isSlackMessage);
1047
992
  if (slackMsgs.length > 0) {
1048
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "space-y-2", children: slackMsgs.map((msg, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MessageBubble, { message: msg }, msg.ts || i)) });
993
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "space-y-2", children: slackMsgs.map((msg, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MessageBubble, { message: msg }, msg.ts || i)) });
1049
994
  }
1050
995
  }
1051
996
  }
1052
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
997
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1053
998
  }
1054
999
 
1055
1000
  // src/ui/formatters/github.tsx
1056
- var import_lucide_react7 = require("lucide-react");
1057
- var import_jsx_runtime7 = require("react/jsx-runtime");
1001
+ var import_lucide_react6 = require("lucide-react");
1002
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1058
1003
  function isGithubItem(data) {
1059
1004
  return typeof data === "object" && data !== null && ("title" in data || "number" in data);
1060
1005
  }
@@ -1075,45 +1020,45 @@ function formatRelativeDate2(dateStr) {
1075
1020
  function getStateInfo(item) {
1076
1021
  const isPR = !!item.pull_request;
1077
1022
  if (isPR && item.merged) {
1078
- return { icon: import_lucide_react7.GitMerge, color: "text-purple-500", label: "Merged" };
1023
+ return { icon: import_lucide_react6.GitMerge, color: "text-purple-500", label: "Merged" };
1079
1024
  }
1080
1025
  if (item.state === "open") {
1081
1026
  return {
1082
- icon: isPR ? import_lucide_react7.GitPullRequest : import_lucide_react7.CircleDot,
1027
+ icon: isPR ? import_lucide_react6.GitPullRequest : import_lucide_react6.CircleDot,
1083
1028
  color: "text-green-500",
1084
1029
  label: "Open"
1085
1030
  };
1086
1031
  }
1087
1032
  return {
1088
- icon: isPR ? import_lucide_react7.GitPullRequest : import_lucide_react7.CircleDot,
1033
+ icon: isPR ? import_lucide_react6.GitPullRequest : import_lucide_react6.CircleDot,
1089
1034
  color: "text-destructive",
1090
1035
  label: "Closed"
1091
1036
  };
1092
1037
  }
1093
1038
  function GithubCard({ item }) {
1094
1039
  const { icon: StateIcon, color: stateColor, label: stateLabel } = getStateInfo(item);
1095
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
1096
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-start gap-2", children: [
1097
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(StateIcon, { className: `h-4 w-4 mt-0.5 shrink-0 ${stateColor}` }),
1098
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "min-w-0 flex-1", children: [
1099
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { className: "text-sm font-medium text-foreground", children: [
1100
- item.html_url ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("a", { href: item.html_url, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: item.title }) : item.title,
1101
- item.number && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "text-muted-foreground font-normal", children: [
1040
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
1041
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start gap-2", children: [
1042
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StateIcon, { className: `h-4 w-4 mt-0.5 shrink-0 ${stateColor}` }),
1043
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "min-w-0 flex-1", children: [
1044
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "text-sm font-medium text-foreground", children: [
1045
+ item.html_url ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("a", { href: item.html_url, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: item.title }) : item.title,
1046
+ item.number && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "text-muted-foreground font-normal", children: [
1102
1047
  " #",
1103
1048
  item.number
1104
1049
  ] })
1105
1050
  ] }),
1106
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2 mt-0.5", children: [
1107
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: `text-xs ${stateColor}`, children: stateLabel }),
1108
- item.user?.login && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-xs text-muted-foreground", children: item.user.login }),
1109
- item.created_at && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
1110
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react7.Clock, { className: "h-3 w-3" }),
1051
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2 mt-0.5", children: [
1052
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: `text-xs ${stateColor}`, children: stateLabel }),
1053
+ item.user?.login && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-xs text-muted-foreground", children: item.user.login }),
1054
+ item.created_at && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
1055
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react6.Clock, { className: "h-3 w-3" }),
1111
1056
  formatRelativeDate2(item.created_at)
1112
1057
  ] })
1113
1058
  ] })
1114
1059
  ] })
1115
1060
  ] }),
1116
- item.labels && item.labels.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-wrap gap-1.5", children: item.labels.map((label) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1061
+ item.labels && item.labels.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex flex-wrap gap-1.5", children: item.labels.map((label) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1117
1062
  "span",
1118
1063
  {
1119
1064
  className: "rounded-full border border-border px-2 py-0.5 text-xs text-muted-foreground",
@@ -1122,35 +1067,35 @@ function GithubCard({ item }) {
1122
1067
  },
1123
1068
  label.name
1124
1069
  )) }),
1125
- item.body && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-2", children: item.body })
1070
+ item.body && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-2", children: item.body })
1126
1071
  ] });
1127
1072
  }
1128
1073
  function GithubFormatter({ data }) {
1129
1074
  if (isGithubItem(data)) {
1130
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(GithubCard, { item: data });
1075
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(GithubCard, { item: data });
1131
1076
  }
1132
1077
  if (Array.isArray(data)) {
1133
1078
  const items = data.filter(isGithubItem);
1134
1079
  if (items.length > 0) {
1135
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "space-y-2", children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(GithubCard, { item }, item.number || i)) });
1080
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "space-y-2", children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(GithubCard, { item }, item.number || i)) });
1136
1081
  }
1137
1082
  }
1138
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1083
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1139
1084
  }
1140
1085
 
1141
1086
  // src/ui/formatters/drive-file.tsx
1142
- var import_lucide_react8 = require("lucide-react");
1143
- var import_jsx_runtime8 = require("react/jsx-runtime");
1087
+ var import_lucide_react7 = require("lucide-react");
1088
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1144
1089
  function isDriveFile(data) {
1145
1090
  return typeof data === "object" && data !== null && ("name" in data || "mimeType" in data);
1146
1091
  }
1147
1092
  function getFileIcon(mimeType) {
1148
- if (!mimeType) return import_lucide_react8.FileText;
1149
- if (mimeType.includes("folder")) return import_lucide_react8.Folder;
1150
- if (mimeType.includes("image")) return import_lucide_react8.Image;
1151
- if (mimeType.includes("video")) return import_lucide_react8.Film;
1152
- if (mimeType.includes("spreadsheet") || mimeType.includes("excel")) return import_lucide_react8.FileSpreadsheet;
1153
- return import_lucide_react8.FileText;
1093
+ if (!mimeType) return import_lucide_react7.FileText;
1094
+ if (mimeType.includes("folder")) return import_lucide_react7.Folder;
1095
+ if (mimeType.includes("image")) return import_lucide_react7.Image;
1096
+ if (mimeType.includes("video")) return import_lucide_react7.Film;
1097
+ if (mimeType.includes("spreadsheet") || mimeType.includes("excel")) return import_lucide_react7.FileSpreadsheet;
1098
+ return import_lucide_react7.FileText;
1154
1099
  }
1155
1100
  function formatFileSize(size) {
1156
1101
  if (size === void 0) return null;
@@ -1164,29 +1109,29 @@ function formatFileSize(size) {
1164
1109
  function FileCard({ file }) {
1165
1110
  const Icon = getFileIcon(file.mimeType);
1166
1111
  const sizeStr = formatFileSize(file.size);
1167
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-3 rounded-lg border border-border bg-card p-3", children: [
1168
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
1169
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "min-w-0 flex-1", children: [
1170
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-foreground truncate", children: file.webViewLink ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("a", { href: file.webViewLink, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: file.name || "Untitled" }) : file.name || "Untitled" }),
1171
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2", children: [
1172
- file.modifiedTime && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-xs text-muted-foreground", children: new Date(file.modifiedTime).toLocaleDateString() }),
1173
- sizeStr && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-xs text-muted-foreground", children: sizeStr })
1112
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-3 rounded-lg border border-border bg-card p-3", children: [
1113
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
1114
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "min-w-0 flex-1", children: [
1115
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-sm text-foreground truncate", children: file.webViewLink ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("a", { href: file.webViewLink, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: file.name || "Untitled" }) : file.name || "Untitled" }),
1116
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
1117
+ file.modifiedTime && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-xs text-muted-foreground", children: new Date(file.modifiedTime).toLocaleDateString() }),
1118
+ sizeStr && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-xs text-muted-foreground", children: sizeStr })
1174
1119
  ] })
1175
1120
  ] }),
1176
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-1.5 shrink-0", children: [
1177
- file.shared && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { title: "Shared", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react8.Users, { className: "h-3.5 w-3.5 text-muted-foreground" }) }),
1178
- file.webViewLink && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("a", { href: file.webViewLink, target: "_blank", rel: "noopener noreferrer", className: "text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react8.ExternalLink, { className: "h-3.5 w-3.5" }) })
1121
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1.5 shrink-0", children: [
1122
+ file.shared && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { title: "Shared", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react7.Users, { className: "h-3.5 w-3.5 text-muted-foreground" }) }),
1123
+ file.webViewLink && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("a", { href: file.webViewLink, target: "_blank", rel: "noopener noreferrer", className: "text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react7.ExternalLink, { className: "h-3.5 w-3.5" }) })
1179
1124
  ] })
1180
1125
  ] });
1181
1126
  }
1182
1127
  function DriveFileFormatter({ data }) {
1183
1128
  if (isDriveFile(data)) {
1184
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FileCard, { file: data });
1129
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FileCard, { file: data });
1185
1130
  }
1186
1131
  if (Array.isArray(data)) {
1187
1132
  const files = data.filter(isDriveFile);
1188
1133
  if (files.length > 0) {
1189
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "space-y-1.5", children: files.map((file, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FileCard, { file }, file.id || i)) });
1134
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "space-y-1.5", children: files.map((file, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FileCard, { file }, file.id || i)) });
1190
1135
  }
1191
1136
  }
1192
1137
  if (typeof data === "object" && data !== null && "files" in data) {
@@ -1194,16 +1139,16 @@ function DriveFileFormatter({ data }) {
1194
1139
  if (Array.isArray(files)) {
1195
1140
  const driveFiles = files.filter(isDriveFile);
1196
1141
  if (driveFiles.length > 0) {
1197
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "space-y-1.5", children: driveFiles.map((file, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FileCard, { file }, file.id || i)) });
1142
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "space-y-1.5", children: driveFiles.map((file, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FileCard, { file }, file.id || i)) });
1198
1143
  }
1199
1144
  }
1200
1145
  }
1201
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1146
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1202
1147
  }
1203
1148
 
1204
1149
  // src/ui/formatters/search.tsx
1205
- var import_lucide_react9 = require("lucide-react");
1206
- var import_jsx_runtime9 = require("react/jsx-runtime");
1150
+ var import_lucide_react8 = require("lucide-react");
1151
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1207
1152
  function isSearchData(data) {
1208
1153
  if (typeof data !== "object" || data === null) return false;
1209
1154
  return "results" in data || "organic" in data || "answer" in data || "answerBox" in data;
@@ -1221,10 +1166,10 @@ function getDomain(url) {
1221
1166
  function ResultCard({ result }) {
1222
1167
  const href = result.link || result.url;
1223
1168
  const snippet = result.snippet || result.description;
1224
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: [
1225
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-start gap-2", children: [
1226
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "min-w-0 flex-1", children: [
1227
- href ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1169
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: [
1170
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-start gap-2", children: [
1171
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "min-w-0 flex-1", children: [
1172
+ href ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1228
1173
  "a",
1229
1174
  {
1230
1175
  href,
@@ -1233,12 +1178,12 @@ function ResultCard({ result }) {
1233
1178
  className: "text-sm font-medium text-primary hover:underline",
1234
1179
  children: result.title || href
1235
1180
  }
1236
- ) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm font-medium text-foreground", children: result.title }),
1237
- href && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs text-muted-foreground truncate", children: getDomain(href) })
1181
+ ) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm font-medium text-foreground", children: result.title }),
1182
+ href && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs text-muted-foreground truncate", children: getDomain(href) })
1238
1183
  ] }),
1239
- href && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("a", { href, target: "_blank", rel: "noopener noreferrer", className: "shrink-0 text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react9.ExternalLink, { className: "h-3.5 w-3.5" }) })
1184
+ href && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("a", { href, target: "_blank", rel: "noopener noreferrer", className: "shrink-0 text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react8.ExternalLink, { className: "h-3.5 w-3.5" }) })
1240
1185
  ] }),
1241
- snippet && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-2", children: snippet })
1186
+ snippet && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-2", children: snippet })
1242
1187
  ] });
1243
1188
  }
1244
1189
  function SearchFormatter({ data }) {
@@ -1246,18 +1191,18 @@ function SearchFormatter({ data }) {
1246
1191
  const results = data.results || data.organic || [];
1247
1192
  const answerText = data.answer || data.answerBox?.answer || data.answerBox?.snippet;
1248
1193
  const related = data.relatedSearches || data.related_searches;
1249
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "space-y-3", children: [
1250
- answerText && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3", children: [
1251
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm text-foreground", children: answerText }),
1252
- data.answerBox?.title && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs text-muted-foreground mt-1", children: data.answerBox.title })
1194
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "space-y-3", children: [
1195
+ answerText && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3", children: [
1196
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-foreground", children: answerText }),
1197
+ data.answerBox?.title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs text-muted-foreground mt-1", children: data.answerBox.title })
1253
1198
  ] }),
1254
- results.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "space-y-2", children: results.filter(isSearchResult).map((result, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ResultCard, { result }, result.link || result.url || i)) }),
1255
- related && related.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex flex-wrap gap-1.5", children: related.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1199
+ results.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "space-y-2", children: results.filter(isSearchResult).map((result, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ResultCard, { result }, result.link || result.url || i)) }),
1200
+ related && related.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-wrap gap-1.5", children: related.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1256
1201
  "span",
1257
1202
  {
1258
1203
  className: "inline-flex items-center gap-1 rounded-full bg-muted px-2.5 py-1 text-xs text-muted-foreground",
1259
1204
  children: [
1260
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react9.Search, { className: "h-3 w-3" }),
1205
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react8.Search, { className: "h-3 w-3" }),
1261
1206
  r.query
1262
1207
  ]
1263
1208
  },
@@ -1268,15 +1213,15 @@ function SearchFormatter({ data }) {
1268
1213
  if (Array.isArray(data)) {
1269
1214
  const results = data.filter(isSearchResult);
1270
1215
  if (results.length > 0) {
1271
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "space-y-2", children: results.map((result, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ResultCard, { result }, result.link || result.url || i)) });
1216
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "space-y-2", children: results.map((result, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ResultCard, { result }, result.link || result.url || i)) });
1272
1217
  }
1273
1218
  }
1274
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1219
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1275
1220
  }
1276
1221
 
1277
1222
  // src/ui/formatters/docs.tsx
1278
- var import_lucide_react10 = require("lucide-react");
1279
- var import_jsx_runtime10 = require("react/jsx-runtime");
1223
+ var import_lucide_react9 = require("lucide-react");
1224
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1280
1225
  function isDocData(data) {
1281
1226
  return typeof data === "object" && data !== null && ("documentId" in data || "title" in data);
1282
1227
  }
@@ -1299,31 +1244,31 @@ function extractTextContent(body) {
1299
1244
  function DocCard({ doc }) {
1300
1245
  const docUrl = doc.url || (doc.documentId ? `https://docs.google.com/document/d/${doc.documentId}` : null);
1301
1246
  const textContent = doc.content || extractTextContent(doc.body);
1302
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-2", children: [
1303
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-start gap-2", children: [
1304
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react10.FileText, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1305
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm font-medium text-foreground", children: docUrl ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("a", { href: docUrl, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: doc.title || "Untitled document" }) : doc.title || "Untitled document" }) }),
1306
- docUrl && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("a", { href: docUrl, target: "_blank", rel: "noopener noreferrer", className: "shrink-0 text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react10.ExternalLink, { className: "h-3.5 w-3.5" }) })
1247
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-2", children: [
1248
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-start gap-2", children: [
1249
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react9.FileText, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1250
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm font-medium text-foreground", children: docUrl ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("a", { href: docUrl, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: doc.title || "Untitled document" }) : doc.title || "Untitled document" }) }),
1251
+ docUrl && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("a", { href: docUrl, target: "_blank", rel: "noopener noreferrer", className: "shrink-0 text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react9.ExternalLink, { className: "h-3.5 w-3.5" }) })
1307
1252
  ] }),
1308
- textContent && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-4 whitespace-pre-wrap", children: textContent })
1253
+ textContent && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-4 whitespace-pre-wrap", children: textContent })
1309
1254
  ] });
1310
1255
  }
1311
1256
  function DocsFormatter({ data }) {
1312
1257
  if (isDocData(data)) {
1313
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DocCard, { doc: data });
1258
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DocCard, { doc: data });
1314
1259
  }
1315
1260
  if (Array.isArray(data)) {
1316
1261
  const docs = data.filter(isDocData);
1317
1262
  if (docs.length > 0) {
1318
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "space-y-2", children: docs.map((doc, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DocCard, { doc }, doc.documentId || i)) });
1263
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "space-y-2", children: docs.map((doc, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DocCard, { doc }, doc.documentId || i)) });
1319
1264
  }
1320
1265
  }
1321
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1266
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1322
1267
  }
1323
1268
 
1324
1269
  // src/ui/formatters/sheets.tsx
1325
- var import_lucide_react11 = require("lucide-react");
1326
- var import_jsx_runtime11 = require("react/jsx-runtime");
1270
+ var import_lucide_react10 = require("lucide-react");
1271
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1327
1272
  function isSheetsData(data) {
1328
1273
  return typeof data === "object" && data !== null && ("spreadsheetId" in data || "values" in data || "range" in data || "updatedRange" in data);
1329
1274
  }
@@ -1331,67 +1276,67 @@ function SheetsTable({ values }) {
1331
1276
  if (values.length === 0) return null;
1332
1277
  const headers = values[0];
1333
1278
  const rows = values.slice(1);
1334
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "overflow-x-auto rounded-lg border border-border", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("table", { className: "w-full text-xs", children: [
1335
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("tr", { className: "border-b border-border bg-muted", children: headers.map((header, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("th", { className: "px-3 py-2 text-left font-medium text-foreground whitespace-nowrap", children: String(header) }, i)) }) }),
1336
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("tbody", { children: rows.map((row, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("tr", { className: "border-b border-border last:border-0", children: headers.map((_, colIdx) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("td", { className: "px-3 py-1.5 text-muted-foreground whitespace-nowrap", children: String(row[colIdx] ?? "") }, colIdx)) }, rowIdx)) })
1279
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "overflow-x-auto rounded-lg border border-border", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("table", { className: "w-full text-xs", children: [
1280
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("tr", { className: "border-b border-border bg-muted", children: headers.map((header, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("th", { className: "px-3 py-2 text-left font-medium text-foreground whitespace-nowrap", children: String(header) }, i)) }) }),
1281
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("tbody", { children: rows.map((row, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("tr", { className: "border-b border-border last:border-0", children: headers.map((_, colIdx) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("td", { className: "px-3 py-1.5 text-muted-foreground whitespace-nowrap", children: String(row[colIdx] ?? "") }, colIdx)) }, rowIdx)) })
1337
1282
  ] }) });
1338
1283
  }
1339
1284
  function SheetsCard({ sheet }) {
1340
1285
  const sheetUrl = sheet.url || (sheet.spreadsheetId ? `https://docs.google.com/spreadsheets/d/${sheet.spreadsheetId}` : null);
1341
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "space-y-2", children: [
1342
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "rounded-lg border border-border bg-card p-3", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-start gap-2", children: [
1343
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react11.Table2, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1344
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "min-w-0 flex-1", children: [
1345
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-sm font-medium text-foreground", children: sheetUrl ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("a", { href: sheetUrl, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: sheet.title || "Spreadsheet" }) : sheet.title || "Spreadsheet" }),
1346
- (sheet.updatedRange || sheet.range) && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
1286
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "space-y-2", children: [
1287
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "rounded-lg border border-border bg-card p-3", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-start gap-2", children: [
1288
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react10.Table2, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1289
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "min-w-0 flex-1", children: [
1290
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm font-medium text-foreground", children: sheetUrl ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("a", { href: sheetUrl, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: sheet.title || "Spreadsheet" }) : sheet.title || "Spreadsheet" }),
1291
+ (sheet.updatedRange || sheet.range) && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
1347
1292
  sheet.updatedRange || sheet.range,
1348
1293
  sheet.updatedCells !== void 0 && ` \xB7 ${sheet.updatedCells} cells updated`
1349
1294
  ] })
1350
1295
  ] }),
1351
- sheetUrl && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("a", { href: sheetUrl, target: "_blank", rel: "noopener noreferrer", className: "shrink-0 text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react11.ExternalLink, { className: "h-3.5 w-3.5" }) })
1296
+ sheetUrl && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("a", { href: sheetUrl, target: "_blank", rel: "noopener noreferrer", className: "shrink-0 text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react10.ExternalLink, { className: "h-3.5 w-3.5" }) })
1352
1297
  ] }) }),
1353
- sheet.values && sheet.values.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SheetsTable, { values: sheet.values })
1298
+ sheet.values && sheet.values.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SheetsTable, { values: sheet.values })
1354
1299
  ] });
1355
1300
  }
1356
1301
  function SheetsFormatter({ data }) {
1357
1302
  if (isSheetsData(data)) {
1358
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SheetsCard, { sheet: data });
1303
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SheetsCard, { sheet: data });
1359
1304
  }
1360
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1305
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1361
1306
  }
1362
1307
 
1363
1308
  // src/ui/formatters/slides.tsx
1364
- var import_lucide_react12 = require("lucide-react");
1365
- var import_jsx_runtime12 = require("react/jsx-runtime");
1309
+ var import_lucide_react11 = require("lucide-react");
1310
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1366
1311
  function isSlidesData(data) {
1367
1312
  return typeof data === "object" && data !== null && ("presentationId" in data || "title" in data && "slides" in data);
1368
1313
  }
1369
1314
  function SlidesCard({ presentation }) {
1370
1315
  const slideUrl = presentation.url || (presentation.presentationId ? `https://docs.google.com/presentation/d/${presentation.presentationId}` : null);
1371
1316
  const slideCount = presentation.slides?.length;
1372
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "rounded-lg border border-border bg-card p-3", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-start gap-2", children: [
1373
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react12.Presentation, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1374
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "min-w-0 flex-1", children: [
1375
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm font-medium text-foreground", children: slideUrl ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("a", { href: slideUrl, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: presentation.title || "Presentation" }) : presentation.title || "Presentation" }),
1376
- slideCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
1317
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "rounded-lg border border-border bg-card p-3", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-start gap-2", children: [
1318
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react11.Presentation, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1319
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "min-w-0 flex-1", children: [
1320
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-sm font-medium text-foreground", children: slideUrl ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("a", { href: slideUrl, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: presentation.title || "Presentation" }) : presentation.title || "Presentation" }),
1321
+ slideCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
1377
1322
  slideCount,
1378
1323
  " ",
1379
1324
  slideCount === 1 ? "slide" : "slides"
1380
1325
  ] })
1381
1326
  ] }),
1382
- slideUrl && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("a", { href: slideUrl, target: "_blank", rel: "noopener noreferrer", className: "shrink-0 text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react12.ExternalLink, { className: "h-3.5 w-3.5" }) })
1327
+ slideUrl && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("a", { href: slideUrl, target: "_blank", rel: "noopener noreferrer", className: "shrink-0 text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react11.ExternalLink, { className: "h-3.5 w-3.5" }) })
1383
1328
  ] }) });
1384
1329
  }
1385
1330
  function SlidesFormatter({ data }) {
1386
1331
  if (isSlidesData(data)) {
1387
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SlidesCard, { presentation: data });
1332
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SlidesCard, { presentation: data });
1388
1333
  }
1389
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1334
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1390
1335
  }
1391
1336
 
1392
1337
  // src/ui/formatters/hubspot.tsx
1393
- var import_lucide_react13 = require("lucide-react");
1394
- var import_jsx_runtime13 = require("react/jsx-runtime");
1338
+ var import_lucide_react12 = require("lucide-react");
1339
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1395
1340
  function isHubspotContact(data) {
1396
1341
  if (typeof data !== "object" || data === null) return false;
1397
1342
  const d = data;
@@ -1401,9 +1346,50 @@ function isHubspotContact(data) {
1401
1346
  }
1402
1347
  function isHubspotCompany(data) {
1403
1348
  if (typeof data !== "object" || data === null) return false;
1404
- const props = data.properties;
1349
+ const d = data;
1350
+ if ("domain" in d && !("email" in d) && !("amount" in d)) return true;
1351
+ const props = d.properties;
1405
1352
  return props && ("name" in props || "domain" in props);
1406
1353
  }
1354
+ function isHubspotDeal(data) {
1355
+ if (typeof data !== "object" || data === null) return false;
1356
+ const d = data;
1357
+ return ("amount" in d || "stage" in d || "closeDate" in d) && !("email" in d);
1358
+ }
1359
+ function formatCurrency(value) {
1360
+ try {
1361
+ return new Intl.NumberFormat(void 0, {
1362
+ style: "currency",
1363
+ currency: "USD",
1364
+ minimumFractionDigits: 0,
1365
+ maximumFractionDigits: 0
1366
+ }).format(value);
1367
+ } catch {
1368
+ return `$${value.toLocaleString()}`;
1369
+ }
1370
+ }
1371
+ function formatDate(dateStr) {
1372
+ try {
1373
+ return new Date(dateStr).toLocaleDateString(void 0, {
1374
+ month: "short",
1375
+ day: "numeric",
1376
+ year: "numeric"
1377
+ });
1378
+ } catch {
1379
+ return dateStr;
1380
+ }
1381
+ }
1382
+ function getStageBadge(stage) {
1383
+ if (!stage) return null;
1384
+ const s = stage.toLowerCase();
1385
+ if (s === "closedwon" || s === "closed won")
1386
+ return { label: "Won", className: "text-green-500 bg-green-500/10" };
1387
+ if (s === "closedlost" || s === "closed lost")
1388
+ return { label: "Lost", className: "text-red-400 bg-red-400/10" };
1389
+ if (/^\d+$/.test(stage))
1390
+ return { label: "In Progress", className: "text-blue-400 bg-blue-400/10" };
1391
+ return { label: stage, className: "text-muted-foreground bg-muted" };
1392
+ }
1407
1393
  function ContactCard({ contact }) {
1408
1394
  const p = contact.properties || {};
1409
1395
  const first = contact.firstName || p.firstname;
@@ -1412,21 +1398,21 @@ function ContactCard({ contact }) {
1412
1398
  const phone = contact.phone || p.phone;
1413
1399
  const company = contact.company || p.company;
1414
1400
  const name = [first, last].filter(Boolean).join(" ") || "Unknown contact";
1415
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
1416
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-start gap-2", children: [
1417
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react13.Users, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1418
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "min-w-0 flex-1", children: [
1419
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-sm font-medium text-foreground", children: name }),
1420
- company && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-xs text-muted-foreground", children: company })
1401
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
1402
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-start gap-2", children: [
1403
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react12.Users, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1404
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "min-w-0 flex-1", children: [
1405
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm font-medium text-foreground", children: name }),
1406
+ company && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs text-muted-foreground", children: company })
1421
1407
  ] })
1422
1408
  ] }),
1423
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-wrap gap-x-4 gap-y-1 pl-6", children: [
1424
- email && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
1425
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react13.Mail, { className: "h-3 w-3" }),
1409
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-wrap gap-x-4 gap-y-1 pl-6", children: [
1410
+ email && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
1411
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react12.Mail, { className: "h-3 w-3" }),
1426
1412
  email
1427
1413
  ] }),
1428
- phone && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
1429
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react13.Phone, { className: "h-3 w-3" }),
1414
+ phone && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
1415
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react12.Phone, { className: "h-3 w-3" }),
1430
1416
  phone
1431
1417
  ] })
1432
1418
  ] })
@@ -1434,68 +1420,149 @@ function ContactCard({ contact }) {
1434
1420
  }
1435
1421
  function CompanyCard({ company }) {
1436
1422
  const p = company.properties || {};
1437
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
1438
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-start gap-2", children: [
1439
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react13.Building2, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1440
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "min-w-0 flex-1", children: [
1441
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-sm font-medium text-foreground", children: p.name || "Unknown company" }),
1442
- p.industry && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-xs text-muted-foreground", children: p.industry })
1423
+ const name = company.name || p.name;
1424
+ const domain = company.domain || p.domain;
1425
+ const industry = company.industry || p.industry;
1426
+ const phone = p.phone;
1427
+ const employeeCount = company.employeeCount ?? (p.numberofemployees ? Number(p.numberofemployees) : null);
1428
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
1429
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-start gap-2", children: [
1430
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react12.Building2, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1431
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "min-w-0 flex-1", children: [
1432
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm font-medium text-foreground", children: name || "Unknown company" }),
1433
+ industry && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs text-muted-foreground", children: industry })
1443
1434
  ] })
1444
1435
  ] }),
1445
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-wrap gap-x-4 gap-y-1 pl-6", children: [
1446
- p.domain && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-xs text-muted-foreground", children: p.domain }),
1447
- p.phone && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
1448
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react13.Phone, { className: "h-3 w-3" }),
1449
- p.phone
1436
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-wrap gap-x-4 gap-y-1 pl-6 text-xs text-muted-foreground", children: [
1437
+ domain && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex items-center gap-1", children: [
1438
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react12.Globe, { className: "h-3 w-3" }),
1439
+ domain
1440
+ ] }),
1441
+ phone && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex items-center gap-1", children: [
1442
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react12.Phone, { className: "h-3 w-3" }),
1443
+ phone
1444
+ ] }),
1445
+ employeeCount != null && employeeCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex items-center gap-1", children: [
1446
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react12.Users, { className: "h-3 w-3" }),
1447
+ employeeCount.toLocaleString(),
1448
+ " employees"
1449
+ ] })
1450
+ ] })
1451
+ ] });
1452
+ }
1453
+ function DealCard({ deal }) {
1454
+ const stageBadge = getStageBadge(deal.stage);
1455
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
1456
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-start gap-2", children: [
1457
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react12.Briefcase, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1458
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "min-w-0 flex-1", children: [
1459
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm font-medium text-foreground", children: deal.name || "Untitled deal" }),
1460
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: [
1461
+ deal.amount != null && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex items-center gap-1 text-xs font-medium text-foreground", children: [
1462
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react12.DollarSign, { className: "h-3 w-3" }),
1463
+ formatCurrency(deal.amount)
1464
+ ] }),
1465
+ stageBadge && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1466
+ "span",
1467
+ {
1468
+ className: `rounded-full px-2 py-0.5 text-xs ${stageBadge.className}`,
1469
+ children: stageBadge.label
1470
+ }
1471
+ )
1472
+ ] })
1450
1473
  ] })
1474
+ ] }),
1475
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-wrap gap-x-4 gap-y-1 pl-6 text-xs text-muted-foreground", children: [
1476
+ deal.closeDate && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex items-center gap-1", children: [
1477
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react12.Calendar, { className: "h-3 w-3" }),
1478
+ "Close: ",
1479
+ formatDate(deal.closeDate)
1480
+ ] }),
1481
+ deal.pipeline && deal.pipeline !== "default" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: deal.pipeline })
1451
1482
  ] })
1452
1483
  ] });
1453
1484
  }
1485
+ function ListWrapper({
1486
+ children,
1487
+ hasMore
1488
+ }) {
1489
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "space-y-2", children: [
1490
+ children,
1491
+ hasMore && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs text-muted-foreground text-center pt-1", children: "More results available" })
1492
+ ] });
1493
+ }
1494
+ function hasPaging(data) {
1495
+ if (typeof data !== "object" || data === null) return false;
1496
+ const paging = data.paging;
1497
+ return paging && typeof paging === "object" && paging.next;
1498
+ }
1454
1499
  function HubspotFormatter({ data }) {
1455
1500
  if (isHubspotContact(data)) {
1456
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ContactCard, { contact: data });
1501
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ContactCard, { contact: data });
1502
+ }
1503
+ if (isHubspotDeal(data)) {
1504
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DealCard, { deal: data });
1457
1505
  }
1458
1506
  if (isHubspotCompany(data)) {
1459
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CompanyCard, { company: data });
1507
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CompanyCard, { company: data });
1460
1508
  }
1461
1509
  if (Array.isArray(data)) {
1510
+ const deals = data.filter(isHubspotDeal);
1511
+ if (deals.length > 0) {
1512
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ListWrapper, { children: deals.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DealCard, { deal: d }, d.id || i)) });
1513
+ }
1462
1514
  const contacts = data.filter(isHubspotContact);
1463
1515
  if (contacts.length > 0) {
1464
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "space-y-2", children: contacts.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ContactCard, { contact: c }, c.id || i)) });
1516
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ListWrapper, { children: contacts.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ContactCard, { contact: c }, c.id || i)) });
1465
1517
  }
1466
1518
  const companies = data.filter(isHubspotCompany);
1467
1519
  if (companies.length > 0) {
1468
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "space-y-2", children: companies.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CompanyCard, { company: c }, c.id || i)) });
1520
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ListWrapper, { children: companies.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CompanyCard, { company: c }, c.id || i)) });
1469
1521
  }
1470
1522
  }
1471
- if (typeof data === "object" && data !== null && "contacts" in data) {
1472
- const contacts = data.contacts;
1473
- if (Array.isArray(contacts)) {
1474
- const valid = contacts.filter(isHubspotContact);
1523
+ if (typeof data === "object" && data !== null) {
1524
+ const d = data;
1525
+ const more = hasPaging(data);
1526
+ if ("contacts" in d && Array.isArray(d.contacts)) {
1527
+ const valid = d.contacts.filter(isHubspotContact);
1475
1528
  if (valid.length > 0) {
1476
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "space-y-2", children: valid.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ContactCard, { contact: c }, c.id || i)) });
1529
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ListWrapper, { hasMore: more, children: valid.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ContactCard, { contact: c }, c.id || i)) });
1477
1530
  }
1478
1531
  }
1479
- }
1480
- if (typeof data === "object" && data !== null && "results" in data) {
1481
- const results = data.results;
1482
- if (Array.isArray(results)) {
1532
+ if ("companies" in d && Array.isArray(d.companies)) {
1533
+ const valid = d.companies.filter(isHubspotCompany);
1534
+ if (valid.length > 0) {
1535
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ListWrapper, { hasMore: more, children: valid.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CompanyCard, { company: c }, c.id || i)) });
1536
+ }
1537
+ }
1538
+ if ("deals" in d && Array.isArray(d.deals)) {
1539
+ const valid = d.deals.filter(isHubspotDeal);
1540
+ if (valid.length > 0) {
1541
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ListWrapper, { hasMore: more, children: valid.map((deal, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DealCard, { deal }, deal.id || i)) });
1542
+ }
1543
+ }
1544
+ if ("results" in d && Array.isArray(d.results)) {
1545
+ const results = d.results;
1546
+ const deals = results.filter(isHubspotDeal);
1547
+ if (deals.length > 0) {
1548
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ListWrapper, { hasMore: more, children: deals.map((deal, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DealCard, { deal }, deal.id || i)) });
1549
+ }
1483
1550
  const contacts = results.filter(isHubspotContact);
1484
1551
  if (contacts.length > 0) {
1485
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "space-y-2", children: contacts.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ContactCard, { contact: c }, c.id || i)) });
1552
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ListWrapper, { hasMore: more, children: contacts.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ContactCard, { contact: c }, c.id || i)) });
1486
1553
  }
1487
1554
  const companies = results.filter(isHubspotCompany);
1488
1555
  if (companies.length > 0) {
1489
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "space-y-2", children: companies.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CompanyCard, { company: c }, c.id || i)) });
1556
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ListWrapper, { hasMore: more, children: companies.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CompanyCard, { company: c }, c.id || i)) });
1490
1557
  }
1491
1558
  }
1492
1559
  }
1493
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1560
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1494
1561
  }
1495
1562
 
1496
1563
  // src/ui/formatters/linear.tsx
1497
- var import_lucide_react14 = require("lucide-react");
1498
- var import_jsx_runtime14 = require("react/jsx-runtime");
1564
+ var import_lucide_react13 = require("lucide-react");
1565
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1499
1566
  function isLinearIssue(data) {
1500
1567
  if (typeof data !== "object" || data === null) return false;
1501
1568
  return "title" in data && ("identifier" in data || "state" in data || "priority" in data);
@@ -1514,24 +1581,24 @@ var PRIORITY_LABELS = {
1514
1581
  function IssueCard({ issue }) {
1515
1582
  const priorityInfo = issue.priority !== void 0 ? PRIORITY_LABELS[issue.priority] : null;
1516
1583
  const assigneeName = issue.assignee?.displayName || issue.assignee?.name;
1517
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-start gap-2", children: [
1518
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1519
- import_lucide_react14.CircleDot,
1584
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-start gap-2", children: [
1585
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1586
+ import_lucide_react13.CircleDot,
1520
1587
  {
1521
1588
  className: "h-4 w-4 mt-0.5 shrink-0",
1522
1589
  style: issue.state?.color ? { color: issue.state.color } : void 0
1523
1590
  }
1524
1591
  ),
1525
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "min-w-0 flex-1", children: [
1526
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "text-sm font-medium text-foreground", children: [
1527
- issue.url ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("a", { href: issue.url, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: issue.title }) : issue.title,
1528
- issue.identifier && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "text-muted-foreground font-normal", children: [
1592
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "min-w-0 flex-1", children: [
1593
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "text-sm font-medium text-foreground", children: [
1594
+ issue.url ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("a", { href: issue.url, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: issue.title }) : issue.title,
1595
+ issue.identifier && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "text-muted-foreground font-normal", children: [
1529
1596
  " ",
1530
1597
  issue.identifier
1531
1598
  ] })
1532
1599
  ] }),
1533
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: [
1534
- issue.state?.name && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1600
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: [
1601
+ issue.state?.name && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1535
1602
  "span",
1536
1603
  {
1537
1604
  className: "rounded-full bg-muted px-2 py-0.5 text-xs",
@@ -1539,31 +1606,31 @@ function IssueCard({ issue }) {
1539
1606
  children: issue.state.name
1540
1607
  }
1541
1608
  ),
1542
- priorityInfo && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: `text-xs ${priorityInfo.style}`, children: issue.priorityLabel || priorityInfo.label }),
1543
- assigneeName && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-xs text-muted-foreground", children: assigneeName })
1609
+ priorityInfo && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: `text-xs ${priorityInfo.style}`, children: issue.priorityLabel || priorityInfo.label }),
1610
+ assigneeName && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-xs text-muted-foreground", children: assigneeName })
1544
1611
  ] })
1545
1612
  ] })
1546
1613
  ] }) });
1547
1614
  }
1548
1615
  function ProjectCard({ project }) {
1549
1616
  const progressPercent = project.progress !== void 0 ? Math.round(project.progress * 100) : null;
1550
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-2", children: [
1551
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-start gap-2", children: [
1552
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react14.FolderKanban, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1553
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "min-w-0 flex-1", children: [
1554
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm font-medium text-foreground", children: project.url ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("a", { href: project.url, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: project.name }) : project.name }),
1555
- project.state && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-xs text-muted-foreground", children: project.state })
1617
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-2", children: [
1618
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-start gap-2", children: [
1619
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react13.FolderKanban, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1620
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "min-w-0 flex-1", children: [
1621
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-sm font-medium text-foreground", children: project.url ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("a", { href: project.url, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: project.name }) : project.name }),
1622
+ project.state && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-xs text-muted-foreground", children: project.state })
1556
1623
  ] })
1557
1624
  ] }),
1558
- progressPercent !== null && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "space-y-1", children: [
1559
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "h-1.5 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1625
+ progressPercent !== null && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-1", children: [
1626
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "h-1.5 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1560
1627
  "div",
1561
1628
  {
1562
1629
  className: "h-full rounded-full bg-primary transition-all",
1563
1630
  style: { width: `${progressPercent}%` }
1564
1631
  }
1565
1632
  ) }),
1566
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "text-xs text-muted-foreground text-right", children: [
1633
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "text-xs text-muted-foreground text-right", children: [
1567
1634
  progressPercent,
1568
1635
  "%"
1569
1636
  ] })
@@ -1572,19 +1639,19 @@ function ProjectCard({ project }) {
1572
1639
  }
1573
1640
  function LinearFormatter({ data }) {
1574
1641
  if (isLinearIssue(data)) {
1575
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IssueCard, { issue: data });
1642
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IssueCard, { issue: data });
1576
1643
  }
1577
1644
  if (isLinearProject(data)) {
1578
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ProjectCard, { project: data });
1645
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ProjectCard, { project: data });
1579
1646
  }
1580
1647
  if (Array.isArray(data)) {
1581
1648
  const issues = data.filter(isLinearIssue);
1582
1649
  if (issues.length > 0) {
1583
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "space-y-2", children: issues.map((issue, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IssueCard, { issue }, issue.id || i)) });
1650
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "space-y-2", children: issues.map((issue, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IssueCard, { issue }, issue.id || i)) });
1584
1651
  }
1585
1652
  const projects = data.filter(isLinearProject);
1586
1653
  if (projects.length > 0) {
1587
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "space-y-2", children: projects.map((project, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ProjectCard, { project }, project.id || i)) });
1654
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "space-y-2", children: projects.map((project, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ProjectCard, { project }, project.id || i)) });
1588
1655
  }
1589
1656
  }
1590
1657
  if (typeof data === "object" && data !== null) {
@@ -1592,24 +1659,24 @@ function LinearFormatter({ data }) {
1592
1659
  if (Array.isArray(arr)) {
1593
1660
  const issues = arr.filter(isLinearIssue);
1594
1661
  if (issues.length > 0) {
1595
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "space-y-2", children: issues.map((issue, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IssueCard, { issue }, issue.id || i)) });
1662
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "space-y-2", children: issues.map((issue, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IssueCard, { issue }, issue.id || i)) });
1596
1663
  }
1597
1664
  const projects = arr.filter(isLinearProject);
1598
1665
  if (projects.length > 0) {
1599
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "space-y-2", children: projects.map((project, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ProjectCard, { project }, project.id || i)) });
1666
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "space-y-2", children: projects.map((project, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ProjectCard, { project }, project.id || i)) });
1600
1667
  }
1601
1668
  }
1602
1669
  }
1603
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1670
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1604
1671
  }
1605
1672
 
1606
1673
  // src/ui/formatters/pipedrive.tsx
1607
- var import_lucide_react15 = require("lucide-react");
1608
- var import_jsx_runtime15 = require("react/jsx-runtime");
1674
+ var import_lucide_react14 = require("lucide-react");
1675
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1609
1676
  function isPipedriveDeal(data) {
1610
1677
  return typeof data === "object" && data !== null && ("title" in data || "value" in data || "status" in data) && !("subject" in data);
1611
1678
  }
1612
- function formatCurrency(value, currency) {
1679
+ function formatCurrency2(value, currency) {
1613
1680
  try {
1614
1681
  return new Intl.NumberFormat(void 0, {
1615
1682
  style: "currency",
@@ -1635,37 +1702,37 @@ function getStatusBadge(status) {
1635
1702
  return status ? { label: status, className: "text-muted-foreground bg-muted" } : null;
1636
1703
  }
1637
1704
  }
1638
- function DealCard({ deal }) {
1705
+ function DealCard2({ deal }) {
1639
1706
  const statusBadge = getStatusBadge(deal.status);
1640
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
1641
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-start gap-2", children: [
1642
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react15.Briefcase, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1643
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "min-w-0 flex-1", children: [
1644
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm font-medium text-foreground", children: deal.title || "Untitled deal" }),
1645
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: [
1646
- deal.value !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "flex items-center gap-1 text-xs font-medium text-foreground", children: [
1647
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react15.DollarSign, { className: "h-3 w-3" }),
1648
- formatCurrency(deal.value, deal.currency)
1707
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
1708
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-start gap-2", children: [
1709
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react14.Briefcase, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1710
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "min-w-0 flex-1", children: [
1711
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm font-medium text-foreground", children: deal.title || "Untitled deal" }),
1712
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: [
1713
+ deal.value !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "flex items-center gap-1 text-xs font-medium text-foreground", children: [
1714
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react14.DollarSign, { className: "h-3 w-3" }),
1715
+ formatCurrency2(deal.value, deal.currency)
1649
1716
  ] }),
1650
- statusBadge && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: `rounded-full px-2 py-0.5 text-xs ${statusBadge.className}`, children: statusBadge.label })
1717
+ statusBadge && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: `rounded-full px-2 py-0.5 text-xs ${statusBadge.className}`, children: statusBadge.label })
1651
1718
  ] })
1652
1719
  ] })
1653
1720
  ] }),
1654
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-wrap gap-x-4 gap-y-1 pl-6 text-xs text-muted-foreground", children: [
1655
- deal.person_name && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: deal.person_name }),
1656
- deal.org_name && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: deal.org_name }),
1657
- deal.stage_name && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: deal.stage_name })
1721
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-wrap gap-x-4 gap-y-1 pl-6 text-xs text-muted-foreground", children: [
1722
+ deal.person_name && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: deal.person_name }),
1723
+ deal.org_name && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: deal.org_name }),
1724
+ deal.stage_name && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: deal.stage_name })
1658
1725
  ] })
1659
1726
  ] });
1660
1727
  }
1661
1728
  function PipedriveFormatter({ data }) {
1662
1729
  if (isPipedriveDeal(data)) {
1663
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DealCard, { deal: data });
1730
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DealCard2, { deal: data });
1664
1731
  }
1665
1732
  if (Array.isArray(data)) {
1666
1733
  const deals = data.filter(isPipedriveDeal);
1667
1734
  if (deals.length > 0) {
1668
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "space-y-2", children: deals.map((deal, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DealCard, { deal }, deal.id || i)) });
1735
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "space-y-2", children: deals.map((deal, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DealCard2, { deal }, deal.id || i)) });
1669
1736
  }
1670
1737
  }
1671
1738
  if (typeof data === "object" && data !== null && "deals" in data) {
@@ -1673,14 +1740,14 @@ function PipedriveFormatter({ data }) {
1673
1740
  if (Array.isArray(items)) {
1674
1741
  const deals = items.filter(isPipedriveDeal);
1675
1742
  if (deals.length > 0) {
1676
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "space-y-2", children: deals.map((deal, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DealCard, { deal }, deal.id || i)) });
1743
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "space-y-2", children: deals.map((deal, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DealCard2, { deal }, deal.id || i)) });
1677
1744
  }
1678
1745
  }
1679
1746
  }
1680
1747
  if (typeof data === "object" && data !== null && "deal" in data) {
1681
1748
  const item = data.deal;
1682
1749
  if (isPipedriveDeal(item)) {
1683
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DealCard, { deal: item });
1750
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DealCard2, { deal: item });
1684
1751
  }
1685
1752
  }
1686
1753
  if (typeof data === "object" && data !== null && "data" in data) {
@@ -1688,19 +1755,19 @@ function PipedriveFormatter({ data }) {
1688
1755
  if (Array.isArray(items)) {
1689
1756
  const deals = items.filter(isPipedriveDeal);
1690
1757
  if (deals.length > 0) {
1691
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "space-y-2", children: deals.map((deal, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DealCard, { deal }, deal.id || i)) });
1758
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "space-y-2", children: deals.map((deal, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DealCard2, { deal }, deal.id || i)) });
1692
1759
  }
1693
1760
  }
1694
1761
  if (isPipedriveDeal(items)) {
1695
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DealCard, { deal: items });
1762
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DealCard2, { deal: items });
1696
1763
  }
1697
1764
  }
1698
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1765
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1699
1766
  }
1700
1767
 
1701
1768
  // src/ui/formatters/compute.tsx
1702
- var import_lucide_react16 = require("lucide-react");
1703
- var import_jsx_runtime16 = require("react/jsx-runtime");
1769
+ var import_lucide_react15 = require("lucide-react");
1770
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1704
1771
  function isComputeData(data) {
1705
1772
  if (typeof data !== "object" || data === null) return false;
1706
1773
  return "stdout" in data || "stderr" in data || "exit_code" in data || "exitCode" in data || "output" in data;
@@ -1712,47 +1779,47 @@ function formatDuration(ms) {
1712
1779
  }
1713
1780
  function ComputeFormatter({ data }) {
1714
1781
  if (!isComputeData(data)) {
1715
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1782
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1716
1783
  }
1717
1784
  const exitCode = data.exit_code ?? data.exitCode;
1718
1785
  const duration = data.duration_ms ?? data.duration;
1719
1786
  const stdout = data.stdout || data.output || "";
1720
1787
  const stderr = data.stderr || data.error || "";
1721
1788
  const success = exitCode === void 0 || exitCode === 0;
1722
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-2", children: [
1723
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "rounded-lg border border-border bg-background overflow-hidden", children: [
1724
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-2 px-3 py-1.5 bg-muted border-b border-border", children: [
1725
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react16.Terminal, { className: "h-3.5 w-3.5 text-muted-foreground" }),
1726
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xs text-muted-foreground flex-1", children: "Output" }),
1727
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-2", children: [
1728
- duration !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xs text-muted-foreground", children: formatDuration(duration) }),
1729
- exitCode !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: `inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs ${success ? "text-green-500 bg-green-500/10" : "text-destructive bg-destructive/10"}`, children: [
1730
- success ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react16.Check, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react16.X, { className: "h-3 w-3" }),
1789
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "space-y-2", children: [
1790
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "rounded-lg border border-border bg-background overflow-hidden", children: [
1791
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2 px-3 py-1.5 bg-muted border-b border-border", children: [
1792
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react15.Terminal, { className: "h-3.5 w-3.5 text-muted-foreground" }),
1793
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-xs text-muted-foreground flex-1", children: "Output" }),
1794
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2", children: [
1795
+ duration !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-xs text-muted-foreground", children: formatDuration(duration) }),
1796
+ exitCode !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: `inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs ${success ? "text-green-500 bg-green-500/10" : "text-destructive bg-destructive/10"}`, children: [
1797
+ success ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react15.Check, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react15.X, { className: "h-3 w-3" }),
1731
1798
  "exit ",
1732
1799
  exitCode
1733
1800
  ] })
1734
1801
  ] })
1735
1802
  ] }),
1736
- stdout && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("pre", { className: "p-3 text-xs text-foreground overflow-x-auto max-h-80 overflow-y-auto font-mono whitespace-pre-wrap", children: stdout }),
1737
- stderr && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "border-t border-border", children: [
1738
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-1.5 px-3 py-1 bg-destructive/5", children: [
1739
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react16.AlertTriangle, { className: "h-3 w-3 text-destructive" }),
1740
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xs text-destructive", children: "stderr" })
1803
+ stdout && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("pre", { className: "p-3 text-xs text-foreground overflow-x-auto max-h-80 overflow-y-auto font-mono whitespace-pre-wrap", children: stdout }),
1804
+ stderr && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "border-t border-border", children: [
1805
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-1.5 px-3 py-1 bg-destructive/5", children: [
1806
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react15.AlertTriangle, { className: "h-3 w-3 text-destructive" }),
1807
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-xs text-destructive", children: "stderr" })
1741
1808
  ] }),
1742
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("pre", { className: "p-3 text-xs text-destructive overflow-x-auto max-h-40 overflow-y-auto font-mono whitespace-pre-wrap", children: stderr })
1809
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("pre", { className: "p-3 text-xs text-destructive overflow-x-auto max-h-40 overflow-y-auto font-mono whitespace-pre-wrap", children: stderr })
1743
1810
  ] }),
1744
- !stdout && !stderr && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "p-3 text-xs text-muted-foreground italic", children: "No output" })
1811
+ !stdout && !stderr && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "p-3 text-xs text-muted-foreground italic", children: "No output" })
1745
1812
  ] }),
1746
- data.files && data.files.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "space-y-1", children: data.files.map((file, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-card p-2", children: [
1747
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react16.Terminal, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }),
1748
- file.url ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("a", { href: file.url, target: "_blank", rel: "noopener noreferrer", className: "text-xs text-primary hover:underline truncate", children: file.name || file.url }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xs text-foreground truncate", children: file.name })
1813
+ data.files && data.files.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "space-y-1", children: data.files.map((file, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-card p-2", children: [
1814
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react15.Terminal, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }),
1815
+ file.url ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: file.url, target: "_blank", rel: "noopener noreferrer", className: "text-xs text-primary hover:underline truncate", children: file.name || file.url }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-xs text-foreground truncate", children: file.name })
1749
1816
  ] }, i)) })
1750
1817
  ] });
1751
1818
  }
1752
1819
 
1753
1820
  // src/ui/formatters/resend.tsx
1754
- var import_lucide_react17 = require("lucide-react");
1755
- var import_jsx_runtime17 = require("react/jsx-runtime");
1821
+ var import_lucide_react16 = require("lucide-react");
1822
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1756
1823
  function isResendData(data) {
1757
1824
  return typeof data === "object" && data !== null && ("id" in data || "to" in data) && ("subject" in data || "from" in data || "created_at" in data);
1758
1825
  }
@@ -1770,49 +1837,49 @@ function formatTimestamp(dateStr) {
1770
1837
  }
1771
1838
  }
1772
1839
  function ResendCard({ email }) {
1773
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-2", children: [
1774
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-start gap-2", children: [
1775
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-green-500/10 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react17.Send, { className: "h-4 w-4 text-green-500" }) }),
1776
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "min-w-0 flex-1", children: [
1777
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-sm font-medium text-foreground", children: "Email sent" }),
1778
- email.subject && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xs text-muted-foreground truncate", children: email.subject })
1840
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-2", children: [
1841
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-start gap-2", children: [
1842
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-green-500/10 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react16.Send, { className: "h-4 w-4 text-green-500" }) }),
1843
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "min-w-0 flex-1", children: [
1844
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-sm font-medium text-foreground", children: "Email sent" }),
1845
+ email.subject && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-xs text-muted-foreground truncate", children: email.subject })
1779
1846
  ] })
1780
1847
  ] }),
1781
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "pl-10 space-y-1 text-xs text-muted-foreground", children: [
1782
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
1783
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-foreground", children: "To:" }),
1848
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "pl-10 space-y-1 text-xs text-muted-foreground", children: [
1849
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { children: [
1850
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-foreground", children: "To:" }),
1784
1851
  " ",
1785
1852
  formatRecipients2(email.to)
1786
1853
  ] }),
1787
- email.from && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
1788
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-foreground", children: "From:" }),
1854
+ email.from && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { children: [
1855
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-foreground", children: "From:" }),
1789
1856
  " ",
1790
1857
  email.from
1791
1858
  ] }),
1792
- email.created_at && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "flex items-center gap-1", children: [
1793
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react17.Clock, { className: "h-3 w-3" }),
1859
+ email.created_at && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { className: "flex items-center gap-1", children: [
1860
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react16.Clock, { className: "h-3 w-3" }),
1794
1861
  formatTimestamp(email.created_at)
1795
1862
  ] }),
1796
- email.last_event && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "inline-block rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground capitalize", children: email.last_event })
1863
+ email.last_event && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "inline-block rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground capitalize", children: email.last_event })
1797
1864
  ] })
1798
1865
  ] });
1799
1866
  }
1800
1867
  function ResendFormatter({ data }) {
1801
1868
  if (isResendData(data)) {
1802
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ResendCard, { email: data });
1869
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ResendCard, { email: data });
1803
1870
  }
1804
1871
  if (typeof data === "object" && data !== null && "data" in data) {
1805
1872
  const inner = data.data;
1806
1873
  if (isResendData(inner)) {
1807
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ResendCard, { email: inner });
1874
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ResendCard, { email: inner });
1808
1875
  }
1809
1876
  }
1810
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1877
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1811
1878
  }
1812
1879
 
1813
1880
  // src/ui/formatters/inbox.tsx
1814
- var import_lucide_react18 = require("lucide-react");
1815
- var import_jsx_runtime18 = require("react/jsx-runtime");
1881
+ var import_lucide_react17 = require("lucide-react");
1882
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1816
1883
  function isInboxEvent(data) {
1817
1884
  if (typeof data !== "object" || data === null) return false;
1818
1885
  if ("event_type" in data || "summary" in data) return true;
@@ -1828,13 +1895,13 @@ function resolveEventType(event) {
1828
1895
  function getEventIcon(type) {
1829
1896
  switch (type) {
1830
1897
  case "email":
1831
- return import_lucide_react18.Mail;
1898
+ return import_lucide_react17.Mail;
1832
1899
  case "message":
1833
- return import_lucide_react18.MessageSquare;
1900
+ return import_lucide_react17.MessageSquare;
1834
1901
  case "calendar":
1835
- return import_lucide_react18.Calendar;
1902
+ return import_lucide_react17.Calendar;
1836
1903
  default:
1837
- return import_lucide_react18.Bell;
1904
+ return import_lucide_react17.Bell;
1838
1905
  }
1839
1906
  }
1840
1907
  function formatTimestamp2(dateStr) {
@@ -1860,30 +1927,30 @@ function EventCard2({ event }) {
1860
1927
  const source = event.provider || event.source;
1861
1928
  const snippet = event.description || event.payload?.snippet || event.payload?.text;
1862
1929
  const isUnread = event.status === "unread" || event.read === false;
1863
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
1864
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-start gap-2", children: [
1865
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1866
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "min-w-0 flex-1", children: [
1867
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2", children: [
1868
- eventType && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground capitalize", children: eventType }),
1869
- source && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xs text-muted-foreground capitalize", children: source }),
1870
- isUnread && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-primary shrink-0" }),
1871
- timestamp && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xs text-muted-foreground ml-auto shrink-0", children: formatTimestamp2(timestamp) })
1930
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
1931
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-start gap-2", children: [
1932
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
1933
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "min-w-0 flex-1", children: [
1934
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-2", children: [
1935
+ eventType && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground capitalize", children: eventType }),
1936
+ source && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-xs text-muted-foreground capitalize", children: source }),
1937
+ isUnread && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-primary shrink-0" }),
1938
+ timestamp && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-xs text-muted-foreground ml-auto shrink-0", children: formatTimestamp2(timestamp) })
1872
1939
  ] }),
1873
- title && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm font-medium text-foreground mt-1 line-clamp-1", children: title })
1940
+ title && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-sm font-medium text-foreground mt-1 line-clamp-1", children: title })
1874
1941
  ] })
1875
1942
  ] }),
1876
- snippet && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-2 pl-6", children: snippet })
1943
+ snippet && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-2 pl-6", children: snippet })
1877
1944
  ] });
1878
1945
  }
1879
1946
  function InboxFormatter({ data }) {
1880
1947
  if (isInboxEvent(data)) {
1881
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EventCard2, { event: data });
1948
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EventCard2, { event: data });
1882
1949
  }
1883
1950
  if (Array.isArray(data)) {
1884
1951
  const events = data.filter(isInboxEvent);
1885
1952
  if (events.length > 0) {
1886
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-2", children: events.map((event, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EventCard2, { event }, event.id || i)) });
1953
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "space-y-2", children: events.map((event, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EventCard2, { event }, event.id || i)) });
1887
1954
  }
1888
1955
  }
1889
1956
  if (typeof data === "object" && data !== null && "events" in data) {
@@ -1891,16 +1958,16 @@ function InboxFormatter({ data }) {
1891
1958
  if (Array.isArray(events)) {
1892
1959
  const inboxEvents = events.filter(isInboxEvent);
1893
1960
  if (inboxEvents.length > 0) {
1894
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-2", children: inboxEvents.map((event, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EventCard2, { event }, event.id || i)) });
1961
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "space-y-2", children: inboxEvents.map((event, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EventCard2, { event }, event.id || i)) });
1895
1962
  }
1896
1963
  }
1897
1964
  }
1898
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1965
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1899
1966
  }
1900
1967
 
1901
1968
  // src/ui/formatters/discord.tsx
1902
- var import_lucide_react19 = require("lucide-react");
1903
- var import_jsx_runtime19 = require("react/jsx-runtime");
1969
+ var import_lucide_react18 = require("lucide-react");
1970
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1904
1971
  function isGuildData(data) {
1905
1972
  return typeof data === "object" && data !== null && "name" in data && ("owner" in data || "member_count" in data || "icon" in data);
1906
1973
  }
@@ -1928,75 +1995,75 @@ function formatRelativeDate3(dateStr) {
1928
1995
  }
1929
1996
  }
1930
1997
  function GuildCard({ guild }) {
1931
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: [
1932
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-2", children: [
1933
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react19.Shield, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
1934
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-sm font-medium text-foreground flex-1", children: guild.name }),
1935
- guild.owner && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "rounded-full bg-yellow-500/10 px-2 py-0.5 text-xs text-yellow-600", children: "Owner" })
1998
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: [
1999
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2", children: [
2000
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react18.Shield, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
2001
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-sm font-medium text-foreground flex-1", children: guild.name }),
2002
+ guild.owner && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "rounded-full bg-yellow-500/10 px-2 py-0.5 text-xs text-yellow-600", children: "Owner" })
1936
2003
  ] }),
1937
- guild.member_count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-1 pl-6 text-xs text-muted-foreground", children: [
1938
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react19.Users, { className: "h-3 w-3" }),
2004
+ guild.member_count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-1 pl-6 text-xs text-muted-foreground", children: [
2005
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react18.Users, { className: "h-3 w-3" }),
1939
2006
  guild.member_count,
1940
2007
  " members"
1941
2008
  ] })
1942
2009
  ] });
1943
2010
  }
1944
2011
  function ChannelCard2({ channel }) {
1945
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-card p-3", children: [
1946
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react19.Hash, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
1947
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-sm text-foreground flex-1", children: channel.name || channel.id }),
1948
- channel.member_count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
2012
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-card p-3", children: [
2013
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react18.Hash, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
2014
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-sm text-foreground flex-1", children: channel.name || channel.id }),
2015
+ channel.member_count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
1949
2016
  channel.member_count,
1950
2017
  " members"
1951
2018
  ] })
1952
2019
  ] });
1953
2020
  }
1954
2021
  function MessageCard({ message }) {
1955
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
1956
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-2", children: [
1957
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react19.MessageSquare, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
1958
- message.author?.username && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-xs font-medium text-foreground", children: message.author.username }),
1959
- message.timestamp && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-xs text-muted-foreground ml-auto", children: formatRelativeDate3(message.timestamp) })
2022
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2023
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2", children: [
2024
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react18.MessageSquare, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
2025
+ message.author?.username && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xs font-medium text-foreground", children: message.author.username }),
2026
+ message.timestamp && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xs text-muted-foreground ml-auto", children: formatRelativeDate3(message.timestamp) })
1960
2027
  ] }),
1961
- message.content && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm text-foreground line-clamp-3", children: message.content })
2028
+ message.content && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm text-foreground line-clamp-3", children: message.content })
1962
2029
  ] });
1963
2030
  }
1964
2031
  function DiscordFormatter({ data }) {
1965
2032
  if (typeof data === "object" && data !== null && "guilds" in data) {
1966
2033
  const guilds = data.guilds;
1967
2034
  if (Array.isArray(guilds)) {
1968
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-1.5", children: guilds.filter(isGuildData).map((g, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(GuildCard, { guild: g }, g.id || i)) });
2035
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-1.5", children: guilds.filter(isGuildData).map((g, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(GuildCard, { guild: g }, g.id || i)) });
1969
2036
  }
1970
2037
  }
1971
2038
  if (typeof data === "object" && data !== null && "channels" in data) {
1972
2039
  const channels = data.channels;
1973
2040
  if (Array.isArray(channels)) {
1974
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-1.5", children: channels.filter(isChannelData).map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ChannelCard2, { channel: c }, c.id || i)) });
2041
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-1.5", children: channels.filter(isChannelData).map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChannelCard2, { channel: c }, c.id || i)) });
1975
2042
  }
1976
2043
  }
1977
2044
  if (typeof data === "object" && data !== null && "messages" in data) {
1978
2045
  const messages = data.messages;
1979
2046
  if (Array.isArray(messages)) {
1980
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-2", children: messages.filter(isMessageData).map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MessageCard, { message: m }, m.id || i)) });
2047
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-2", children: messages.filter(isMessageData).map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MessageCard, { message: m }, m.id || i)) });
1981
2048
  }
1982
2049
  }
1983
- if (isMessageData(data)) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MessageCard, { message: data });
2050
+ if (isMessageData(data)) return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MessageCard, { message: data });
1984
2051
  if (Array.isArray(data)) {
1985
2052
  const guilds = data.filter(isGuildData);
1986
2053
  if (guilds.length > 0) {
1987
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-1.5", children: guilds.map((g, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(GuildCard, { guild: g }, g.id || i)) });
2054
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-1.5", children: guilds.map((g, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(GuildCard, { guild: g }, g.id || i)) });
1988
2055
  }
1989
2056
  const messages = data.filter(isMessageData);
1990
2057
  if (messages.length > 0) {
1991
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-2", children: messages.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MessageCard, { message: m }, m.id || i)) });
2058
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-2", children: messages.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MessageCard, { message: m }, m.id || i)) });
1992
2059
  }
1993
2060
  }
1994
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2061
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
1995
2062
  }
1996
2063
 
1997
2064
  // src/ui/formatters/notion.tsx
1998
- var import_lucide_react20 = require("lucide-react");
1999
- var import_jsx_runtime20 = require("react/jsx-runtime");
2065
+ var import_lucide_react19 = require("lucide-react");
2066
+ var import_jsx_runtime19 = require("react/jsx-runtime");
2000
2067
  function isNotionPage(data) {
2001
2068
  if (typeof data !== "object" || data === null) return false;
2002
2069
  if ("properties" in data) return true;
@@ -2047,26 +2114,26 @@ function formatRelativeDate4(dateStr) {
2047
2114
  }
2048
2115
  function PageCard({ page }) {
2049
2116
  const title = extractPageTitle(page);
2050
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-start gap-2", children: [
2051
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react20.FileText, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2052
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm font-medium text-foreground truncate", children: page.url ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("a", { href: page.url, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: title }) : title }) }),
2053
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-1.5 shrink-0", children: [
2054
- (page.last_edited_time || page.lastEditedTime) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2055
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react20.Clock, { className: "h-3 w-3" }),
2117
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-start gap-2", children: [
2118
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react19.FileText, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2119
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm font-medium text-foreground truncate", children: page.url ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("a", { href: page.url, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: title }) : title }) }),
2120
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-1.5 shrink-0", children: [
2121
+ (page.last_edited_time || page.lastEditedTime) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2122
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react19.Clock, { className: "h-3 w-3" }),
2056
2123
  formatRelativeDate4(page.last_edited_time || page.lastEditedTime)
2057
2124
  ] }),
2058
- page.url && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("a", { href: page.url, target: "_blank", rel: "noopener noreferrer", className: "text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react20.ExternalLink, { className: "h-3 w-3" }) })
2125
+ page.url && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("a", { href: page.url, target: "_blank", rel: "noopener noreferrer", className: "text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react19.ExternalLink, { className: "h-3 w-3" }) })
2059
2126
  ] })
2060
2127
  ] }) });
2061
2128
  }
2062
2129
  function DatabaseCard({ db }) {
2063
2130
  const title = typeof db.title === "string" ? db.title : Array.isArray(db.title) && db.title.length > 0 ? db.title.map((t) => t.plain_text || "").join("") : "Untitled database";
2064
2131
  const desc = typeof db.description === "string" ? db.description : Array.isArray(db.description) && db.description.length > 0 ? db.description.map((d) => d.plain_text || "").join("") : null;
2065
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-start gap-2", children: [
2066
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react20.Database, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2067
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "min-w-0 flex-1", children: [
2068
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm font-medium text-foreground truncate", children: db.url ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("a", { href: db.url, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: title }) : title }),
2069
- desc && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-2", children: desc })
2132
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-start gap-2", children: [
2133
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react19.Database, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2134
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "min-w-0 flex-1", children: [
2135
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm font-medium text-foreground truncate", children: db.url ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("a", { href: db.url, target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: title }) : title }),
2136
+ desc && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-2", children: desc })
2070
2137
  ] })
2071
2138
  ] }) });
2072
2139
  }
@@ -2074,13 +2141,13 @@ function NotionFormatter({ data }) {
2074
2141
  if (typeof data === "object" && data !== null && "pages" in data) {
2075
2142
  const pages = data.pages;
2076
2143
  if (Array.isArray(pages)) {
2077
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "space-y-1.5", children: pages.filter(isNotionPage).map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PageCard, { page: p }, p.id || i)) });
2144
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-1.5", children: pages.filter(isNotionPage).map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PageCard, { page: p }, p.id || i)) });
2078
2145
  }
2079
2146
  }
2080
2147
  if (typeof data === "object" && data !== null && "databases" in data) {
2081
2148
  const dbs = data.databases;
2082
2149
  if (Array.isArray(dbs)) {
2083
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "space-y-1.5", children: dbs.filter(isNotionDatabase).map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DatabaseCard, { db: d }, d.id || i)) });
2150
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-1.5", children: dbs.filter(isNotionDatabase).map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DatabaseCard, { db: d }, d.id || i)) });
2084
2151
  }
2085
2152
  }
2086
2153
  if (typeof data === "object" && data !== null && "results" in data) {
@@ -2088,28 +2155,28 @@ function NotionFormatter({ data }) {
2088
2155
  if (Array.isArray(results)) {
2089
2156
  const pages = results.filter(isNotionPage);
2090
2157
  if (pages.length > 0) {
2091
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "space-y-1.5", children: pages.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PageCard, { page: p }, p.id || i)) });
2158
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-1.5", children: pages.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PageCard, { page: p }, p.id || i)) });
2092
2159
  }
2093
2160
  const dbs = results.filter(isNotionDatabase);
2094
2161
  if (dbs.length > 0) {
2095
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "space-y-1.5", children: dbs.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DatabaseCard, { db: d }, d.id || i)) });
2162
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-1.5", children: dbs.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DatabaseCard, { db: d }, d.id || i)) });
2096
2163
  }
2097
2164
  }
2098
2165
  }
2099
- if (isNotionPage(data)) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PageCard, { page: data });
2100
- if (isNotionDatabase(data)) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DatabaseCard, { db: data });
2166
+ if (isNotionPage(data)) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PageCard, { page: data });
2167
+ if (isNotionDatabase(data)) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DatabaseCard, { db: data });
2101
2168
  if (Array.isArray(data)) {
2102
2169
  const pages = data.filter(isNotionPage);
2103
2170
  if (pages.length > 0) {
2104
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "space-y-1.5", children: pages.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PageCard, { page: p }, p.id || i)) });
2171
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-1.5", children: pages.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PageCard, { page: p }, p.id || i)) });
2105
2172
  }
2106
2173
  }
2107
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2174
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2108
2175
  }
2109
2176
 
2110
2177
  // src/ui/formatters/twitter.tsx
2111
- var import_lucide_react21 = require("lucide-react");
2112
- var import_jsx_runtime21 = require("react/jsx-runtime");
2178
+ var import_lucide_react20 = require("lucide-react");
2179
+ var import_jsx_runtime20 = require("react/jsx-runtime");
2113
2180
  function isTweetData(data) {
2114
2181
  return typeof data === "object" && data !== null && "text" in data;
2115
2182
  }
@@ -2135,31 +2202,31 @@ function TweetCard({ tweet }) {
2135
2202
  const likes = tweet.public_metrics?.like_count ?? tweet.like_count;
2136
2203
  const retweets = tweet.public_metrics?.retweet_count ?? tweet.retweet_count;
2137
2204
  const replies = tweet.public_metrics?.reply_count;
2138
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2139
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-2", children: [
2140
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react21.MessageCircle, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
2141
- username && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "text-xs font-medium text-foreground", children: [
2205
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2206
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2", children: [
2207
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react20.MessageCircle, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
2208
+ username && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "text-xs font-medium text-foreground", children: [
2142
2209
  "@",
2143
2210
  username
2144
2211
  ] }),
2145
- tweet.author?.name && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-xs text-muted-foreground", children: tweet.author.name }),
2146
- tweet.created_at && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto", children: [
2147
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react21.Clock, { className: "h-3 w-3" }),
2212
+ tweet.author?.name && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-xs text-muted-foreground", children: tweet.author.name }),
2213
+ tweet.created_at && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto", children: [
2214
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react20.Clock, { className: "h-3 w-3" }),
2148
2215
  formatRelativeDate5(tweet.created_at)
2149
2216
  ] })
2150
2217
  ] }),
2151
- tweet.text && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm text-foreground line-clamp-4", children: tweet.text }),
2152
- (likes !== void 0 || retweets !== void 0 || replies !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-4 pt-0.5", children: [
2153
- likes !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2154
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react21.Heart, { className: "h-3 w-3" }),
2218
+ tweet.text && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm text-foreground line-clamp-4", children: tweet.text }),
2219
+ (likes !== void 0 || retweets !== void 0 || replies !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-4 pt-0.5", children: [
2220
+ likes !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2221
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react20.Heart, { className: "h-3 w-3" }),
2155
2222
  likes
2156
2223
  ] }),
2157
- retweets !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2158
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react21.Repeat2, { className: "h-3 w-3" }),
2224
+ retweets !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2225
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react20.Repeat2, { className: "h-3 w-3" }),
2159
2226
  retweets
2160
2227
  ] }),
2161
- replies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2162
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react21.MessageCircle, { className: "h-3 w-3" }),
2228
+ replies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2229
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react20.MessageCircle, { className: "h-3 w-3" }),
2163
2230
  replies
2164
2231
  ] })
2165
2232
  ] })
@@ -2169,26 +2236,26 @@ function TwitterFormatter({ data }) {
2169
2236
  if (typeof data === "object" && data !== null && "tweets" in data) {
2170
2237
  const tweets = data.tweets;
2171
2238
  if (Array.isArray(tweets)) {
2172
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "space-y-2", children: tweets.filter(isTweetData).map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TweetCard, { tweet: t }, t.id || i)) });
2239
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "space-y-2", children: tweets.filter(isTweetData).map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TweetCard, { tweet: t }, t.id || i)) });
2173
2240
  }
2174
2241
  }
2175
2242
  if (typeof data === "object" && data !== null && "data" in data && Array.isArray(data.data)) {
2176
2243
  const tweets = data.data;
2177
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "space-y-2", children: tweets.filter(isTweetData).map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TweetCard, { tweet: t }, t.id || i)) });
2244
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "space-y-2", children: tweets.filter(isTweetData).map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TweetCard, { tweet: t }, t.id || i)) });
2178
2245
  }
2179
- if (isTweetData(data)) return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TweetCard, { tweet: data });
2246
+ if (isTweetData(data)) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TweetCard, { tweet: data });
2180
2247
  if (Array.isArray(data)) {
2181
2248
  const tweets = data.filter(isTweetData);
2182
2249
  if (tweets.length > 0) {
2183
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "space-y-2", children: tweets.map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TweetCard, { tweet: t }, t.id || i)) });
2250
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "space-y-2", children: tweets.map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TweetCard, { tweet: t }, t.id || i)) });
2184
2251
  }
2185
2252
  }
2186
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2253
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2187
2254
  }
2188
2255
 
2189
2256
  // src/ui/formatters/telegram.tsx
2190
- var import_lucide_react22 = require("lucide-react");
2191
- var import_jsx_runtime22 = require("react/jsx-runtime");
2257
+ var import_lucide_react21 = require("lucide-react");
2258
+ var import_jsx_runtime21 = require("react/jsx-runtime");
2192
2259
  function isTelegramMessage(data) {
2193
2260
  return typeof data === "object" && data !== null && ("text" in data || "message_id" in data);
2194
2261
  }
@@ -2211,27 +2278,27 @@ function formatUnixDate(ts) {
2211
2278
  }
2212
2279
  function MessageCard2({ message }) {
2213
2280
  const fromName = message.from ? [message.from.first_name, message.from.last_name].filter(Boolean).join(" ") || message.from.username : void 0;
2214
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2215
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-2", children: [
2216
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react22.MessageSquare, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
2217
- fromName && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "flex items-center gap-1 text-xs font-medium text-foreground", children: [
2218
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react22.User, { className: "h-3 w-3" }),
2281
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2282
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-2", children: [
2283
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react21.MessageSquare, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
2284
+ fromName && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "flex items-center gap-1 text-xs font-medium text-foreground", children: [
2285
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react21.User, { className: "h-3 w-3" }),
2219
2286
  fromName
2220
2287
  ] }),
2221
- message.chat?.title && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-xs text-muted-foreground", children: message.chat.title }),
2222
- message.date && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto", children: [
2223
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react22.Clock, { className: "h-3 w-3" }),
2288
+ message.chat?.title && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-xs text-muted-foreground", children: message.chat.title }),
2289
+ message.date && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto", children: [
2290
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react21.Clock, { className: "h-3 w-3" }),
2224
2291
  formatUnixDate(message.date)
2225
2292
  ] })
2226
2293
  ] }),
2227
- message.text && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm text-foreground line-clamp-3", children: message.text })
2294
+ message.text && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm text-foreground line-clamp-3", children: message.text })
2228
2295
  ] });
2229
2296
  }
2230
2297
  function TelegramFormatter({ data }) {
2231
2298
  if (typeof data === "object" && data !== null && "messages" in data) {
2232
2299
  const msgs = data.messages;
2233
2300
  if (Array.isArray(msgs)) {
2234
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-2", children: msgs.filter(isTelegramMessage).map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MessageCard2, { message: m }, m.message_id || i)) });
2301
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "space-y-2", children: msgs.filter(isTelegramMessage).map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MessageCard2, { message: m }, m.message_id || i)) });
2235
2302
  }
2236
2303
  }
2237
2304
  if (typeof data === "object" && data !== null && "result" in data) {
@@ -2239,23 +2306,23 @@ function TelegramFormatter({ data }) {
2239
2306
  if (Array.isArray(result)) {
2240
2307
  const msgs = result.filter(isTelegramMessage);
2241
2308
  if (msgs.length > 0) {
2242
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-2", children: msgs.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MessageCard2, { message: m }, m.message_id || i)) });
2309
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "space-y-2", children: msgs.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MessageCard2, { message: m }, m.message_id || i)) });
2243
2310
  }
2244
2311
  }
2245
2312
  }
2246
- if (isTelegramMessage(data)) return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MessageCard2, { message: data });
2313
+ if (isTelegramMessage(data)) return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MessageCard2, { message: data });
2247
2314
  if (Array.isArray(data)) {
2248
2315
  const msgs = data.filter(isTelegramMessage);
2249
2316
  if (msgs.length > 0) {
2250
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-2", children: msgs.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MessageCard2, { message: m }, m.message_id || i)) });
2317
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "space-y-2", children: msgs.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MessageCard2, { message: m }, m.message_id || i)) });
2251
2318
  }
2252
2319
  }
2253
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2320
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2254
2321
  }
2255
2322
 
2256
2323
  // src/ui/formatters/stripe.tsx
2257
- var import_lucide_react23 = require("lucide-react");
2258
- var import_jsx_runtime23 = require("react/jsx-runtime");
2324
+ var import_lucide_react22 = require("lucide-react");
2325
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2259
2326
  function isCustomer(data) {
2260
2327
  return typeof data === "object" && data !== null && ("email" in data || "name" in data) && !("amount_due" in data) && !("plan" in data);
2261
2328
  }
@@ -2294,106 +2361,106 @@ var STATUS_STYLES = {
2294
2361
  trialing: "bg-yellow-500/10 text-yellow-600"
2295
2362
  };
2296
2363
  function StatusBadge({ status }) {
2297
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: `rounded-full px-2 py-0.5 text-xs ${STATUS_STYLES[status] || "bg-muted text-muted-foreground"}`, children: status });
2364
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: `rounded-full px-2 py-0.5 text-xs ${STATUS_STYLES[status] || "bg-muted text-muted-foreground"}`, children: status });
2298
2365
  }
2299
2366
  function CustomerCard({ customer }) {
2300
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-start gap-2", children: [
2301
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react23.User, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2302
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "min-w-0 flex-1", children: [
2303
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-sm font-medium text-foreground", children: customer.name || "Unnamed customer" }),
2304
- customer.email && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs text-muted-foreground", children: customer.email })
2367
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-start gap-2", children: [
2368
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react22.User, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2369
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "min-w-0 flex-1", children: [
2370
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm font-medium text-foreground", children: customer.name || "Unnamed customer" }),
2371
+ customer.email && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-xs text-muted-foreground", children: customer.email })
2305
2372
  ] })
2306
2373
  ] }) });
2307
2374
  }
2308
2375
  function InvoiceCard({ invoice }) {
2309
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-start gap-2", children: [
2310
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react23.FileText, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2311
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "min-w-0 flex-1", children: [
2312
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-sm font-medium text-foreground", children: invoice.number || invoice.id }),
2313
- invoice.customer_name && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs text-muted-foreground", children: invoice.customer_name })
2376
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-start gap-2", children: [
2377
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react22.FileText, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2378
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "min-w-0 flex-1", children: [
2379
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm font-medium text-foreground", children: invoice.number || invoice.id }),
2380
+ invoice.customer_name && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-xs text-muted-foreground", children: invoice.customer_name })
2314
2381
  ] }),
2315
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-1.5 shrink-0", children: [
2316
- invoice.amount_due !== void 0 && invoice.currency && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-sm font-medium text-foreground", children: formatAmount(invoice.amount_due, invoice.currency) }),
2317
- invoice.status && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StatusBadge, { status: invoice.status })
2382
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-1.5 shrink-0", children: [
2383
+ invoice.amount_due !== void 0 && invoice.currency && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-sm font-medium text-foreground", children: formatAmount(invoice.amount_due, invoice.currency) }),
2384
+ invoice.status && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StatusBadge, { status: invoice.status })
2318
2385
  ] })
2319
2386
  ] }) });
2320
2387
  }
2321
2388
  function SubscriptionCard({ sub }) {
2322
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-start gap-2", children: [
2323
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react23.RefreshCw, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2324
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "min-w-0 flex-1", children: [
2325
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { className: "text-sm font-medium text-foreground", children: [
2389
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-start gap-2", children: [
2390
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react22.RefreshCw, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2391
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "min-w-0 flex-1", children: [
2392
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { className: "text-sm font-medium text-foreground", children: [
2326
2393
  sub.plan?.nickname || "Subscription",
2327
- sub.plan?.amount !== void 0 && sub.plan?.currency && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "text-muted-foreground font-normal", children: [
2394
+ sub.plan?.amount !== void 0 && sub.plan?.currency && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "text-muted-foreground font-normal", children: [
2328
2395
  " ",
2329
2396
  formatAmount(sub.plan.amount, sub.plan.currency),
2330
2397
  "/",
2331
2398
  sub.plan.interval
2332
2399
  ] })
2333
2400
  ] }),
2334
- sub.current_period_end && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2335
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react23.Clock, { className: "h-3 w-3" }),
2401
+ sub.current_period_end && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2402
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react22.Clock, { className: "h-3 w-3" }),
2336
2403
  "Renews ",
2337
2404
  formatUnixDate2(sub.current_period_end)
2338
2405
  ] })
2339
2406
  ] }),
2340
- sub.status && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StatusBadge, { status: sub.status })
2407
+ sub.status && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StatusBadge, { status: sub.status })
2341
2408
  ] }) });
2342
2409
  }
2343
2410
  function BalanceDisplay({ balance }) {
2344
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-2", children: [
2345
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-2", children: [
2346
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react23.CreditCard, { className: "h-4 w-4 text-muted-foreground" }),
2347
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-sm font-medium text-foreground", children: "Balance" })
2411
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-2", children: [
2412
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-2", children: [
2413
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react22.CreditCard, { className: "h-4 w-4 text-muted-foreground" }),
2414
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-sm font-medium text-foreground", children: "Balance" })
2348
2415
  ] }),
2349
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "grid grid-cols-2 gap-4 pl-6", children: [
2350
- balance.available && balance.available.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
2351
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs text-muted-foreground", children: "Available" }),
2352
- balance.available.map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-sm font-medium text-foreground", children: formatAmount(b.amount, b.currency) }, i))
2416
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "grid grid-cols-2 gap-4 pl-6", children: [
2417
+ balance.available && balance.available.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
2418
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-xs text-muted-foreground", children: "Available" }),
2419
+ balance.available.map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm font-medium text-foreground", children: formatAmount(b.amount, b.currency) }, i))
2353
2420
  ] }),
2354
- balance.pending && balance.pending.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
2355
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs text-muted-foreground", children: "Pending" }),
2356
- balance.pending.map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-sm font-medium text-foreground", children: formatAmount(b.amount, b.currency) }, i))
2421
+ balance.pending && balance.pending.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
2422
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-xs text-muted-foreground", children: "Pending" }),
2423
+ balance.pending.map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm font-medium text-foreground", children: formatAmount(b.amount, b.currency) }, i))
2357
2424
  ] })
2358
2425
  ] })
2359
2426
  ] });
2360
2427
  }
2361
2428
  function StripeFormatter({ data }) {
2362
- if (isBalance(data)) return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(BalanceDisplay, { balance: data });
2429
+ if (isBalance(data)) return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BalanceDisplay, { balance: data });
2363
2430
  if (typeof data === "object" && data !== null && "data" in data && Array.isArray(data.data)) {
2364
2431
  const items = data.data;
2365
2432
  const invoices = items.filter(isInvoice);
2366
2433
  if (invoices.length > 0) {
2367
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "space-y-1.5", children: invoices.map((inv, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(InvoiceCard, { invoice: inv }, inv.id || i)) });
2434
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-1.5", children: invoices.map((inv, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(InvoiceCard, { invoice: inv }, inv.id || i)) });
2368
2435
  }
2369
2436
  const subs = items.filter(isSubscription);
2370
2437
  if (subs.length > 0) {
2371
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "space-y-1.5", children: subs.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SubscriptionCard, { sub: s }, s.id || i)) });
2438
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-1.5", children: subs.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SubscriptionCard, { sub: s }, s.id || i)) });
2372
2439
  }
2373
2440
  const customers = items.filter(isCustomer);
2374
2441
  if (customers.length > 0) {
2375
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "space-y-1.5", children: customers.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CustomerCard, { customer: c }, c.id || i)) });
2442
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-1.5", children: customers.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CustomerCard, { customer: c }, c.id || i)) });
2376
2443
  }
2377
2444
  }
2378
- if (isInvoice(data)) return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(InvoiceCard, { invoice: data });
2379
- if (isSubscription(data)) return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SubscriptionCard, { sub: data });
2380
- if (isCustomer(data)) return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CustomerCard, { customer: data });
2445
+ if (isInvoice(data)) return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(InvoiceCard, { invoice: data });
2446
+ if (isSubscription(data)) return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SubscriptionCard, { sub: data });
2447
+ if (isCustomer(data)) return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CustomerCard, { customer: data });
2381
2448
  if (Array.isArray(data)) {
2382
2449
  const invoices = data.filter(isInvoice);
2383
2450
  if (invoices.length > 0) {
2384
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "space-y-1.5", children: invoices.map((inv, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(InvoiceCard, { invoice: inv }, inv.id || i)) });
2451
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-1.5", children: invoices.map((inv, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(InvoiceCard, { invoice: inv }, inv.id || i)) });
2385
2452
  }
2386
2453
  const customers = data.filter(isCustomer);
2387
2454
  if (customers.length > 0) {
2388
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "space-y-1.5", children: customers.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CustomerCard, { customer: c }, c.id || i)) });
2455
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-1.5", children: customers.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CustomerCard, { customer: c }, c.id || i)) });
2389
2456
  }
2390
2457
  }
2391
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2458
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2392
2459
  }
2393
2460
 
2394
2461
  // src/ui/formatters/jira.tsx
2395
- var import_lucide_react24 = require("lucide-react");
2396
- var import_jsx_runtime24 = require("react/jsx-runtime");
2462
+ var import_lucide_react23 = require("lucide-react");
2463
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2397
2464
  function isJiraIssue(data) {
2398
2465
  return typeof data === "object" && data !== null && "key" in data && "fields" in data;
2399
2466
  }
@@ -2409,35 +2476,35 @@ var STATUS_COLORS = {
2409
2476
  };
2410
2477
  function PriorityIcon({ name }) {
2411
2478
  const lower = (name || "").toLowerCase();
2412
- if (lower === "highest" || lower === "critical") return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.ArrowUp, { className: "h-3 w-3 text-destructive" });
2413
- if (lower === "high") return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.ArrowUp, { className: "h-3 w-3 text-orange-500" });
2414
- if (lower === "low") return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.ArrowDown, { className: "h-3 w-3 text-blue-500" });
2415
- if (lower === "lowest") return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.ArrowDown, { className: "h-3 w-3 text-green-500" });
2416
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.Minus, { className: "h-3 w-3 text-muted-foreground" });
2479
+ if (lower === "highest" || lower === "critical") return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react23.ArrowUp, { className: "h-3 w-3 text-destructive" });
2480
+ if (lower === "high") return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react23.ArrowUp, { className: "h-3 w-3 text-orange-500" });
2481
+ if (lower === "low") return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react23.ArrowDown, { className: "h-3 w-3 text-blue-500" });
2482
+ if (lower === "lowest") return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react23.ArrowDown, { className: "h-3 w-3 text-green-500" });
2483
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react23.Minus, { className: "h-3 w-3 text-muted-foreground" });
2417
2484
  }
2418
2485
  function IssueCard2({ issue }) {
2419
2486
  const f = issue.fields || {};
2420
2487
  const statusColor = f.status?.statusCategory?.colorName || "undefined";
2421
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-start gap-2", children: [
2422
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.CircleDot, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2423
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "min-w-0 flex-1", children: [
2424
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("p", { className: "text-sm font-medium text-foreground", children: [
2425
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-muted-foreground font-normal", children: issue.key }),
2488
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-start gap-2", children: [
2489
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react23.CircleDot, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2490
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "min-w-0 flex-1", children: [
2491
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { className: "text-sm font-medium text-foreground", children: [
2492
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-muted-foreground font-normal", children: issue.key }),
2426
2493
  " ",
2427
2494
  f.summary
2428
2495
  ] }),
2429
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: [
2430
- f.status?.name && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "inline-flex items-center gap-1 text-xs text-muted-foreground", children: [
2431
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: `h-1.5 w-1.5 rounded-full ${STATUS_COLORS[statusColor] || STATUS_COLORS.undefined}` }),
2496
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: [
2497
+ f.status?.name && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "inline-flex items-center gap-1 text-xs text-muted-foreground", children: [
2498
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: `h-1.5 w-1.5 rounded-full ${STATUS_COLORS[statusColor] || STATUS_COLORS.undefined}` }),
2432
2499
  f.status.name
2433
2500
  ] }),
2434
- f.priority?.name && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "inline-flex items-center gap-1 text-xs text-muted-foreground", children: [
2435
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PriorityIcon, { name: f.priority.name }),
2501
+ f.priority?.name && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "inline-flex items-center gap-1 text-xs text-muted-foreground", children: [
2502
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PriorityIcon, { name: f.priority.name }),
2436
2503
  f.priority.name
2437
2504
  ] }),
2438
- f.issuetype?.name && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-xs text-muted-foreground", children: f.issuetype.name }),
2439
- f.assignee && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2440
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.User, { className: "h-3 w-3" }),
2505
+ f.issuetype?.name && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-xs text-muted-foreground", children: f.issuetype.name }),
2506
+ f.assignee && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2507
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react23.User, { className: "h-3 w-3" }),
2441
2508
  f.assignee.displayName || f.assignee.name
2442
2509
  ] })
2443
2510
  ] })
@@ -2445,15 +2512,15 @@ function IssueCard2({ issue }) {
2445
2512
  ] }) });
2446
2513
  }
2447
2514
  function ProjectCard2({ project }) {
2448
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "rounded-lg border border-border bg-card p-3", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-start gap-2", children: [
2449
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.SquareKanban, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2450
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "min-w-0 flex-1", children: [
2451
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("p", { className: "text-sm font-medium text-foreground", children: [
2452
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-muted-foreground font-normal", children: project.key }),
2515
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "rounded-lg border border-border bg-card p-3", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-start gap-2", children: [
2516
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react23.SquareKanban, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2517
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "min-w-0 flex-1", children: [
2518
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { className: "text-sm font-medium text-foreground", children: [
2519
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-muted-foreground font-normal", children: project.key }),
2453
2520
  " ",
2454
2521
  project.name
2455
2522
  ] }),
2456
- project.projectTypeKey && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-xs text-muted-foreground", children: project.projectTypeKey })
2523
+ project.projectTypeKey && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs text-muted-foreground", children: project.projectTypeKey })
2457
2524
  ] })
2458
2525
  ] }) });
2459
2526
  }
@@ -2461,29 +2528,29 @@ function JiraFormatter({ data }) {
2461
2528
  if (typeof data === "object" && data !== null && "issues" in data) {
2462
2529
  const issues = data.issues;
2463
2530
  if (Array.isArray(issues)) {
2464
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "space-y-1.5", children: issues.filter(isJiraIssue).map((iss, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IssueCard2, { issue: iss }, iss.key || i)) });
2531
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "space-y-1.5", children: issues.filter(isJiraIssue).map((iss, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(IssueCard2, { issue: iss }, iss.key || i)) });
2465
2532
  }
2466
2533
  }
2467
2534
  if (typeof data === "object" && data !== null && "projects" in data) {
2468
2535
  const projects = data.projects;
2469
2536
  if (Array.isArray(projects)) {
2470
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "space-y-1.5", children: projects.filter(isJiraProject).map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ProjectCard2, { project: p }, p.key || i)) });
2537
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "space-y-1.5", children: projects.filter(isJiraProject).map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ProjectCard2, { project: p }, p.key || i)) });
2471
2538
  }
2472
2539
  }
2473
- if (isJiraIssue(data)) return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IssueCard2, { issue: data });
2474
- if (isJiraProject(data)) return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ProjectCard2, { project: data });
2540
+ if (isJiraIssue(data)) return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(IssueCard2, { issue: data });
2541
+ if (isJiraProject(data)) return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ProjectCard2, { project: data });
2475
2542
  if (Array.isArray(data)) {
2476
2543
  const issues = data.filter(isJiraIssue);
2477
2544
  if (issues.length > 0) {
2478
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "space-y-1.5", children: issues.map((iss, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IssueCard2, { issue: iss }, iss.key || i)) });
2545
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "space-y-1.5", children: issues.map((iss, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(IssueCard2, { issue: iss }, iss.key || i)) });
2479
2546
  }
2480
2547
  }
2481
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2548
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2482
2549
  }
2483
2550
 
2484
2551
  // src/ui/formatters/salesforce.tsx
2485
- var import_lucide_react25 = require("lucide-react");
2486
- var import_jsx_runtime25 = require("react/jsx-runtime");
2552
+ var import_lucide_react24 = require("lucide-react");
2553
+ var import_jsx_runtime24 = require("react/jsx-runtime");
2487
2554
  function isContact(data) {
2488
2555
  if (typeof data !== "object" || data === null) return false;
2489
2556
  return "Name" in data && ("Email" in data || "Phone" in data || "Title" in data);
@@ -2494,55 +2561,55 @@ function isOpportunity(data) {
2494
2561
  }
2495
2562
  function ContactCard2({ contact }) {
2496
2563
  const account = contact.AccountName || contact.Account?.Name;
2497
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2498
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-start gap-2", children: [
2499
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react25.User, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2500
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "min-w-0 flex-1", children: [
2501
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm font-medium text-foreground", children: contact.Name }),
2502
- contact.Title && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-xs text-muted-foreground", children: contact.Title })
2564
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2565
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-start gap-2", children: [
2566
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.User, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2567
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "min-w-0 flex-1", children: [
2568
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-sm font-medium text-foreground", children: contact.Name }),
2569
+ contact.Title && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-xs text-muted-foreground", children: contact.Title })
2503
2570
  ] })
2504
2571
  ] }),
2505
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-wrap gap-x-4 gap-y-1 pl-6", children: [
2506
- contact.Email && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2507
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react25.Mail, { className: "h-3 w-3" }),
2572
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-wrap gap-x-4 gap-y-1 pl-6", children: [
2573
+ contact.Email && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2574
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.Mail, { className: "h-3 w-3" }),
2508
2575
  contact.Email
2509
2576
  ] }),
2510
- contact.Phone && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2511
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react25.Phone, { className: "h-3 w-3" }),
2577
+ contact.Phone && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2578
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.Phone, { className: "h-3 w-3" }),
2512
2579
  contact.Phone
2513
2580
  ] }),
2514
- account && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2515
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react25.Building2, { className: "h-3 w-3" }),
2581
+ account && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2582
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.Building2, { className: "h-3 w-3" }),
2516
2583
  account
2517
2584
  ] })
2518
2585
  ] })
2519
2586
  ] });
2520
2587
  }
2521
2588
  function OpportunityCard({ opp }) {
2522
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2523
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-start gap-2", children: [
2524
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react25.Briefcase, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2525
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "min-w-0 flex-1", children: [
2526
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm font-medium text-foreground", children: opp.Name }),
2527
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: [
2528
- opp.Amount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-xs font-medium text-foreground", children: new Intl.NumberFormat(void 0, { style: "currency", currency: "USD" }).format(opp.Amount) }),
2529
- opp.StageName && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground", children: opp.StageName }),
2530
- opp.CloseDate && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2531
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react25.Calendar, { className: "h-3 w-3" }),
2589
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2590
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-start gap-2", children: [
2591
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.Briefcase, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2592
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "min-w-0 flex-1", children: [
2593
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-sm font-medium text-foreground", children: opp.Name }),
2594
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: [
2595
+ opp.Amount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-xs font-medium text-foreground", children: new Intl.NumberFormat(void 0, { style: "currency", currency: "USD" }).format(opp.Amount) }),
2596
+ opp.StageName && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground", children: opp.StageName }),
2597
+ opp.CloseDate && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2598
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react24.Calendar, { className: "h-3 w-3" }),
2532
2599
  opp.CloseDate
2533
2600
  ] })
2534
2601
  ] })
2535
2602
  ] })
2536
2603
  ] }),
2537
- opp.Probability !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "pl-6 space-y-0.5", children: [
2538
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center justify-between", children: [
2539
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-xs text-muted-foreground", children: "Probability" }),
2540
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "text-xs font-medium text-foreground", children: [
2604
+ opp.Probability !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "pl-6 space-y-0.5", children: [
2605
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center justify-between", children: [
2606
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-xs text-muted-foreground", children: "Probability" }),
2607
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "text-xs font-medium text-foreground", children: [
2541
2608
  opp.Probability,
2542
2609
  "%"
2543
2610
  ] })
2544
2611
  ] }),
2545
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "h-1.5 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2612
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-1.5 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2546
2613
  "div",
2547
2614
  {
2548
2615
  className: "h-full rounded-full bg-primary transition-all",
@@ -2559,31 +2626,31 @@ function SalesforceFormatter({ data }) {
2559
2626
  const contacts = records.filter(isContact);
2560
2627
  const opps = records.filter(isOpportunity);
2561
2628
  if (opps.length > 0 && contacts.length === 0) {
2562
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "space-y-1.5", children: opps.map((o, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(OpportunityCard, { opp: o }, o.Id || i)) });
2629
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "space-y-1.5", children: opps.map((o, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(OpportunityCard, { opp: o }, o.Id || i)) });
2563
2630
  }
2564
2631
  if (contacts.length > 0) {
2565
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "space-y-1.5", children: contacts.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ContactCard2, { contact: c }, c.Id || i)) });
2632
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "space-y-1.5", children: contacts.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ContactCard2, { contact: c }, c.Id || i)) });
2566
2633
  }
2567
2634
  }
2568
2635
  }
2569
- if (isOpportunity(data)) return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(OpportunityCard, { opp: data });
2570
- if (isContact(data)) return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ContactCard2, { contact: data });
2636
+ if (isOpportunity(data)) return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(OpportunityCard, { opp: data });
2637
+ if (isContact(data)) return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ContactCard2, { contact: data });
2571
2638
  if (Array.isArray(data)) {
2572
2639
  const contacts = data.filter(isContact);
2573
2640
  if (contacts.length > 0) {
2574
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "space-y-1.5", children: contacts.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ContactCard2, { contact: c }, c.Id || i)) });
2641
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "space-y-1.5", children: contacts.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ContactCard2, { contact: c }, c.Id || i)) });
2575
2642
  }
2576
2643
  const opps = data.filter(isOpportunity);
2577
2644
  if (opps.length > 0) {
2578
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "space-y-1.5", children: opps.map((o, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(OpportunityCard, { opp: o }, o.Id || i)) });
2645
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "space-y-1.5", children: opps.map((o, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(OpportunityCard, { opp: o }, o.Id || i)) });
2579
2646
  }
2580
2647
  }
2581
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2648
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2582
2649
  }
2583
2650
 
2584
2651
  // src/ui/formatters/brevo.tsx
2585
- var import_lucide_react26 = require("lucide-react");
2586
- var import_jsx_runtime26 = require("react/jsx-runtime");
2652
+ var import_lucide_react25 = require("lucide-react");
2653
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2587
2654
  function isBrevoContact(data) {
2588
2655
  return typeof data === "object" && data !== null && "email" in data && ("attributes" in data || "id" in data);
2589
2656
  }
@@ -2599,12 +2666,12 @@ var STATUS_STYLES2 = {
2599
2666
  };
2600
2667
  function ContactCard3({ contact }) {
2601
2668
  const name = contact.attributes ? [contact.attributes.FIRSTNAME, contact.attributes.LASTNAME].filter(Boolean).join(" ") : void 0;
2602
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "rounded-lg border border-border bg-card p-3", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-start gap-2", children: [
2603
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react26.User, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2604
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "min-w-0 flex-1", children: [
2605
- name && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-sm font-medium text-foreground", children: name }),
2606
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("p", { className: "text-xs text-muted-foreground flex items-center gap-1", children: [
2607
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react26.Mail, { className: "h-3 w-3" }),
2669
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "rounded-lg border border-border bg-card p-3", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-start gap-2", children: [
2670
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react25.User, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2671
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "min-w-0 flex-1", children: [
2672
+ name && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm font-medium text-foreground", children: name }),
2673
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("p", { className: "text-xs text-muted-foreground flex items-center gap-1", children: [
2674
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react25.Mail, { className: "h-3 w-3" }),
2608
2675
  contact.email
2609
2676
  ] })
2610
2677
  ] })
@@ -2612,26 +2679,26 @@ function ContactCard3({ contact }) {
2612
2679
  }
2613
2680
  function CampaignCard({ campaign }) {
2614
2681
  const stats = campaign.statistics?.globalStats;
2615
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2616
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-start gap-2", children: [
2617
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react26.Mail, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2618
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "min-w-0 flex-1", children: [
2619
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-sm font-medium text-foreground", children: campaign.name }),
2620
- campaign.subject && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs text-muted-foreground", children: campaign.subject })
2682
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2683
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-start gap-2", children: [
2684
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react25.Mail, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2685
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "min-w-0 flex-1", children: [
2686
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm font-medium text-foreground", children: campaign.name }),
2687
+ campaign.subject && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-xs text-muted-foreground", children: campaign.subject })
2621
2688
  ] }),
2622
- campaign.status && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: `rounded-full px-2 py-0.5 text-xs ${STATUS_STYLES2[campaign.status] || "bg-muted text-muted-foreground"}`, children: campaign.status })
2689
+ campaign.status && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: `rounded-full px-2 py-0.5 text-xs ${STATUS_STYLES2[campaign.status] || "bg-muted text-muted-foreground"}`, children: campaign.status })
2623
2690
  ] }),
2624
- stats && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-4 pl-6", children: [
2625
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2626
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react26.BarChart3, { className: "h-3 w-3" }),
2691
+ stats && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-4 pl-6", children: [
2692
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2693
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react25.BarChart3, { className: "h-3 w-3" }),
2627
2694
  stats.sent ?? 0,
2628
2695
  " sent"
2629
2696
  ] }),
2630
- stats.opened !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
2697
+ stats.opened !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
2631
2698
  stats.opened,
2632
2699
  " opened"
2633
2700
  ] }),
2634
- stats.clicked !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
2701
+ stats.clicked !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
2635
2702
  stats.clicked,
2636
2703
  " clicked"
2637
2704
  ] })
@@ -2642,33 +2709,33 @@ function BrevoFormatter({ data }) {
2642
2709
  if (typeof data === "object" && data !== null && "contacts" in data) {
2643
2710
  const contacts = data.contacts;
2644
2711
  if (Array.isArray(contacts)) {
2645
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "space-y-1.5", children: contacts.filter(isBrevoContact).map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ContactCard3, { contact: c }, c.id || i)) });
2712
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "space-y-1.5", children: contacts.filter(isBrevoContact).map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ContactCard3, { contact: c }, c.id || i)) });
2646
2713
  }
2647
2714
  }
2648
2715
  if (typeof data === "object" && data !== null && "campaigns" in data) {
2649
2716
  const campaigns = data.campaigns;
2650
2717
  if (Array.isArray(campaigns)) {
2651
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "space-y-1.5", children: campaigns.filter(isBrevoCampaign).map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CampaignCard, { campaign: c }, c.id || i)) });
2718
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "space-y-1.5", children: campaigns.filter(isBrevoCampaign).map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CampaignCard, { campaign: c }, c.id || i)) });
2652
2719
  }
2653
2720
  }
2654
- if (isBrevoContact(data)) return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ContactCard3, { contact: data });
2655
- if (isBrevoCampaign(data)) return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CampaignCard, { campaign: data });
2721
+ if (isBrevoContact(data)) return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ContactCard3, { contact: data });
2722
+ if (isBrevoCampaign(data)) return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CampaignCard, { campaign: data });
2656
2723
  if (Array.isArray(data)) {
2657
2724
  const contacts = data.filter(isBrevoContact);
2658
2725
  if (contacts.length > 0) {
2659
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "space-y-1.5", children: contacts.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ContactCard3, { contact: c }, c.id || i)) });
2726
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "space-y-1.5", children: contacts.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ContactCard3, { contact: c }, c.id || i)) });
2660
2727
  }
2661
2728
  const campaigns = data.filter(isBrevoCampaign);
2662
2729
  if (campaigns.length > 0) {
2663
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "space-y-1.5", children: campaigns.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CampaignCard, { campaign: c }, c.id || i)) });
2730
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "space-y-1.5", children: campaigns.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CampaignCard, { campaign: c }, c.id || i)) });
2664
2731
  }
2665
2732
  }
2666
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2733
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2667
2734
  }
2668
2735
 
2669
2736
  // src/ui/formatters/calendly.tsx
2670
- var import_lucide_react27 = require("lucide-react");
2671
- var import_jsx_runtime27 = require("react/jsx-runtime");
2737
+ var import_lucide_react26 = require("lucide-react");
2738
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2672
2739
  function isCalendlyEvent(data) {
2673
2740
  return typeof data === "object" && data !== null && "name" in data && ("start_time" in data || "status" in data);
2674
2741
  }
@@ -2692,36 +2759,36 @@ var STATUS_STYLES3 = {
2692
2759
  canceled: "bg-destructive/10 text-destructive"
2693
2760
  };
2694
2761
  function EventCard3({ event }) {
2695
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-start gap-2", children: [
2696
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react27.Calendar, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2697
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "min-w-0 flex-1", children: [
2698
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-sm font-medium text-foreground", children: event.name }),
2699
- event.start_time && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("p", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2700
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react27.Clock, { className: "h-3 w-3" }),
2762
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-start gap-2", children: [
2763
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react26.Calendar, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2764
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "min-w-0 flex-1", children: [
2765
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-sm font-medium text-foreground", children: event.name }),
2766
+ event.start_time && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("p", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2767
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react26.Clock, { className: "h-3 w-3" }),
2701
2768
  formatDateTime(event.start_time),
2702
2769
  event.end_time && ` - ${formatDateTime(event.end_time)}`
2703
2770
  ] }),
2704
- event.location?.location && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("p", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2705
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react27.MapPin, { className: "h-3 w-3" }),
2771
+ event.location?.location && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("p", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2772
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react26.MapPin, { className: "h-3 w-3" }),
2706
2773
  event.location.location
2707
2774
  ] })
2708
2775
  ] }),
2709
- event.status && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: `rounded-full px-2 py-0.5 text-xs ${STATUS_STYLES3[event.status] || "bg-muted text-muted-foreground"}`, children: event.status })
2776
+ event.status && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: `rounded-full px-2 py-0.5 text-xs ${STATUS_STYLES3[event.status] || "bg-muted text-muted-foreground"}`, children: event.status })
2710
2777
  ] }) });
2711
2778
  }
2712
2779
  function EventTypeCard({ eventType }) {
2713
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "rounded-lg border border-border bg-card p-3", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-start gap-2", children: [
2714
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react27.Calendar, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2715
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "min-w-0 flex-1", children: [
2716
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-sm font-medium text-foreground", children: eventType.name }),
2717
- eventType.description_plain && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-2", children: eventType.description_plain }),
2718
- eventType.duration !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("p", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2719
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react27.Clock, { className: "h-3 w-3" }),
2780
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "rounded-lg border border-border bg-card p-3", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-start gap-2", children: [
2781
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react26.Calendar, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2782
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "min-w-0 flex-1", children: [
2783
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-sm font-medium text-foreground", children: eventType.name }),
2784
+ eventType.description_plain && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-2", children: eventType.description_plain }),
2785
+ eventType.duration !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("p", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2786
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react26.Clock, { className: "h-3 w-3" }),
2720
2787
  eventType.duration,
2721
2788
  " min"
2722
2789
  ] })
2723
2790
  ] }),
2724
- eventType.active !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: `rounded-full px-2 py-0.5 text-xs ${eventType.active ? "bg-green-500/10 text-green-500" : "bg-muted text-muted-foreground"}`, children: eventType.active ? "Active" : "Inactive" })
2791
+ eventType.active !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: `rounded-full px-2 py-0.5 text-xs ${eventType.active ? "bg-green-500/10 text-green-500" : "bg-muted text-muted-foreground"}`, children: eventType.active ? "Active" : "Inactive" })
2725
2792
  ] }) });
2726
2793
  }
2727
2794
  function CalendlyFormatter({ data }) {
@@ -2731,33 +2798,33 @@ function CalendlyFormatter({ data }) {
2731
2798
  const events = d.collection.filter(isCalendlyEvent);
2732
2799
  const types = d.collection.filter(isCalendlyEventType);
2733
2800
  if (types.length > 0 && events.length === 0) {
2734
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "space-y-1.5", children: types.map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(EventTypeCard, { eventType: t }, t.uri || i)) });
2801
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "space-y-1.5", children: types.map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(EventTypeCard, { eventType: t }, t.uri || i)) });
2735
2802
  }
2736
2803
  if (events.length > 0) {
2737
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "space-y-1.5", children: events.map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(EventCard3, { event: e }, e.uri || i)) });
2804
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "space-y-1.5", children: events.map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(EventCard3, { event: e }, e.uri || i)) });
2738
2805
  }
2739
2806
  }
2740
2807
  if (Array.isArray(d.scheduled_events)) {
2741
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "space-y-1.5", children: d.scheduled_events.filter(isCalendlyEvent).map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(EventCard3, { event: e }, e.uri || i)) });
2808
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "space-y-1.5", children: d.scheduled_events.filter(isCalendlyEvent).map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(EventCard3, { event: e }, e.uri || i)) });
2742
2809
  }
2743
2810
  if (Array.isArray(d.event_types)) {
2744
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "space-y-1.5", children: d.event_types.filter(isCalendlyEventType).map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(EventTypeCard, { eventType: t }, t.uri || i)) });
2811
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "space-y-1.5", children: d.event_types.filter(isCalendlyEventType).map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(EventTypeCard, { eventType: t }, t.uri || i)) });
2745
2812
  }
2746
2813
  }
2747
- if (isCalendlyEvent(data)) return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(EventCard3, { event: data });
2748
- if (isCalendlyEventType(data)) return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(EventTypeCard, { eventType: data });
2814
+ if (isCalendlyEvent(data)) return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(EventCard3, { event: data });
2815
+ if (isCalendlyEventType(data)) return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(EventTypeCard, { eventType: data });
2749
2816
  if (Array.isArray(data)) {
2750
2817
  const events = data.filter(isCalendlyEvent);
2751
2818
  if (events.length > 0) {
2752
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "space-y-1.5", children: events.map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(EventCard3, { event: e }, e.uri || i)) });
2819
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "space-y-1.5", children: events.map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(EventCard3, { event: e }, e.uri || i)) });
2753
2820
  }
2754
2821
  }
2755
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2822
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2756
2823
  }
2757
2824
 
2758
2825
  // src/ui/formatters/twilio.tsx
2759
- var import_lucide_react28 = require("lucide-react");
2760
- var import_jsx_runtime28 = require("react/jsx-runtime");
2826
+ var import_lucide_react27 = require("lucide-react");
2827
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2761
2828
  function isTwilioMessage(data) {
2762
2829
  return typeof data === "object" && data !== null && ("body" in data || "sid" in data) && ("from" in data || "to" in data);
2763
2830
  }
@@ -2789,48 +2856,48 @@ var STATUS_STYLES4 = {
2789
2856
  };
2790
2857
  function MessageCard3({ message }) {
2791
2858
  const isInbound = message.direction?.includes("inbound");
2792
- const DirectionIcon = isInbound ? import_lucide_react28.ArrowDownLeft : import_lucide_react28.ArrowUpRight;
2859
+ const DirectionIcon = isInbound ? import_lucide_react27.ArrowDownLeft : import_lucide_react27.ArrowUpRight;
2793
2860
  const dateStr = message.date_sent || message.date_created;
2794
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2795
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-2", children: [
2796
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react28.Phone, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
2797
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DirectionIcon, { className: "h-3 w-3 text-muted-foreground shrink-0" }),
2798
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-1.5 flex-1 min-w-0", children: [
2799
- message.from && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-xs text-muted-foreground", children: message.from }),
2800
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-xs text-muted-foreground", children: "\u2192" }),
2801
- message.to && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-xs text-muted-foreground", children: message.to })
2861
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2862
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-2", children: [
2863
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react27.Phone, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
2864
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DirectionIcon, { className: "h-3 w-3 text-muted-foreground shrink-0" }),
2865
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-1.5 flex-1 min-w-0", children: [
2866
+ message.from && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-xs text-muted-foreground", children: message.from }),
2867
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-xs text-muted-foreground", children: "\u2192" }),
2868
+ message.to && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-xs text-muted-foreground", children: message.to })
2802
2869
  ] }),
2803
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-1.5 shrink-0", children: [
2804
- message.status && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: `rounded-full px-2 py-0.5 text-xs ${STATUS_STYLES4[message.status] || "bg-muted text-muted-foreground"}`, children: message.status }),
2805
- dateStr && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2806
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react28.Clock, { className: "h-3 w-3" }),
2870
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-1.5 shrink-0", children: [
2871
+ message.status && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: `rounded-full px-2 py-0.5 text-xs ${STATUS_STYLES4[message.status] || "bg-muted text-muted-foreground"}`, children: message.status }),
2872
+ dateStr && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2873
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react27.Clock, { className: "h-3 w-3" }),
2807
2874
  formatRelativeDate6(dateStr)
2808
2875
  ] })
2809
2876
  ] })
2810
2877
  ] }),
2811
- message.body && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm text-foreground line-clamp-3", children: message.body })
2878
+ message.body && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-sm text-foreground line-clamp-3", children: message.body })
2812
2879
  ] });
2813
2880
  }
2814
2881
  function TwilioFormatter({ data }) {
2815
2882
  if (typeof data === "object" && data !== null && "messages" in data) {
2816
2883
  const msgs = data.messages;
2817
2884
  if (Array.isArray(msgs)) {
2818
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "space-y-1.5", children: msgs.filter(isTwilioMessage).map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MessageCard3, { message: m }, m.sid || i)) });
2885
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "space-y-1.5", children: msgs.filter(isTwilioMessage).map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MessageCard3, { message: m }, m.sid || i)) });
2819
2886
  }
2820
2887
  }
2821
- if (isTwilioMessage(data)) return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MessageCard3, { message: data });
2888
+ if (isTwilioMessage(data)) return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MessageCard3, { message: data });
2822
2889
  if (Array.isArray(data)) {
2823
2890
  const msgs = data.filter(isTwilioMessage);
2824
2891
  if (msgs.length > 0) {
2825
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "space-y-1.5", children: msgs.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MessageCard3, { message: m }, m.sid || i)) });
2892
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "space-y-1.5", children: msgs.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MessageCard3, { message: m }, m.sid || i)) });
2826
2893
  }
2827
2894
  }
2828
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2895
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2829
2896
  }
2830
2897
 
2831
2898
  // src/ui/formatters/linkedin.tsx
2832
- var import_lucide_react29 = require("lucide-react");
2833
- var import_jsx_runtime29 = require("react/jsx-runtime");
2899
+ var import_lucide_react28 = require("lucide-react");
2900
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2834
2901
  function isProfile(data) {
2835
2902
  if (typeof data !== "object" || data === null) return false;
2836
2903
  return "localizedFirstName" in data || "firstName" in data || "name" in data && "headline" in data;
@@ -2855,13 +2922,13 @@ function formatRelativeDate7(dateStr) {
2855
2922
  }
2856
2923
  function ProfileCard({ profile }) {
2857
2924
  const name = profile.name || [profile.localizedFirstName || profile.firstName, profile.localizedLastName || profile.lastName].filter(Boolean).join(" ");
2858
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-start gap-2", children: [
2859
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react29.User, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2860
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "min-w-0 flex-1", children: [
2861
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-sm font-medium text-foreground", children: name || "LinkedIn Profile" }),
2862
- profile.headline && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-2", children: profile.headline }),
2863
- profile.vanityName && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("p", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2864
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react29.ExternalLink, { className: "h-3 w-3" }),
2925
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-start gap-2", children: [
2926
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react28.User, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
2927
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "min-w-0 flex-1", children: [
2928
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm font-medium text-foreground", children: name || "LinkedIn Profile" }),
2929
+ profile.headline && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-xs text-muted-foreground line-clamp-2", children: profile.headline }),
2930
+ profile.vanityName && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("p", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
2931
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react28.ExternalLink, { className: "h-3 w-3" }),
2865
2932
  "linkedin.com/in/",
2866
2933
  profile.vanityName
2867
2934
  ] })
@@ -2871,24 +2938,24 @@ function ProfileCard({ profile }) {
2871
2938
  function PostCard({ post }) {
2872
2939
  const content = post.text || post.commentary;
2873
2940
  const time = post.created?.time || post.timestamp;
2874
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2875
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-2", children: [
2876
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react29.FileText, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
2877
- post.author && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-xs font-medium text-foreground", children: post.author }),
2878
- time && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto", children: [
2879
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react29.Clock, { className: "h-3 w-3" }),
2941
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
2942
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-2", children: [
2943
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react28.FileText, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
2944
+ post.author && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-xs font-medium text-foreground", children: post.author }),
2945
+ time && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "flex items-center gap-1 text-xs text-muted-foreground ml-auto", children: [
2946
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react28.Clock, { className: "h-3 w-3" }),
2880
2947
  formatRelativeDate7(time)
2881
2948
  ] })
2882
2949
  ] }),
2883
- content && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-sm text-foreground line-clamp-4", children: content })
2950
+ content && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm text-foreground line-clamp-4", children: content })
2884
2951
  ] });
2885
2952
  }
2886
2953
  function LinkedInFormatter({ data }) {
2887
- if (isProfile(data)) return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ProfileCard, { profile: data });
2954
+ if (isProfile(data)) return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ProfileCard, { profile: data });
2888
2955
  if (typeof data === "object" && data !== null && "posts" in data) {
2889
2956
  const posts = data.posts;
2890
2957
  if (Array.isArray(posts)) {
2891
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "space-y-1.5", children: posts.filter(isPost).map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PostCard, { post: p }, p.id || i)) });
2958
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "space-y-1.5", children: posts.filter(isPost).map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PostCard, { post: p }, p.id || i)) });
2892
2959
  }
2893
2960
  }
2894
2961
  if (typeof data === "object" && data !== null && "elements" in data) {
@@ -2896,32 +2963,32 @@ function LinkedInFormatter({ data }) {
2896
2963
  if (Array.isArray(elements)) {
2897
2964
  const posts = elements.filter(isPost);
2898
2965
  if (posts.length > 0) {
2899
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "space-y-1.5", children: posts.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PostCard, { post: p }, p.id || i)) });
2966
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "space-y-1.5", children: posts.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PostCard, { post: p }, p.id || i)) });
2900
2967
  }
2901
2968
  }
2902
2969
  }
2903
- if (isPost(data)) return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PostCard, { post: data });
2970
+ if (isPost(data)) return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PostCard, { post: data });
2904
2971
  if (Array.isArray(data)) {
2905
2972
  const posts = data.filter(isPost);
2906
2973
  if (posts.length > 0) {
2907
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "space-y-1.5", children: posts.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PostCard, { post: p }, p.id || i)) });
2974
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "space-y-1.5", children: posts.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PostCard, { post: p }, p.id || i)) });
2908
2975
  }
2909
2976
  }
2910
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2977
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2911
2978
  }
2912
2979
 
2913
2980
  // src/ui/formatters/generic.tsx
2914
- var import_jsx_runtime30 = require("react/jsx-runtime");
2981
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2915
2982
  function GenericFormatter({ data }) {
2916
2983
  if (data === null || data === void 0) {
2917
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm text-muted-foreground italic", children: "No data returned" });
2984
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-sm text-muted-foreground italic", children: "No data returned" });
2918
2985
  }
2919
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2986
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
2920
2987
  }
2921
2988
 
2922
2989
  // src/ui/tool-result.tsx
2923
- var import_jsx_runtime31 = require("react/jsx-runtime");
2924
- function extractToolName2(part) {
2990
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2991
+ function extractToolName(part) {
2925
2992
  if (part.type.startsWith("tool-") && part.type !== "tool-invocation") {
2926
2993
  return part.type.slice(5);
2927
2994
  }
@@ -2932,7 +2999,7 @@ function extractToolName2(part) {
2932
2999
  if (part.toolInvocation?.toolName) return part.toolInvocation.toolName;
2933
3000
  return "unknown";
2934
3001
  }
2935
- function extractState2(part) {
3002
+ function extractState(part) {
2936
3003
  return part.state ?? part.toolInvocation?.state;
2937
3004
  }
2938
3005
  function unwrapSupyagentResult(result) {
@@ -2941,7 +3008,7 @@ function unwrapSupyagentResult(result) {
2941
3008
  }
2942
3009
  return result;
2943
3010
  }
2944
- function extractArgs2(part) {
3011
+ function extractArgs(part) {
2945
3012
  if (part.input && typeof part.input === "object" && !Array.isArray(part.input)) {
2946
3013
  return part.input;
2947
3014
  }
@@ -2973,72 +3040,72 @@ function maybeNormalize(toolName, formatterType, data) {
2973
3040
  function renderFormatter(formatterType, data) {
2974
3041
  switch (formatterType) {
2975
3042
  case "email":
2976
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(EmailFormatter, { data });
3043
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(EmailFormatter, { data });
2977
3044
  case "calendar":
2978
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CalendarEventFormatter, { data });
3045
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CalendarEventFormatter, { data });
2979
3046
  case "slack":
2980
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SlackMessageFormatter, { data });
3047
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SlackMessageFormatter, { data });
2981
3048
  case "github":
2982
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(GithubFormatter, { data });
3049
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(GithubFormatter, { data });
2983
3050
  case "drive":
2984
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DriveFileFormatter, { data });
3051
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DriveFileFormatter, { data });
2985
3052
  case "search":
2986
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SearchFormatter, { data });
3053
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SearchFormatter, { data });
2987
3054
  case "docs":
2988
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DocsFormatter, { data });
3055
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DocsFormatter, { data });
2989
3056
  case "sheets":
2990
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SheetsFormatter, { data });
3057
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SheetsFormatter, { data });
2991
3058
  case "slides":
2992
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SlidesFormatter, { data });
3059
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SlidesFormatter, { data });
2993
3060
  case "hubspot":
2994
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(HubspotFormatter, { data });
3061
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(HubspotFormatter, { data });
2995
3062
  case "linear":
2996
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(LinearFormatter, { data });
3063
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(LinearFormatter, { data });
2997
3064
  case "pipedrive":
2998
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PipedriveFormatter, { data });
3065
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PipedriveFormatter, { data });
2999
3066
  case "compute":
3000
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ComputeFormatter, { data });
3067
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ComputeFormatter, { data });
3001
3068
  case "resend":
3002
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ResendFormatter, { data });
3069
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ResendFormatter, { data });
3003
3070
  case "inbox":
3004
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(InboxFormatter, { data });
3071
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(InboxFormatter, { data });
3005
3072
  case "discord":
3006
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DiscordFormatter, { data });
3073
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DiscordFormatter, { data });
3007
3074
  case "notion":
3008
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(NotionFormatter, { data });
3075
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(NotionFormatter, { data });
3009
3076
  case "twitter":
3010
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TwitterFormatter, { data });
3077
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TwitterFormatter, { data });
3011
3078
  case "telegram":
3012
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TelegramFormatter, { data });
3079
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TelegramFormatter, { data });
3013
3080
  case "stripe":
3014
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StripeFormatter, { data });
3081
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(StripeFormatter, { data });
3015
3082
  case "jira":
3016
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(JiraFormatter, { data });
3083
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(JiraFormatter, { data });
3017
3084
  case "salesforce":
3018
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SalesforceFormatter, { data });
3085
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SalesforceFormatter, { data });
3019
3086
  case "brevo":
3020
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(BrevoFormatter, { data });
3087
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(BrevoFormatter, { data });
3021
3088
  case "calendly":
3022
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CalendlyFormatter, { data });
3089
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CalendlyFormatter, { data });
3023
3090
  case "twilio":
3024
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TwilioFormatter, { data });
3091
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TwilioFormatter, { data });
3025
3092
  case "linkedin":
3026
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(LinkedInFormatter, { data });
3093
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(LinkedInFormatter, { data });
3027
3094
  default:
3028
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(GenericFormatter, { data });
3095
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(GenericFormatter, { data });
3029
3096
  }
3030
3097
  }
3031
3098
  function SupyagentToolResult({ part }) {
3032
- const state = extractState2(part);
3099
+ const state = extractState(part);
3033
3100
  const result = extractResult(part);
3034
- const toolName = extractToolName2(part);
3101
+ const toolName = extractToolName(part);
3035
3102
  if (state !== "output-available" || result === void 0) {
3036
3103
  return null;
3037
3104
  }
3038
3105
  const formatterType = getFormatterType(toolName);
3039
3106
  const data = maybeNormalize(toolName, formatterType, result);
3040
3107
  const summary = getSummary(formatterType, data, toolName);
3041
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3108
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3042
3109
  CollapsibleResult,
3043
3110
  {
3044
3111
  toolName,
@@ -3049,13 +3116,9 @@ function SupyagentToolResult({ part }) {
3049
3116
  );
3050
3117
  }
3051
3118
 
3052
- // src/ui/tool-action.tsx
3053
- var import_react4 = require("react");
3054
- var import_lucide_react30 = require("lucide-react");
3055
-
3056
3119
  // src/ui/tool-input.tsx
3057
- var import_react3 = __toESM(require("react"), 1);
3058
- var import_jsx_runtime32 = require("react/jsx-runtime");
3120
+ var import_react2 = __toESM(require("react"), 1);
3121
+ var import_jsx_runtime31 = require("react/jsx-runtime");
3059
3122
  function formatValue(value) {
3060
3123
  if (value === null || value === void 0) {
3061
3124
  return { text: "null", muted: true };
@@ -3089,17 +3152,19 @@ function formatValue(value) {
3089
3152
  }
3090
3153
  function ToolInput({ args }) {
3091
3154
  if (!args || Object.keys(args).length === 0) return null;
3092
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm", children: Object.entries(args).map(([key, value]) => {
3155
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm", children: Object.entries(args).map(([key, value]) => {
3093
3156
  const formatted = formatValue(value);
3094
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react3.default.Fragment, { children: [
3095
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-muted-foreground select-none", children: key }),
3096
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: formatted.muted ? "text-muted-foreground" : "text-foreground", children: formatted.text })
3157
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react2.default.Fragment, { children: [
3158
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-muted-foreground select-none", children: key }),
3159
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: formatted.muted ? "text-muted-foreground" : "text-foreground", children: formatted.text })
3097
3160
  ] }, key);
3098
3161
  }) });
3099
3162
  }
3100
3163
 
3101
3164
  // src/ui/tool-action.tsx
3102
- var import_jsx_runtime33 = require("react/jsx-runtime");
3165
+ var import_react3 = require("react");
3166
+ var import_lucide_react29 = require("lucide-react");
3167
+ var import_jsx_runtime32 = require("react/jsx-runtime");
3103
3168
  var BADGE_STYLES2 = {
3104
3169
  default: "bg-muted text-muted-foreground",
3105
3170
  success: "bg-green-500/10 text-green-500",
@@ -3107,10 +3172,10 @@ var BADGE_STYLES2 = {
3107
3172
  warning: "bg-yellow-500/10 text-yellow-600"
3108
3173
  };
3109
3174
  function SupyagentToolAction({ part, defaultExpanded = false }) {
3110
- const [expanded, setExpanded] = (0, import_react4.useState)(defaultExpanded);
3111
- const toolName = extractToolName2(part);
3112
- const state = extractState2(part);
3113
- const args = extractArgs2(part);
3175
+ const [expanded, setExpanded] = (0, import_react3.useState)(defaultExpanded);
3176
+ const toolName = extractToolName(part);
3177
+ const state = extractState(part);
3178
+ const args = extractArgs(part);
3114
3179
  const provider = getProviderFromToolName(toolName);
3115
3180
  const providerLabel = getProviderLabel(provider);
3116
3181
  const actionLabel = humanizeToolName(toolName);
@@ -3132,59 +3197,59 @@ function SupyagentToolAction({ part, defaultExpanded = false }) {
3132
3197
  const hasArgs = args && Object.keys(args).length > 0;
3133
3198
  const hasExpandableContent = hasArgs || formatterOutput;
3134
3199
  const canExpand = !isStreaming && hasExpandableContent;
3135
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3200
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
3136
3201
  "div",
3137
3202
  {
3138
3203
  className: "rounded-lg border border-border bg-card overflow-hidden",
3139
3204
  "data-state": isDone ? "done" : isError ? "error" : isStreaming ? "streaming" : "pending",
3140
3205
  children: [
3141
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3206
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
3142
3207
  "button",
3143
3208
  {
3144
3209
  type: "button",
3145
3210
  onClick: () => canExpand && setExpanded(!expanded),
3146
3211
  className: `flex items-center gap-2 w-full px-3 py-2 text-left transition-colors ${canExpand ? "hover:bg-muted cursor-pointer" : "cursor-default"}`,
3147
3212
  children: [
3148
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative shrink-0", children: [
3149
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ProviderIcon, { toolName, className: "h-4 w-4 text-muted-foreground" }),
3150
- isStreaming && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react30.Loader2, { className: "absolute -top-1 -right-1 h-3 w-3 text-primary animate-spin" })
3213
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "relative shrink-0", children: [
3214
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ProviderIcon, { toolName, className: "h-4 w-4 text-muted-foreground" }),
3215
+ isStreaming && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react29.Loader2, { className: "absolute -top-1 -right-1 h-3 w-3 text-primary animate-spin" })
3151
3216
  ] }),
3152
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xs text-muted-foreground", children: providerLabel }),
3153
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-sm text-foreground", children: actionLabel }),
3154
- summary && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
3155
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-muted-foreground text-xs", children: "\xB7" }),
3156
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-sm text-muted-foreground flex-1 truncate", children: summary.text })
3217
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xs text-muted-foreground", children: providerLabel }),
3218
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-sm text-foreground", children: actionLabel }),
3219
+ summary && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
3220
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-muted-foreground text-xs", children: "\xB7" }),
3221
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-sm text-muted-foreground flex-1 truncate", children: summary.text })
3157
3222
  ] }),
3158
- !summary && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "flex-1" }),
3159
- summary?.badge && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3223
+ !summary && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "flex-1" }),
3224
+ summary?.badge && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3160
3225
  "span",
3161
3226
  {
3162
3227
  className: `inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium shrink-0 ${BADGE_STYLES2[summary.badge.variant || "default"]}`,
3163
3228
  children: summary.badge.text
3164
3229
  }
3165
3230
  ),
3166
- isDone && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react30.Check, { className: "h-3.5 w-3.5 text-green-500 shrink-0" }),
3167
- isError && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-xs text-destructive shrink-0", children: [
3168
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react30.AlertCircle, { className: "h-3 w-3" }),
3231
+ isDone && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react29.Check, { className: "h-3.5 w-3.5 text-green-500 shrink-0" }),
3232
+ isError && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-xs text-destructive shrink-0", children: [
3233
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react29.AlertCircle, { className: "h-3 w-3" }),
3169
3234
  "Error"
3170
3235
  ] }),
3171
- isStreaming && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-xs text-primary animate-pulse shrink-0", children: "Calling..." }),
3172
- canExpand && (expanded ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react30.ChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react30.ChevronRight, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }))
3236
+ isStreaming && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-xs text-primary animate-pulse shrink-0", children: "Calling..." }),
3237
+ canExpand && (expanded ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react29.ChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react29.ChevronRight, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }))
3173
3238
  ]
3174
3239
  }
3175
3240
  ),
3176
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3241
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3177
3242
  "div",
3178
3243
  {
3179
3244
  className: "grid transition-[grid-template-rows] duration-200 ease-out",
3180
3245
  style: { gridTemplateRows: expanded ? "1fr" : "0fr" },
3181
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "border-t border-border px-3 py-2 space-y-3", children: [
3182
- args && Object.keys(args).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
3183
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-[10px] font-medium uppercase tracking-wider text-muted-foreground mb-1.5", children: "Input" }),
3184
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ToolInput, { args })
3246
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "border-t border-border px-3 py-2 space-y-3", children: [
3247
+ args && Object.keys(args).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
3248
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-[10px] font-medium uppercase tracking-wider text-muted-foreground mb-1.5", children: "Input" }),
3249
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ToolInput, { args })
3185
3250
  ] }),
3186
- formatterOutput && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
3187
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-[10px] font-medium uppercase tracking-wider text-muted-foreground mb-1.5", children: "Output" }),
3251
+ formatterOutput && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
3252
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-[10px] font-medium uppercase tracking-wider text-muted-foreground mb-1.5", children: "Output" }),
3188
3253
  formatterOutput
3189
3254
  ] })
3190
3255
  ] }) })
@@ -3194,6 +3259,76 @@ function SupyagentToolAction({ part, defaultExpanded = false }) {
3194
3259
  }
3195
3260
  );
3196
3261
  }
3262
+
3263
+ // src/ui/tool-call.tsx
3264
+ var import_react4 = require("react");
3265
+ var import_lucide_react30 = require("lucide-react");
3266
+ var import_jsx_runtime33 = require("react/jsx-runtime");
3267
+ function extractToolName2(part) {
3268
+ if (part.type.startsWith("tool-") && part.type !== "tool-invocation") {
3269
+ return part.type.slice(5);
3270
+ }
3271
+ if (part.type === "dynamic-tool" && part.toolName) {
3272
+ return part.toolName;
3273
+ }
3274
+ if (part.toolName) return part.toolName;
3275
+ if (part.toolInvocation?.toolName) return part.toolInvocation.toolName;
3276
+ return "unknown";
3277
+ }
3278
+ function extractState2(part) {
3279
+ return part.state || part.toolInvocation?.state || "input-available";
3280
+ }
3281
+ function extractArgs2(part) {
3282
+ return part.input || part.args || part.toolInvocation?.args;
3283
+ }
3284
+ function SupyagentToolCall({ part }) {
3285
+ const [expanded, setExpanded] = (0, import_react4.useState)(false);
3286
+ const toolName = extractToolName2(part);
3287
+ const state = extractState2(part);
3288
+ const args = extractArgs2(part);
3289
+ const provider = getProviderFromToolName(toolName);
3290
+ const providerLabel = getProviderLabel(provider);
3291
+ const actionLabel = humanizeToolName(toolName);
3292
+ const isStreaming = state === "input-streaming";
3293
+ const isError = state === "output-error";
3294
+ const isDone = state === "output-available";
3295
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3296
+ "div",
3297
+ {
3298
+ className: "rounded-lg border border-border bg-card overflow-hidden",
3299
+ "data-state": isDone ? "done" : isError ? "error" : isStreaming ? "streaming" : "pending",
3300
+ children: [
3301
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3302
+ "button",
3303
+ {
3304
+ type: "button",
3305
+ onClick: () => args && setExpanded(!expanded),
3306
+ className: "flex items-center gap-2 w-full px-3 py-2 text-left hover:bg-muted transition-colors",
3307
+ children: [
3308
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative", children: [
3309
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ProviderIcon, { toolName, className: "h-4 w-4 text-muted-foreground" }),
3310
+ isStreaming && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react30.Loader2, { className: "absolute -top-1 -right-1 h-3 w-3 text-primary animate-spin" })
3311
+ ] }),
3312
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xs text-muted-foreground", children: providerLabel }),
3313
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-sm text-foreground flex-1", children: actionLabel }),
3314
+ isDone && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "inline-flex items-center gap-1 rounded-full bg-green-500/10 px-2 py-0.5 text-xs text-green-500", children: [
3315
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react30.Check, { className: "h-3 w-3" }),
3316
+ "Completed"
3317
+ ] }),
3318
+ isError && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-xs text-destructive", children: [
3319
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react30.AlertCircle, { className: "h-3 w-3" }),
3320
+ "Error"
3321
+ ] }),
3322
+ isStreaming && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-xs text-primary animate-pulse", children: "Calling..." }),
3323
+ args && (expanded ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react30.ChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react30.ChevronRight, { className: "h-3.5 w-3.5 text-muted-foreground" }))
3324
+ ]
3325
+ }
3326
+ ),
3327
+ expanded && args && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "border-t border-border px-3 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("pre", { className: "text-xs text-muted-foreground overflow-x-auto", children: JSON.stringify(args, null, 2) }) })
3328
+ ]
3329
+ }
3330
+ );
3331
+ }
3197
3332
  // Annotate the CommonJS export names for ESM import in node:
3198
3333
  0 && (module.exports = {
3199
3334
  BrevoFormatter,
@@ -3213,6 +3348,7 @@ function SupyagentToolAction({ part, defaultExpanded = false }) {
3213
3348
  LinearFormatter,
3214
3349
  LinkedInFormatter,
3215
3350
  NotionFormatter,
3351
+ PROVIDER_LABELS,
3216
3352
  PipedriveFormatter,
3217
3353
  ProviderIcon,
3218
3354
  ResendFormatter,
@@ -3229,9 +3365,19 @@ function SupyagentToolAction({ part, defaultExpanded = false }) {
3229
3365
  ToolInput,
3230
3366
  TwilioFormatter,
3231
3367
  TwitterFormatter,
3368
+ extractArgs,
3369
+ extractResult,
3370
+ extractState,
3371
+ extractToolName,
3372
+ getFormatterType,
3232
3373
  getProviderFromToolName,
3233
3374
  getProviderLabel,
3234
3375
  getSummary,
3235
- humanizeToolName
3376
+ humanizeToolName,
3377
+ maybeNormalize,
3378
+ normalizeMicrosoftCalendar,
3379
+ normalizeMicrosoftDrive,
3380
+ normalizeMicrosoftMail,
3381
+ unwrapSupyagentResult
3236
3382
  });
3237
3383
  //# sourceMappingURL=react.cjs.map