@supyagent/sdk 0.1.10 → 0.1.12

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