spiracha 1.2.0 → 1.3.2
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/AGENTS.md +50 -12
- package/README.md +117 -64
- package/apps/ui/AGENTS.md +16 -8
- package/apps/ui/README.md +28 -12
- package/apps/ui/dist/client/assets/{analytics-Cv0JMDN2.js → analytics-B_hYz65v.js} +1 -1
- package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-qiyygB7e.js +1 -0
- package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-z1SQC2Kg.js +1 -0
- package/apps/ui/dist/client/assets/antigravity-keychain-panel-dYuRWtCf.js +1 -0
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-CliqUr7o.js +1 -0
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-CnoBzyX6.js +1 -0
- package/apps/ui/dist/client/assets/antigravity.index-CakfZz_E.js +1 -0
- package/apps/ui/dist/client/assets/antigravity.index-DY7M1KhG.js +1 -0
- package/apps/ui/dist/client/assets/badge-aHE9ETVe.js +1 -0
- package/apps/ui/dist/client/assets/checkbox-DN3XnJaA.js +1 -0
- package/apps/ui/dist/client/assets/cursor-threads._composerId-BMQyx8qG.js +1 -0
- package/apps/ui/dist/client/assets/cursor-threads._composerId-BTlaA-tV.js +1 -0
- package/apps/ui/dist/client/assets/cursor._workspaceKey-CrgrfevV.js +1 -0
- package/apps/ui/dist/client/assets/cursor._workspaceKey-bYS2syGL.js +1 -0
- package/apps/ui/dist/client/assets/cursor.index-CTqZMPYU.js +1 -0
- package/apps/ui/dist/client/assets/cursor.index-Clsz4E_e.js +2 -0
- package/apps/ui/dist/client/assets/{data-table-Bgnh7phF.js → data-table-Cj-v-uyB.js} +2 -2
- package/apps/ui/dist/client/assets/delete-confirm-dialog-DTpzBiNK.js +11 -0
- package/apps/ui/dist/client/assets/dist-BNAn99Pu.js +1 -0
- package/apps/ui/dist/client/assets/download-P3Rp23Ad.js +1 -0
- package/apps/ui/dist/client/assets/dropdown-menu-3qB5j9nt.js +1 -0
- package/apps/ui/dist/client/assets/es2015-Dwm_turD.js +41 -0
- package/apps/ui/dist/client/assets/export-dialog-CazdrASq.js +1 -0
- package/apps/ui/dist/client/assets/formatters-BdnWuM1z.js +1 -0
- package/apps/ui/dist/client/assets/index-BVFnfS78.js +22 -0
- package/apps/ui/dist/client/assets/json-panel-DLkS30sQ.js +1 -0
- package/apps/ui/dist/client/assets/metadata-section-jnIkB7dB.js +1 -0
- package/apps/ui/dist/client/assets/{metric-card-BJX5rkHK.js → metric-card-CBZuWLzQ.js} +1 -1
- package/apps/ui/dist/client/assets/page-header-CnD21cPn.js +1 -0
- package/apps/ui/dist/client/assets/projects._project-BLszwvYL.js +1 -0
- package/apps/ui/dist/client/assets/projects._project-DvLxYbvk.js +1 -0
- package/apps/ui/dist/client/assets/projects.index-COn8woBR.js +1 -0
- package/apps/ui/dist/client/assets/projects.index-DYs98skV.js +3 -0
- package/apps/ui/dist/client/assets/refresh-ccw-BDrYXjtD.js +1 -0
- package/apps/ui/dist/client/assets/reload-error-panel-DLAg0AW2.js +1 -0
- package/apps/ui/dist/client/assets/routes-BtF5-coe.js +1 -0
- package/apps/ui/dist/client/assets/scroll-text-CqaFm9by.js +1 -0
- package/apps/ui/dist/client/assets/select-DbnpwqL6.js +1 -0
- package/apps/ui/dist/client/assets/settings-CGX3VleN.js +1 -0
- package/apps/ui/dist/client/assets/styles-Ch0r3kMZ.css +1 -0
- package/apps/ui/dist/client/assets/text-document-panel-DPleOmmq.js +1 -0
- package/apps/ui/dist/client/assets/text-filter-7M6wRo-t.js +2 -0
- package/apps/ui/dist/client/assets/threads._threadId-D5w76IB-.js +7 -0
- package/apps/ui/dist/client/assets/{threads._threadId-CUiCZSwo.js → threads._threadId-Dx85sI9P.js} +1 -1
- package/apps/ui/dist/client/assets/useMutation-MZ3Hr9h9.js +1 -0
- package/apps/ui/dist/client/assets/useQuery-Cb4V0AT0.js +1 -0
- package/apps/ui/dist/client/icon.svg +28 -0
- package/apps/ui/dist/client/manifest.json +6 -16
- package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-CBbkUXw6.js +227 -0
- package/apps/ui/dist/server/assets/{analytics-2QpLKjlG.js → analytics-CBNOYZwJ.js} +2 -2
- package/apps/ui/dist/server/assets/antigravity-conversation-state-HgzS302O.js +16 -0
- package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-B9Rm4EXh.js +212 -0
- package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-BIdYNy68.js +20 -0
- package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-D426O-64.js +11 -0
- package/apps/ui/dist/server/assets/antigravity-db-D9gW1D8G.js +576 -0
- package/apps/ui/dist/server/assets/antigravity-keychain-DOiuHDwK.js +126 -0
- package/apps/ui/dist/server/assets/antigravity-keychain-panel-DcLyBBwd.js +55 -0
- package/apps/ui/dist/server/assets/antigravity-queries-CgQhlQ7J.js +37 -0
- package/apps/ui/dist/server/assets/antigravity-server-DFUx4Khk.js +114 -0
- package/apps/ui/dist/server/assets/antigravity._workspaceKey-3m_MzNFA.js +11 -0
- package/apps/ui/dist/server/assets/antigravity._workspaceKey-D42ixtzp.js +210 -0
- package/apps/ui/dist/server/assets/antigravity._workspaceKey-DnSlSC-C.js +28 -0
- package/apps/ui/dist/server/assets/antigravity.index-DZVT-cac.js +104 -0
- package/apps/ui/dist/server/assets/antigravity.index-DudTB3Tq.js +11 -0
- package/apps/ui/dist/server/assets/badge-EvdhKK_Z.js +26 -0
- package/apps/ui/dist/server/assets/{codex-queries-BH4Cb0v3.js → codex-queries-eOJGfHQj.js} +4 -16
- package/apps/ui/dist/server/assets/{codex-server-DqzruLmg.js → codex-server-nrETIF--.js} +149 -140
- package/apps/ui/dist/server/assets/createServerRpc-BtXIw2iP.js +12 -0
- package/apps/ui/dist/server/assets/createSsrRpc-COf5Zuye.js +16 -0
- package/apps/ui/dist/server/assets/cursor-db-B7agkAvM.js +643 -0
- package/apps/ui/dist/server/assets/cursor-exporter-types-CI3goo-c.js +34 -0
- package/apps/ui/dist/server/assets/cursor-queries-BMhuJeUO.js +65 -0
- package/apps/ui/dist/server/assets/cursor-recovery-9bJLs7vG.js +361 -0
- package/apps/ui/dist/server/assets/cursor-server-BgylIFgn.js +184 -0
- package/apps/ui/dist/server/assets/cursor-threads._composerId-BB0Y_Mao.js +11 -0
- package/apps/ui/dist/server/assets/cursor-threads._composerId-BsxFKzoJ.js +218 -0
- package/apps/ui/dist/server/assets/cursor-threads._composerId-DXffY_CK.js +18 -0
- package/apps/ui/dist/server/assets/cursor-transcript-2iL3KFSK.js +125 -0
- package/apps/ui/dist/server/assets/cursor._workspaceKey-BP2J1x_x.js +28 -0
- package/apps/ui/dist/server/assets/cursor._workspaceKey-BQd0e-Pd.js +399 -0
- package/apps/ui/dist/server/assets/cursor._workspaceKey-nmg3YIOQ.js +11 -0
- package/apps/ui/dist/server/assets/cursor.index-CQVxtCm8.js +189 -0
- package/apps/ui/dist/server/assets/cursor.index-CcsX7DG0.js +11 -0
- package/apps/ui/dist/server/assets/{delete-confirm-dialog-CWqcTXTF.js → delete-confirm-dialog-PCD7S0_M.js} +5 -4
- package/apps/ui/dist/server/assets/download-DMmiy1xf.js +92 -0
- package/apps/ui/dist/server/assets/{input-B4tEzctc.js → dropdown-menu-Dy_9t6TN.js} +1 -11
- package/apps/ui/dist/server/assets/{download-Drctxary.js → export-dialog-DaPlOGFT.js} +1 -92
- package/apps/ui/dist/server/assets/json-panel-RYsxWFae.js +16 -0
- package/apps/ui/dist/server/assets/{loading-panel-DbLdvjtR.js → loading-panel-BGFnWseS.js} +1 -1
- package/apps/ui/dist/server/assets/metadata-section-D6Lbc7D6.js +54 -0
- package/apps/ui/dist/server/assets/page-header-VNSaM3xd.js +29 -0
- package/apps/ui/dist/server/assets/projects._project-Bshqk7JA.js +12 -0
- package/apps/ui/dist/server/assets/{projects._project-gT01HBqH.js → projects._project-DUN3iWfg.js} +4 -4
- package/apps/ui/dist/server/assets/{projects._project-DreIU5b0.js → projects._project-Dim9Y0kD.js} +54 -26
- package/apps/ui/dist/server/assets/projects.index-BLXOx5eL.js +12 -0
- package/apps/ui/dist/server/assets/{projects.index-BYmgSGAj.js → projects.index-DjSQK5dm.js} +23 -27
- package/apps/ui/dist/server/assets/{projects.index-CaplpeMy.js → reload-error-panel-BJMxY3U1.js} +5 -6
- package/apps/ui/dist/server/assets/{router-Qj5Kn7bl.js → router-DrDgc-LD.js} +131 -44
- package/apps/ui/dist/server/assets/{routes-_LbCIjtJ.js → routes-B-GlEe2C.js} +54 -39
- package/apps/ui/dist/server/assets/{routes-BtcXuK0x.js → routes-CNHAUMwo.js} +2 -2
- package/apps/ui/dist/server/assets/{settings-MvWDgc1u.js → settings-OayxIYQQ.js} +1 -1
- package/apps/ui/dist/server/assets/shared-CPRNYIql.js +134 -0
- package/apps/ui/dist/server/assets/text-document-panel-D8JbQWAn.js +23 -0
- package/apps/ui/dist/server/assets/text-filter-CGKxMCKt.js +36 -0
- package/apps/ui/dist/server/assets/{threads._threadId-DcbAJkwf.js → threads._threadId-CJzm4KrZ.js} +3 -3
- package/apps/ui/dist/server/assets/{threads._threadId-D5m6ypGw.js → threads._threadId-DODTYddm.js} +69 -76
- package/apps/ui/dist/server/server.js +77 -13
- package/package.json +21 -11
- package/src/export-cursor.ts +244 -0
- package/src/lib/antigravity-db.ts +936 -0
- package/src/lib/antigravity-exporter-types.ts +70 -0
- package/src/lib/antigravity-keychain.ts +203 -0
- package/src/lib/codex-browser-db.ts +7 -1
- package/src/lib/codex-browser-types.ts +22 -1
- package/src/lib/codex-thread-recovery.ts +202 -0
- package/src/lib/cursor-db.ts +1096 -0
- package/src/lib/cursor-exporter-types.ts +190 -0
- package/src/lib/cursor-exporter.ts +266 -0
- package/src/lib/cursor-recovery.ts +543 -0
- package/src/lib/cursor-transcript.ts +183 -0
- package/src/spiracha.ts +16 -3
- package/src/ui-cli.ts +2 -2
- package/apps/ui/dist/client/assets/checkbox-DjHij7DJ.js +0 -1
- package/apps/ui/dist/client/assets/delete-confirm-dialog-CIZy_LXD.js +0 -11
- package/apps/ui/dist/client/assets/download-DQtfva4z.js +0 -1
- package/apps/ui/dist/client/assets/es2015-DsDKdYCE.js +0 -41
- package/apps/ui/dist/client/assets/formatters-CWFrMKSn.js +0 -1
- package/apps/ui/dist/client/assets/index-C_-e0lDI.js +0 -22
- package/apps/ui/dist/client/assets/input-BbgApiqZ.js +0 -1
- package/apps/ui/dist/client/assets/page-header-ODLuGLAB.js +0 -1
- package/apps/ui/dist/client/assets/projects._project-C2Pys_bB.js +0 -1
- package/apps/ui/dist/client/assets/projects._project-CHvAKvlu.js +0 -1
- package/apps/ui/dist/client/assets/projects.index-BmwtS1x-.js +0 -1
- package/apps/ui/dist/client/assets/projects.index-CuLw73mt.js +0 -1
- package/apps/ui/dist/client/assets/routes-CfnaTOlj.js +0 -1
- package/apps/ui/dist/client/assets/select-B1kH_5lx.js +0 -1
- package/apps/ui/dist/client/assets/settings-mYTB3sso.js +0 -1
- package/apps/ui/dist/client/assets/styles-CMrP9Jb4.css +0 -1
- package/apps/ui/dist/client/assets/threads._threadId-C_47okme.js +0 -7
- package/apps/ui/dist/client/favicon.ico +0 -0
- package/apps/ui/dist/client/logo192.png +0 -0
- package/apps/ui/dist/client/logo512.png +0 -0
- package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-kj_QB_26.js +0 -99
- package/apps/ui/dist/server/assets/page-header-CxdZM86z.js +0 -25
- package/apps/ui/dist/server/assets/projects._project-CLSohrBp.js +0 -26
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { t as cn } from "./utils-C_uf36nf.js";
|
|
2
|
+
import { t as Button } from "./button-CmTDnzOn.js";
|
|
3
|
+
import { r as antigravityDecryptionQueryOptions, s as unlockAntigravityDecryptionFn } from "./antigravity-queries-CgQhlQ7J.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
6
|
+
import { KeyRound, LockKeyhole, ShieldCheck, TriangleAlert } from "lucide-react";
|
|
7
|
+
//#region src/components/antigravity-keychain-panel.tsx
|
|
8
|
+
function AntigravityKeychainPanel() {
|
|
9
|
+
const queryClient = useQueryClient();
|
|
10
|
+
const decryptionState = useQuery(antigravityDecryptionQueryOptions()).data ?? null;
|
|
11
|
+
const unlockMutation = useMutation({
|
|
12
|
+
mutationFn: () => unlockAntigravityDecryptionFn(),
|
|
13
|
+
onSuccess: (result) => {
|
|
14
|
+
queryClient.setQueryData(antigravityDecryptionQueryOptions().queryKey, result);
|
|
15
|
+
Promise.all([queryClient.invalidateQueries({ queryKey: antigravityDecryptionQueryOptions().queryKey }), queryClient.invalidateQueries({ queryKey: ["antigravity-conversation"] })]);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
if (!decryptionState || decryptionState.status === "unsupported") return null;
|
|
19
|
+
const isUnlocked = decryptionState.isUnlocked;
|
|
20
|
+
const error = unlockMutation.error?.message ?? decryptionState.error;
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
22
|
+
className: cn("flex flex-col gap-3 rounded-xl border px-4 py-3 sm:flex-row sm:items-center sm:justify-between", isUnlocked ? "border-emerald-500/30 bg-emerald-500/10" : "border-[var(--border)] bg-[var(--panel)]"),
|
|
23
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
24
|
+
className: "flex min-w-0 items-start gap-3",
|
|
25
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
26
|
+
className: cn("mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-md", isUnlocked ? "bg-emerald-500/15 text-emerald-600" : "bg-[var(--panel-secondary)]"),
|
|
27
|
+
children: isUnlocked ? /* @__PURE__ */ jsx(ShieldCheck, { className: "size-4" }) : /* @__PURE__ */ jsx(LockKeyhole, { className: "size-4" })
|
|
28
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
29
|
+
className: "min-w-0",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsx("p", {
|
|
32
|
+
className: "font-medium text-sm",
|
|
33
|
+
children: isUnlocked ? "Keychain access enabled" : "Unlock Antigravity transcript export"
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ jsx("p", {
|
|
36
|
+
className: "mt-1 text-[var(--muted-foreground)] text-xs",
|
|
37
|
+
children: isUnlocked ? "The Antigravity key is cached in this server process only. Transcript exports are available for local logs and safe-storage payloads." : `Spiracha needs one-time access to ${decryptionState.keychainService} to decrypt Antigravity transcript data. macOS will ask for approval after you click unlock.`
|
|
38
|
+
}),
|
|
39
|
+
error ? /* @__PURE__ */ jsxs("p", {
|
|
40
|
+
className: "mt-2 flex items-center gap-1 text-[var(--destructive)] text-xs",
|
|
41
|
+
children: [/* @__PURE__ */ jsx(TriangleAlert, { className: "size-3" }), error]
|
|
42
|
+
}) : null
|
|
43
|
+
]
|
|
44
|
+
})]
|
|
45
|
+
}), !isUnlocked ? /* @__PURE__ */ jsxs(Button, {
|
|
46
|
+
className: "shrink-0",
|
|
47
|
+
disabled: !decryptionState.canRequestAccess || unlockMutation.isPending,
|
|
48
|
+
type: "button",
|
|
49
|
+
onClick: () => unlockMutation.mutate(),
|
|
50
|
+
children: [/* @__PURE__ */ jsx(KeyRound, { className: "size-4" }), unlockMutation.isPending ? "Waiting..." : "Unlock"]
|
|
51
|
+
}) : null]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { AntigravityKeychainPanel as t };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { t as createServerFn } from "../server.js";
|
|
2
|
+
import { t as createSsrRpc } from "./createSsrRpc-COf5Zuye.js";
|
|
3
|
+
import { queryOptions } from "@tanstack/react-query";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
//#region src/lib/antigravity-server.ts
|
|
6
|
+
var workspaceSchema = z.object({ workspaceKey: z.string().min(1) });
|
|
7
|
+
var conversationSchema = z.object({ conversationId: z.string().min(1) });
|
|
8
|
+
var exportSchema = z.object({ conversationId: z.string().min(1) });
|
|
9
|
+
var listAntigravityWorkspacesFn = createServerFn({ method: "GET" }).handler(createSsrRpc("50ab3a39f9880771d0d9b15931e46bcf0c4915077e38a7b6bf8605fde065256e"));
|
|
10
|
+
var getAntigravityDecryptionStateFn = createServerFn({ method: "GET" }).handler(createSsrRpc("37acb5a1f0915c7b996d6cf9682243d5a3446fe26a60f12bfacf60ce772b0f49"));
|
|
11
|
+
var unlockAntigravityDecryptionFn = createServerFn({ method: "POST" }).handler(createSsrRpc("e266948869e9a4ae03c84b8a7db1bfa945fdb440c5e1c64ae826b1302e441885"));
|
|
12
|
+
var listAntigravityConversationsFn = createServerFn({ method: "GET" }).inputValidator(workspaceSchema).handler(createSsrRpc("6a3fe93f3095ec985bb39f45eacb221bd1b77a5d53cbb96fda99caa0fcce7e4e"));
|
|
13
|
+
var getAntigravityConversationDetailFn = createServerFn({ method: "GET" }).inputValidator(conversationSchema).handler(createSsrRpc("229f5293a4eb8237ac97fc2c9a19c31740139aaed41a44d336d77f75584dbd90"));
|
|
14
|
+
var exportAntigravityArtifactsFn = createServerFn({ method: "POST" }).inputValidator(exportSchema).handler(createSsrRpc("0c4c2059bb3a8a71939f93494402a63168932a544e55a462e42679647762f936"));
|
|
15
|
+
var exportAntigravityConversationFn = createServerFn({ method: "POST" }).inputValidator(exportSchema).handler(createSsrRpc("a6261a774fd8e76a6be777fcbb951977db16f33922519ed880097cea035e9034"));
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/lib/antigravity-queries.ts
|
|
18
|
+
var antigravityDecryptionQueryOptions = () => queryOptions({
|
|
19
|
+
queryFn: () => getAntigravityDecryptionStateFn(),
|
|
20
|
+
queryKey: ["antigravity-decryption"]
|
|
21
|
+
});
|
|
22
|
+
var antigravityWorkspacesQueryOptions = () => queryOptions({
|
|
23
|
+
queryFn: () => listAntigravityWorkspacesFn(),
|
|
24
|
+
queryKey: ["antigravity-workspaces"]
|
|
25
|
+
});
|
|
26
|
+
var antigravityConversationsQueryOptions = (workspaceKey) => queryOptions({
|
|
27
|
+
enabled: workspaceKey !== null,
|
|
28
|
+
queryFn: () => listAntigravityConversationsFn({ data: { workspaceKey: workspaceKey ?? "" } }),
|
|
29
|
+
queryKey: ["antigravity-conversations", workspaceKey ?? "none"]
|
|
30
|
+
});
|
|
31
|
+
var antigravityConversationDetailQueryOptions = (conversationId) => queryOptions({
|
|
32
|
+
enabled: conversationId !== null,
|
|
33
|
+
queryFn: () => getAntigravityConversationDetailFn({ data: { conversationId: conversationId ?? "" } }),
|
|
34
|
+
queryKey: ["antigravity-conversation", conversationId ?? "none"]
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
export { exportAntigravityArtifactsFn as a, antigravityWorkspacesQueryOptions as i, antigravityConversationsQueryOptions as n, exportAntigravityConversationFn as o, antigravityDecryptionQueryOptions as r, unlockAntigravityDecryptionFn as s, antigravityConversationDetailQueryOptions as t };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { t as createServerFn } from "../server.js";
|
|
2
|
+
import { t as createServerRpc } from "./createServerRpc-BtXIw2iP.js";
|
|
3
|
+
import { i as isAntigravityConversationLocked, t as canExportAntigravityConversation } from "./antigravity-conversation-state-HgzS302O.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
//#region src/lib/antigravity-server.ts?tss-serverfn-split
|
|
6
|
+
var workspaceSchema = z.object({ workspaceKey: z.string().min(1) });
|
|
7
|
+
var conversationSchema = z.object({ conversationId: z.string().min(1) });
|
|
8
|
+
var exportSchema = z.object({ conversationId: z.string().min(1) });
|
|
9
|
+
var listAntigravityWorkspacesFn_createServerFn_handler = createServerRpc({
|
|
10
|
+
id: "50ab3a39f9880771d0d9b15931e46bcf0c4915077e38a7b6bf8605fde065256e",
|
|
11
|
+
name: "listAntigravityWorkspacesFn",
|
|
12
|
+
filename: "src/lib/antigravity-server.ts"
|
|
13
|
+
}, (opts) => listAntigravityWorkspacesFn.__executeServer(opts));
|
|
14
|
+
var listAntigravityWorkspacesFn = createServerFn({ method: "GET" }).handler(listAntigravityWorkspacesFn_createServerFn_handler, async () => {
|
|
15
|
+
const { listAntigravityWorkspaceGroups } = await import("./antigravity-db-D9gW1D8G.js");
|
|
16
|
+
return listAntigravityWorkspaceGroups();
|
|
17
|
+
});
|
|
18
|
+
var getAntigravityDecryptionStateFn_createServerFn_handler = createServerRpc({
|
|
19
|
+
id: "37acb5a1f0915c7b996d6cf9682243d5a3446fe26a60f12bfacf60ce772b0f49",
|
|
20
|
+
name: "getAntigravityDecryptionStateFn",
|
|
21
|
+
filename: "src/lib/antigravity-server.ts"
|
|
22
|
+
}, (opts) => getAntigravityDecryptionStateFn.__executeServer(opts));
|
|
23
|
+
var getAntigravityDecryptionStateFn = createServerFn({ method: "GET" }).handler(getAntigravityDecryptionStateFn_createServerFn_handler, async () => {
|
|
24
|
+
const { getAntigravityDecryptionState } = await import("./antigravity-keychain-DOiuHDwK.js");
|
|
25
|
+
return getAntigravityDecryptionState();
|
|
26
|
+
});
|
|
27
|
+
var unlockAntigravityDecryptionFn_createServerFn_handler = createServerRpc({
|
|
28
|
+
id: "e266948869e9a4ae03c84b8a7db1bfa945fdb440c5e1c64ae826b1302e441885",
|
|
29
|
+
name: "unlockAntigravityDecryptionFn",
|
|
30
|
+
filename: "src/lib/antigravity-server.ts"
|
|
31
|
+
}, (opts) => unlockAntigravityDecryptionFn.__executeServer(opts));
|
|
32
|
+
var unlockAntigravityDecryptionFn = createServerFn({ method: "POST" }).handler(unlockAntigravityDecryptionFn_createServerFn_handler, async () => {
|
|
33
|
+
const { unlockAntigravityDecryption } = await import("./antigravity-keychain-DOiuHDwK.js");
|
|
34
|
+
return unlockAntigravityDecryption();
|
|
35
|
+
});
|
|
36
|
+
var listAntigravityConversationsFn_createServerFn_handler = createServerRpc({
|
|
37
|
+
id: "6a3fe93f3095ec985bb39f45eacb221bd1b77a5d53cbb96fda99caa0fcce7e4e",
|
|
38
|
+
name: "listAntigravityConversationsFn",
|
|
39
|
+
filename: "src/lib/antigravity-server.ts"
|
|
40
|
+
}, (opts) => listAntigravityConversationsFn.__executeServer(opts));
|
|
41
|
+
var listAntigravityConversationsFn = createServerFn({ method: "GET" }).inputValidator(workspaceSchema).handler(listAntigravityConversationsFn_createServerFn_handler, async ({ data }) => {
|
|
42
|
+
const { listAntigravityConversationsForGroup } = await import("./antigravity-db-D9gW1D8G.js");
|
|
43
|
+
return listAntigravityConversationsForGroup(data.workspaceKey);
|
|
44
|
+
});
|
|
45
|
+
var findAntigravityConversationById = async (conversationId) => {
|
|
46
|
+
const { listAntigravityConversations } = await import("./antigravity-db-D9gW1D8G.js");
|
|
47
|
+
const conversation = (await listAntigravityConversations()).find((candidate) => candidate.conversationId === conversationId);
|
|
48
|
+
if (!conversation) throw new Error(`Antigravity conversation not found: ${conversationId}`);
|
|
49
|
+
return conversation;
|
|
50
|
+
};
|
|
51
|
+
var loadAntigravityConversationDetail = async (conversationId) => {
|
|
52
|
+
const { renderAntigravityArtifactsMarkdown, renderAntigravityConversationMarkdown } = await import("./antigravity-db-D9gW1D8G.js");
|
|
53
|
+
const { getCachedAntigravityKeychainSecret } = await import("./antigravity-keychain-DOiuHDwK.js");
|
|
54
|
+
const conversation = await findAntigravityConversationById(conversationId);
|
|
55
|
+
const keychainSecret = getCachedAntigravityKeychainSecret();
|
|
56
|
+
const transcriptLocked = isAntigravityConversationLocked(conversation, Boolean(keychainSecret));
|
|
57
|
+
const conversationMarkdown = transcriptLocked ? null : await renderAntigravityConversationMarkdown(conversation, { keychainSecret });
|
|
58
|
+
const artifactsMarkdown = conversation.artifactCount > 0 ? await renderAntigravityArtifactsMarkdown(conversation) : null;
|
|
59
|
+
return {
|
|
60
|
+
artifactsMarkdown,
|
|
61
|
+
conversation,
|
|
62
|
+
conversationMarkdown: conversationMarkdown === artifactsMarkdown ? null : conversationMarkdown,
|
|
63
|
+
transcriptLocked
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
var loadAntigravityConversationExport = async (conversationId) => {
|
|
67
|
+
const { renderAntigravityConversationMarkdown } = await import("./antigravity-db-D9gW1D8G.js");
|
|
68
|
+
const { getCachedAntigravityKeychainSecret } = await import("./antigravity-keychain-DOiuHDwK.js");
|
|
69
|
+
const conversation = await findAntigravityConversationById(conversationId);
|
|
70
|
+
const keychainSecret = getCachedAntigravityKeychainSecret();
|
|
71
|
+
const hasKeychainSecret = Boolean(keychainSecret);
|
|
72
|
+
if (!canExportAntigravityConversation(conversation, hasKeychainSecret)) {
|
|
73
|
+
if (isAntigravityConversationLocked(conversation, hasKeychainSecret)) throw new Error("Unlock Antigravity Keychain access before exporting transcript logs.");
|
|
74
|
+
throw new Error(`No exportable Antigravity transcript found for conversation: ${conversationId}`);
|
|
75
|
+
}
|
|
76
|
+
const content = await renderAntigravityConversationMarkdown(conversation, { keychainSecret });
|
|
77
|
+
if (!content) throw new Error(`No exportable Antigravity transcript found for conversation: ${conversationId}`);
|
|
78
|
+
return {
|
|
79
|
+
content,
|
|
80
|
+
filename: `${conversationId}.md`
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
var getAntigravityConversationDetailFn_createServerFn_handler = createServerRpc({
|
|
84
|
+
id: "229f5293a4eb8237ac97fc2c9a19c31740139aaed41a44d336d77f75584dbd90",
|
|
85
|
+
name: "getAntigravityConversationDetailFn",
|
|
86
|
+
filename: "src/lib/antigravity-server.ts"
|
|
87
|
+
}, (opts) => getAntigravityConversationDetailFn.__executeServer(opts));
|
|
88
|
+
var getAntigravityConversationDetailFn = createServerFn({ method: "GET" }).inputValidator(conversationSchema).handler(getAntigravityConversationDetailFn_createServerFn_handler, async ({ data }) => {
|
|
89
|
+
return loadAntigravityConversationDetail(data.conversationId);
|
|
90
|
+
});
|
|
91
|
+
var exportAntigravityArtifactsFn_createServerFn_handler = createServerRpc({
|
|
92
|
+
id: "0c4c2059bb3a8a71939f93494402a63168932a544e55a462e42679647762f936",
|
|
93
|
+
name: "exportAntigravityArtifactsFn",
|
|
94
|
+
filename: "src/lib/antigravity-server.ts"
|
|
95
|
+
}, (opts) => exportAntigravityArtifactsFn.__executeServer(opts));
|
|
96
|
+
var exportAntigravityArtifactsFn = createServerFn({ method: "POST" }).inputValidator(exportSchema).handler(exportAntigravityArtifactsFn_createServerFn_handler, async ({ data }) => {
|
|
97
|
+
const { renderAntigravityArtifactsMarkdown } = await import("./antigravity-db-D9gW1D8G.js");
|
|
98
|
+
const content = await renderAntigravityArtifactsMarkdown(await findAntigravityConversationById(data.conversationId));
|
|
99
|
+
if (!content) throw new Error(`No Markdown artifacts found for conversation: ${data.conversationId}`);
|
|
100
|
+
return {
|
|
101
|
+
content,
|
|
102
|
+
filename: `${data.conversationId}-artifacts.md`
|
|
103
|
+
};
|
|
104
|
+
});
|
|
105
|
+
var exportAntigravityConversationFn_createServerFn_handler = createServerRpc({
|
|
106
|
+
id: "a6261a774fd8e76a6be777fcbb951977db16f33922519ed880097cea035e9034",
|
|
107
|
+
name: "exportAntigravityConversationFn",
|
|
108
|
+
filename: "src/lib/antigravity-server.ts"
|
|
109
|
+
}, (opts) => exportAntigravityConversationFn.__executeServer(opts));
|
|
110
|
+
var exportAntigravityConversationFn = createServerFn({ method: "POST" }).inputValidator(exportSchema).handler(exportAntigravityConversationFn_createServerFn_handler, async ({ data }) => {
|
|
111
|
+
return loadAntigravityConversationExport(data.conversationId);
|
|
112
|
+
});
|
|
113
|
+
//#endregion
|
|
114
|
+
export { exportAntigravityArtifactsFn_createServerFn_handler, exportAntigravityConversationFn_createServerFn_handler, getAntigravityConversationDetailFn_createServerFn_handler, getAntigravityDecryptionStateFn_createServerFn_handler, listAntigravityConversationsFn_createServerFn_handler, listAntigravityWorkspacesFn_createServerFn_handler, unlockAntigravityDecryptionFn_createServerFn_handler };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { t as ReloadErrorPanel } from "./reload-error-panel-BJMxY3U1.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/routes/antigravity.$workspaceKey.tsx?tsr-split=errorComponent
|
|
4
|
+
function AntigravityWorkspaceErrorComponent({ error }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(ReloadErrorPanel, {
|
|
6
|
+
description: error.message,
|
|
7
|
+
title: "Failed to load Antigravity workspace"
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { AntigravityWorkspaceErrorComponent as errorComponent };
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { t as Button } from "./button-CmTDnzOn.js";
|
|
2
|
+
import { i as isAntigravityConversationLocked, n as hasEncryptedAntigravityConversation, r as hasReadableAntigravityConversation, t as canExportAntigravityConversation } from "./antigravity-conversation-state-HgzS302O.js";
|
|
3
|
+
import { a as exportAntigravityArtifactsFn, i as antigravityWorkspacesQueryOptions, n as antigravityConversationsQueryOptions, o as exportAntigravityConversationFn, r as antigravityDecryptionQueryOptions } from "./antigravity-queries-CgQhlQ7J.js";
|
|
4
|
+
import { n as findWorkspaceOrThrow, t as Route } from "./antigravity._workspaceKey-DnSlSC-C.js";
|
|
5
|
+
import { t as DataTable } from "./data-table-Cdct823O.js";
|
|
6
|
+
import { t as PageHeader } from "./page-header-VNSaM3xd.js";
|
|
7
|
+
import { n as formatBytes, o as formatNumber, r as formatDateTime } from "./formatters-FJaGZgJk.js";
|
|
8
|
+
import { t as AntigravityKeychainPanel } from "./antigravity-keychain-panel-DcLyBBwd.js";
|
|
9
|
+
import { t as downloadTextFile } from "./download-DMmiy1xf.js";
|
|
10
|
+
import { t as Badge } from "./badge-EvdhKK_Z.js";
|
|
11
|
+
import { i as DropdownMenuTrigger, n as DropdownMenuContent, r as DropdownMenuItem, t as DropdownMenu } from "./dropdown-menu-Dy_9t6TN.js";
|
|
12
|
+
import { n as ListSearchInput, t as matchesTextQuery } from "./text-filter-CGKxMCKt.js";
|
|
13
|
+
import { useDeferredValue, useMemo, useState } from "react";
|
|
14
|
+
import { Link } from "@tanstack/react-router";
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { useMutation, useSuspenseQuery } from "@tanstack/react-query";
|
|
17
|
+
import { Download, LockKeyhole, MoreHorizontal, ScrollText } from "lucide-react";
|
|
18
|
+
import { createColumnHelper } from "@tanstack/react-table";
|
|
19
|
+
//#region src/components/antigravity-conversations-table.tsx
|
|
20
|
+
var columnHelper = createColumnHelper();
|
|
21
|
+
var getConversationExportState = (conversation, decryptionState) => {
|
|
22
|
+
const hasArtifacts = conversation.artifactCount > 0;
|
|
23
|
+
const isUnlocked = Boolean(decryptionState?.isUnlocked);
|
|
24
|
+
const hasTranscript = hasReadableAntigravityConversation(conversation) || hasEncryptedAntigravityConversation(conversation);
|
|
25
|
+
const canExportConversation = canExportAntigravityConversation(conversation, isUnlocked);
|
|
26
|
+
const lockedTranscript = isAntigravityConversationLocked(conversation, isUnlocked);
|
|
27
|
+
const showConversationAction = canExportConversation || lockedTranscript;
|
|
28
|
+
return {
|
|
29
|
+
canExportConversation,
|
|
30
|
+
hasArtifacts,
|
|
31
|
+
hasTranscript,
|
|
32
|
+
lockedTranscript,
|
|
33
|
+
showActions: showConversationAction || hasArtifacts,
|
|
34
|
+
showConversationAction
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
var getTranscriptLabel = (conversation, exportState) => {
|
|
38
|
+
if (!exportState.hasTranscript) return "Summary only";
|
|
39
|
+
return `${conversation.transcriptSource ? conversation.transcriptSource.replace(/-/gu, " ") : "transcript"} · ${exportState.lockedTranscript ? "locked" : "available"}`;
|
|
40
|
+
};
|
|
41
|
+
var columns = (decryptionState, onExportConversation, onExportArtifacts) => [
|
|
42
|
+
columnHelper.accessor("title", {
|
|
43
|
+
cell: (info) => {
|
|
44
|
+
const exportState = getConversationExportState(info.row.original, decryptionState);
|
|
45
|
+
return /* @__PURE__ */ jsxs(Link, {
|
|
46
|
+
className: "block w-[16rem] max-w-[22rem] space-y-1 rounded-md outline-none transition hover:opacity-80 focus-visible:ring-2 focus-visible:ring-[var(--accent)] lg:w-auto",
|
|
47
|
+
params: { conversationId: info.row.original.conversationId },
|
|
48
|
+
to: "/antigravity-conversations/$conversationId",
|
|
49
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: "flex items-center gap-2",
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsx("p", {
|
|
53
|
+
className: "truncate font-medium underline-offset-2 hover:underline",
|
|
54
|
+
children: info.getValue()
|
|
55
|
+
}),
|
|
56
|
+
exportState.hasTranscript ? /* @__PURE__ */ jsx(Badge, {
|
|
57
|
+
variant: "secondary",
|
|
58
|
+
children: "transcript"
|
|
59
|
+
}) : null,
|
|
60
|
+
exportState.hasArtifacts ? /* @__PURE__ */ jsx(Badge, {
|
|
61
|
+
variant: "outline",
|
|
62
|
+
children: "artifact"
|
|
63
|
+
}) : null
|
|
64
|
+
]
|
|
65
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
66
|
+
className: "truncate text-[var(--muted-foreground)] text-xs",
|
|
67
|
+
children: info.row.original.conversationId
|
|
68
|
+
})]
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
header: "Conversation"
|
|
72
|
+
}),
|
|
73
|
+
columnHelper.accessor("lastUpdatedAtMs", {
|
|
74
|
+
cell: (info) => /* @__PURE__ */ jsx("span", {
|
|
75
|
+
className: "whitespace-nowrap text-sm",
|
|
76
|
+
suppressHydrationWarning: true,
|
|
77
|
+
children: formatDateTime(info.getValue())
|
|
78
|
+
}),
|
|
79
|
+
header: "Updated"
|
|
80
|
+
}),
|
|
81
|
+
columnHelper.display({
|
|
82
|
+
cell: (info) => {
|
|
83
|
+
const exportState = getConversationExportState(info.row.original, decryptionState);
|
|
84
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
85
|
+
className: "text-sm",
|
|
86
|
+
children: [getTranscriptLabel(info.row.original, exportState), info.row.original.transcriptEntryCount > 0 ? ` · ${formatNumber(info.row.original.transcriptEntryCount)} entries` : ""]
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
header: "Transcript",
|
|
90
|
+
id: "transcript"
|
|
91
|
+
}),
|
|
92
|
+
columnHelper.accessor("artifactCount", {
|
|
93
|
+
cell: (info) => /* @__PURE__ */ jsx("span", {
|
|
94
|
+
className: "font-mono text-sm",
|
|
95
|
+
children: formatNumber(info.getValue())
|
|
96
|
+
}),
|
|
97
|
+
header: "Artifacts"
|
|
98
|
+
}),
|
|
99
|
+
columnHelper.accessor("conversationBytes", {
|
|
100
|
+
cell: (info) => /* @__PURE__ */ jsx("span", {
|
|
101
|
+
className: "font-mono text-sm",
|
|
102
|
+
children: formatBytes(info.getValue())
|
|
103
|
+
}),
|
|
104
|
+
header: "Size"
|
|
105
|
+
}),
|
|
106
|
+
columnHelper.display({
|
|
107
|
+
cell: (info) => {
|
|
108
|
+
const exportState = getConversationExportState(info.row.original, decryptionState);
|
|
109
|
+
if (!exportState.showActions) return /* @__PURE__ */ jsx("span", {
|
|
110
|
+
className: "text-[var(--muted-foreground)] text-sm",
|
|
111
|
+
children: "No export"
|
|
112
|
+
});
|
|
113
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
114
|
+
asChild: true,
|
|
115
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
116
|
+
className: "rounded-full",
|
|
117
|
+
size: "icon",
|
|
118
|
+
type: "button",
|
|
119
|
+
variant: "ghost",
|
|
120
|
+
onClick: (event) => event.stopPropagation(),
|
|
121
|
+
children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" })
|
|
122
|
+
})
|
|
123
|
+
}), /* @__PURE__ */ jsxs(DropdownMenuContent, {
|
|
124
|
+
align: "end",
|
|
125
|
+
children: [exportState.showConversationAction ? /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
126
|
+
disabled: !exportState.canExportConversation,
|
|
127
|
+
onClick: () => onExportConversation(info.row.original),
|
|
128
|
+
children: [exportState.lockedTranscript ? /* @__PURE__ */ jsx(LockKeyhole, { className: "mr-2 size-4" }) : /* @__PURE__ */ jsx(Download, { className: "mr-2 size-4" }), exportState.lockedTranscript ? "Unlock conversation export first" : "Export conversation"]
|
|
129
|
+
}) : null, exportState.hasArtifacts ? /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
130
|
+
onClick: () => onExportArtifacts(info.row.original),
|
|
131
|
+
children: [/* @__PURE__ */ jsx(ScrollText, { className: "mr-2 size-4" }), "Export artifacts"]
|
|
132
|
+
}) : null]
|
|
133
|
+
})] });
|
|
134
|
+
},
|
|
135
|
+
header: "",
|
|
136
|
+
id: "actions"
|
|
137
|
+
})
|
|
138
|
+
];
|
|
139
|
+
function AntigravityConversationsTable({ conversations, decryptionState, onExportArtifacts, onExportConversation }) {
|
|
140
|
+
return /* @__PURE__ */ jsx(DataTable, {
|
|
141
|
+
columns: useMemo(() => columns(decryptionState, onExportConversation, onExportArtifacts), [
|
|
142
|
+
decryptionState,
|
|
143
|
+
onExportArtifacts,
|
|
144
|
+
onExportConversation
|
|
145
|
+
]),
|
|
146
|
+
data: conversations,
|
|
147
|
+
emptyMessage: "No Antigravity conversations match the current workspace filter."
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region src/routes/antigravity.$workspaceKey.tsx?tsr-split=component
|
|
152
|
+
function AntigravityWorkspacePage() {
|
|
153
|
+
const params = Route.useParams();
|
|
154
|
+
const workspaces = useSuspenseQuery(antigravityWorkspacesQueryOptions()).data;
|
|
155
|
+
const workspace = findWorkspaceOrThrow(workspaces, params.workspaceKey);
|
|
156
|
+
const conversations = useSuspenseQuery(antigravityConversationsQueryOptions(workspace.key)).data;
|
|
157
|
+
const decryptionState = useSuspenseQuery(antigravityDecryptionQueryOptions()).data ?? null;
|
|
158
|
+
const [searchInput, setSearchInput] = useState("");
|
|
159
|
+
const deferredSearch = useDeferredValue(searchInput);
|
|
160
|
+
const exportConversationMutation = useMutation({
|
|
161
|
+
mutationFn: (conversation) => exportAntigravityConversationFn({ data: { conversationId: conversation.conversationId } }),
|
|
162
|
+
onSuccess: (result) => {
|
|
163
|
+
downloadTextFile(result.filename, result.content, "text/markdown; charset=utf-8");
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
const exportArtifactsMutation = useMutation({
|
|
167
|
+
mutationFn: (conversation) => exportAntigravityArtifactsFn({ data: { conversationId: conversation.conversationId } }),
|
|
168
|
+
onSuccess: (result) => {
|
|
169
|
+
downloadTextFile(result.filename, result.content, "text/markdown; charset=utf-8");
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
const visibleConversations = conversations.filter((conversation) => matchesTextQuery(deferredSearch, [
|
|
173
|
+
conversation.title,
|
|
174
|
+
conversation.conversationId,
|
|
175
|
+
conversation.transcriptSource,
|
|
176
|
+
conversation.workspaceLabel
|
|
177
|
+
]));
|
|
178
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
179
|
+
className: "space-y-6",
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ jsx(PageHeader, {
|
|
182
|
+
actions: /* @__PURE__ */ jsx(ListSearchInput, {
|
|
183
|
+
placeholder: "Search title, id, or transcript source",
|
|
184
|
+
value: searchInput,
|
|
185
|
+
onValueChange: setSearchInput
|
|
186
|
+
}),
|
|
187
|
+
eyebrow: "Antigravity workspace",
|
|
188
|
+
subtitle: "Inspect conversation coverage across Antigravity transcripts, raw payloads, and generated artifacts.",
|
|
189
|
+
title: workspace.label
|
|
190
|
+
}),
|
|
191
|
+
/* @__PURE__ */ jsx(AntigravityKeychainPanel, {}),
|
|
192
|
+
/* @__PURE__ */ jsx(AntigravityConversationsTable, {
|
|
193
|
+
conversations: visibleConversations,
|
|
194
|
+
decryptionState,
|
|
195
|
+
onExportArtifacts: (conversation) => exportArtifactsMutation.mutate(conversation),
|
|
196
|
+
onExportConversation: (conversation) => exportConversationMutation.mutate(conversation)
|
|
197
|
+
}),
|
|
198
|
+
exportConversationMutation.isError ? /* @__PURE__ */ jsx("p", {
|
|
199
|
+
className: "text-[var(--destructive)] text-sm",
|
|
200
|
+
children: exportConversationMutation.error instanceof Error ? exportConversationMutation.error.message : "Conversation export failed"
|
|
201
|
+
}) : null,
|
|
202
|
+
exportArtifactsMutation.isError ? /* @__PURE__ */ jsx("p", {
|
|
203
|
+
className: "text-[var(--destructive)] text-sm",
|
|
204
|
+
children: exportArtifactsMutation.error instanceof Error ? exportArtifactsMutation.error.message : "Artifact export failed"
|
|
205
|
+
}) : null
|
|
206
|
+
]
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
//#endregion
|
|
210
|
+
export { AntigravityWorkspacePage as component };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { i as antigravityWorkspacesQueryOptions, n as antigravityConversationsQueryOptions, r as antigravityDecryptionQueryOptions } from "./antigravity-queries-CgQhlQ7J.js";
|
|
2
|
+
import { t as LoadingPanel } from "./loading-panel-BGFnWseS.js";
|
|
3
|
+
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/routes/antigravity.$workspaceKey.tsx?tsr-shared=1
|
|
6
|
+
var findWorkspaceOrThrow = (workspaces, workspaceKey) => {
|
|
7
|
+
const workspace = workspaces.find((candidate) => candidate.key === workspaceKey);
|
|
8
|
+
if (!workspace) throw new Error(`Antigravity workspace not found: ${workspaceKey}`);
|
|
9
|
+
return workspace;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/routes/antigravity.$workspaceKey.tsx
|
|
13
|
+
var $$splitErrorComponentImporter = () => import("./antigravity._workspaceKey-3m_MzNFA.js");
|
|
14
|
+
var $$splitComponentImporter = () => import("./antigravity._workspaceKey-D42ixtzp.js");
|
|
15
|
+
var Route = createFileRoute("/antigravity/$workspaceKey")({
|
|
16
|
+
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
17
|
+
errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent"),
|
|
18
|
+
loader: async ({ context, params }) => {
|
|
19
|
+
findWorkspaceOrThrow(await context.queryClient.ensureQueryData(antigravityWorkspacesQueryOptions()), params.workspaceKey);
|
|
20
|
+
await Promise.all([context.queryClient.ensureQueryData(antigravityDecryptionQueryOptions()), context.queryClient.ensureQueryData(antigravityConversationsQueryOptions(params.workspaceKey))]);
|
|
21
|
+
},
|
|
22
|
+
pendingComponent: () => /* @__PURE__ */ jsx(LoadingPanel, {
|
|
23
|
+
description: "Loading Antigravity conversations, artifacts, and transcript availability.",
|
|
24
|
+
title: "Loading workspace"
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
//#endregion
|
|
28
|
+
export { findWorkspaceOrThrow as n, Route as t };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { i as antigravityWorkspacesQueryOptions } from "./antigravity-queries-CgQhlQ7J.js";
|
|
2
|
+
import { t as DataTable } from "./data-table-Cdct823O.js";
|
|
3
|
+
import { t as PageHeader } from "./page-header-VNSaM3xd.js";
|
|
4
|
+
import { n as formatBytes, o as formatNumber, r as formatDateTime } from "./formatters-FJaGZgJk.js";
|
|
5
|
+
import { t as AntigravityKeychainPanel } from "./antigravity-keychain-panel-DcLyBBwd.js";
|
|
6
|
+
import { n as ListSearchInput, t as matchesTextQuery } from "./text-filter-CGKxMCKt.js";
|
|
7
|
+
import { useDeferredValue, useState } from "react";
|
|
8
|
+
import { Link } from "@tanstack/react-router";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
11
|
+
import { createColumnHelper } from "@tanstack/react-table";
|
|
12
|
+
//#region src/components/antigravity-workspaces-table.tsx
|
|
13
|
+
var columnHelper = createColumnHelper();
|
|
14
|
+
var columns = [
|
|
15
|
+
columnHelper.accessor("label", {
|
|
16
|
+
cell: (info) => /* @__PURE__ */ jsxs(Link, {
|
|
17
|
+
className: "block w-[16rem] max-w-[22rem] space-y-1 rounded-md outline-none transition hover:opacity-80 focus-visible:ring-2 focus-visible:ring-[var(--accent)] lg:w-auto",
|
|
18
|
+
params: { workspaceKey: info.row.original.key },
|
|
19
|
+
to: "/antigravity/$workspaceKey",
|
|
20
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
21
|
+
className: "font-medium underline-offset-2 hover:underline",
|
|
22
|
+
children: info.getValue()
|
|
23
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
24
|
+
className: "truncate text-[var(--muted-foreground)] text-xs",
|
|
25
|
+
children: info.row.original.uri ?? "Unknown root"
|
|
26
|
+
})]
|
|
27
|
+
}),
|
|
28
|
+
header: "Workspace"
|
|
29
|
+
}),
|
|
30
|
+
columnHelper.accessor("conversationCount", {
|
|
31
|
+
cell: (info) => /* @__PURE__ */ jsx("span", {
|
|
32
|
+
className: "font-mono text-sm",
|
|
33
|
+
children: formatNumber(info.getValue())
|
|
34
|
+
}),
|
|
35
|
+
header: "Conversations"
|
|
36
|
+
}),
|
|
37
|
+
columnHelper.accessor("transcriptCount", {
|
|
38
|
+
cell: (info) => /* @__PURE__ */ jsx("span", {
|
|
39
|
+
className: "font-mono text-sm",
|
|
40
|
+
children: formatNumber(info.getValue())
|
|
41
|
+
}),
|
|
42
|
+
header: "Transcripts"
|
|
43
|
+
}),
|
|
44
|
+
columnHelper.accessor("artifactCount", {
|
|
45
|
+
cell: (info) => /* @__PURE__ */ jsx("span", {
|
|
46
|
+
className: "font-mono text-sm",
|
|
47
|
+
children: formatNumber(info.getValue())
|
|
48
|
+
}),
|
|
49
|
+
header: "Artifacts"
|
|
50
|
+
}),
|
|
51
|
+
columnHelper.accessor("conversationBytes", {
|
|
52
|
+
cell: (info) => /* @__PURE__ */ jsx("span", {
|
|
53
|
+
className: "font-mono text-sm",
|
|
54
|
+
children: formatBytes(info.getValue())
|
|
55
|
+
}),
|
|
56
|
+
header: "Size"
|
|
57
|
+
}),
|
|
58
|
+
columnHelper.accessor("lastActiveMs", {
|
|
59
|
+
cell: (info) => /* @__PURE__ */ jsx("span", {
|
|
60
|
+
className: "whitespace-nowrap text-sm",
|
|
61
|
+
suppressHydrationWarning: true,
|
|
62
|
+
children: formatDateTime(info.getValue())
|
|
63
|
+
}),
|
|
64
|
+
header: "Last updated"
|
|
65
|
+
})
|
|
66
|
+
];
|
|
67
|
+
function AntigravityWorkspacesTable({ workspaces }) {
|
|
68
|
+
return /* @__PURE__ */ jsx(DataTable, {
|
|
69
|
+
columns,
|
|
70
|
+
data: workspaces,
|
|
71
|
+
emptyMessage: "No Antigravity workspaces match the current search."
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/routes/antigravity.index.tsx?tsr-split=component
|
|
76
|
+
function AntigravityPage() {
|
|
77
|
+
const workspaces = useSuspenseQuery(antigravityWorkspacesQueryOptions()).data;
|
|
78
|
+
const [searchInput, setSearchInput] = useState("");
|
|
79
|
+
const deferredSearch = useDeferredValue(searchInput);
|
|
80
|
+
const visibleWorkspaces = workspaces.filter((workspace) => matchesTextQuery(deferredSearch, [
|
|
81
|
+
workspace.label,
|
|
82
|
+
workspace.uri,
|
|
83
|
+
workspace.key
|
|
84
|
+
]));
|
|
85
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: "space-y-6",
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsx(PageHeader, {
|
|
89
|
+
actions: /* @__PURE__ */ jsx(ListSearchInput, {
|
|
90
|
+
placeholder: "Search workspace name or path",
|
|
91
|
+
value: searchInput,
|
|
92
|
+
onValueChange: setSearchInput
|
|
93
|
+
}),
|
|
94
|
+
eyebrow: "Inventory",
|
|
95
|
+
subtitle: "Workspace groups are derived from Antigravity summary indexes, raw conversation files, local logs, and brain artifacts.",
|
|
96
|
+
title: "Antigravity"
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ jsx(AntigravityKeychainPanel, {}),
|
|
99
|
+
/* @__PURE__ */ jsx(AntigravityWorkspacesTable, { workspaces: visibleWorkspaces })
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { AntigravityPage as component };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { t as ReloadErrorPanel } from "./reload-error-panel-BJMxY3U1.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/routes/antigravity.index.tsx?tsr-split=errorComponent
|
|
4
|
+
function AntigravityErrorComponent({ error }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(ReloadErrorPanel, {
|
|
6
|
+
description: error.message,
|
|
7
|
+
title: "Failed to load Antigravity workspaces"
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { AntigravityErrorComponent as errorComponent };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { t as cn } from "./utils-C_uf36nf.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { Slot } from "radix-ui";
|
|
5
|
+
//#region src/components/ui/badge.tsx
|
|
6
|
+
var badgeVariants = cva("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
|
|
7
|
+
defaultVariants: { variant: "default" },
|
|
8
|
+
variants: { variant: {
|
|
9
|
+
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
10
|
+
destructive: "bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
|
|
11
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
12
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline",
|
|
13
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
14
|
+
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90"
|
|
15
|
+
} }
|
|
16
|
+
});
|
|
17
|
+
function Badge({ className, variant = "default", asChild = false, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(asChild ? Slot.Root : "span", {
|
|
19
|
+
"data-slot": "badge",
|
|
20
|
+
"data-variant": variant,
|
|
21
|
+
className: cn(badgeVariants({ variant }), className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { Badge as t };
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as createServerFn } from "../server.js";
|
|
2
2
|
import { t as isRetryableSqliteError } from "./sqlite-error-LZDrnxdd.js";
|
|
3
|
+
import { t as createSsrRpc } from "./createSsrRpc-COf5Zuye.js";
|
|
3
4
|
import { queryOptions } from "@tanstack/react-query";
|
|
4
5
|
import { z } from "zod";
|
|
5
|
-
//#region ../../node_modules/.bun/@tanstack+start-server-core@1.169.3/node_modules/@tanstack/start-server-core/dist/esm/createSsrRpc.js
|
|
6
|
-
var createSsrRpc = (functionId) => {
|
|
7
|
-
const url = "/_serverFn/" + functionId;
|
|
8
|
-
const serverFnMeta = { id: functionId };
|
|
9
|
-
const fn = async (...args) => {
|
|
10
|
-
return (await getServerFnById(functionId, { origin: "server" }))(...args);
|
|
11
|
-
};
|
|
12
|
-
return Object.assign(fn, {
|
|
13
|
-
url,
|
|
14
|
-
serverFnMeta,
|
|
15
|
-
[TSS_SERVER_FUNCTION]: true
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
//#endregion
|
|
19
6
|
//#region src/lib/codex-server.ts
|
|
20
7
|
var projectSchema = z.object({ project: z.string().min(1) });
|
|
21
8
|
var deleteProjectSchema = z.object({
|
|
@@ -61,6 +48,7 @@ var exportThreadsFn = createServerFn({ method: "POST" }).inputValidator(exportTh
|
|
|
61
48
|
var deleteThreadFn = createServerFn({ method: "POST" }).inputValidator(deleteThreadSchema).handler(createSsrRpc("29727b7ad5b8fe42e83817376653e064d9fe8888799f056b2e59296b3396568b"));
|
|
62
49
|
var deleteThreadsFn = createServerFn({ method: "POST" }).inputValidator(deleteThreadsSchema).handler(createSsrRpc("96aa60bf7dd9b5bde415bcf3ad6f6955a975eecd9aa0516cf401cc39bebebe6c"));
|
|
63
50
|
var deleteProjectFn = createServerFn({ method: "POST" }).inputValidator(deleteProjectSchema).handler(createSsrRpc("164ee82cdd565ed96591a64312f0f7bd961040baf066a89d9f5636330d11360b"));
|
|
51
|
+
var recoverProjectThreadsFn = createServerFn({ method: "POST" }).inputValidator(projectSchema).handler(createSsrRpc("412c05e00aef3ad43905593fdfd2f566561259da7e1f5d6f1c03428ff33c6867"));
|
|
64
52
|
//#endregion
|
|
65
53
|
//#region src/lib/codex-queries.ts
|
|
66
54
|
var retrySqliteQuery = (failureCount, error) => {
|
|
@@ -106,4 +94,4 @@ var analyticsQueryOptions = (project) => queryOptions({
|
|
|
106
94
|
retryDelay
|
|
107
95
|
});
|
|
108
96
|
//#endregion
|
|
109
|
-
export { threadSnapshotQueryOptions as a, deleteThreadFn as c, exportThreadsFn as d, projectsQueryOptions as i, deleteThreadsFn as l, dashboardQueryOptions as n, threadTranscriptQueryOptions as o, projectThreadsQueryOptions as r, deleteProjectFn as s, analyticsQueryOptions as t, exportThreadFn as u };
|
|
97
|
+
export { threadSnapshotQueryOptions as a, deleteThreadFn as c, exportThreadsFn as d, recoverProjectThreadsFn as f, projectsQueryOptions as i, deleteThreadsFn as l, dashboardQueryOptions as n, threadTranscriptQueryOptions as o, projectThreadsQueryOptions as r, deleteProjectFn as s, analyticsQueryOptions as t, exportThreadFn as u };
|