@omg-dev/app 0.2.20 → 0.2.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omg-dev/app",
3
- "version": "0.2.20",
3
+ "version": "0.2.22",
4
4
  "description": "The full OMG application surface for React hosts.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://omg.dev",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "type": "module",
26
26
  "dependencies": {
27
- "@omg-dev/client": "0.2.20",
27
+ "@omg-dev/client": "0.2.22",
28
28
  "@ai-sdk/react": "^4.0.19",
29
29
  "@base-ui/react": "^1.6.0",
30
30
  "@number-flow/react": "^0.6.2",
@@ -1,288 +0,0 @@
1
- import { jsxs as t, jsx as e, Fragment as K } from "react/jsx-runtime";
2
- import { R as F, B as d, L as z, P as w, S as R, f as $, g, T, h as m, i as M, j as _, k as S, C as q, l as H, X as U, K as W } from "./embedded-fYVkvd7A.js";
3
- import { cn as E } from "cnfast";
4
- import { useState as A } from "react";
5
- function j(a) {
6
- const i = a.filter((r) => !r.ok);
7
- return i.length ? i.length === 1 ? `${i[0].label} missing` : `${i.length} checks failing` : null;
8
- }
9
- function I({ checks: a }) {
10
- return /* @__PURE__ */ e("div", { className: "space-y-1", children: a.map((i) => /* @__PURE__ */ t(
11
- "div",
12
- {
13
- className: "flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",
14
- children: [
15
- i.ok ? /* @__PURE__ */ e(H, { className: "size-3.5 shrink-0 text-success" }) : /* @__PURE__ */ e(U, { className: "size-3.5 shrink-0 text-destructive" }),
16
- /* @__PURE__ */ e("span", { className: "shrink-0", children: i.label }),
17
- i.detail ? /* @__PURE__ */ e("span", { className: "min-w-0 truncate text-muted-foreground/70", children: i.detail }) : null
18
- ]
19
- },
20
- i.label
21
- )) });
22
- }
23
- function L({
24
- icon: a,
25
- title: i,
26
- note: r,
27
- ok: u,
28
- control: o,
29
- open: c,
30
- onToggle: h,
31
- children: f
32
- }) {
33
- return /* @__PURE__ */ t("div", { className: "px-4 py-2.5", children: [
34
- /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
35
- /* @__PURE__ */ t(
36
- "button",
37
- {
38
- type: "button",
39
- onClick: h,
40
- "aria-expanded": c,
41
- className: "flex min-w-0 flex-1 items-center gap-3 text-left",
42
- children: [
43
- /* @__PURE__ */ e("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-[8px] border border-border bg-background", children: a }),
44
- /* @__PURE__ */ t("span", { className: "min-w-0 flex-1", children: [
45
- /* @__PURE__ */ t("span", { className: "flex items-center gap-2", children: [
46
- /* @__PURE__ */ e("span", { className: "truncate text-sm font-medium", children: i }),
47
- u ? null : /* @__PURE__ */ e("span", { className: "size-1.5 shrink-0 rounded-full bg-destructive", "aria-hidden": !0 })
48
- ] }),
49
- r ? /* @__PURE__ */ e("span", { className: "block truncate text-xs text-muted-foreground", children: r }) : null
50
- ] }),
51
- /* @__PURE__ */ e(
52
- q,
53
- {
54
- className: E(
55
- "size-4 shrink-0 text-muted-foreground/60 transition-transform duration-150",
56
- c && "rotate-180"
57
- )
58
- }
59
- )
60
- ]
61
- }
62
- ),
63
- o
64
- ] }),
65
- c ? /* @__PURE__ */ e("div", { className: "mt-3 space-y-3 pl-11", children: f }) : null
66
- ] });
67
- }
68
- function X({
69
- provider: a,
70
- onConnect: i,
71
- onDisconnect: r
72
- }) {
73
- return /* @__PURE__ */ t("div", { className: "flex items-center gap-2 rounded-xl border border-border/70 bg-background/55 px-2.5 py-2", children: [
74
- /* @__PURE__ */ t("span", { className: "min-w-0 flex-1", children: [
75
- /* @__PURE__ */ e("span", { className: "block truncate text-xs font-medium", children: a.label }),
76
- a.detail || a.fromEnv ? /* @__PURE__ */ e("span", { className: "block truncate text-[11px] text-muted-foreground", children: a.detail ?? "From the environment" }) : null
77
- ] }),
78
- a.connected ? /* @__PURE__ */ t(K, { children: [
79
- /* @__PURE__ */ e("span", { className: "text-[11px] text-success", children: "Connected" }),
80
- a.fromEnv ? null : /* @__PURE__ */ e(
81
- "button",
82
- {
83
- type: "button",
84
- onClick: () => r(a),
85
- title: `Disconnect ${a.label}`,
86
- "aria-label": `Disconnect ${a.label}`,
87
- className: "flex size-7 items-center justify-center rounded-full text-muted-foreground transition hover:bg-destructive/10 hover:text-destructive",
88
- children: /* @__PURE__ */ e(T, { className: "size-3.5" })
89
- }
90
- )
91
- ] }) : /* @__PURE__ */ t(d, { size: "sm", variant: "outline", onClick: () => i(a), children: [
92
- a.method === "oauth" ? /* @__PURE__ */ e(g, { className: "size-3.5" }) : /* @__PURE__ */ e(W, { className: "size-3.5" }),
93
- "Connect"
94
- ] })
95
- ] });
96
- }
97
- function Z({
98
- setupChecks: a,
99
- agents: i,
100
- onVisibleChange: r,
101
- onSetup: u,
102
- onLogin: o,
103
- onAddClaudeAccount: c,
104
- onRemoveClaudeAccount: h,
105
- onConnectProvider: f,
106
- onDisconnectProvider: D,
107
- onSetupCheck: O,
108
- onRefresh: P
109
- }) {
110
- const [x, k] = A(!1), [N, B] = A(null), y = (n) => B((s) => s === n ? null : n);
111
- async function G() {
112
- if (!x) {
113
- k(!0);
114
- try {
115
- await P(), S.success("Coding agents refreshed");
116
- } catch (n) {
117
- S.error(n instanceof Error ? n.message : "Could not refresh coding agents");
118
- } finally {
119
- k(!1);
120
- }
121
- }
122
- }
123
- return /* @__PURE__ */ t("div", { className: "mx-auto max-w-xl space-y-3 pb-10", "data-lfg-page-column": !0, children: [
124
- /* @__PURE__ */ t("div", { className: "flex items-center justify-between px-4", children: [
125
- /* @__PURE__ */ e("h2", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: "Coding agents" }),
126
- /* @__PURE__ */ t(
127
- "button",
128
- {
129
- type: "button",
130
- onClick: () => void G(),
131
- disabled: x,
132
- className: "flex items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground disabled:opacity-50",
133
- children: [
134
- /* @__PURE__ */ e(F, { className: E("size-3.5", x && "animate-spin") }),
135
- "Refresh"
136
- ]
137
- }
138
- )
139
- ] }),
140
- a.length ? /* @__PURE__ */ e("div", { className: "overflow-hidden rounded-2xl border border-border bg-card/40 divide-y divide-border", children: a.map((n) => /* @__PURE__ */ t(
141
- L,
142
- {
143
- icon: /* @__PURE__ */ e(R, { className: "size-4 text-muted-foreground" }),
144
- title: n.label,
145
- note: j(n.checks),
146
- ok: n.configured,
147
- open: N === `setup:${n.key}`,
148
- onToggle: () => y(`setup:${n.key}`),
149
- children: [
150
- /* @__PURE__ */ e(I, { checks: n.checks }),
151
- n.instructions.map((s) => /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: s }, s)),
152
- /* @__PURE__ */ t(
153
- d,
154
- {
155
- size: "sm",
156
- variant: "outline",
157
- disabled: !n.canAutoSetup || n.running,
158
- onClick: () => O(n.key),
159
- title: n.canAutoSetup ? n.actionLabel : "Install a supported coding agent first",
160
- children: [
161
- n.running ? /* @__PURE__ */ e(z, { className: "size-4 animate-spin" }) : /* @__PURE__ */ e(w, { className: "size-4" }),
162
- n.running ? "Running…" : n.actionLabel
163
- ]
164
- }
165
- )
166
- ]
167
- },
168
- n.key
169
- )) }) : null,
170
- /* @__PURE__ */ e("div", { className: "overflow-hidden rounded-2xl border border-border bg-card/40 divide-y divide-border", children: i.map((n) => {
171
- const s = n.status, b = n.key === "aisdk" ? s.accounts ?? [] : [], v = s.providers ?? [], C = b.some((l) => l.connected);
172
- return /* @__PURE__ */ t(
173
- L,
174
- {
175
- icon: /* @__PURE__ */ e("img", { src: $(n.key), alt: _(n.key), className: "size-5" }),
176
- title: n.label,
177
- note: j(s.checks),
178
- ok: s.configured,
179
- open: N === `agent:${n.key}`,
180
- onToggle: () => y(`agent:${n.key}`),
181
- control: /* @__PURE__ */ e(
182
- M,
183
- {
184
- checked: n.visible,
185
- onCheckedChange: (l) => r(n.key, l),
186
- "aria-label": `${n.label} visible in composer`
187
- }
188
- ),
189
- children: [
190
- /* @__PURE__ */ e(I, { checks: s.checks }),
191
- b.length ? /* @__PURE__ */ e("div", { className: "space-y-1.5", children: b.map((l) => /* @__PURE__ */ t(
192
- "div",
193
- {
194
- className: "flex items-center gap-2 rounded-xl border border-border/70 bg-background/55 px-2.5 py-2",
195
- children: [
196
- /* @__PURE__ */ t("span", { className: "relative flex size-7 shrink-0 items-center justify-center rounded-full bg-muted", children: [
197
- /* @__PURE__ */ e("img", { src: $("aisdk"), alt: "", className: "size-4.5" }),
198
- /* @__PURE__ */ e("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: l.number })
199
- ] }),
200
- /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-xs font-medium", children: l.label }),
201
- l.connected ? /* @__PURE__ */ e("span", { className: "text-[11px] text-success", children: "Connected" }) : /* @__PURE__ */ t(
202
- d,
203
- {
204
- size: "sm",
205
- variant: "outline",
206
- onClick: () => o(n.key, l.id),
207
- children: [
208
- /* @__PURE__ */ e(g, { className: "size-3.5" }),
209
- "Connect"
210
- ]
211
- }
212
- ),
213
- l.removable ? /* @__PURE__ */ e(
214
- "button",
215
- {
216
- type: "button",
217
- onClick: () => h(l),
218
- title: `Remove ${l.label}`,
219
- "aria-label": `Remove ${l.label}`,
220
- className: "flex size-7 items-center justify-center rounded-full text-muted-foreground transition hover:bg-destructive/10 hover:text-destructive",
221
- children: /* @__PURE__ */ e(T, { className: "size-3.5" })
222
- }
223
- ) : null
224
- ]
225
- },
226
- l.id
227
- )) }) : null,
228
- v.length ? /* @__PURE__ */ e("div", { className: "space-y-1.5", children: v.map((l) => /* @__PURE__ */ e(
229
- X,
230
- {
231
- provider: l,
232
- onConnect: (p) => f(n.key, p),
233
- onDisconnect: (p) => D(n.key, p)
234
- },
235
- l.id
236
- )) }) : null,
237
- s.instructions.map((l) => /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: l }, l)),
238
- !s.configured && (s.installCommand || s.loginCommand && !m.has(n.key)) ? /* @__PURE__ */ t("div", { className: "space-y-1 text-xs text-muted-foreground", children: [
239
- s.installCommand ? /* @__PURE__ */ t("div", { className: "truncate", children: [
240
- "Install: ",
241
- /* @__PURE__ */ e("code", { children: s.installCommand })
242
- ] }) : null,
243
- s.loginCommand && !m.has(n.key) ? /* @__PURE__ */ t("div", { className: "truncate", children: [
244
- "Login: ",
245
- /* @__PURE__ */ e("code", { children: s.loginCommand })
246
- ] }) : null
247
- ] }) : null,
248
- /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2", children: [
249
- s.canAutoSetup ? /* @__PURE__ */ t(
250
- d,
251
- {
252
- size: "sm",
253
- variant: "outline",
254
- disabled: s.setupRunning,
255
- onClick: () => u(n.key),
256
- title: "Run setup for this agent",
257
- children: [
258
- s.setupRunning ? /* @__PURE__ */ e(z, { className: "size-4 animate-spin" }) : /* @__PURE__ */ e(w, { className: "size-4" }),
259
- s.setupRunning ? "Running…" : "Install"
260
- ]
261
- }
262
- ) : null,
263
- s.canLoginInTerminal ? /* @__PURE__ */ t(
264
- d,
265
- {
266
- size: "sm",
267
- variant: "outline",
268
- disabled: s.setupRunning,
269
- onClick: () => n.key === "aisdk" && C ? c() : o(n.key),
270
- title: m.has(n.key) ? `Sign in to ${n.label} in your browser` : `Open terminal and run ${s.loginCommand}`,
271
- children: [
272
- m.has(n.key) ? /* @__PURE__ */ e(g, { className: "size-4" }) : /* @__PURE__ */ e(R, { className: "size-4" }),
273
- n.key === "aisdk" && C ? "Add account" : "Login"
274
- ]
275
- }
276
- ) : null,
277
- /* @__PURE__ */ e("span", { className: "text-[11px] text-muted-foreground/70", children: s.omgCapabilityAccess === "mcp" ? "OMG tools" : "OMG prompt only" })
278
- ] })
279
- ]
280
- },
281
- n.key
282
- );
283
- }) })
284
- ] });
285
- }
286
- export {
287
- Z as default
288
- };
@@ -1,4 +0,0 @@
1
- import { p } from "./streamdown-response-gONFDL8V.js";
2
- export {
3
- p as Mermaid
4
- };