@omg-dev/app 0.2.22 → 0.3.0
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-lib/{ChangelogPage-l-UlKe1t.js → ChangelogPage-tITBP5A1.js} +64 -1
- package/dist-lib/{SessionFilesPanel-CIACL6m9.js → SessionFilesPanel-T3CkIp2a.js} +17 -17
- package/dist-lib/{TermView-DRG91TBB.js → TermView-BJiSY2oC.js} +1 -1
- package/dist-lib/apple-touch-icon.png +0 -0
- package/dist-lib/{chat-engine-BaoFBnjm.js → chat-engine-ChrOJLdY.js} +1 -1
- package/dist-lib/{coding-agents-page-BgaSJ48j.js → coding-agents-page-Bsy-dsUo.js} +1 -1
- package/dist-lib/{embedded-Dg1UH3AQ.js → embedded-cpSkU0tg.js} +13071 -12977
- package/dist-lib/{highlighted-body-OFNGDK62-Bcdmy8xK.js → highlighted-body-OFNGDK62-bfel3kiX.js} +1 -1
- package/dist-lib/icon-192.png +0 -0
- package/dist-lib/icon-512.png +0 -0
- package/dist-lib/icon-maskable-512.png +0 -0
- package/dist-lib/icon-maskable.svg +11 -11
- package/dist-lib/icon-small.svg +18 -15
- package/dist-lib/icon.svg +18 -15
- package/dist-lib/{index-uXIZsv3_.js → index-BNac_jIC.js} +1 -1
- package/dist-lib/index.js +1 -1
- package/dist-lib/mermaid-GHXKKRXX-CTlo5kzO.js +4 -0
- package/dist-lib/resume-session-sheet-CsBKi_wb.js +347 -0
- package/dist-lib/{session-token-usage-BpE02cRH.js → session-token-usage-CTQR54Yk.js} +6 -6
- package/dist-lib/{shipped-page-DvL-9270.js → shipped-page-B46DR9zS.js} +91 -101
- package/dist-lib/{streamdown-response-9boPsbKB.js → streamdown-response-Bt7VM-cZ.js} +4 -4
- package/dist-lib/styles.css +1 -1
- package/package.json +2 -2
- package/dist-lib/mermaid-GHXKKRXX-sJaUMvbY.js +0 -4
- package/dist-lib/resume-session-sheet-ABKL_UJZ.js +0 -317
package/dist-lib/{highlighted-body-OFNGDK62-Bcdmy8xK.js → highlighted-body-OFNGDK62-bfel3kiX.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as c, L as f, A as d } from "./streamdown-response-
|
|
1
|
+
import { R as c, L as f, A as d } from "./streamdown-response-Bt7VM-cZ.js";
|
|
2
2
|
import { useContext as p, useState as L, useEffect as N } from "react";
|
|
3
3
|
import { jsx as x } from "react/jsx-runtime";
|
|
4
4
|
var A = ({ code: s, language: e, raw: a, className: o, startLine: m, lineNumbers: u, ...g }) => {
|
package/dist-lib/icon-192.png
CHANGED
|
Binary file
|
package/dist-lib/icon-512.png
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
2
|
+
<!-- Adaptive-icon variant of icon.svg: full bleed, no tile corners, and the
|
|
3
|
+
mark scaled to 0.8 about the centre so it sits inside the maskable safe
|
|
4
|
+
zone whatever shape the launcher crops to. Same colours and the same
|
|
5
|
+
disc-with-a-bite, so the adaptive icon and the app icon read identically. -->
|
|
2
6
|
<defs>
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
+
<radialGradient id="bg" cx="0" cy="0" r="1.2"><stop offset="0%" stop-color="#4a2417"/><stop offset="100%" stop-color="#120f0b"/></radialGradient>
|
|
8
|
+
<mask id="disc">
|
|
9
|
+
<rect width="512" height="512" fill="black"/>
|
|
10
|
+
<circle cx="256" cy="256" r="147" fill="white"/>
|
|
11
|
+
<circle cx="324.2" cy="187.7" r="42.7" fill="black"/>
|
|
12
|
+
</mask>
|
|
7
13
|
</defs>
|
|
8
14
|
<rect width="512" height="512" fill="url(#bg)"/>
|
|
9
|
-
|
|
10
|
-
icon read identically. Still well inside the maskable safe zone. -->
|
|
11
|
-
<g fill="#fff" transform="translate(256 256) scale(.78) translate(-268 -256)">
|
|
12
|
-
<rect x="126" y="158" width="38" height="190" rx="7"/>
|
|
13
|
-
<path d="M196 218v-12c0-36 22-56 59-56h29v35h-19c-21 0-30 8-30 25v8h48v36h-48v94h-39v-94h-28v-36h28Z"/>
|
|
14
|
-
<path fill-rule="evenodd" d="M337 210c16 0 30 6 40 17v-13h37v126c0 51-29 78-78 78-25 0-48-7-65-19l16-30c14 9 30 14 47 14 28 0 43-13 43-40v-9c-11 12-25 18-41 18-39 0-68-30-68-71s29-71 69-71Zm7 35c-21 0-37 15-37 36s16 36 37 36c20 0 36-15 36-36s-16-36-36-36Z"/>
|
|
15
|
-
</g>
|
|
15
|
+
<rect width="512" height="512" fill="#f6f2ec" mask="url(#disc)"/>
|
|
16
16
|
</svg>
|
package/dist-lib/icon-small.svg
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
2
|
+
<!-- The omg.dev app icon: a cream disc with a bite out of the upper right,
|
|
3
|
+
on the warm near-black tile. Traced from docs/images/omg-icon.png, which
|
|
4
|
+
is the product's own icon and stays the reference for this file. Geometry
|
|
5
|
+
was measured off that artwork at 192px and scaled by 512/192: disc centre
|
|
6
|
+
(95.5, 95.5) r69, bite centre (127.5, 63.5) r20, corner radius 44.
|
|
7
|
+
|
|
8
|
+
This used to draw the legacy "lfg" wordmark on a blue/cyan tile, which is
|
|
9
|
+
why generate-icons.ts refused to regenerate the README icon from it. -->
|
|
2
10
|
<defs>
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
<radialGradient id="bg" cx="0" cy="0" r="1.2"><stop offset="0%" stop-color="#4a2417"/><stop offset="100%" stop-color="#120f0b"/></radialGradient>
|
|
12
|
+
<!-- The bite is a hole, not a dark dot: the tile gradient shows through it,
|
|
13
|
+
so it stays correct wherever the mark is placed. -->
|
|
14
|
+
<mask id="disc">
|
|
15
|
+
<rect width="512" height="512" fill="black"/>
|
|
16
|
+
<circle cx="254.7" cy="254.7" r="184" fill="white"/>
|
|
17
|
+
<circle cx="340" cy="169.3" r="53.3" fill="black"/>
|
|
18
|
+
</mask>
|
|
7
19
|
</defs>
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
optical size it did as a bitmap. Glyph bbox is 288x268 at 126,150; this
|
|
11
|
-
scales it to 0.78 and re-centres on (256.3, 271.8), the centre the old
|
|
12
|
-
artwork occupied. That puts the 'l' stem at 5.8% of the tile against the
|
|
13
|
-
old 6.1%, instead of the 7.4% the unscaled outlines were drawing. -->
|
|
14
|
-
<g fill="#fff" transform="translate(45.70 50.28) scale(0.78)">
|
|
15
|
-
<rect x="126" y="158" width="38" height="190" rx="7"/>
|
|
16
|
-
<path d="M196 218v-12c0-36 22-56 59-56h29v35h-19c-21 0-30 8-30 25v8h48v36h-48v94h-39v-94h-28v-36h28Z"/>
|
|
17
|
-
<path fill-rule="evenodd" d="M337 210c16 0 30 6 40 17v-13h37v126c0 51-29 78-78 78-25 0-48-7-65-19l16-30c14 9 30 14 47 14 28 0 43-13 43-40v-9c-11 12-25 18-41 18-39 0-68-30-68-71s29-71 69-71Zm7 35c-21 0-37 15-37 36s16 36 37 36c20 0 36-15 36-36s-16-36-36-36Z"/>
|
|
18
|
-
</g>
|
|
20
|
+
<rect width="512" height="512" rx="115" ry="115" fill="url(#bg)"/>
|
|
21
|
+
<rect width="512" height="512" fill="#f6f2ec" mask="url(#disc)"/>
|
|
19
22
|
</svg>
|
package/dist-lib/icon.svg
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
2
|
+
<!-- The omg.dev app icon: a cream disc with a bite out of the upper right,
|
|
3
|
+
on the warm near-black tile. Traced from docs/images/omg-icon.png, which
|
|
4
|
+
is the product's own icon and stays the reference for this file. Geometry
|
|
5
|
+
was measured off that artwork at 192px and scaled by 512/192: disc centre
|
|
6
|
+
(95.5, 95.5) r69, bite centre (127.5, 63.5) r20, corner radius 44.
|
|
7
|
+
|
|
8
|
+
This used to draw the legacy "lfg" wordmark on a blue/cyan tile, which is
|
|
9
|
+
why generate-icons.ts refused to regenerate the README icon from it. -->
|
|
2
10
|
<defs>
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
<radialGradient id="bg" cx="0" cy="0" r="1.2"><stop offset="0%" stop-color="#4a2417"/><stop offset="100%" stop-color="#120f0b"/></radialGradient>
|
|
12
|
+
<!-- The bite is a hole, not a dark dot: the tile gradient shows through it,
|
|
13
|
+
so it stays correct wherever the mark is placed. -->
|
|
14
|
+
<mask id="disc">
|
|
15
|
+
<rect width="512" height="512" fill="black"/>
|
|
16
|
+
<circle cx="254.7" cy="254.7" r="184" fill="white"/>
|
|
17
|
+
<circle cx="340" cy="169.3" r="53.3" fill="black"/>
|
|
18
|
+
</mask>
|
|
7
19
|
</defs>
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
optical size it did as a bitmap. Glyph bbox is 288x268 at 126,150; this
|
|
11
|
-
scales it to 0.78 and re-centres on (256.3, 271.8), the centre the old
|
|
12
|
-
artwork occupied. That puts the 'l' stem at 5.8% of the tile against the
|
|
13
|
-
old 6.1%, instead of the 7.4% the unscaled outlines were drawing. -->
|
|
14
|
-
<g fill="#fff" transform="translate(45.70 50.28) scale(0.78)">
|
|
15
|
-
<rect x="126" y="158" width="38" height="190" rx="7"/>
|
|
16
|
-
<path d="M196 218v-12c0-36 22-56 59-56h29v35h-19c-21 0-30 8-30 25v8h48v36h-48v94h-39v-94h-28v-36h28Z"/>
|
|
17
|
-
<path fill-rule="evenodd" d="M337 210c16 0 30 6 40 17v-13h37v126c0 51-29 78-78 78-25 0-48-7-65-19l16-30c14 9 30 14 47 14 28 0 43-13 43-40v-9c-11 12-25 18-41 18-39 0-68-30-68-71s29-71 69-71Zm7 35c-21 0-37 15-37 36s16 36 37 36c20 0 36-15 36-36s-16-36-36-36Z"/>
|
|
18
|
-
</g>
|
|
20
|
+
<rect width="512" height="512" rx="115" ry="115" fill="url(#bg)"/>
|
|
21
|
+
<rect width="512" height="512" fill="#f6f2ec" mask="url(#disc)"/>
|
|
19
22
|
</svg>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as T, s as U, h as X, c as Y, v as G, S as J, o as k, l as Q, f as M, m as y } from "./streamdown-response-
|
|
1
|
+
import { w as T, s as U, h as X, c as Y, v as G, S as J, o as k, l as Q, f as M, m as y } from "./streamdown-response-Bt7VM-cZ.js";
|
|
2
2
|
import v from "./katex-jHfnQmlp.js";
|
|
3
3
|
function Z(t, e) {
|
|
4
4
|
return B(t, {}) || { type: "root", children: [] };
|
package/dist-lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@tanstack/react-router";
|
|
4
|
-
import {
|
|
4
|
+
import { ad as m, ae as o, af as s } from "./embedded-cpSkU0tg.js";
|
|
5
5
|
export {
|
|
6
6
|
m as OmgAppSurface,
|
|
7
7
|
o as OmgSettingsSurface,
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { jsx as t, jsxs as s, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { r as X, P as J, a as le, f as oe, g as ie, h as ce, X as K, A as P, R as Y, i as de, S as ue, j as Z, T as me, k as he, l as pe, C as fe, L as ge } from "./embedded-cpSkU0tg.js";
|
|
3
|
+
import { cn as x } from "cnfast";
|
|
4
|
+
import { useState as a, useRef as E, useEffect as C, useCallback as xe } from "react";
|
|
5
|
+
function be(r) {
|
|
6
|
+
if (!r) return "";
|
|
7
|
+
const i = r.split("/").filter(Boolean);
|
|
8
|
+
return i[i.length - 1] ?? "";
|
|
9
|
+
}
|
|
10
|
+
function Ne(r, i) {
|
|
11
|
+
const u = (i ?? "").trim();
|
|
12
|
+
if (!u) return "";
|
|
13
|
+
const b = (h) => h.replace(/\s+/g, " ").trim().toLowerCase(), d = b(u), m = b(r);
|
|
14
|
+
return !m || d === m || d.startsWith(m) || m.startsWith(d) ? "" : u;
|
|
15
|
+
}
|
|
16
|
+
function ke({
|
|
17
|
+
initial: r,
|
|
18
|
+
scopedProject: i,
|
|
19
|
+
onRestore: u,
|
|
20
|
+
onPick: b,
|
|
21
|
+
onClose: d
|
|
22
|
+
}) {
|
|
23
|
+
const h = i && i !== "__all" ? i : "all", D = X(), [l, F] = a(
|
|
24
|
+
() => D.some((e) => e.status !== "sent") ? "stash" : "sessions"
|
|
25
|
+
), [N, ee] = a(D), [p, z] = a(""), [v, te] = a(""), [f, M] = a("all"), [n, _] = a(h), [c, $] = a(
|
|
26
|
+
h === "all" && r ? r : []
|
|
27
|
+
), [w, I] = a(h === "all" && r ? r.length : 0), [y, G] = a({ agents: [], projects: [] }), [O, U] = a(!1), [V, W] = a(!1), q = E(null), B = E(c), g = E(0);
|
|
28
|
+
C(() => {
|
|
29
|
+
B.current = c;
|
|
30
|
+
}, [c]), C(() => {
|
|
31
|
+
const e = () => ee(X());
|
|
32
|
+
return window.addEventListener(J, e), window.addEventListener("storage", e), () => {
|
|
33
|
+
window.removeEventListener(J, e), window.removeEventListener("storage", e);
|
|
34
|
+
};
|
|
35
|
+
}, []), C(() => {
|
|
36
|
+
const e = window.setTimeout(() => te(p.trim()), 220);
|
|
37
|
+
return () => window.clearTimeout(e);
|
|
38
|
+
}, [p]);
|
|
39
|
+
const A = xe(
|
|
40
|
+
(e) => {
|
|
41
|
+
const o = e ? ++g.current : g.current, S = e ? 0 : B.current.length;
|
|
42
|
+
e ? U(!0) : W(!0);
|
|
43
|
+
const k = new URLSearchParams({ limit: String(25), offset: String(S) });
|
|
44
|
+
v && k.set("search", v), f !== "all" && k.set("agent", f), n !== "all" && k.set("project", n), le(`/api/sessions/resumable?${k.toString()}`).then((j) => {
|
|
45
|
+
if (o !== g.current) return;
|
|
46
|
+
const T = Array.isArray(j.sessions) ? j.sessions : [];
|
|
47
|
+
$((re) => e ? T : [...re, ...T]), I(j.total ?? T.length), G(j.facets ?? { agents: [], projects: [] });
|
|
48
|
+
}).catch(() => {
|
|
49
|
+
o !== g.current || !e || ($([]), I(0), G({ agents: [], projects: [] }));
|
|
50
|
+
}).finally(() => {
|
|
51
|
+
o === g.current && (e ? U(!1) : W(!1));
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
[f, v, n]
|
|
55
|
+
);
|
|
56
|
+
C(() => {
|
|
57
|
+
l === "sessions" && A(!0);
|
|
58
|
+
}, [A, l]);
|
|
59
|
+
const L = p.trim().toLowerCase(), H = N.filter(
|
|
60
|
+
(e) => L ? `${e.text} ${e.sessionTitle ?? ""} ${e.project ?? ""}`.toLowerCase().includes(L) : !0
|
|
61
|
+
), se = O && !c.length, Q = f !== "all" || n !== "all" || !!v, ae = c.length < w, ne = (e) => e === "draft" ? "Draft" : e === "sending" ? "Sending" : e === "failed" ? "Failed" : "Sent";
|
|
62
|
+
return /* @__PURE__ */ t(
|
|
63
|
+
oe,
|
|
64
|
+
{
|
|
65
|
+
open: !0,
|
|
66
|
+
repositionInputs: !1,
|
|
67
|
+
onOpenChange: (e) => {
|
|
68
|
+
e || d();
|
|
69
|
+
},
|
|
70
|
+
children: /* @__PURE__ */ t(ie, { className: "mx-auto w-full max-w-2xl sm:max-w-2xl", children: /* @__PURE__ */ s("div", { className: "flex min-h-0 flex-col overflow-hidden max-h-[72dvh] group-data-[paged=true]/drawer-content:max-h-none group-data-[paged=true]/drawer-content:flex-1", children: [
|
|
71
|
+
/* @__PURE__ */ s("header", { className: "shrink-0 border-b border-border/70 pb-2", children: [
|
|
72
|
+
/* @__PURE__ */ s("div", { className: "flex h-9 items-center gap-2", children: [
|
|
73
|
+
/* @__PURE__ */ t(ce, { className: "text-[15px] font-semibold", children: "Resume" }),
|
|
74
|
+
/* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: "Stash & sessions" }),
|
|
75
|
+
/* @__PURE__ */ t(
|
|
76
|
+
"button",
|
|
77
|
+
{
|
|
78
|
+
type: "button",
|
|
79
|
+
onClick: d,
|
|
80
|
+
"aria-label": "Close",
|
|
81
|
+
className: "ml-auto flex size-8 items-center justify-center rounded-full bg-muted text-muted-foreground transition hover:text-foreground active:scale-95",
|
|
82
|
+
children: /* @__PURE__ */ t(K, { className: "size-4" })
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ s("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
87
|
+
/* @__PURE__ */ s("div", { className: "inline-flex h-8 shrink-0 items-center rounded-full bg-muted p-0.5 text-xs font-medium", children: [
|
|
88
|
+
/* @__PURE__ */ s(
|
|
89
|
+
"button",
|
|
90
|
+
{
|
|
91
|
+
type: "button",
|
|
92
|
+
onClick: () => F("stash"),
|
|
93
|
+
className: x(
|
|
94
|
+
"flex h-7 items-center gap-1.5 rounded-full px-3 transition",
|
|
95
|
+
l === "stash" ? "bg-background text-foreground shadow-sm" : "text-muted-foreground"
|
|
96
|
+
),
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ t(P, { className: "size-3.5" }),
|
|
99
|
+
"Stash",
|
|
100
|
+
N.length ? /* @__PURE__ */ t("span", { className: "tabular-nums opacity-60", children: N.length }) : null
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ s(
|
|
105
|
+
"button",
|
|
106
|
+
{
|
|
107
|
+
type: "button",
|
|
108
|
+
onClick: () => F("sessions"),
|
|
109
|
+
className: x(
|
|
110
|
+
"flex h-7 items-center gap-1.5 rounded-full px-3 transition",
|
|
111
|
+
l === "sessions" ? "bg-background text-foreground shadow-sm" : "text-muted-foreground"
|
|
112
|
+
),
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ t(Y, { className: "size-3.5" }),
|
|
115
|
+
"Sessions",
|
|
116
|
+
w ? /* @__PURE__ */ t("span", { className: "tabular-nums opacity-60", children: w }) : null
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
] }),
|
|
121
|
+
l === "stash" && N.length ? /* @__PURE__ */ t(
|
|
122
|
+
"button",
|
|
123
|
+
{
|
|
124
|
+
type: "button",
|
|
125
|
+
onClick: () => de(),
|
|
126
|
+
className: "ml-auto h-8 rounded-full px-2.5 text-xs font-medium text-muted-foreground transition hover:bg-muted hover:text-destructive",
|
|
127
|
+
children: "Clear"
|
|
128
|
+
}
|
|
129
|
+
) : null
|
|
130
|
+
] }),
|
|
131
|
+
/* @__PURE__ */ s("div", { className: "mt-2 flex items-center gap-1.5", children: [
|
|
132
|
+
/* @__PURE__ */ s("div", { className: "relative min-w-0 flex-1", children: [
|
|
133
|
+
/* @__PURE__ */ t(ue, { className: "pointer-events-none absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground/70" }),
|
|
134
|
+
/* @__PURE__ */ t(
|
|
135
|
+
"input",
|
|
136
|
+
{
|
|
137
|
+
ref: q,
|
|
138
|
+
value: p,
|
|
139
|
+
onChange: (e) => z(e.target.value),
|
|
140
|
+
placeholder: l === "stash" ? "Search prompts" : "Search sessions",
|
|
141
|
+
"aria-label": l === "stash" ? "Search stashed prompts" : "Search resumable sessions",
|
|
142
|
+
autoComplete: "off",
|
|
143
|
+
className: "h-8 w-full rounded-full border border-border bg-muted/40 pl-8 pr-8 text-xs outline-none transition focus:border-ring focus:bg-background"
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
p ? /* @__PURE__ */ t(
|
|
147
|
+
"button",
|
|
148
|
+
{
|
|
149
|
+
type: "button",
|
|
150
|
+
onClick: () => {
|
|
151
|
+
var e;
|
|
152
|
+
z(""), (e = q.current) == null || e.focus();
|
|
153
|
+
},
|
|
154
|
+
"aria-label": "Clear search",
|
|
155
|
+
className: "absolute right-1.5 top-1/2 flex size-6 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground",
|
|
156
|
+
children: /* @__PURE__ */ t(K, { className: "size-3.5" })
|
|
157
|
+
}
|
|
158
|
+
) : null
|
|
159
|
+
] }),
|
|
160
|
+
l === "sessions" ? /* @__PURE__ */ s(R, { children: [
|
|
161
|
+
/* @__PURE__ */ s(
|
|
162
|
+
"select",
|
|
163
|
+
{
|
|
164
|
+
value: f,
|
|
165
|
+
onChange: (e) => M(e.target.value),
|
|
166
|
+
"aria-label": "Filter by agent",
|
|
167
|
+
className: "h-8 max-w-28 rounded-full border border-border bg-background px-2 text-xs outline-none",
|
|
168
|
+
children: [
|
|
169
|
+
/* @__PURE__ */ t("option", { value: "all", children: "All agents" }),
|
|
170
|
+
y.agents.map((e) => /* @__PURE__ */ s("option", { value: e.agent, children: [
|
|
171
|
+
e.agent,
|
|
172
|
+
" · ",
|
|
173
|
+
e.count
|
|
174
|
+
] }, e.agent))
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
y.projects.length || n !== "all" ? /* @__PURE__ */ s(
|
|
179
|
+
"select",
|
|
180
|
+
{
|
|
181
|
+
value: n,
|
|
182
|
+
onChange: (e) => _(e.target.value),
|
|
183
|
+
"aria-label": "Filter by project",
|
|
184
|
+
className: "h-8 max-w-32 rounded-full border border-border bg-background px-2 text-xs outline-none",
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ t("option", { value: "all", children: "All projects" }),
|
|
187
|
+
n !== "all" && !y.projects.some((e) => e.project === n) ? /* @__PURE__ */ t("option", { value: n, children: n }) : null,
|
|
188
|
+
y.projects.map((e) => /* @__PURE__ */ s("option", { value: e.project, children: [
|
|
189
|
+
e.project,
|
|
190
|
+
" · ",
|
|
191
|
+
e.count
|
|
192
|
+
] }, e.project))
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
) : null
|
|
196
|
+
] }) : null
|
|
197
|
+
] })
|
|
198
|
+
] }),
|
|
199
|
+
/* @__PURE__ */ t("div", { className: "min-h-0 max-h-[min(28rem,55dvh)] overflow-y-auto overscroll-contain pt-1", children: l === "stash" ? H.length ? /* @__PURE__ */ t("div", { className: "space-y-0.5", children: H.map((e) => /* @__PURE__ */ s(
|
|
200
|
+
"div",
|
|
201
|
+
{
|
|
202
|
+
className: "group flex items-center gap-1 rounded-xl transition hover:bg-muted",
|
|
203
|
+
children: [
|
|
204
|
+
/* @__PURE__ */ s(
|
|
205
|
+
"button",
|
|
206
|
+
{
|
|
207
|
+
type: "button",
|
|
208
|
+
onClick: () => {
|
|
209
|
+
u(e), d();
|
|
210
|
+
},
|
|
211
|
+
className: "flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left active:scale-[0.99]",
|
|
212
|
+
children: [
|
|
213
|
+
/* @__PURE__ */ t(
|
|
214
|
+
"span",
|
|
215
|
+
{
|
|
216
|
+
className: x(
|
|
217
|
+
"flex size-7 shrink-0 items-center justify-center rounded-lg",
|
|
218
|
+
e.status === "draft" || e.status === "failed" ? "bg-primary/12 text-primary" : "bg-muted text-muted-foreground"
|
|
219
|
+
),
|
|
220
|
+
children: /* @__PURE__ */ t(P, { className: "size-3.5" })
|
|
221
|
+
}
|
|
222
|
+
),
|
|
223
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
224
|
+
/* @__PURE__ */ t("span", { className: "line-clamp-2 text-sm leading-snug", children: e.text }),
|
|
225
|
+
/* @__PURE__ */ s("span", { className: "mt-0.5 flex items-center gap-1.5 text-[11px] text-muted-foreground", children: [
|
|
226
|
+
/* @__PURE__ */ t(
|
|
227
|
+
"span",
|
|
228
|
+
{
|
|
229
|
+
className: x(
|
|
230
|
+
"font-medium",
|
|
231
|
+
e.status === "failed" && "text-destructive",
|
|
232
|
+
e.status === "draft" && "text-primary"
|
|
233
|
+
),
|
|
234
|
+
children: ne(e.status)
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
/* @__PURE__ */ t("span", { children: "·" }),
|
|
238
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: e.source === "new-session" ? e.project || "New session" : e.sessionTitle || "Session" }),
|
|
239
|
+
/* @__PURE__ */ t("span", { children: "·" }),
|
|
240
|
+
/* @__PURE__ */ t("span", { className: "shrink-0 tabular-nums", children: Z(e.updatedAt) })
|
|
241
|
+
] })
|
|
242
|
+
] })
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
),
|
|
246
|
+
/* @__PURE__ */ t(
|
|
247
|
+
"button",
|
|
248
|
+
{
|
|
249
|
+
type: "button",
|
|
250
|
+
onClick: () => he(e.id),
|
|
251
|
+
"aria-label": "Remove from Stash",
|
|
252
|
+
className: "mr-1 flex size-7 shrink-0 items-center justify-center rounded-full text-muted-foreground opacity-60 transition hover:bg-background hover:text-destructive group-hover:opacity-100",
|
|
253
|
+
children: /* @__PURE__ */ t(me, { className: "size-3.5" })
|
|
254
|
+
}
|
|
255
|
+
)
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
e.id
|
|
259
|
+
)) }) : /* @__PURE__ */ s("div", { className: "flex h-full min-h-48 flex-col items-center justify-center gap-2 px-4 text-center text-sm text-muted-foreground", children: [
|
|
260
|
+
/* @__PURE__ */ t(P, { className: "size-5" }),
|
|
261
|
+
/* @__PURE__ */ t("span", { children: L ? "No stashed prompts match" : "Typed and dictated prompts will appear here" })
|
|
262
|
+
] }) : se ? /* @__PURE__ */ t("div", { className: "animate-pulse space-y-1.5", "aria-hidden": !0, children: Array.from({ length: 6 }).map((e, o) => /* @__PURE__ */ s(
|
|
263
|
+
"div",
|
|
264
|
+
{
|
|
265
|
+
className: "flex items-center gap-3 rounded-xl border border-transparent bg-card px-3 py-2.5",
|
|
266
|
+
children: [
|
|
267
|
+
/* @__PURE__ */ t("div", { className: "size-8 shrink-0 rounded-md bg-muted" }),
|
|
268
|
+
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1 space-y-1.5", children: [
|
|
269
|
+
/* @__PURE__ */ t("div", { className: "h-3 w-1/2 rounded bg-muted" }),
|
|
270
|
+
/* @__PURE__ */ t("div", { className: "h-2.5 w-3/4 rounded bg-muted/60" }),
|
|
271
|
+
/* @__PURE__ */ t("div", { className: "h-2.5 w-1/4 rounded-full bg-muted/60" })
|
|
272
|
+
] })
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
o
|
|
276
|
+
)) }) : c.length === 0 ? /* @__PURE__ */ s("div", { className: "flex h-full min-h-48 flex-col items-center justify-center gap-2 px-4 text-center text-sm text-muted-foreground", children: [
|
|
277
|
+
/* @__PURE__ */ t(Y, { className: "size-5" }),
|
|
278
|
+
/* @__PURE__ */ t("span", { children: Q ? "No sessions match" : "No recent sessions to resume" }),
|
|
279
|
+
Q ? /* @__PURE__ */ t(
|
|
280
|
+
"button",
|
|
281
|
+
{
|
|
282
|
+
type: "button",
|
|
283
|
+
onClick: () => {
|
|
284
|
+
z(""), M("all"), _("all");
|
|
285
|
+
},
|
|
286
|
+
className: "rounded-full border border-border px-3 py-1 text-xs font-medium text-foreground",
|
|
287
|
+
children: "Clear filters"
|
|
288
|
+
}
|
|
289
|
+
) : null
|
|
290
|
+
] }) : /* @__PURE__ */ s(R, { children: [
|
|
291
|
+
/* @__PURE__ */ t("div", { className: x("space-y-1.5 transition-opacity", O && "opacity-60"), children: c.map((e) => {
|
|
292
|
+
const o = be(e.cwd), S = Ne(e.title, e.lastUserText);
|
|
293
|
+
return /* @__PURE__ */ s(
|
|
294
|
+
"button",
|
|
295
|
+
{
|
|
296
|
+
type: "button",
|
|
297
|
+
onClick: () => b(e),
|
|
298
|
+
title: e.cwd || e.title,
|
|
299
|
+
className: "lfg-gborder flex w-full items-center gap-3 rounded-xl border border-transparent bg-card px-3 py-2.5 text-left transition hover:border-border hover:bg-muted/60 active:scale-[0.99]",
|
|
300
|
+
children: [
|
|
301
|
+
/* @__PURE__ */ t(
|
|
302
|
+
pe,
|
|
303
|
+
{
|
|
304
|
+
session: e,
|
|
305
|
+
className: "size-8 rounded-md",
|
|
306
|
+
size: "md",
|
|
307
|
+
wrapperClassName: "shrink-0"
|
|
308
|
+
}
|
|
309
|
+
),
|
|
310
|
+
/* @__PURE__ */ s("span", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
311
|
+
/* @__PURE__ */ s("span", { className: "flex items-baseline gap-1.5", children: [
|
|
312
|
+
/* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-sm font-medium leading-tight", children: e.title }),
|
|
313
|
+
/* @__PURE__ */ t("span", { className: "shrink-0 text-[10px] leading-tight tabular-nums text-muted-foreground/70", children: Z(e.lastActivityAt) })
|
|
314
|
+
] }),
|
|
315
|
+
S ? /* @__PURE__ */ t("span", { className: "truncate text-xs leading-tight text-muted-foreground", children: S }) : null,
|
|
316
|
+
/* @__PURE__ */ s("span", { className: "flex min-w-0 items-center gap-1", children: [
|
|
317
|
+
/* @__PURE__ */ t("span", { className: "max-w-[50%] truncate rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground", children: e.project }),
|
|
318
|
+
o && o !== e.project ? /* @__PURE__ */ t("span", { className: "max-w-[50%] truncate rounded-full bg-muted/60 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground/80", children: o }) : null
|
|
319
|
+
] })
|
|
320
|
+
] }),
|
|
321
|
+
/* @__PURE__ */ t(fe, { className: "size-3.5 shrink-0 text-muted-foreground/60" })
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
e.sessionId
|
|
325
|
+
);
|
|
326
|
+
}) }),
|
|
327
|
+
ae ? /* @__PURE__ */ t(
|
|
328
|
+
"button",
|
|
329
|
+
{
|
|
330
|
+
type: "button",
|
|
331
|
+
onClick: () => A(!1),
|
|
332
|
+
disabled: V,
|
|
333
|
+
className: "mt-1 flex w-full items-center justify-center gap-2 rounded-xl px-3 py-2.5 text-xs font-medium text-muted-foreground transition hover:bg-muted disabled:opacity-60",
|
|
334
|
+
children: V ? /* @__PURE__ */ s(R, { children: [
|
|
335
|
+
/* @__PURE__ */ t(ge, { className: "size-3.5 animate-spin" }),
|
|
336
|
+
" Loading…"
|
|
337
|
+
] }) : `Load ${Math.min(25, w - c.length)} more`
|
|
338
|
+
}
|
|
339
|
+
) : null
|
|
340
|
+
] }) })
|
|
341
|
+
] }) })
|
|
342
|
+
}
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
export {
|
|
346
|
+
ke as default
|
|
347
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as s, jsxs as n, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
-
import { a as C, D as T, b as M, c as D, d as S, G as F, e as L, t as R, L as j } from "./embedded-
|
|
2
|
+
import { a as C, D as T, b as M, c as D, d as S, G as F, e as L, t as R, L as j } from "./embedded-cpSkU0tg.js";
|
|
3
|
+
import { useState as p, useCallback as z, useEffect as P } from "react";
|
|
3
4
|
import "@base-ui/react/collapsible";
|
|
4
|
-
import { cn as
|
|
5
|
-
import { useState as p, useCallback as P, useEffect as U } from "react";
|
|
5
|
+
import { cn as U } from "cnfast";
|
|
6
6
|
import "@base-ui/react/input";
|
|
7
7
|
function u({
|
|
8
8
|
title: r,
|
|
@@ -28,7 +28,7 @@ function H({
|
|
|
28
28
|
onOpenChange: l
|
|
29
29
|
}) {
|
|
30
30
|
var k;
|
|
31
|
-
const m = r.sessionId, [e, v] = p(null), [x, g] = p(!1), [b, N] = p(null), h =
|
|
31
|
+
const m = r.sessionId, [e, v] = p(null), [x, g] = p(!1), [b, N] = p(null), h = z(async () => {
|
|
32
32
|
if (m) {
|
|
33
33
|
g(!0), N(null);
|
|
34
34
|
try {
|
|
@@ -40,7 +40,7 @@ function H({
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}, [m]);
|
|
43
|
-
|
|
43
|
+
P(() => {
|
|
44
44
|
!d || e || x || h();
|
|
45
45
|
}, [h, x, d, e]);
|
|
46
46
|
const y = (e == null ? void 0 : e.categories.reduce((t, o) => t + o.tokens, 0)) ?? 0, w = Math.max(y, (e == null ? void 0 : e.context.used) ?? 0, 1), f = (e == null ? void 0 : e.context.percent) ?? ((e == null ? void 0 : e.context.used) != null && e.context.max ? e.context.used / e.context.max * 100 : null), a = e == null ? void 0 : e.details, i = a == null ? void 0 : a.messageBreakdown;
|
|
@@ -216,7 +216,7 @@ function H({
|
|
|
216
216
|
/* @__PURE__ */ s(
|
|
217
217
|
"span",
|
|
218
218
|
{
|
|
219
|
-
className:
|
|
219
|
+
className: U(
|
|
220
220
|
"size-2 rounded-full",
|
|
221
221
|
e.accuracy === "reported" ? "bg-emerald-500" : "bg-amber-500"
|
|
222
222
|
)
|