spiracha 1.2.0 → 1.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/AGENTS.md +49 -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 +19 -9
- 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
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { t as cn } from "./utils-C_uf36nf.js";
|
|
2
2
|
import { t as Button } from "./button-CmTDnzOn.js";
|
|
3
3
|
import { t as SettingsProvider } from "./settings-store-DpEJEQ7M.js";
|
|
4
|
-
import { i as projectsQueryOptions, t as analyticsQueryOptions } from "./codex-queries-
|
|
5
|
-
import { t as Route$
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { i as projectsQueryOptions, t as analyticsQueryOptions } from "./codex-queries-eOJGfHQj.js";
|
|
5
|
+
import { t as Route$7 } from "./routes-CNHAUMwo.js";
|
|
6
|
+
import { r as cursorWorkspacesQueryOptions } from "./cursor-queries-BMhuJeUO.js";
|
|
7
|
+
import { i as antigravityWorkspacesQueryOptions } from "./antigravity-queries-CgQhlQ7J.js";
|
|
8
|
+
import { t as Route$8 } from "./threads._threadId-CJzm4KrZ.js";
|
|
9
|
+
import { t as Route$9 } from "./projects._project-DUN3iWfg.js";
|
|
10
|
+
import { t as Route$10 } from "./cursor._workspaceKey-BP2J1x_x.js";
|
|
11
|
+
import { t as Route$11 } from "./cursor-threads._composerId-DXffY_CK.js";
|
|
12
|
+
import { t as Route$12 } from "./antigravity._workspaceKey-DnSlSC-C.js";
|
|
13
|
+
import { t as Route$13 } from "./antigravity-conversations._conversationId-BIdYNy68.js";
|
|
8
14
|
import { useEffect, useState } from "react";
|
|
9
15
|
import { HeadContent, Link, Outlet, Scripts, createFileRoute, createRootRouteWithContext, createRouter, lazyRouteComponent, notFound, redirect, useRouterState } from "@tanstack/react-router";
|
|
10
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
17
|
import { setupRouterSsrQueryIntegration } from "@tanstack/react-router-ssr-query";
|
|
12
18
|
import { QueryClient } from "@tanstack/react-query";
|
|
13
|
-
import { BarChart3, FolderOpen, LayoutDashboard, Moon, Settings2, Sun } from "lucide-react";
|
|
19
|
+
import { BarChart3, FolderOpen, LayoutDashboard, Moon, Settings2, Sparkles, SquareTerminal, Sun } from "lucide-react";
|
|
14
20
|
import { Tooltip } from "radix-ui";
|
|
15
21
|
//#region src/integrations/tanstack-query/root-provider.tsx
|
|
16
22
|
function getContext() {
|
|
@@ -59,10 +65,23 @@ var navItems = [
|
|
|
59
65
|
to: "/"
|
|
60
66
|
},
|
|
61
67
|
{
|
|
68
|
+
activePrefixes: ["/projects", "/threads"],
|
|
62
69
|
icon: FolderOpen,
|
|
63
|
-
label: "
|
|
70
|
+
label: "Codex",
|
|
64
71
|
to: "/projects"
|
|
65
72
|
},
|
|
73
|
+
{
|
|
74
|
+
activePrefixes: ["/antigravity", "/antigravity-conversations"],
|
|
75
|
+
icon: Sparkles,
|
|
76
|
+
label: "Antigravity",
|
|
77
|
+
to: "/antigravity"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
activePrefixes: ["/cursor", "/cursor-threads"],
|
|
81
|
+
icon: SquareTerminal,
|
|
82
|
+
label: "Cursor",
|
|
83
|
+
to: "/cursor"
|
|
84
|
+
},
|
|
66
85
|
{
|
|
67
86
|
icon: BarChart3,
|
|
68
87
|
label: "Analytics",
|
|
@@ -74,6 +93,9 @@ var navItems = [
|
|
|
74
93
|
to: "/settings"
|
|
75
94
|
}
|
|
76
95
|
];
|
|
96
|
+
var isNavItemActive = (pathname, item) => {
|
|
97
|
+
return (item.activePrefixes ?? [item.to]).some((prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`));
|
|
98
|
+
};
|
|
77
99
|
function AppShell({ children }) {
|
|
78
100
|
const pathname = useRouterState({ select: (state) => state.location.pathname });
|
|
79
101
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -91,13 +113,13 @@ function AppShell({ children }) {
|
|
|
91
113
|
children: "Spiracha"
|
|
92
114
|
}), /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", {
|
|
93
115
|
className: "font-['IBM_Plex_Sans'] font-semibold text-lg tracking-[-0.02em]",
|
|
94
|
-
children: "
|
|
116
|
+
children: "Spiracha Console"
|
|
95
117
|
}) })]
|
|
96
118
|
}), /* @__PURE__ */ jsx(ThemeToggle, {})]
|
|
97
119
|
}), /* @__PURE__ */ jsx("nav", {
|
|
98
120
|
className: "mt-5 grid gap-1",
|
|
99
121
|
children: navItems.map((item) => {
|
|
100
|
-
const active = pathname
|
|
122
|
+
const active = isNavItemActive(pathname, item);
|
|
101
123
|
const Icon = item.icon;
|
|
102
124
|
return /* @__PURE__ */ jsxs(Link, {
|
|
103
125
|
className: cn("flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm transition-colors", active ? "bg-[var(--accent-muted)] font-medium text-[var(--accent-foreground)]" : "text-[var(--muted-foreground)] hover:bg-[var(--panel-secondary)] hover:text-[var(--foreground)]"),
|
|
@@ -124,7 +146,7 @@ function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
|
124
146
|
}
|
|
125
147
|
//#endregion
|
|
126
148
|
//#region src/styles.css?url
|
|
127
|
-
var styles_default = "/assets/styles-
|
|
149
|
+
var styles_default = "/assets/styles-Ch0r3kMZ.css";
|
|
128
150
|
//#endregion
|
|
129
151
|
//#region src/routes/__root.tsx
|
|
130
152
|
var themeInitScript = `
|
|
@@ -169,14 +191,25 @@ function RootErrorComponent({ error }) {
|
|
|
169
191
|
})
|
|
170
192
|
});
|
|
171
193
|
}
|
|
172
|
-
var Route$
|
|
194
|
+
var Route$6 = createRootRouteWithContext()({
|
|
173
195
|
component: RootComponent,
|
|
174
196
|
errorComponent: RootErrorComponent,
|
|
175
197
|
head: () => ({
|
|
176
|
-
links: [
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
198
|
+
links: [
|
|
199
|
+
{
|
|
200
|
+
href: styles_default,
|
|
201
|
+
rel: "stylesheet"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
href: "/icon.svg",
|
|
205
|
+
rel: "icon",
|
|
206
|
+
type: "image/svg+xml"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
href: "/manifest.json",
|
|
210
|
+
rel: "manifest"
|
|
211
|
+
}
|
|
212
|
+
],
|
|
180
213
|
meta: [
|
|
181
214
|
{ charSet: "utf-8" },
|
|
182
215
|
{
|
|
@@ -184,7 +217,7 @@ var Route$4 = createRootRouteWithContext()({
|
|
|
184
217
|
name: "viewport"
|
|
185
218
|
},
|
|
186
219
|
{
|
|
187
|
-
content: "Browse local Codex
|
|
220
|
+
content: "Browse local Codex, Cursor, and Antigravity history through a compact workspace UI.",
|
|
188
221
|
name: "description"
|
|
189
222
|
},
|
|
190
223
|
{ title: "Spiracha UI" }
|
|
@@ -203,13 +236,13 @@ function RootDocument({ children }) {
|
|
|
203
236
|
}
|
|
204
237
|
//#endregion
|
|
205
238
|
//#region src/routes/settings.tsx
|
|
206
|
-
var $$splitComponentImporter$
|
|
207
|
-
var Route$
|
|
239
|
+
var $$splitComponentImporter$5 = () => import("./settings-OayxIYQQ.js");
|
|
240
|
+
var Route$5 = createFileRoute("/settings")({ component: lazyRouteComponent($$splitComponentImporter$5, "component") });
|
|
208
241
|
//#endregion
|
|
209
242
|
//#region src/routes/analytics.tsx
|
|
210
|
-
var $$splitComponentImporter$
|
|
211
|
-
var Route$
|
|
212
|
-
component: lazyRouteComponent($$splitComponentImporter$
|
|
243
|
+
var $$splitComponentImporter$4 = () => import("./analytics-CBNOYZwJ.js");
|
|
244
|
+
var Route$4 = createFileRoute("/analytics")({
|
|
245
|
+
component: lazyRouteComponent($$splitComponentImporter$4, "component"),
|
|
213
246
|
loader: ({ context }) => {
|
|
214
247
|
return Promise.all([context.queryClient.ensureQueryData(projectsQueryOptions()), context.queryClient.ensureQueryData(analyticsQueryOptions(null))]);
|
|
215
248
|
}
|
|
@@ -220,8 +253,8 @@ var THREAD_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-
|
|
|
220
253
|
var isCodexThreadId = (value) => THREAD_ID_PATTERN.test(value);
|
|
221
254
|
//#endregion
|
|
222
255
|
//#region src/routes/$threadId.tsx
|
|
223
|
-
var $$splitComponentImporter$
|
|
224
|
-
var Route$
|
|
256
|
+
var $$splitComponentImporter$3 = () => import("./_threadId-B6SrBR9E.js");
|
|
257
|
+
var Route$3 = createFileRoute("/$threadId")({
|
|
225
258
|
beforeLoad: ({ params }) => {
|
|
226
259
|
if (!isCodexThreadId(params.threadId)) throw notFound();
|
|
227
260
|
throw redirect({
|
|
@@ -229,63 +262,117 @@ var Route$1 = createFileRoute("/$threadId")({
|
|
|
229
262
|
to: "/threads/$threadId"
|
|
230
263
|
});
|
|
231
264
|
},
|
|
232
|
-
component: lazyRouteComponent($$splitComponentImporter$
|
|
265
|
+
component: lazyRouteComponent($$splitComponentImporter$3, "component")
|
|
233
266
|
});
|
|
234
267
|
//#endregion
|
|
235
268
|
//#region src/routes/projects.index.tsx
|
|
236
|
-
var $$splitErrorComponentImporter = () => import("./projects.index-
|
|
237
|
-
var $$splitComponentImporter = () => import("./projects.index-
|
|
238
|
-
var Route = createFileRoute("/projects/")({
|
|
269
|
+
var $$splitErrorComponentImporter$2 = () => import("./projects.index-BLXOx5eL.js");
|
|
270
|
+
var $$splitComponentImporter$2 = () => import("./projects.index-DjSQK5dm.js");
|
|
271
|
+
var Route$2 = createFileRoute("/projects/")({
|
|
272
|
+
component: lazyRouteComponent($$splitComponentImporter$2, "component"),
|
|
273
|
+
errorComponent: lazyRouteComponent($$splitErrorComponentImporter$2, "errorComponent"),
|
|
274
|
+
loader: ({ context }) => context.queryClient.ensureQueryData(projectsQueryOptions())
|
|
275
|
+
});
|
|
276
|
+
//#endregion
|
|
277
|
+
//#region src/routes/cursor.index.tsx
|
|
278
|
+
var $$splitErrorComponentImporter$1 = () => import("./cursor.index-CcsX7DG0.js");
|
|
279
|
+
var $$splitComponentImporter$1 = () => import("./cursor.index-CQVxtCm8.js");
|
|
280
|
+
var Route$1 = createFileRoute("/cursor/")({
|
|
281
|
+
component: lazyRouteComponent($$splitComponentImporter$1, "component"),
|
|
282
|
+
errorComponent: lazyRouteComponent($$splitErrorComponentImporter$1, "errorComponent"),
|
|
283
|
+
loader: ({ context }) => context.queryClient.ensureQueryData(cursorWorkspacesQueryOptions())
|
|
284
|
+
});
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region src/routes/antigravity.index.tsx
|
|
287
|
+
var $$splitErrorComponentImporter = () => import("./antigravity.index-DudTB3Tq.js");
|
|
288
|
+
var $$splitComponentImporter = () => import("./antigravity.index-DZVT-cac.js");
|
|
289
|
+
var Route = createFileRoute("/antigravity/")({
|
|
239
290
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
240
291
|
errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent"),
|
|
241
|
-
loader: ({ context }) => context.queryClient.ensureQueryData(
|
|
292
|
+
loader: ({ context }) => context.queryClient.ensureQueryData(antigravityWorkspacesQueryOptions())
|
|
242
293
|
});
|
|
243
294
|
//#endregion
|
|
244
295
|
//#region src/routeTree.gen.ts
|
|
245
|
-
var SettingsRoute = Route$
|
|
296
|
+
var SettingsRoute = Route$5.update({
|
|
246
297
|
id: "/settings",
|
|
247
298
|
path: "/settings",
|
|
248
|
-
getParentRoute: () => Route$
|
|
299
|
+
getParentRoute: () => Route$6
|
|
249
300
|
});
|
|
250
|
-
var AnalyticsRoute = Route$
|
|
301
|
+
var AnalyticsRoute = Route$4.update({
|
|
251
302
|
id: "/analytics",
|
|
252
303
|
path: "/analytics",
|
|
253
|
-
getParentRoute: () => Route$
|
|
304
|
+
getParentRoute: () => Route$6
|
|
254
305
|
});
|
|
255
|
-
var ThreadIdRoute = Route$
|
|
306
|
+
var ThreadIdRoute = Route$3.update({
|
|
256
307
|
id: "/$threadId",
|
|
257
308
|
path: "/$threadId",
|
|
258
|
-
getParentRoute: () => Route$
|
|
309
|
+
getParentRoute: () => Route$6
|
|
259
310
|
});
|
|
260
|
-
var IndexRoute = Route$
|
|
311
|
+
var IndexRoute = Route$7.update({
|
|
261
312
|
id: "/",
|
|
262
313
|
path: "/",
|
|
263
|
-
getParentRoute: () => Route$
|
|
314
|
+
getParentRoute: () => Route$6
|
|
264
315
|
});
|
|
265
|
-
var ProjectsIndexRoute = Route.update({
|
|
316
|
+
var ProjectsIndexRoute = Route$2.update({
|
|
266
317
|
id: "/projects/",
|
|
267
318
|
path: "/projects/",
|
|
268
|
-
getParentRoute: () => Route$
|
|
319
|
+
getParentRoute: () => Route$6
|
|
269
320
|
});
|
|
270
|
-
var
|
|
321
|
+
var CursorIndexRoute = Route$1.update({
|
|
322
|
+
id: "/cursor/",
|
|
323
|
+
path: "/cursor/",
|
|
324
|
+
getParentRoute: () => Route$6
|
|
325
|
+
});
|
|
326
|
+
var AntigravityIndexRoute = Route.update({
|
|
327
|
+
id: "/antigravity/",
|
|
328
|
+
path: "/antigravity/",
|
|
329
|
+
getParentRoute: () => Route$6
|
|
330
|
+
});
|
|
331
|
+
var ThreadsThreadIdRoute = Route$8.update({
|
|
271
332
|
id: "/threads/$threadId",
|
|
272
333
|
path: "/threads/$threadId",
|
|
273
|
-
getParentRoute: () => Route$
|
|
334
|
+
getParentRoute: () => Route$6
|
|
335
|
+
});
|
|
336
|
+
var ProjectsProjectRoute = Route$9.update({
|
|
337
|
+
id: "/projects/$project",
|
|
338
|
+
path: "/projects/$project",
|
|
339
|
+
getParentRoute: () => Route$6
|
|
340
|
+
});
|
|
341
|
+
var CursorWorkspaceKeyRoute = Route$10.update({
|
|
342
|
+
id: "/cursor/$workspaceKey",
|
|
343
|
+
path: "/cursor/$workspaceKey",
|
|
344
|
+
getParentRoute: () => Route$6
|
|
345
|
+
});
|
|
346
|
+
var CursorThreadsComposerIdRoute = Route$11.update({
|
|
347
|
+
id: "/cursor-threads/$composerId",
|
|
348
|
+
path: "/cursor-threads/$composerId",
|
|
349
|
+
getParentRoute: () => Route$6
|
|
350
|
+
});
|
|
351
|
+
var AntigravityWorkspaceKeyRoute = Route$12.update({
|
|
352
|
+
id: "/antigravity/$workspaceKey",
|
|
353
|
+
path: "/antigravity/$workspaceKey",
|
|
354
|
+
getParentRoute: () => Route$6
|
|
274
355
|
});
|
|
275
356
|
var rootRouteChildren = {
|
|
276
357
|
IndexRoute,
|
|
277
358
|
ThreadIdRoute,
|
|
278
359
|
AnalyticsRoute,
|
|
279
360
|
SettingsRoute,
|
|
280
|
-
|
|
281
|
-
id: "/
|
|
282
|
-
path: "/
|
|
283
|
-
getParentRoute: () => Route$
|
|
361
|
+
AntigravityConversationsConversationIdRoute: Route$13.update({
|
|
362
|
+
id: "/antigravity-conversations/$conversationId",
|
|
363
|
+
path: "/antigravity-conversations/$conversationId",
|
|
364
|
+
getParentRoute: () => Route$6
|
|
284
365
|
}),
|
|
366
|
+
AntigravityWorkspaceKeyRoute,
|
|
367
|
+
CursorThreadsComposerIdRoute,
|
|
368
|
+
CursorWorkspaceKeyRoute,
|
|
369
|
+
ProjectsProjectRoute,
|
|
285
370
|
ThreadsThreadIdRoute,
|
|
371
|
+
AntigravityIndexRoute,
|
|
372
|
+
CursorIndexRoute,
|
|
286
373
|
ProjectsIndexRoute
|
|
287
374
|
};
|
|
288
|
-
var routeTree = Route$
|
|
375
|
+
var routeTree = Route$6._addFileChildren(rootRouteChildren)._addFileTypes();
|
|
289
376
|
//#endregion
|
|
290
377
|
//#region src/router.tsx
|
|
291
378
|
function getRouter() {
|
|
@@ -1,11 +1,55 @@
|
|
|
1
|
-
import { n as dashboardQueryOptions } from "./codex-queries-
|
|
2
|
-
import { t as Route } from "./routes-
|
|
1
|
+
import { n as dashboardQueryOptions } from "./codex-queries-eOJGfHQj.js";
|
|
2
|
+
import { t as Route } from "./routes-CNHAUMwo.js";
|
|
3
3
|
import { t as MetricCard } from "./metric-card-ByEeLu0r.js";
|
|
4
|
-
import { t as PageHeader } from "./page-header-
|
|
4
|
+
import { t as PageHeader } from "./page-header-VNSaM3xd.js";
|
|
5
5
|
import { o as formatNumber, r as formatDateTime, s as formatTokens } from "./formatters-FJaGZgJk.js";
|
|
6
6
|
import { Link } from "@tanstack/react-router";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
9
|
+
//#region src/components/recent-threads-list.tsx
|
|
10
|
+
function RecentThreadsList({ threads }) {
|
|
11
|
+
return /* @__PURE__ */ jsx("div", {
|
|
12
|
+
className: "mt-4 space-y-2",
|
|
13
|
+
children: threads.map(({ project, thread }) => /* @__PURE__ */ jsxs("article", {
|
|
14
|
+
className: "grid min-w-0 grid-cols-[minmax(0,1fr)_7.5rem] gap-3 rounded-xl border border-[var(--border)] bg-[var(--panel-secondary)] p-3.5 transition-colors hover:border-[var(--accent)]/30 hover:bg-[var(--accent-muted)]",
|
|
15
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
16
|
+
className: "min-w-0",
|
|
17
|
+
children: [/* @__PURE__ */ jsxs(Link, {
|
|
18
|
+
className: "block min-w-0 rounded-md outline-none transition hover:opacity-80 focus-visible:ring-2 focus-visible:ring-[var(--accent)]",
|
|
19
|
+
params: { threadId: thread.id },
|
|
20
|
+
to: "/threads/$threadId",
|
|
21
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
22
|
+
className: "truncate font-medium text-sm underline-offset-2 hover:underline",
|
|
23
|
+
children: thread.title
|
|
24
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
25
|
+
className: "mt-0.5 line-clamp-1 text-[var(--muted-foreground)] text-xs",
|
|
26
|
+
children: thread.preview
|
|
27
|
+
})]
|
|
28
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
29
|
+
className: "mt-2 flex min-w-0 flex-wrap gap-3 text-[var(--muted-foreground)] text-xs",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsx(Link, {
|
|
32
|
+
className: "max-w-[14rem] truncate font-medium text-[var(--accent)] underline-offset-2 hover:underline",
|
|
33
|
+
params: { project },
|
|
34
|
+
to: "/projects/$project",
|
|
35
|
+
children: project
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ jsx("span", {
|
|
38
|
+
className: "font-mono",
|
|
39
|
+
children: thread.model ?? "unknown model"
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx("span", { children: formatTokens(thread.tokens_used) })
|
|
42
|
+
]
|
|
43
|
+
})]
|
|
44
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
45
|
+
className: "justify-self-end whitespace-nowrap text-right font-mono text-[var(--muted-foreground)] text-xs",
|
|
46
|
+
suppressHydrationWarning: true,
|
|
47
|
+
children: formatDateTime(thread.updated_at_ms ?? thread.updated_at * 1e3)
|
|
48
|
+
})]
|
|
49
|
+
}, thread.id))
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
9
53
|
//#region src/routes/index.tsx?tsr-split=component
|
|
10
54
|
function DashboardErrorComponent({ error }) {
|
|
11
55
|
const isSqlite = error.message.includes("unable to open database") || error.message.includes("database is locked");
|
|
@@ -36,6 +80,11 @@ function DashboardPage() {
|
|
|
36
80
|
className: "space-y-6",
|
|
37
81
|
children: [
|
|
38
82
|
/* @__PURE__ */ jsx(PageHeader, {
|
|
83
|
+
actions: /* @__PURE__ */ jsx("img", {
|
|
84
|
+
alt: "Spiracha icon",
|
|
85
|
+
className: "size-16 shrink-0 rounded-2xl border border-[var(--border)] bg-white/95 p-2 shadow-[var(--panel-shadow)]",
|
|
86
|
+
src: "/icon.svg"
|
|
87
|
+
}),
|
|
39
88
|
eyebrow: "Overview",
|
|
40
89
|
subtitle: "A compact readout of local Codex activity, project distribution, and recent thread movement.",
|
|
41
90
|
title: "Dashboard"
|
|
@@ -80,43 +129,9 @@ function DashboardPage() {
|
|
|
80
129
|
}), /* @__PURE__ */ jsx(Link, {
|
|
81
130
|
className: "shrink-0 font-medium text-[var(--accent)] text-sm",
|
|
82
131
|
to: "/projects",
|
|
83
|
-
children: "View
|
|
132
|
+
children: "View Codex"
|
|
84
133
|
})]
|
|
85
|
-
}), /* @__PURE__ */ jsx(
|
|
86
|
-
className: "mt-4 space-y-2",
|
|
87
|
-
children: dashboard.recentThreads.map((thread) => /* @__PURE__ */ jsxs(Link, {
|
|
88
|
-
className: "block overflow-hidden rounded-xl border border-[var(--border)] bg-[var(--panel-secondary)] p-3.5 transition-colors hover:border-[var(--accent)]/30 hover:bg-[var(--accent-muted)]",
|
|
89
|
-
params: { threadId: thread.id },
|
|
90
|
-
to: "/threads/$threadId",
|
|
91
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
92
|
-
className: "flex min-w-0 flex-wrap items-start justify-between gap-2",
|
|
93
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
94
|
-
className: "min-w-0 shrink",
|
|
95
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
96
|
-
className: "truncate font-medium text-sm",
|
|
97
|
-
children: thread.title
|
|
98
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
99
|
-
className: "mt-0.5 line-clamp-1 text-[var(--muted-foreground)] text-xs",
|
|
100
|
-
children: thread.preview
|
|
101
|
-
})]
|
|
102
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
103
|
-
className: "shrink-0 whitespace-nowrap font-mono text-[var(--muted-foreground)] text-xs",
|
|
104
|
-
suppressHydrationWarning: true,
|
|
105
|
-
children: formatDateTime(thread.updated_at_ms ?? thread.updated_at * 1e3)
|
|
106
|
-
})]
|
|
107
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
108
|
-
className: "mt-2 flex flex-wrap gap-3 text-[var(--muted-foreground)] text-xs",
|
|
109
|
-
children: [
|
|
110
|
-
/* @__PURE__ */ jsx("span", {
|
|
111
|
-
className: "font-mono",
|
|
112
|
-
children: thread.model ?? "unknown model"
|
|
113
|
-
}),
|
|
114
|
-
/* @__PURE__ */ jsx("span", { children: formatTokens(thread.tokens_used) }),
|
|
115
|
-
/* @__PURE__ */ jsx("span", { children: thread.thread_source ?? "n/a" })
|
|
116
|
-
]
|
|
117
|
-
})]
|
|
118
|
-
}, thread.id))
|
|
119
|
-
})]
|
|
134
|
+
}), /* @__PURE__ */ jsx(RecentThreadsList, { threads: dashboard.recentThreads })]
|
|
120
135
|
}), /* @__PURE__ */ jsxs("div", {
|
|
121
136
|
className: "grid min-w-0 gap-4",
|
|
122
137
|
children: [/* @__PURE__ */ jsxs("section", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as dashboardQueryOptions } from "./codex-queries-
|
|
1
|
+
import { n as dashboardQueryOptions } from "./codex-queries-eOJGfHQj.js";
|
|
2
2
|
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/routes/index.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./routes-
|
|
5
|
+
var $$splitComponentImporter = () => import("./routes-B-GlEe2C.js");
|
|
6
6
|
var Route = createFileRoute("/")({
|
|
7
7
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
8
8
|
loader: ({ context }) => context.queryClient.ensureQueryData(dashboardQueryOptions())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as useSettings } from "./settings-store-DpEJEQ7M.js";
|
|
2
2
|
import { t as Checkbox } from "./checkbox-C0hovF41.js";
|
|
3
|
-
import { t as PageHeader } from "./page-header-
|
|
3
|
+
import { t as PageHeader } from "./page-header-VNSaM3xd.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Settings2 } from "lucide-react";
|
|
6
6
|
//#region src/routes/settings.tsx?tsr-split=component
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { t as formatModelLabel$1 } from "./model-label-B1NWGc65.js";
|
|
2
|
+
import { finished } from "node:stream/promises";
|
|
3
|
+
import { mkdir } from "node:fs/promises";
|
|
4
|
+
import "node:os";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { createReadStream, createWriteStream } from "node:fs";
|
|
7
|
+
import { createInterface } from "node:readline";
|
|
8
|
+
//#region ../../src/lib/shared.ts
|
|
9
|
+
var getPortablePathBasename = (value) => {
|
|
10
|
+
const trimmed = value.replace(/[\\/]+$/u, "");
|
|
11
|
+
if (!trimmed) return "";
|
|
12
|
+
return path.win32.basename(path.posix.basename(trimmed));
|
|
13
|
+
};
|
|
14
|
+
var cleanInlineTitle = (value) => {
|
|
15
|
+
const compact = (value.split("\n").map((line) => line.trim()).find((line) => line.length > 0) ?? "").replace(/\s+/g, " ").trim();
|
|
16
|
+
if (compact.length <= 160) return compact;
|
|
17
|
+
return `${compact.slice(0, 157).trimEnd()}...`;
|
|
18
|
+
};
|
|
19
|
+
var cleanExtractedText = (text) => {
|
|
20
|
+
return text.replace(/^\s*<\/?image>\s*$/gm, "").replace(/\n{3,}/g, "\n\n");
|
|
21
|
+
};
|
|
22
|
+
var formatModelLabel = formatModelLabel$1;
|
|
23
|
+
var asObject = (value) => {
|
|
24
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
|
25
|
+
return value;
|
|
26
|
+
};
|
|
27
|
+
var asString = (value) => {
|
|
28
|
+
return typeof value === "string" ? value : null;
|
|
29
|
+
};
|
|
30
|
+
var asNumber = (value) => {
|
|
31
|
+
return typeof value === "number" ? value : null;
|
|
32
|
+
};
|
|
33
|
+
var readJsonlObjects = (filePath) => {
|
|
34
|
+
const stream = createReadStream(filePath, { encoding: "utf8" });
|
|
35
|
+
const lines = createInterface({
|
|
36
|
+
crlfDelay: Infinity,
|
|
37
|
+
input: stream
|
|
38
|
+
});
|
|
39
|
+
const lineIterator = lines[Symbol.asyncIterator]();
|
|
40
|
+
let closed = false;
|
|
41
|
+
const close = () => {
|
|
42
|
+
if (closed) return;
|
|
43
|
+
closed = true;
|
|
44
|
+
lines.close();
|
|
45
|
+
stream.destroy();
|
|
46
|
+
};
|
|
47
|
+
const readNext = async () => {
|
|
48
|
+
while (true) {
|
|
49
|
+
const nextLine = await lineIterator.next();
|
|
50
|
+
if (nextLine.done) {
|
|
51
|
+
close();
|
|
52
|
+
return {
|
|
53
|
+
done: true,
|
|
54
|
+
value: void 0
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const trimmed = nextLine.value.trim();
|
|
58
|
+
if (!trimmed) continue;
|
|
59
|
+
try {
|
|
60
|
+
return {
|
|
61
|
+
done: false,
|
|
62
|
+
value: JSON.parse(trimmed)
|
|
63
|
+
};
|
|
64
|
+
} catch {}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const iterator = {
|
|
68
|
+
[Symbol.asyncIterator]: () => iterator,
|
|
69
|
+
next: async () => readNext(),
|
|
70
|
+
return: async () => {
|
|
71
|
+
close();
|
|
72
|
+
return {
|
|
73
|
+
done: true,
|
|
74
|
+
value: void 0
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
throw: async (error) => {
|
|
78
|
+
close();
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
return iterator;
|
|
83
|
+
};
|
|
84
|
+
var renderDocumentTitle = (title, format) => {
|
|
85
|
+
if (format === "md") return `# ${title}`;
|
|
86
|
+
return [title, "=".repeat(Math.max(title.length, 3))].join("\n");
|
|
87
|
+
};
|
|
88
|
+
var renderMetadataBlock = (entries, format) => {
|
|
89
|
+
const filteredEntries = entries.filter((entry) => entry.value !== null && entry.value !== void 0 && entry.value !== "");
|
|
90
|
+
if (filteredEntries.length === 0) return "";
|
|
91
|
+
if (format === "md") {
|
|
92
|
+
const lines = ["---"];
|
|
93
|
+
for (const entry of filteredEntries) lines.push(`${entry.key}: ${toMetadataValue(entry.value, "md")}`);
|
|
94
|
+
lines.push("---");
|
|
95
|
+
return `${lines.join("\n")}\n`;
|
|
96
|
+
}
|
|
97
|
+
const lines = ["Metadata", "--------"];
|
|
98
|
+
for (const entry of filteredEntries) lines.push(`${entry.key}: ${toMetadataValue(entry.value, "txt")}`);
|
|
99
|
+
return `${lines.join("\n")}\n`;
|
|
100
|
+
};
|
|
101
|
+
var renderSection = (title, body, format) => {
|
|
102
|
+
const trimmedBody = body.trimEnd();
|
|
103
|
+
if (!trimmedBody) return "";
|
|
104
|
+
if (format === "md") return `## ${title}\n\n${trimmedBody}\n`;
|
|
105
|
+
return `${title}\n${"-".repeat(Math.max(title.length, 3))}\n${trimmedBody}\n`;
|
|
106
|
+
};
|
|
107
|
+
var renderCodeBlock = (text, format) => {
|
|
108
|
+
if (format === "md") return `\`\`\`text\n${text}\n\`\`\``;
|
|
109
|
+
return text;
|
|
110
|
+
};
|
|
111
|
+
var formatInlineLiteral = (value, format) => {
|
|
112
|
+
return format === "md" ? inlineCode(value) : value;
|
|
113
|
+
};
|
|
114
|
+
var inlineCode = (value) => {
|
|
115
|
+
const maxRunLength = (value.match(/`+/g) ?? []).reduce((max, run) => Math.max(max, run.length), 0);
|
|
116
|
+
const fence = "`".repeat(maxRunLength + 1);
|
|
117
|
+
return `${fence}${value.startsWith("`") || value.endsWith("`") ? ` ${value} ` : value}${fence}`;
|
|
118
|
+
};
|
|
119
|
+
var createExportWriteStream = async (outputPath) => {
|
|
120
|
+
await mkdir(path.dirname(outputPath), { recursive: true });
|
|
121
|
+
return createWriteStream(outputPath, { encoding: "utf8" });
|
|
122
|
+
};
|
|
123
|
+
var finalizeExportWriteStream = async (stream) => {
|
|
124
|
+
stream.end();
|
|
125
|
+
await finished(stream);
|
|
126
|
+
};
|
|
127
|
+
var toMetadataValue = (value, format) => {
|
|
128
|
+
if (Array.isArray(value) || value && typeof value === "object") return JSON.stringify(value);
|
|
129
|
+
if (typeof value === "string") return format === "md" ? JSON.stringify(value) : value;
|
|
130
|
+
if (typeof value === "boolean" || typeof value === "number") return String(value);
|
|
131
|
+
return format === "md" ? JSON.stringify(String(value)) : String(value);
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
export { cleanInlineTitle as a, formatInlineLiteral as c, readJsonlObjects as d, renderCodeBlock as f, renderSection as h, cleanExtractedText as i, formatModelLabel as l, renderMetadataBlock as m, asObject as n, createExportWriteStream as o, renderDocumentTitle as p, asString as r, finalizeExportWriteStream as s, asNumber as t, getPortablePathBasename as u };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/text-document-panel.tsx
|
|
3
|
+
var TextDocumentPanel = ({ content, description, title }) => {
|
|
4
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
5
|
+
className: "rounded-[1.6rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]",
|
|
6
|
+
children: [
|
|
7
|
+
/* @__PURE__ */ jsx("h3", {
|
|
8
|
+
className: "font-semibold text-[var(--muted-foreground)] text-sm uppercase tracking-[0.18em]",
|
|
9
|
+
children: title
|
|
10
|
+
}),
|
|
11
|
+
description ? /* @__PURE__ */ jsx("p", {
|
|
12
|
+
className: "mt-2 text-[var(--muted-foreground)] text-sm",
|
|
13
|
+
children: description
|
|
14
|
+
}) : null,
|
|
15
|
+
/* @__PURE__ */ jsx("pre", {
|
|
16
|
+
className: "mt-4 overflow-x-auto whitespace-pre-wrap rounded-2xl border border-[var(--border)] bg-[var(--code-background)] p-4 text-sm leading-6 [overflow-wrap:anywhere]",
|
|
17
|
+
children: content
|
|
18
|
+
})
|
|
19
|
+
]
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { TextDocumentPanel as t };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { t as cn } from "./utils-C_uf36nf.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/ui/input.tsx
|
|
4
|
+
function Input({ className, type, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("input", {
|
|
6
|
+
type,
|
|
7
|
+
"data-slot": "input",
|
|
8
|
+
className: cn("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30", "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", className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/components/list-search-input.tsx
|
|
14
|
+
function ListSearchInput({ placeholder, value, onValueChange }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
16
|
+
className: "h-10 w-full rounded-full border-[var(--border)] bg-[var(--panel)] px-4 sm:w-[20rem]",
|
|
17
|
+
placeholder,
|
|
18
|
+
value,
|
|
19
|
+
onChange: (event) => onValueChange(event.target.value)
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/lib/text-filter.ts
|
|
24
|
+
var normalizeSearchToken = (value) => value.trim().toLowerCase();
|
|
25
|
+
var tokenizeSearchQuery = (query) => {
|
|
26
|
+
const normalized = normalizeSearchToken(query);
|
|
27
|
+
return normalized ? normalized.split(/\s+/u).filter(Boolean) : [];
|
|
28
|
+
};
|
|
29
|
+
var matchesTextQuery = (query, values) => {
|
|
30
|
+
const tokens = tokenizeSearchQuery(query);
|
|
31
|
+
if (tokens.length === 0) return true;
|
|
32
|
+
const haystack = values.filter((value) => value !== null && value !== void 0).map((value) => String(value).toLowerCase()).join("\n");
|
|
33
|
+
return tokens.every((token) => haystack.includes(token));
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { ListSearchInput as n, matchesTextQuery as t };
|
package/apps/ui/dist/server/assets/{threads._threadId-DcbAJkwf.js → threads._threadId-CJzm4KrZ.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as threadSnapshotQueryOptions } from "./codex-queries-
|
|
2
|
-
import { t as LoadingPanel } from "./loading-panel-
|
|
1
|
+
import { a as threadSnapshotQueryOptions } from "./codex-queries-eOJGfHQj.js";
|
|
2
|
+
import { t as LoadingPanel } from "./loading-panel-BGFnWseS.js";
|
|
3
3
|
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/routes/threads.$threadId.tsx
|
|
6
6
|
var $$splitErrorComponentImporter = () => import("./threads._threadId-BSSK4nkI.js");
|
|
7
|
-
var $$splitComponentImporter = () => import("./threads._threadId-
|
|
7
|
+
var $$splitComponentImporter = () => import("./threads._threadId-DODTYddm.js");
|
|
8
8
|
var Route = createFileRoute("/threads/$threadId")({
|
|
9
9
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
10
10
|
errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent"),
|