@omg-dev/app 0.1.320 → 0.1.321

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as ao } from "react/jsx-runtime";
2
2
  import { useRef as Dt, useCallback as Lt, useSyncExternalStore as ut, useEffect as so } from "react";
3
3
  import { g as io } from "./_commonjsHelpers-C6fGbg64.js";
4
- import { ah as uo } from "./embedded-DdwkOHs-.js";
4
+ import { ad as uo } from "./embedded-Bk0VM5g-.js";
5
5
  var Ar = "vercel.ai.error", co = Symbol.for(Ar), Ut, Ft, se = class Nr extends (Ft = Error, Ut = co, Ft) {
6
6
  /**
7
7
  * Creates an AI SDK Error.
@@ -1,73 +1,114 @@
1
- import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
- import { R as L, g as B, S as h, C as x, X as p, B as l, L as b, P as N, h as T, i as v, j as $, k as y, T as O, l as d, m as g } from "./embedded-DdwkOHs-.js";
3
- import { B as n } from "./badge-9CxnDp-1.js";
4
- import { useState as G } from "react";
5
- function q({
6
- setupChecks: c,
7
- agents: k,
8
- onVisibleChange: w,
9
- onSetup: z,
10
- onLogin: m,
11
- onAddClaudeAccount: C,
12
- onRemoveClaudeAccount: R,
1
+ import { jsxs as t, jsx as s } from "react/jsx-runtime";
2
+ import { u as L, n as $, f as C, o as B, R as E, p as v, q as x, X as g, B as l, L as N, s as y, v as O, w as k, x as G, y as w, T as P, z as u, E as z } from "./embedded-Bk0VM5g-.js";
3
+ import { useState as q } from "react";
4
+ function M(r) {
5
+ return L(r.defaultTagName ?? "div", r, r);
6
+ }
7
+ const V = B(
8
+ "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default: "border-primary bg-primary text-primary-foreground [a]:hover:bg-primary/80",
13
+ secondary: "border-border bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
14
+ destructive: "border-destructive/30 bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
15
+ outline: "border-border bg-input/30 text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
16
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
17
+ link: "text-primary underline-offset-4 hover:underline"
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ variant: "default"
22
+ }
23
+ }
24
+ );
25
+ function d({
26
+ className: r,
27
+ variant: n = "default",
28
+ render: c,
29
+ ...o
30
+ }) {
31
+ return M({
32
+ defaultTagName: "span",
33
+ props: $(
34
+ {
35
+ className: C(V({ variant: n }), r)
36
+ },
37
+ o
38
+ ),
39
+ render: c,
40
+ state: {
41
+ slot: "badge",
42
+ variant: n
43
+ }
44
+ });
45
+ }
46
+ function K({
47
+ setupChecks: r,
48
+ agents: n,
49
+ onVisibleChange: c,
50
+ onSetup: o,
51
+ onLogin: f,
52
+ onAddClaudeAccount: R,
53
+ onRemoveClaudeAccount: j,
13
54
  onSetupCheck: S,
14
- onRefresh: j
55
+ onRefresh: A
15
56
  }) {
16
- const [r, o] = G(!1);
17
- async function A() {
18
- if (!r) {
19
- o(!0);
57
+ const [m, b] = q(!1);
58
+ async function I() {
59
+ if (!m) {
60
+ b(!0);
20
61
  try {
21
- await j(), g.success("Coding agents refreshed");
62
+ await A(), z.success("Coding agents refreshed");
22
63
  } catch (e) {
23
- g.error(e instanceof Error ? e.message : "Could not refresh coding agents");
64
+ z.error(e instanceof Error ? e.message : "Could not refresh coding agents");
24
65
  } finally {
25
- o(!1);
66
+ b(!1);
26
67
  }
27
68
  }
28
69
  }
29
- return /* @__PURE__ */ i("div", { className: "mx-auto max-w-xl space-y-3 pb-10", "data-lfg-page-column": !0, children: [
30
- /* @__PURE__ */ i("div", { className: "flex items-center justify-between px-4", children: [
70
+ return /* @__PURE__ */ t("div", { className: "mx-auto max-w-xl space-y-3 pb-10", "data-lfg-page-column": !0, children: [
71
+ /* @__PURE__ */ t("div", { className: "flex items-center justify-between px-4", children: [
31
72
  /* @__PURE__ */ s("h2", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: "Coding agents" }),
32
- /* @__PURE__ */ i(
73
+ /* @__PURE__ */ t(
33
74
  "button",
34
75
  {
35
76
  type: "button",
36
- onClick: () => void A(),
37
- disabled: r,
77
+ onClick: () => void I(),
78
+ disabled: m,
38
79
  className: "flex items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground disabled:opacity-50",
39
80
  children: [
40
- /* @__PURE__ */ s(L, { className: B("size-3.5", r && "animate-spin") }),
81
+ /* @__PURE__ */ s(E, { className: C("size-3.5", m && "animate-spin") }),
41
82
  "Refresh"
42
83
  ]
43
84
  }
44
85
  )
45
86
  ] }),
46
- c.length ? /* @__PURE__ */ s("div", { className: "overflow-hidden rounded-2xl border border-border bg-card/40 divide-y divide-border", children: c.map((e) => /* @__PURE__ */ i("div", { className: "px-4 py-3", children: [
47
- /* @__PURE__ */ s("div", { className: "flex items-start justify-between gap-4", children: /* @__PURE__ */ i("div", { className: "flex min-w-0 items-start gap-3", children: [
48
- /* @__PURE__ */ s("span", { className: "mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-[8px] border border-border bg-background", children: /* @__PURE__ */ s(h, { className: "size-4 text-muted-foreground" }) }),
49
- /* @__PURE__ */ i("div", { className: "min-w-0", children: [
50
- /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2", children: [
87
+ r.length ? /* @__PURE__ */ s("div", { className: "overflow-hidden rounded-2xl border border-border bg-card/40 divide-y divide-border", children: r.map((e) => /* @__PURE__ */ t("div", { className: "px-4 py-3", children: [
88
+ /* @__PURE__ */ s("div", { className: "flex items-start justify-between gap-4", children: /* @__PURE__ */ t("div", { className: "flex min-w-0 items-start gap-3", children: [
89
+ /* @__PURE__ */ s("span", { className: "mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-[8px] border border-border bg-background", children: /* @__PURE__ */ s(v, { className: "size-4 text-muted-foreground" }) }),
90
+ /* @__PURE__ */ t("div", { className: "min-w-0", children: [
91
+ /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2", children: [
51
92
  /* @__PURE__ */ s("span", { className: "text-sm font-semibold", children: e.label }),
52
- /* @__PURE__ */ s(n, { variant: e.configured ? "default" : "secondary", children: e.configured ? "Ready" : "Needs setup" })
93
+ /* @__PURE__ */ s(d, { variant: e.configured ? "default" : "secondary", children: e.configured ? "Ready" : "Needs setup" })
53
94
  ] }),
54
- /* @__PURE__ */ s("div", { className: "mt-1 space-y-1", children: e.checks.map((t) => /* @__PURE__ */ i(
95
+ /* @__PURE__ */ s("div", { className: "mt-1 space-y-1", children: e.checks.map((i) => /* @__PURE__ */ t(
55
96
  "div",
56
97
  {
57
98
  className: "flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",
58
99
  children: [
59
- t.ok ? /* @__PURE__ */ s(x, { className: "size-3.5 shrink-0 text-success" }) : /* @__PURE__ */ s(p, { className: "size-3.5 shrink-0 text-destructive" }),
60
- /* @__PURE__ */ s("span", { className: "shrink-0", children: t.label }),
61
- t.detail ? /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-muted-foreground/70", children: t.detail }) : null
100
+ i.ok ? /* @__PURE__ */ s(x, { className: "size-3.5 shrink-0 text-success" }) : /* @__PURE__ */ s(g, { className: "size-3.5 shrink-0 text-destructive" }),
101
+ /* @__PURE__ */ s("span", { className: "shrink-0", children: i.label }),
102
+ i.detail ? /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-muted-foreground/70", children: i.detail }) : null
62
103
  ]
63
104
  },
64
- t.label
105
+ i.label
65
106
  )) })
66
107
  ] })
67
108
  ] }) }),
68
- /* @__PURE__ */ i("div", { className: "mt-3 flex flex-wrap items-center gap-2 pl-11", children: [
69
- e.instructions.map((t) => /* @__PURE__ */ s("span", { className: "min-w-0 flex-1 text-xs text-muted-foreground", children: t }, t)),
70
- /* @__PURE__ */ i(
109
+ /* @__PURE__ */ t("div", { className: "mt-3 flex flex-wrap items-center gap-2 pl-11", children: [
110
+ e.instructions.map((i) => /* @__PURE__ */ s("span", { className: "min-w-0 flex-1 text-xs text-muted-foreground", children: i }, i)),
111
+ /* @__PURE__ */ t(
71
112
  l,
72
113
  {
73
114
  size: "sm",
@@ -76,39 +117,39 @@ function q({
76
117
  onClick: () => S(e.key),
77
118
  title: e.canAutoSetup ? e.actionLabel : "Install a supported coding agent first",
78
119
  children: [
79
- e.running ? /* @__PURE__ */ s(b, { className: "size-4 animate-spin" }) : /* @__PURE__ */ s(N, { className: "size-4" }),
120
+ e.running ? /* @__PURE__ */ s(N, { className: "size-4 animate-spin" }) : /* @__PURE__ */ s(y, { className: "size-4" }),
80
121
  e.running ? "Running…" : e.actionLabel
81
122
  ]
82
123
  }
83
124
  )
84
125
  ] })
85
126
  ] }, e.key)) }) : null,
86
- /* @__PURE__ */ s("div", { className: "overflow-hidden rounded-2xl border border-border bg-card/40 divide-y divide-border", children: k.map((e) => {
87
- var u, f;
88
- const t = e.status.configured;
89
- return /* @__PURE__ */ i("div", { className: "px-4 py-3", children: [
90
- /* @__PURE__ */ i("div", { className: "flex items-start justify-between gap-4", children: [
91
- /* @__PURE__ */ i("div", { className: "flex min-w-0 items-start gap-3", children: [
127
+ /* @__PURE__ */ s("div", { className: "overflow-hidden rounded-2xl border border-border bg-card/40 divide-y divide-border", children: n.map((e) => {
128
+ var h, p;
129
+ const i = e.status.configured;
130
+ return /* @__PURE__ */ t("div", { className: "px-4 py-3", children: [
131
+ /* @__PURE__ */ t("div", { className: "flex items-start justify-between gap-4", children: [
132
+ /* @__PURE__ */ t("div", { className: "flex min-w-0 items-start gap-3", children: [
92
133
  /* @__PURE__ */ s("span", { className: "mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-[8px] border border-border bg-background", children: /* @__PURE__ */ s(
93
134
  "img",
94
135
  {
95
- src: v(e.key),
96
- alt: T(e.key),
136
+ src: k(e.key),
137
+ alt: O(e.key),
97
138
  className: "size-5"
98
139
  }
99
140
  ) }),
100
- /* @__PURE__ */ i("div", { className: "min-w-0", children: [
101
- /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2", children: [
141
+ /* @__PURE__ */ t("div", { className: "min-w-0", children: [
142
+ /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2", children: [
102
143
  /* @__PURE__ */ s("span", { className: "text-sm font-semibold", children: e.label }),
103
- /* @__PURE__ */ s(n, { variant: t ? "default" : "secondary", children: t ? "Ready" : "Needs setup" }),
104
- /* @__PURE__ */ s(n, { variant: "outline", children: e.status.omgCapabilityAccess === "mcp" ? "OMG tools" : "OMG prompt only" })
144
+ /* @__PURE__ */ s(d, { variant: i ? "default" : "secondary", children: i ? "Ready" : "Needs setup" }),
145
+ /* @__PURE__ */ s(d, { variant: "outline", children: e.status.omgCapabilityAccess === "mcp" ? "OMG tools" : "OMG prompt only" })
105
146
  ] }),
106
- /* @__PURE__ */ s("div", { className: "mt-1 space-y-1", children: e.status.checks.map((a) => /* @__PURE__ */ i(
147
+ /* @__PURE__ */ s("div", { className: "mt-1 space-y-1", children: e.status.checks.map((a) => /* @__PURE__ */ t(
107
148
  "div",
108
149
  {
109
150
  className: "flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",
110
151
  children: [
111
- a.ok ? /* @__PURE__ */ s(x, { className: "size-3.5 shrink-0 text-success" }) : /* @__PURE__ */ s(p, { className: "size-3.5 shrink-0 text-destructive" }),
152
+ a.ok ? /* @__PURE__ */ s(x, { className: "size-3.5 shrink-0 text-success" }) : /* @__PURE__ */ s(g, { className: "size-3.5 shrink-0 text-destructive" }),
112
153
  /* @__PURE__ */ s("span", { className: "shrink-0", children: a.label }),
113
154
  a.detail ? /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-muted-foreground/70", children: a.detail }) : null
114
155
  ]
@@ -118,71 +159,71 @@ function q({
118
159
  ] })
119
160
  ] }),
120
161
  /* @__PURE__ */ s(
121
- $,
162
+ G,
122
163
  {
123
164
  checked: e.visible,
124
- onCheckedChange: (a) => w(e.key, a),
165
+ onCheckedChange: (a) => c(e.key, a),
125
166
  "aria-label": `${e.label} visible in composer`
126
167
  }
127
168
  )
128
169
  ] }),
129
- e.key === "aisdk" && ((u = e.status.accounts) != null && u.length) ? /* @__PURE__ */ s("div", { className: "mt-3 space-y-1.5 pl-11", children: e.status.accounts.map((a) => /* @__PURE__ */ i(
170
+ e.key === "aisdk" && ((h = e.status.accounts) != null && h.length) ? /* @__PURE__ */ s("div", { className: "mt-3 space-y-1.5 pl-11", children: e.status.accounts.map((a) => /* @__PURE__ */ t(
130
171
  "div",
131
172
  {
132
173
  className: "flex items-center gap-2 rounded-xl border border-border/70 bg-background/55 px-2.5 py-2",
133
174
  children: [
134
- /* @__PURE__ */ i("span", { className: "relative flex size-7 shrink-0 items-center justify-center rounded-full bg-muted", children: [
135
- /* @__PURE__ */ s("img", { src: v("aisdk"), alt: "", className: "size-4.5" }),
175
+ /* @__PURE__ */ t("span", { className: "relative flex size-7 shrink-0 items-center justify-center rounded-full bg-muted", children: [
176
+ /* @__PURE__ */ s("img", { src: k("aisdk"), alt: "", className: "size-4.5" }),
136
177
  /* @__PURE__ */ s("span", { className: "absolute -bottom-0.5 -right-0.5 flex size-3.5 items-center justify-center rounded-full bg-foreground text-[8px] font-bold text-background ring-1 ring-background", children: a.number })
137
178
  ] }),
138
179
  /* @__PURE__ */ s("span", { className: "min-w-0 flex-1 truncate text-xs font-medium", children: a.label }),
139
- /* @__PURE__ */ s(n, { variant: a.connected ? "default" : "secondary", children: a.connected ? "Connected" : "Needs login" }),
140
- a.connected ? null : /* @__PURE__ */ i(l, { size: "sm", variant: "outline", onClick: () => m(e.key, a.id), children: [
141
- /* @__PURE__ */ s(y, { className: "size-3.5" }),
180
+ /* @__PURE__ */ s(d, { variant: a.connected ? "default" : "secondary", children: a.connected ? "Connected" : "Needs login" }),
181
+ a.connected ? null : /* @__PURE__ */ t(l, { size: "sm", variant: "outline", onClick: () => f(e.key, a.id), children: [
182
+ /* @__PURE__ */ s(w, { className: "size-3.5" }),
142
183
  "Connect"
143
184
  ] }),
144
185
  a.removable ? /* @__PURE__ */ s(
145
186
  "button",
146
187
  {
147
188
  type: "button",
148
- onClick: () => R(a),
189
+ onClick: () => j(a),
149
190
  title: `Remove ${a.label}`,
150
191
  "aria-label": `Remove ${a.label}`,
151
192
  className: "flex size-7 items-center justify-center rounded-full text-muted-foreground transition hover:bg-destructive/10 hover:text-destructive",
152
- children: /* @__PURE__ */ s(O, { className: "size-3.5" })
193
+ children: /* @__PURE__ */ s(P, { className: "size-3.5" })
153
194
  }
154
195
  ) : null
155
196
  ]
156
197
  },
157
198
  a.id
158
199
  )) }) : null,
159
- /* @__PURE__ */ i("div", { className: "mt-3 flex flex-wrap items-center gap-2 pl-11", children: [
160
- /* @__PURE__ */ i("div", { className: "min-w-0 flex-1 space-y-1 text-xs text-muted-foreground", children: [
200
+ /* @__PURE__ */ t("div", { className: "mt-3 flex flex-wrap items-center gap-2 pl-11", children: [
201
+ /* @__PURE__ */ t("div", { className: "min-w-0 flex-1 space-y-1 text-xs text-muted-foreground", children: [
161
202
  e.status.instructions.map((a) => /* @__PURE__ */ s("div", { children: a }, a)),
162
- e.status.installCommand ? /* @__PURE__ */ i("div", { className: "truncate", children: [
203
+ e.status.installCommand ? /* @__PURE__ */ t("div", { className: "truncate", children: [
163
204
  "Install: ",
164
205
  /* @__PURE__ */ s("code", { children: e.status.installCommand })
165
206
  ] }) : null,
166
- e.status.loginCommand && !d.has(e.key) ? /* @__PURE__ */ i("div", { className: "truncate", children: [
207
+ e.status.loginCommand && !u.has(e.key) ? /* @__PURE__ */ t("div", { className: "truncate", children: [
167
208
  "Login: ",
168
209
  /* @__PURE__ */ s("code", { children: e.status.loginCommand })
169
210
  ] }) : null
170
211
  ] }),
171
- /* @__PURE__ */ i(
212
+ /* @__PURE__ */ t(
172
213
  l,
173
214
  {
174
215
  size: "sm",
175
216
  variant: "outline",
176
217
  disabled: !e.status.canAutoSetup || e.status.setupRunning,
177
- onClick: () => z(e.key),
218
+ onClick: () => o(e.key),
178
219
  title: e.status.canAutoSetup ? "Run setup for this agent" : "No automatic setup is available",
179
220
  children: [
180
- e.status.setupRunning ? /* @__PURE__ */ s(b, { className: "size-4 animate-spin" }) : /* @__PURE__ */ s(N, { className: "size-4" }),
221
+ e.status.setupRunning ? /* @__PURE__ */ s(N, { className: "size-4 animate-spin" }) : /* @__PURE__ */ s(y, { className: "size-4" }),
181
222
  e.status.setupRunning ? "Running…" : "Install"
182
223
  ]
183
224
  }
184
225
  ),
185
- /* @__PURE__ */ i(
226
+ /* @__PURE__ */ t(
186
227
  l,
187
228
  {
188
229
  size: "sm",
@@ -190,12 +231,12 @@ function q({
190
231
  disabled: !e.status.canLoginInTerminal || e.status.setupRunning,
191
232
  onClick: () => {
192
233
  var a;
193
- return e.key === "aisdk" && ((a = e.status.accounts) != null && a.some((I) => I.connected)) ? C() : m(e.key);
234
+ return e.key === "aisdk" && ((a = e.status.accounts) != null && a.some((T) => T.connected)) ? R() : f(e.key);
194
235
  },
195
- title: d.has(e.key) ? `Sign in to ${e.label} in your browser` : e.status.loginCommand ? `Open terminal and run ${e.status.loginCommand}` : "No terminal login command is available",
236
+ title: u.has(e.key) ? `Sign in to ${e.label} in your browser` : e.status.loginCommand ? `Open terminal and run ${e.status.loginCommand}` : "No terminal login command is available",
196
237
  children: [
197
- d.has(e.key) ? /* @__PURE__ */ s(y, { className: "size-4" }) : /* @__PURE__ */ s(h, { className: "size-4" }),
198
- e.key === "aisdk" && ((f = e.status.accounts) != null && f.some((a) => a.connected)) ? "Add account" : "Login"
238
+ u.has(e.key) ? /* @__PURE__ */ s(w, { className: "size-4" }) : /* @__PURE__ */ s(v, { className: "size-4" }),
239
+ e.key === "aisdk" && ((p = e.status.accounts) != null && p.some((a) => a.connected)) ? "Add account" : "Login"
199
240
  ]
200
241
  }
201
242
  )
@@ -205,5 +246,5 @@ function q({
205
246
  ] });
206
247
  }
207
248
  export {
208
- q as default
249
+ K as default
209
250
  };