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