spiracha 1.5.0 → 2.1.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 +114 -205
- package/README.md +94 -269
- package/apps/ui/AGENTS.md +17 -7
- package/apps/ui/README.md +52 -8
- package/apps/ui/components.json +21 -0
- package/apps/ui/package.json +65 -0
- package/apps/ui/src/components/antigravity-conversations-table.tsx +245 -0
- package/apps/ui/src/components/antigravity-keychain-panel.tsx +76 -0
- package/apps/ui/src/components/antigravity-workspaces-table.tsx +63 -0
- package/apps/ui/src/components/app-shell.tsx +125 -0
- package/apps/ui/src/components/breadcrumbs.tsx +71 -0
- package/apps/ui/src/components/claude-code-sessions-table.tsx +150 -0
- package/apps/ui/src/components/claude-code-workspaces-table.tsx +57 -0
- package/apps/ui/src/components/cursor-threads-table.tsx +152 -0
- package/apps/ui/src/components/cursor-workspaces-table.tsx +140 -0
- package/apps/ui/src/components/data-table.tsx +243 -0
- package/apps/ui/src/components/delete-confirm-dialog.tsx +88 -0
- package/apps/ui/src/components/export-dialog.tsx +174 -0
- package/apps/ui/src/components/grok-sessions-table.tsx +146 -0
- package/apps/ui/src/components/grok-workspaces-table.tsx +53 -0
- package/apps/ui/src/components/json-panel.tsx +17 -0
- package/apps/ui/src/components/kiro-sessions-table.tsx +148 -0
- package/apps/ui/src/components/kiro-workspaces-table.tsx +53 -0
- package/apps/ui/src/components/list-search-input.tsx +18 -0
- package/apps/ui/src/components/loading-panel.tsx +23 -0
- package/apps/ui/src/components/metadata-section.tsx +31 -0
- package/apps/ui/src/components/metric-card.tsx +19 -0
- package/apps/ui/src/components/opencode-sessions-table.tsx +164 -0
- package/apps/ui/src/components/opencode-workspaces-table.tsx +57 -0
- package/apps/ui/src/components/page-header.tsx +39 -0
- package/apps/ui/src/components/projects-loading-state.tsx +74 -0
- package/apps/ui/src/components/projects-table.tsx +108 -0
- package/apps/ui/src/components/qoder-sessions-table.tsx +133 -0
- package/apps/ui/src/components/qoder-workspaces-table.tsx +57 -0
- package/apps/ui/src/components/recent-threads-list.tsx +52 -0
- package/apps/ui/src/components/reload-error-panel.tsx +20 -0
- package/apps/ui/src/components/selection-actions-toolbar.tsx +80 -0
- package/apps/ui/src/components/text-document-panel.tsx +19 -0
- package/apps/ui/src/components/theme-toggle.tsx +48 -0
- package/apps/ui/src/components/threads-table.tsx +165 -0
- package/apps/ui/src/components/transcript-view.tsx +648 -0
- package/apps/ui/src/components/ui/alert-dialog.tsx +160 -0
- package/apps/ui/src/components/ui/badge.tsx +45 -0
- package/apps/ui/src/components/ui/button.tsx +62 -0
- package/apps/ui/src/components/ui/checkbox.tsx +29 -0
- package/apps/ui/src/components/ui/dialog.tsx +137 -0
- package/apps/ui/src/components/ui/dropdown-menu.tsx +217 -0
- package/apps/ui/src/components/ui/input.tsx +21 -0
- package/apps/ui/src/components/ui/scroll-area.tsx +46 -0
- package/apps/ui/src/components/ui/select.tsx +163 -0
- package/apps/ui/src/components/ui/separator.tsx +28 -0
- package/apps/ui/src/components/ui/sheet.tsx +107 -0
- package/apps/ui/src/components/ui/skeleton.tsx +7 -0
- package/apps/ui/src/components/ui/table.tsx +76 -0
- package/apps/ui/src/components/ui/tabs.tsx +71 -0
- package/apps/ui/src/components/ui/tooltip.tsx +44 -0
- package/apps/ui/src/integrations/tanstack-query/devtools.tsx +6 -0
- package/apps/ui/src/integrations/tanstack-query/root-provider.tsx +10 -0
- package/apps/ui/src/lib/antigravity-conversation-state.ts +41 -0
- package/apps/ui/src/lib/antigravity-queries.ts +33 -0
- package/apps/ui/src/lib/antigravity-server.ts +273 -0
- package/apps/ui/src/lib/antigravity-transcript-events.ts +343 -0
- package/apps/ui/src/lib/claude-code-queries.ts +34 -0
- package/apps/ui/src/lib/claude-code-server.ts +243 -0
- package/apps/ui/src/lib/claude-code-transcript-events.ts +161 -0
- package/apps/ui/src/lib/codex-queries.ts +82 -0
- package/apps/ui/src/lib/codex-server.ts +291 -0
- package/apps/ui/src/lib/cursor-queries.ts +37 -0
- package/apps/ui/src/lib/cursor-server.ts +315 -0
- package/apps/ui/src/lib/cursor-transcript-events.ts +229 -0
- package/apps/ui/src/lib/download.ts +166 -0
- package/apps/ui/src/lib/formatters.ts +147 -0
- package/apps/ui/src/lib/grok-queries.ts +22 -0
- package/apps/ui/src/lib/grok-server.ts +169 -0
- package/apps/ui/src/lib/grok-transcript-events.ts +149 -0
- package/apps/ui/src/lib/kiro-queries.ts +22 -0
- package/apps/ui/src/lib/kiro-server.ts +151 -0
- package/apps/ui/src/lib/kiro-transcript-events.ts +113 -0
- package/apps/ui/src/lib/opencode-queries.ts +37 -0
- package/apps/ui/src/lib/opencode-server.ts +151 -0
- package/apps/ui/src/lib/opencode-transcript-events.ts +221 -0
- package/apps/ui/src/lib/package-metadata.ts +16 -0
- package/apps/ui/src/lib/path-utils.ts +13 -0
- package/apps/ui/src/lib/qoder-queries.ts +22 -0
- package/apps/ui/src/lib/qoder-server.ts +135 -0
- package/apps/ui/src/lib/qoder-transcript-events.ts +139 -0
- package/apps/ui/src/lib/route-search.ts +182 -0
- package/apps/ui/src/lib/settings-store.tsx +59 -0
- package/apps/ui/src/lib/source-session-export-server.ts +139 -0
- package/apps/ui/src/lib/text-filter.ts +22 -0
- package/apps/ui/src/lib/thread-id.ts +3 -0
- package/apps/ui/src/lib/thread-transcript-load.ts +15 -0
- package/apps/ui/src/lib/thread-transcript-stats.ts +57 -0
- package/apps/ui/src/lib/utils.ts +7 -0
- package/apps/ui/src/lib/workspace-delete-navigation.ts +12 -0
- package/apps/ui/src/routeTree.gen.ts +837 -0
- package/apps/ui/src/router.tsx +20 -0
- package/apps/ui/src/routes/$threadId.tsx +22 -0
- package/apps/ui/src/routes/__root.tsx +127 -0
- package/apps/ui/src/routes/analytics.tsx +143 -0
- package/apps/ui/src/routes/antigravity-conversations.$conversationId.tsx +504 -0
- package/apps/ui/src/routes/antigravity.$workspaceKey.tsx +365 -0
- package/apps/ui/src/routes/antigravity.index.tsx +51 -0
- package/apps/ui/src/routes/api.v1.conversation-query.ts +12 -0
- package/apps/ui/src/routes/api.v1.conversations.$source.$id.export.ts +12 -0
- package/apps/ui/src/routes/api.v1.conversations.$source.$id.ts +16 -0
- package/apps/ui/src/routes/api.v1.conversations.delete.ts +12 -0
- package/apps/ui/src/routes/api.v1.conversations.export.ts +12 -0
- package/apps/ui/src/routes/api.v1.conversations.ts +12 -0
- package/apps/ui/src/routes/api.v1.resolve.ts +12 -0
- package/apps/ui/src/routes/api.v1.sources.ts +12 -0
- package/apps/ui/src/routes/claude-code-sessions.$sessionId.tsx +468 -0
- package/apps/ui/src/routes/claude-code.$workspaceKey.tsx +274 -0
- package/apps/ui/src/routes/claude-code.index.tsx +48 -0
- package/apps/ui/src/routes/codex.$project.tsx +390 -0
- package/apps/ui/src/routes/codex.index.tsx +116 -0
- package/apps/ui/src/routes/cursor-threads.$composerId.tsx +435 -0
- package/apps/ui/src/routes/cursor.$workspaceKey.tsx +426 -0
- package/apps/ui/src/routes/cursor.index.tsx +120 -0
- package/apps/ui/src/routes/grok-sessions.$sessionId.tsx +388 -0
- package/apps/ui/src/routes/grok.$workspaceKey.tsx +301 -0
- package/apps/ui/src/routes/grok.index.tsx +48 -0
- package/apps/ui/src/routes/index.tsx +124 -0
- package/apps/ui/src/routes/kiro-sessions.$sessionId.tsx +396 -0
- package/apps/ui/src/routes/kiro.$workspaceKey.tsx +303 -0
- package/apps/ui/src/routes/kiro.index.tsx +48 -0
- package/apps/ui/src/routes/opencode-sessions.$sessionId.tsx +420 -0
- package/apps/ui/src/routes/opencode.$workspaceKey.tsx +327 -0
- package/apps/ui/src/routes/opencode.index.tsx +61 -0
- package/apps/ui/src/routes/qoder-sessions.$sessionId.tsx +344 -0
- package/apps/ui/src/routes/qoder.$workspaceKey.tsx +186 -0
- package/apps/ui/src/routes/qoder.index.tsx +48 -0
- package/apps/ui/src/routes/settings.tsx +91 -0
- package/apps/ui/src/routes/threads.$threadId.tsx +1103 -0
- package/apps/ui/src/styles.css +122 -0
- package/apps/ui/tsconfig.json +29 -0
- package/apps/ui/vite.config.ts +84 -0
- package/bin/spiracha.ts +32 -0
- package/package.json +54 -80
- package/src/client.ts +423 -0
- package/src/lib/antigravity-db.ts +414 -44
- package/src/lib/antigravity-exporter-types.ts +4 -0
- package/src/lib/antigravity-projects.ts +201 -0
- package/src/lib/claude-code-db.ts +498 -32
- package/src/lib/claude-code-exporter-types.ts +5 -0
- package/src/lib/claude-code-transcript-phase.ts +60 -1
- package/src/lib/claude-code-transcript.ts +8 -5
- package/src/lib/codex-analytics.ts +1 -1
- package/src/lib/codex-browser-db.ts +410 -74
- package/src/lib/codex-browser-export.ts +29 -41
- package/src/lib/codex-browser-types.ts +1 -1
- package/src/lib/codex-thread-cache.ts +41 -13
- package/src/lib/codex-thread-parser.ts +86 -35
- package/src/lib/{codex-exporter-types.ts → codex-thread-types.ts} +2 -30
- package/src/lib/codex-transcript-filter.ts +31 -0
- package/src/lib/{codex-exporter-transcript.ts → codex-transcript-renderer.ts} +104 -48
- package/src/lib/concurrency.ts +41 -0
- package/src/lib/conversation-api.ts +1172 -0
- package/src/lib/conversation-data/adapter-helpers.ts +110 -0
- package/src/lib/conversation-data/antigravity-adapter.ts +167 -0
- package/src/lib/conversation-data/claude-code-adapter.ts +206 -0
- package/src/lib/conversation-data/codex-adapter.ts +269 -0
- package/src/lib/conversation-data/cursor-adapter.ts +205 -0
- package/src/lib/conversation-data/grok-adapter.ts +210 -0
- package/src/lib/conversation-data/index.ts +386 -0
- package/src/lib/conversation-data/kiro-adapter.ts +174 -0
- package/src/lib/conversation-data/message-selector.ts +37 -0
- package/src/lib/conversation-data/opencode-adapter.ts +202 -0
- package/src/lib/conversation-data/path-match.ts +79 -0
- package/src/lib/conversation-data/qoder-adapter.ts +255 -0
- package/src/lib/conversation-data/types.ts +159 -0
- package/src/lib/conversation-zip-export.ts +57 -0
- package/src/lib/cursor-db.ts +100 -25
- package/src/lib/cursor-exporter-types.ts +0 -19
- package/src/lib/grok-db.ts +1026 -0
- package/src/lib/grok-exporter-types.ts +110 -0
- package/src/lib/grok-transcript-phase.ts +52 -0
- package/src/lib/grok-transcript.ts +154 -0
- package/src/lib/kiro-db.ts +52 -1
- package/src/lib/model-label.ts +11 -3
- package/src/lib/opencode-db.ts +598 -55
- package/src/lib/opencode-transcript.ts +8 -5
- package/src/lib/qoder-acp-client.ts +268 -0
- package/src/lib/qoder-db.ts +1601 -0
- package/src/lib/qoder-exporter-types.ts +114 -0
- package/src/lib/qoder-transcript-phase.ts +41 -0
- package/src/lib/qoder-transcript.ts +112 -0
- package/src/lib/shared.ts +12 -0
- package/src/lib/transcript-load-limiter.ts +82 -0
- package/src/lib/ui-cache.ts +43 -17
- package/src/lib/ui-export-archive.ts +60 -0
- package/apps/ui/dist/client/assets/_threadId-CAIeH5mq.js +0 -1
- package/apps/ui/dist/client/assets/analytics-DOy1b6Sh.js +0 -1
- package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-DqySVO2K.js +0 -7
- package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-KAcXtNxI.js +0 -1
- package/apps/ui/dist/client/assets/antigravity-keychain-panel-B77qJz6f.js +0 -1
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-B3NM6gRH.js +0 -1
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-ByitGWki.js +0 -1
- package/apps/ui/dist/client/assets/antigravity.index-DP9JC2P9.js +0 -1
- package/apps/ui/dist/client/assets/antigravity.index-DgW25FEV.js +0 -1
- package/apps/ui/dist/client/assets/badge-C3i4OKs8.js +0 -1
- package/apps/ui/dist/client/assets/checkbox-CdHitXWQ.js +0 -1
- package/apps/ui/dist/client/assets/claude-code-sessions._sessionId-8pQ55ci2.js +0 -1
- package/apps/ui/dist/client/assets/claude-code-sessions._sessionId-DVz5UmtU.js +0 -1
- package/apps/ui/dist/client/assets/claude-code._workspaceKey-BBKskSum.js +0 -1
- package/apps/ui/dist/client/assets/claude-code._workspaceKey-OkikMUFs.js +0 -1
- package/apps/ui/dist/client/assets/claude-code.index-Cwu76dbb.js +0 -1
- package/apps/ui/dist/client/assets/claude-code.index-D6eMd08t.js +0 -1
- package/apps/ui/dist/client/assets/createServerFn-B-KkwmHU.js +0 -3
- package/apps/ui/dist/client/assets/cursor-threads._composerId-CmBFclK8.js +0 -1
- package/apps/ui/dist/client/assets/cursor-threads._composerId-hBWlP1D-.js +0 -1
- package/apps/ui/dist/client/assets/cursor._workspaceKey-BFPkIRi-.js +0 -1
- package/apps/ui/dist/client/assets/cursor._workspaceKey-CaAZjGmm.js +0 -1
- package/apps/ui/dist/client/assets/cursor.index-8y4o20kb.js +0 -2
- package/apps/ui/dist/client/assets/cursor.index-CrnMwDCi.js +0 -1
- package/apps/ui/dist/client/assets/data-table-Br78_dk3.js +0 -4
- package/apps/ui/dist/client/assets/delete-confirm-dialog-Bxs07u-j.js +0 -7
- package/apps/ui/dist/client/assets/dist-B9pyYCVU.js +0 -1
- package/apps/ui/dist/client/assets/dist-BrJhN2A0.js +0 -5
- package/apps/ui/dist/client/assets/dist-Cmd3AIfD.js +0 -1
- package/apps/ui/dist/client/assets/dist-DvMS2965.js +0 -1
- package/apps/ui/dist/client/assets/download-Bf0QJKD3.js +0 -1
- package/apps/ui/dist/client/assets/dropdown-menu-D5cvPaZt.js +0 -1
- package/apps/ui/dist/client/assets/es2015-ad6040dw.js +0 -41
- package/apps/ui/dist/client/assets/export-dialog-Dr8d2MqD.js +0 -1
- package/apps/ui/dist/client/assets/formatters-BtqyrX_c.js +0 -1
- package/apps/ui/dist/client/assets/index-C-STgIH4.js +0 -166
- package/apps/ui/dist/client/assets/jsx-runtime-DGeXAQPT.js +0 -1
- package/apps/ui/dist/client/assets/kiro-sessions._sessionId-CKgfJ7GR.js +0 -1
- package/apps/ui/dist/client/assets/kiro-sessions._sessionId-zvIJHtQF.js +0 -1
- package/apps/ui/dist/client/assets/kiro._workspaceKey-DhVuJuZB.js +0 -1
- package/apps/ui/dist/client/assets/kiro._workspaceKey-QArsjkTY.js +0 -1
- package/apps/ui/dist/client/assets/kiro.index-C-fr4m7i.js +0 -1
- package/apps/ui/dist/client/assets/kiro.index-OYgAdtZd.js +0 -1
- package/apps/ui/dist/client/assets/metric-card-Dplm0ZiM.js +0 -1
- package/apps/ui/dist/client/assets/opencode-sessions._sessionId-DLjiTst-.js +0 -1
- package/apps/ui/dist/client/assets/opencode-sessions._sessionId-biBwrRbt.js +0 -8
- package/apps/ui/dist/client/assets/opencode._workspaceKey-C7OIzMOJ.js +0 -1
- package/apps/ui/dist/client/assets/opencode._workspaceKey-sBakX0oI.js +0 -1
- package/apps/ui/dist/client/assets/opencode.index-Bl_kNs9N.js +0 -1
- package/apps/ui/dist/client/assets/opencode.index-CN53bVmb.js +0 -1
- package/apps/ui/dist/client/assets/page-header-Cwa3p6Tl.js +0 -1
- package/apps/ui/dist/client/assets/preload-helper-B8fFrdxC.js +0 -1
- package/apps/ui/dist/client/assets/projects._project-D8WloxQN.js +0 -1
- package/apps/ui/dist/client/assets/projects._project-DSDwH4NF.js +0 -1
- package/apps/ui/dist/client/assets/projects.index-5xRtuJdX.js +0 -3
- package/apps/ui/dist/client/assets/projects.index-DEfhWqa8.js +0 -1
- package/apps/ui/dist/client/assets/react-dom-DL96Jor4.js +0 -1
- package/apps/ui/dist/client/assets/refresh-ccw-BgKjOiA6.js +0 -1
- package/apps/ui/dist/client/assets/reload-error-panel-AHqu0akK.js +0 -1
- package/apps/ui/dist/client/assets/routes-DnzF_9CX.js +0 -1
- package/apps/ui/dist/client/assets/scroll-text-fM0sMOB3.js +0 -1
- package/apps/ui/dist/client/assets/select-CYF6pF37.js +0 -1
- package/apps/ui/dist/client/assets/settings-Dx70jgP_.js +0 -1
- package/apps/ui/dist/client/assets/sqlite-error-B6uZjUe8.js +0 -1
- package/apps/ui/dist/client/assets/styles-B7Zi9EFA.css +0 -1
- package/apps/ui/dist/client/assets/tabs-CmuhkT-c.js +0 -7
- package/apps/ui/dist/client/assets/text-filter-DVAZySUS.js +0 -2
- package/apps/ui/dist/client/assets/thread-transcript-stats-BUNz6u7F.js +0 -1
- package/apps/ui/dist/client/assets/threads._threadId-BB9tTsV4.js +0 -1
- package/apps/ui/dist/client/assets/threads._threadId-BMRSFow3.js +0 -1
- package/apps/ui/dist/client/assets/useMutation-BSFult2i.js +0 -1
- package/apps/ui/dist/client/assets/useQuery-CjINKZf1.js +0 -1
- package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-CQ8Jjs3B.js +0 -387
- package/apps/ui/dist/server/assets/_threadId-B6SrBR9E.js +0 -6
- package/apps/ui/dist/server/assets/analytics-CYP_LT5Y.js +0 -16
- package/apps/ui/dist/server/assets/analytics-CtpOMVMO.js +0 -146
- package/apps/ui/dist/server/assets/antigravity-conversation-state-HgzS302O.js +0 -16
- package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-BKOyL2T6.js +0 -613
- package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-D426O-64.js +0 -11
- package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-eS87Dx7g.js +0 -20
- package/apps/ui/dist/server/assets/antigravity-db-Bh8_U9uw.js +0 -580
- package/apps/ui/dist/server/assets/antigravity-keychain-DOiuHDwK.js +0 -126
- package/apps/ui/dist/server/assets/antigravity-keychain-panel-CC7FLmAK.js +0 -55
- package/apps/ui/dist/server/assets/antigravity-queries-CGrJO9Vr.js +0 -37
- package/apps/ui/dist/server/assets/antigravity-server-CHRjVFqN.js +0 -114
- package/apps/ui/dist/server/assets/antigravity._workspaceKey-3m_MzNFA.js +0 -11
- package/apps/ui/dist/server/assets/antigravity._workspaceKey-B0QeYUOh.js +0 -28
- package/apps/ui/dist/server/assets/antigravity._workspaceKey-C3kP-qyN.js +0 -210
- package/apps/ui/dist/server/assets/antigravity.index-CPCYkqCi.js +0 -104
- package/apps/ui/dist/server/assets/antigravity.index-DudTB3Tq.js +0 -11
- package/apps/ui/dist/server/assets/badge-EvdhKK_Z.js +0 -26
- package/apps/ui/dist/server/assets/button-CmTDnzOn.js +0 -46
- package/apps/ui/dist/server/assets/checkbox-C0hovF41.js +0 -19
- package/apps/ui/dist/server/assets/claude-code-db-Ik3VStKZ.js +0 -361
- package/apps/ui/dist/server/assets/claude-code-queries-Cgzi4K-e.js +0 -37
- package/apps/ui/dist/server/assets/claude-code-server-PfraClXS.js +0 -72
- package/apps/ui/dist/server/assets/claude-code-sessions._sessionId-C55oe6zj.js +0 -18
- package/apps/ui/dist/server/assets/claude-code-sessions._sessionId-D1RYYi3j.js +0 -473
- package/apps/ui/dist/server/assets/claude-code-sessions._sessionId-DSvPLEUL.js +0 -11
- package/apps/ui/dist/server/assets/claude-code-transcript-C-bxh3cS.js +0 -139
- package/apps/ui/dist/server/assets/claude-code-transcript-phase-DmUMc8VU.js +0 -10
- package/apps/ui/dist/server/assets/claude-code._workspaceKey-B5Xg_-tE.js +0 -28
- package/apps/ui/dist/server/assets/claude-code._workspaceKey-BPlzyXPa.js +0 -11
- package/apps/ui/dist/server/assets/claude-code._workspaceKey-DqDve2wl.js +0 -191
- package/apps/ui/dist/server/assets/claude-code.index-B7yYR7dD.js +0 -92
- package/apps/ui/dist/server/assets/claude-code.index-BUHThG1W.js +0 -11
- package/apps/ui/dist/server/assets/codex-queries-CtgeZ7VL.js +0 -99
- package/apps/ui/dist/server/assets/codex-server-CGXU4H8-.js +0 -2294
- package/apps/ui/dist/server/assets/concurrency-VXtYvlGh.js +0 -18
- package/apps/ui/dist/server/assets/createServerRpc-CF_DEwnm.js +0 -12
- package/apps/ui/dist/server/assets/createSsrRpc-C754NPki.js +0 -16
- package/apps/ui/dist/server/assets/cursor-db-CZnYy7aT.js +0 -830
- package/apps/ui/dist/server/assets/cursor-exporter-types-CI3goo-c.js +0 -34
- package/apps/ui/dist/server/assets/cursor-queries-NCIM0Nat.js +0 -67
- package/apps/ui/dist/server/assets/cursor-recovery-CXpO8KcD.js +0 -361
- package/apps/ui/dist/server/assets/cursor-server-DNu52A3K.js +0 -213
- package/apps/ui/dist/server/assets/cursor-threads._composerId-BB0Y_Mao.js +0 -11
- package/apps/ui/dist/server/assets/cursor-threads._composerId-Ckn6ItHI.js +0 -582
- package/apps/ui/dist/server/assets/cursor-threads._composerId-p9-ARAzc.js +0 -18
- package/apps/ui/dist/server/assets/cursor-transcript-B7tGnqtn.js +0 -125
- package/apps/ui/dist/server/assets/cursor._workspaceKey-CZuohIUL.js +0 -28
- package/apps/ui/dist/server/assets/cursor._workspaceKey-DPp5JSjy.js +0 -401
- package/apps/ui/dist/server/assets/cursor._workspaceKey-nmg3YIOQ.js +0 -11
- package/apps/ui/dist/server/assets/cursor.index-CcsX7DG0.js +0 -11
- package/apps/ui/dist/server/assets/cursor.index-DkWT-mxw.js +0 -189
- package/apps/ui/dist/server/assets/data-table-Cdct823O.js +0 -189
- package/apps/ui/dist/server/assets/delete-confirm-dialog-BcBNCxWB.js +0 -144
- package/apps/ui/dist/server/assets/download-DMmiy1xf.js +0 -92
- package/apps/ui/dist/server/assets/dropdown-menu-Dy_9t6TN.js +0 -36
- package/apps/ui/dist/server/assets/empty-plugin-adapters-B3lHh1La.js +0 -5
- package/apps/ui/dist/server/assets/export-dialog-D88ze9Gy.js +0 -240
- package/apps/ui/dist/server/assets/formatters-FJaGZgJk.js +0 -91
- package/apps/ui/dist/server/assets/kiro-db--fXrED_-.js +0 -552
- package/apps/ui/dist/server/assets/kiro-queries-CzNlM2ok.js +0 -37
- package/apps/ui/dist/server/assets/kiro-server-9WRxg2Au.js +0 -72
- package/apps/ui/dist/server/assets/kiro-sessions._sessionId-CRY2c7YO.js +0 -11
- package/apps/ui/dist/server/assets/kiro-sessions._sessionId-F1UlwxmR.js +0 -449
- package/apps/ui/dist/server/assets/kiro-sessions._sessionId-bvTulT7C.js +0 -18
- package/apps/ui/dist/server/assets/kiro-transcript-DoekQBaH.js +0 -112
- package/apps/ui/dist/server/assets/kiro-transcript-phase-CJG40nQg.js +0 -27
- package/apps/ui/dist/server/assets/kiro._workspaceKey-BDe9sQwo.js +0 -11
- package/apps/ui/dist/server/assets/kiro._workspaceKey-CJsjgNwO.js +0 -28
- package/apps/ui/dist/server/assets/kiro._workspaceKey-D_-4Qb7y.js +0 -193
- package/apps/ui/dist/server/assets/kiro.index-C__-UROk.js +0 -11
- package/apps/ui/dist/server/assets/kiro.index-CmTbqeYj.js +0 -93
- package/apps/ui/dist/server/assets/loading-panel-BGFnWseS.js +0 -27
- package/apps/ui/dist/server/assets/metric-card-ByEeLu0r.js +0 -23
- package/apps/ui/dist/server/assets/model-label-B1NWGc65.js +0 -13
- package/apps/ui/dist/server/assets/opencode-db-BM7KjOzc.js +0 -397
- package/apps/ui/dist/server/assets/opencode-queries-BeNYXnQv.js +0 -50
- package/apps/ui/dist/server/assets/opencode-server-BpQ_kRze.js +0 -72
- package/apps/ui/dist/server/assets/opencode-sessions._sessionId-CGQ-t0vD.js +0 -518
- package/apps/ui/dist/server/assets/opencode-sessions._sessionId-D8Q7in_Z.js +0 -18
- package/apps/ui/dist/server/assets/opencode-sessions._sessionId-DKOvi0lV.js +0 -11
- package/apps/ui/dist/server/assets/opencode-think-tags-CAoD-EcZ.js +0 -87
- package/apps/ui/dist/server/assets/opencode-transcript-BNTcGNym.js +0 -141
- package/apps/ui/dist/server/assets/opencode-transcript-phase-OqLkiQD0.js +0 -32
- package/apps/ui/dist/server/assets/opencode._workspaceKey-BdqcWHw1.js +0 -11
- package/apps/ui/dist/server/assets/opencode._workspaceKey-CfH96HTT.js +0 -28
- package/apps/ui/dist/server/assets/opencode._workspaceKey-DdbHPDrO.js +0 -207
- package/apps/ui/dist/server/assets/opencode.index-BbVzkJXP.js +0 -11
- package/apps/ui/dist/server/assets/opencode.index-Vh_Gq_1L.js +0 -93
- package/apps/ui/dist/server/assets/page-header-VNSaM3xd.js +0 -29
- package/apps/ui/dist/server/assets/path-transforms-DL2IwtYd.js +0 -31
- package/apps/ui/dist/server/assets/projects._project-4io5LO0E.js +0 -20
- package/apps/ui/dist/server/assets/projects._project-Bshqk7JA.js +0 -12
- package/apps/ui/dist/server/assets/projects._project-D6ZoGhJ8.js +0 -395
- package/apps/ui/dist/server/assets/projects.index-BLXOx5eL.js +0 -12
- package/apps/ui/dist/server/assets/projects.index-BkLiF2FF.js +0 -182
- package/apps/ui/dist/server/assets/projects.index-DesYXwfi.js +0 -14
- package/apps/ui/dist/server/assets/reload-error-panel-BJMxY3U1.js +0 -25
- package/apps/ui/dist/server/assets/route-search-ts4W9MJ9.js +0 -38
- package/apps/ui/dist/server/assets/router-Sac2DGk6.js +0 -518
- package/apps/ui/dist/server/assets/routes-Bsact1uB.js +0 -184
- package/apps/ui/dist/server/assets/routes-BzkJgq4W.js +0 -34
- package/apps/ui/dist/server/assets/select-GW76p-ld.js +0 -76
- package/apps/ui/dist/server/assets/settings-OayxIYQQ.js +0 -100
- package/apps/ui/dist/server/assets/settings-store-DpEJEQ7M.js +0 -52
- package/apps/ui/dist/server/assets/shared-DyhChtHf.js +0 -137
- package/apps/ui/dist/server/assets/source-session-export-server-DNutCawb.js +0 -38
- package/apps/ui/dist/server/assets/sqlite-error-LZDrnxdd.js +0 -13
- package/apps/ui/dist/server/assets/start-B_HFwkkk.js +0 -4
- package/apps/ui/dist/server/assets/tabs-DkaChNVg.js +0 -501
- package/apps/ui/dist/server/assets/text-filter-CGKxMCKt.js +0 -36
- package/apps/ui/dist/server/assets/thread-transcript-stats-Dh34mt2u.js +0 -45
- package/apps/ui/dist/server/assets/threads._threadId-BSSK4nkI.js +0 -26
- package/apps/ui/dist/server/assets/threads._threadId-BeXEc4Lo.js +0 -648
- package/apps/ui/dist/server/assets/threads._threadId-Ci0S4mKU.js +0 -18
- package/apps/ui/dist/server/assets/ui-export-files-BHLX9bhN.js +0 -83
- package/apps/ui/dist/server/assets/utils-C_uf36nf.js +0 -8
- package/apps/ui/dist/server/server.js +0 -5895
- package/bin/codex-chats-claude.js +0 -5
- package/bin/codex-chats.js +0 -5
- package/bin/spiracha.js +0 -5
- package/src/export-chats.ts +0 -120
- package/src/export-claude.ts +0 -36
- package/src/export-cursor.ts +0 -244
- package/src/lib/claude-exporter.ts +0 -864
- package/src/lib/codex-exporter-cli.ts +0 -277
- package/src/lib/codex-exporter-db.ts +0 -319
- package/src/lib/codex-exporter.ts +0 -115
- package/src/lib/cursor-exporter.ts +0 -266
- package/src/lib/interactive-cli.ts +0 -433
- package/src/lib/native-open.ts +0 -54
- package/src/mcp-server.ts +0 -137
- package/src/spiracha.ts +0 -116
- package/src/ui-cli.ts +0 -310
- /package/apps/ui/{dist/client → public}/icon.svg +0 -0
- /package/apps/ui/{dist/client → public}/manifest.json +0 -0
- /package/apps/ui/{dist/client → public}/robots.txt +0 -0
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { n as dashboardQueryOptions } from "./codex-queries-CtgeZ7VL.js";
|
|
2
|
-
import { t as Route } from "./routes-BzkJgq4W.js";
|
|
3
|
-
import { t as MetricCard } from "./metric-card-ByEeLu0r.js";
|
|
4
|
-
import { t as PageHeader } from "./page-header-VNSaM3xd.js";
|
|
5
|
-
import { o as formatNumber, r as formatDateTime, s as formatTokens } from "./formatters-FJaGZgJk.js";
|
|
6
|
-
import { Link } from "@tanstack/react-router";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
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
|
|
53
|
-
//#region src/routes/index.tsx?tsr-split=component
|
|
54
|
-
function DashboardErrorComponent({ error }) {
|
|
55
|
-
const isSqlite = error.message.includes("unable to open database") || error.message.includes("database is locked");
|
|
56
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
57
|
-
className: "rounded-xl border border-[var(--border)] bg-[var(--panel)] px-6 py-10 text-center",
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ jsx("p", {
|
|
60
|
-
className: "font-medium text-[var(--destructive)] text-sm",
|
|
61
|
-
children: isSqlite ? "Database unavailable" : "Failed to load dashboard"
|
|
62
|
-
}),
|
|
63
|
-
/* @__PURE__ */ jsx("p", {
|
|
64
|
-
className: "mt-2 text-[var(--muted-foreground)] text-sm",
|
|
65
|
-
children: isSqlite ? "Codex may have an exclusive lock on the database. Reload to retry." : error.message
|
|
66
|
-
}),
|
|
67
|
-
/* @__PURE__ */ jsx("button", {
|
|
68
|
-
className: "mt-4 text-[var(--accent)] text-sm underline-offset-2 hover:underline",
|
|
69
|
-
type: "button",
|
|
70
|
-
onClick: () => window.location.reload(),
|
|
71
|
-
children: "Reload"
|
|
72
|
-
})
|
|
73
|
-
]
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
Route.update({ errorComponent: DashboardErrorComponent });
|
|
77
|
-
function DashboardPage() {
|
|
78
|
-
const dashboard = useSuspenseQuery(dashboardQueryOptions()).data;
|
|
79
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
80
|
-
className: "space-y-6",
|
|
81
|
-
children: [
|
|
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
|
-
}),
|
|
88
|
-
eyebrow: "Overview",
|
|
89
|
-
subtitle: "A compact readout of local Codex activity, project distribution, and recent thread movement.",
|
|
90
|
-
title: "Dashboard"
|
|
91
|
-
}),
|
|
92
|
-
/* @__PURE__ */ jsxs("div", {
|
|
93
|
-
className: "grid gap-3 md:grid-cols-2 xl:grid-cols-4",
|
|
94
|
-
children: [
|
|
95
|
-
/* @__PURE__ */ jsx(MetricCard, {
|
|
96
|
-
label: "Threads",
|
|
97
|
-
value: formatNumber(dashboard.totalThreads)
|
|
98
|
-
}),
|
|
99
|
-
/* @__PURE__ */ jsx(MetricCard, {
|
|
100
|
-
label: "Projects",
|
|
101
|
-
value: formatNumber(dashboard.totalProjects)
|
|
102
|
-
}),
|
|
103
|
-
/* @__PURE__ */ jsx(MetricCard, {
|
|
104
|
-
label: "Tokens",
|
|
105
|
-
value: formatTokens(dashboard.totalTokens)
|
|
106
|
-
}),
|
|
107
|
-
/* @__PURE__ */ jsx(MetricCard, {
|
|
108
|
-
helper: `${formatNumber(dashboard.archivedThreads)} archived`,
|
|
109
|
-
label: "Active",
|
|
110
|
-
value: formatNumber(dashboard.activeThreads)
|
|
111
|
-
})
|
|
112
|
-
]
|
|
113
|
-
}),
|
|
114
|
-
/* @__PURE__ */ jsxs("div", {
|
|
115
|
-
className: "grid min-w-0 gap-4 xl:grid-cols-[1.4fr_1fr]",
|
|
116
|
-
children: [/* @__PURE__ */ jsxs("section", {
|
|
117
|
-
className: "min-w-0 overflow-hidden rounded-[1.8rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]",
|
|
118
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
119
|
-
className: "flex items-center justify-between gap-3",
|
|
120
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
121
|
-
className: "min-w-0",
|
|
122
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
123
|
-
className: "font-semibold text-sm",
|
|
124
|
-
children: "Recent threads"
|
|
125
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
126
|
-
className: "mt-0.5 text-[var(--muted-foreground)] text-xs",
|
|
127
|
-
children: "Most recently updated threads across the local Codex database."
|
|
128
|
-
})]
|
|
129
|
-
}), /* @__PURE__ */ jsx(Link, {
|
|
130
|
-
className: "shrink-0 font-medium text-[var(--accent)] text-sm",
|
|
131
|
-
to: "/projects",
|
|
132
|
-
children: "View Codex"
|
|
133
|
-
})]
|
|
134
|
-
}), /* @__PURE__ */ jsx(RecentThreadsList, { threads: dashboard.recentThreads })]
|
|
135
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
136
|
-
className: "grid min-w-0 gap-4",
|
|
137
|
-
children: [/* @__PURE__ */ jsxs("section", {
|
|
138
|
-
className: "min-w-0 overflow-hidden rounded-[1.8rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]",
|
|
139
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
140
|
-
className: "font-semibold text-sm",
|
|
141
|
-
children: "Top projects by thread count"
|
|
142
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
143
|
-
className: "mt-3 space-y-2",
|
|
144
|
-
children: dashboard.topProjectsByThreadCount.map((project) => /* @__PURE__ */ jsxs(Link, {
|
|
145
|
-
className: "flex items-center justify-between gap-3 rounded-lg border border-[var(--border)] bg-[var(--panel-secondary)] px-3.5 py-2.5 text-sm",
|
|
146
|
-
params: { project: project.name },
|
|
147
|
-
to: "/projects/$project",
|
|
148
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
149
|
-
className: "truncate",
|
|
150
|
-
children: project.name
|
|
151
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
152
|
-
className: "shrink-0 font-mono text-[var(--muted-foreground)]",
|
|
153
|
-
children: formatNumber(project.threadCount)
|
|
154
|
-
})]
|
|
155
|
-
}, project.name))
|
|
156
|
-
})]
|
|
157
|
-
}), /* @__PURE__ */ jsxs("section", {
|
|
158
|
-
className: "min-w-0 overflow-hidden rounded-[1.8rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]",
|
|
159
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
160
|
-
className: "font-semibold text-sm",
|
|
161
|
-
children: "Top projects by tokens"
|
|
162
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
163
|
-
className: "mt-3 space-y-2",
|
|
164
|
-
children: dashboard.topProjectsByTokens.map((project) => /* @__PURE__ */ jsxs(Link, {
|
|
165
|
-
className: "flex items-center justify-between gap-3 rounded-lg border border-[var(--border)] bg-[var(--panel-secondary)] px-3.5 py-2.5 text-sm",
|
|
166
|
-
params: { project: project.name },
|
|
167
|
-
to: "/projects/$project",
|
|
168
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
169
|
-
className: "truncate",
|
|
170
|
-
children: project.name
|
|
171
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
172
|
-
className: "shrink-0 font-mono text-[var(--muted-foreground)]",
|
|
173
|
-
children: formatTokens(project.totalTokens)
|
|
174
|
-
})]
|
|
175
|
-
}, project.name))
|
|
176
|
-
})]
|
|
177
|
-
})]
|
|
178
|
-
})]
|
|
179
|
-
})
|
|
180
|
-
]
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
//#endregion
|
|
184
|
-
export { DashboardPage as component };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { n as dashboardQueryOptions } from "./codex-queries-CtgeZ7VL.js";
|
|
2
|
-
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
//#region src/routes/index.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./routes-Bsact1uB.js");
|
|
6
|
-
var Route = createFileRoute("/")({
|
|
7
|
-
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
8
|
-
loader: ({ context }) => context.queryClient.ensureQueryData(dashboardQueryOptions())
|
|
9
|
-
});
|
|
10
|
-
function DashboardErrorComponent({ error }) {
|
|
11
|
-
const isSqlite = error.message.includes("unable to open database") || error.message.includes("database is locked");
|
|
12
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
13
|
-
className: "rounded-xl border border-[var(--border)] bg-[var(--panel)] px-6 py-10 text-center",
|
|
14
|
-
children: [
|
|
15
|
-
/* @__PURE__ */ jsx("p", {
|
|
16
|
-
className: "font-medium text-[var(--destructive)] text-sm",
|
|
17
|
-
children: isSqlite ? "Database unavailable" : "Failed to load dashboard"
|
|
18
|
-
}),
|
|
19
|
-
/* @__PURE__ */ jsx("p", {
|
|
20
|
-
className: "mt-2 text-[var(--muted-foreground)] text-sm",
|
|
21
|
-
children: isSqlite ? "Codex may have an exclusive lock on the database. Reload to retry." : error.message
|
|
22
|
-
}),
|
|
23
|
-
/* @__PURE__ */ jsx("button", {
|
|
24
|
-
className: "mt-4 text-[var(--accent)] text-sm underline-offset-2 hover:underline",
|
|
25
|
-
type: "button",
|
|
26
|
-
onClick: () => window.location.reload(),
|
|
27
|
-
children: "Reload"
|
|
28
|
-
})
|
|
29
|
-
]
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
Route.update({ errorComponent: DashboardErrorComponent });
|
|
33
|
-
//#endregion
|
|
34
|
-
export { Route as t };
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { t as cn } from "./utils-C_uf36nf.js";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
4
|
-
import { Select } from "radix-ui";
|
|
5
|
-
//#region src/components/ui/select.tsx
|
|
6
|
-
function Select$1({ ...props }) {
|
|
7
|
-
return /* @__PURE__ */ jsx(Select.Root, {
|
|
8
|
-
"data-slot": "select",
|
|
9
|
-
...props
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
function SelectValue({ ...props }) {
|
|
13
|
-
return /* @__PURE__ */ jsx(Select.Value, {
|
|
14
|
-
"data-slot": "select-value",
|
|
15
|
-
...props
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
19
|
-
return /* @__PURE__ */ jsxs(Select.Trigger, {
|
|
20
|
-
"data-slot": "select-trigger",
|
|
21
|
-
"data-size": size,
|
|
22
|
-
className: cn("flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
23
|
-
...props,
|
|
24
|
-
children: [children, /* @__PURE__ */ jsx(Select.Icon, {
|
|
25
|
-
asChild: true,
|
|
26
|
-
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" })
|
|
27
|
-
})]
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function SelectContent({ className, children, position = "item-aligned", align = "center", ...props }) {
|
|
31
|
-
return /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsxs(Select.Content, {
|
|
32
|
-
"data-slot": "select-content",
|
|
33
|
-
className: cn("data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in", position === "popper" && "data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1", className),
|
|
34
|
-
position,
|
|
35
|
-
align,
|
|
36
|
-
...props,
|
|
37
|
-
children: [
|
|
38
|
-
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
39
|
-
/* @__PURE__ */ jsx(Select.Viewport, {
|
|
40
|
-
className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
41
|
-
children
|
|
42
|
-
}),
|
|
43
|
-
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
44
|
-
]
|
|
45
|
-
}) });
|
|
46
|
-
}
|
|
47
|
-
function SelectItem({ className, children, ...props }) {
|
|
48
|
-
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
49
|
-
"data-slot": "select-item",
|
|
50
|
-
className: cn("relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
51
|
-
...props,
|
|
52
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
53
|
-
"data-slot": "select-item-indicator",
|
|
54
|
-
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
55
|
-
children: /* @__PURE__ */ jsx(Select.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
56
|
-
}), /* @__PURE__ */ jsx(Select.ItemText, { children })]
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
function SelectScrollUpButton({ className, ...props }) {
|
|
60
|
-
return /* @__PURE__ */ jsx(Select.ScrollUpButton, {
|
|
61
|
-
"data-slot": "select-scroll-up-button",
|
|
62
|
-
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
63
|
-
...props,
|
|
64
|
-
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
function SelectScrollDownButton({ className, ...props }) {
|
|
68
|
-
return /* @__PURE__ */ jsx(Select.ScrollDownButton, {
|
|
69
|
-
"data-slot": "select-scroll-down-button",
|
|
70
|
-
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
71
|
-
...props,
|
|
72
|
-
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
//#endregion
|
|
76
|
-
export { SelectValue as a, SelectTrigger as i, SelectContent as n, SelectItem as r, Select$1 as t };
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { n as useSettings } from "./settings-store-DpEJEQ7M.js";
|
|
2
|
-
import { t as Checkbox } from "./checkbox-C0hovF41.js";
|
|
3
|
-
import { t as PageHeader } from "./page-header-VNSaM3xd.js";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { Settings2 } from "lucide-react";
|
|
6
|
-
//#region src/routes/settings.tsx?tsr-split=component
|
|
7
|
-
function SettingsPage() {
|
|
8
|
-
const { settings, updateSetting } = useSettings();
|
|
9
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
-
className: "space-y-6",
|
|
11
|
-
children: [/* @__PURE__ */ jsx(PageHeader, {
|
|
12
|
-
eyebrow: "Configuration",
|
|
13
|
-
subtitle: "Control how paths and usernames appear in transcript messages.",
|
|
14
|
-
title: "Settings"
|
|
15
|
-
}), /* @__PURE__ */ jsxs("section", {
|
|
16
|
-
className: "rounded-[1.6rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]",
|
|
17
|
-
children: [/* @__PURE__ */ jsxs("h3", {
|
|
18
|
-
className: "flex items-center gap-2 font-semibold text-[var(--muted-foreground)] text-xs uppercase tracking-[0.18em]",
|
|
19
|
-
children: [/* @__PURE__ */ jsx(Settings2, { className: "size-3.5" }), "Privacy"]
|
|
20
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
21
|
-
className: "mt-5 space-y-5",
|
|
22
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
23
|
-
className: "flex items-center gap-3",
|
|
24
|
-
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
25
|
-
checked: settings.redactUsername,
|
|
26
|
-
id: "redact-username",
|
|
27
|
-
onCheckedChange: (checked) => updateSetting("redactUsername", checked === true)
|
|
28
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
29
|
-
className: "min-w-0",
|
|
30
|
-
children: [/* @__PURE__ */ jsx("label", {
|
|
31
|
-
className: "cursor-pointer font-medium text-sm leading-none",
|
|
32
|
-
htmlFor: "redact-username",
|
|
33
|
-
children: "Redact Username"
|
|
34
|
-
}), /* @__PURE__ */ jsxs("p", {
|
|
35
|
-
className: "mt-1.5 text-[var(--muted-foreground)] text-xs leading-5",
|
|
36
|
-
children: [
|
|
37
|
-
"Replaces",
|
|
38
|
-
" ",
|
|
39
|
-
/* @__PURE__ */ jsx("code", {
|
|
40
|
-
className: "rounded bg-[var(--code-background)] px-1 py-0.5 font-mono text-[var(--code-foreground)]",
|
|
41
|
-
children: "/Users/[username]/"
|
|
42
|
-
}),
|
|
43
|
-
" ",
|
|
44
|
-
"with",
|
|
45
|
-
" ",
|
|
46
|
-
/* @__PURE__ */ jsx("code", {
|
|
47
|
-
className: "rounded bg-[var(--code-background)] px-1 py-0.5 font-mono text-[var(--code-foreground)]",
|
|
48
|
-
children: "~/"
|
|
49
|
-
}),
|
|
50
|
-
" ",
|
|
51
|
-
"in all transcript messages."
|
|
52
|
-
]
|
|
53
|
-
})]
|
|
54
|
-
})]
|
|
55
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
56
|
-
className: "flex items-center gap-3",
|
|
57
|
-
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
58
|
-
checked: settings.convertToProjectRoot,
|
|
59
|
-
id: "convert-project-root",
|
|
60
|
-
onCheckedChange: (checked) => updateSetting("convertToProjectRoot", checked === true)
|
|
61
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
62
|
-
className: "min-w-0",
|
|
63
|
-
children: [/* @__PURE__ */ jsx("label", {
|
|
64
|
-
className: "cursor-pointer font-medium text-sm leading-none",
|
|
65
|
-
htmlFor: "convert-project-root",
|
|
66
|
-
children: "Convert Absolute Paths to Project Root"
|
|
67
|
-
}), /* @__PURE__ */ jsxs("p", {
|
|
68
|
-
className: "mt-1.5 text-[var(--muted-foreground)] text-xs leading-5",
|
|
69
|
-
children: [
|
|
70
|
-
"Converts the current thread or project cwd from",
|
|
71
|
-
" ",
|
|
72
|
-
/* @__PURE__ */ jsx("code", {
|
|
73
|
-
className: "rounded bg-[var(--code-background)] px-1 py-0.5 font-mono text-[var(--code-foreground)]",
|
|
74
|
-
children: "/Users/[username]/workspace/[projectname]/"
|
|
75
|
-
}),
|
|
76
|
-
" ",
|
|
77
|
-
"to project-root-relative paths, so",
|
|
78
|
-
" ",
|
|
79
|
-
/* @__PURE__ */ jsx("code", {
|
|
80
|
-
className: "rounded bg-[var(--code-background)] px-1 py-0.5 font-mono text-[var(--code-foreground)]",
|
|
81
|
-
children: "/Users/jane/workspace/myapp/src/index.ts"
|
|
82
|
-
}),
|
|
83
|
-
" ",
|
|
84
|
-
"appear as",
|
|
85
|
-
" ",
|
|
86
|
-
/* @__PURE__ */ jsx("code", {
|
|
87
|
-
className: "rounded bg-[var(--code-background)] px-1 py-0.5 font-mono text-[var(--code-foreground)]",
|
|
88
|
-
children: "src/index.ts"
|
|
89
|
-
}),
|
|
90
|
-
". If Redact Username is also enabled, remaining absolute paths outside the project root are redacted afterward."
|
|
91
|
-
]
|
|
92
|
-
})]
|
|
93
|
-
})]
|
|
94
|
-
})]
|
|
95
|
-
})]
|
|
96
|
-
})]
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
//#endregion
|
|
100
|
-
export { SettingsPage as component };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext, useEffect, useState } from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
//#region src/lib/settings-store.tsx
|
|
4
|
-
var STORAGE_KEY = "spiracha-settings";
|
|
5
|
-
var defaultSettings = {
|
|
6
|
-
convertToProjectRoot: false,
|
|
7
|
-
redactUsername: false
|
|
8
|
-
};
|
|
9
|
-
var SettingsContext = createContext({
|
|
10
|
-
settings: defaultSettings,
|
|
11
|
-
updateSetting: () => {}
|
|
12
|
-
});
|
|
13
|
-
var loadSettings = () => {
|
|
14
|
-
if (typeof window === "undefined") return defaultSettings;
|
|
15
|
-
try {
|
|
16
|
-
const stored = window.localStorage.getItem(STORAGE_KEY);
|
|
17
|
-
return stored ? {
|
|
18
|
-
...defaultSettings,
|
|
19
|
-
...JSON.parse(stored)
|
|
20
|
-
} : defaultSettings;
|
|
21
|
-
} catch {
|
|
22
|
-
return defaultSettings;
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
function SettingsProvider({ children }) {
|
|
26
|
-
const [settings, setSettings] = useState(defaultSettings);
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
setSettings(loadSettings());
|
|
29
|
-
}, []);
|
|
30
|
-
const updateSetting = (key, value) => {
|
|
31
|
-
setSettings((prev) => {
|
|
32
|
-
const next = {
|
|
33
|
-
...prev,
|
|
34
|
-
[key]: value
|
|
35
|
-
};
|
|
36
|
-
try {
|
|
37
|
-
localStorage.setItem(STORAGE_KEY, JSON.stringify(next));
|
|
38
|
-
} catch {}
|
|
39
|
-
return next;
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
return /* @__PURE__ */ jsx(SettingsContext.Provider, {
|
|
43
|
-
value: {
|
|
44
|
-
settings,
|
|
45
|
-
updateSetting
|
|
46
|
-
},
|
|
47
|
-
children
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
var useSettings = () => useContext(SettingsContext);
|
|
51
|
-
//#endregion
|
|
52
|
-
export { useSettings as n, SettingsProvider as t };
|
|
@@ -1,137 +0,0 @@
|
|
|
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 asBoolean = (value) => {
|
|
34
|
-
return value === true;
|
|
35
|
-
};
|
|
36
|
-
var readJsonlObjects = (filePath) => {
|
|
37
|
-
const stream = createReadStream(filePath, { encoding: "utf8" });
|
|
38
|
-
const lines = createInterface({
|
|
39
|
-
crlfDelay: Infinity,
|
|
40
|
-
input: stream
|
|
41
|
-
});
|
|
42
|
-
const lineIterator = lines[Symbol.asyncIterator]();
|
|
43
|
-
let closed = false;
|
|
44
|
-
const close = () => {
|
|
45
|
-
if (closed) return;
|
|
46
|
-
closed = true;
|
|
47
|
-
lines.close();
|
|
48
|
-
stream.destroy();
|
|
49
|
-
};
|
|
50
|
-
const readNext = async () => {
|
|
51
|
-
while (true) {
|
|
52
|
-
const nextLine = await lineIterator.next();
|
|
53
|
-
if (nextLine.done) {
|
|
54
|
-
close();
|
|
55
|
-
return {
|
|
56
|
-
done: true,
|
|
57
|
-
value: void 0
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
const trimmed = nextLine.value.trim();
|
|
61
|
-
if (!trimmed) continue;
|
|
62
|
-
try {
|
|
63
|
-
return {
|
|
64
|
-
done: false,
|
|
65
|
-
value: JSON.parse(trimmed)
|
|
66
|
-
};
|
|
67
|
-
} catch {}
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
const iterator = {
|
|
71
|
-
[Symbol.asyncIterator]: () => iterator,
|
|
72
|
-
next: async () => readNext(),
|
|
73
|
-
return: async () => {
|
|
74
|
-
close();
|
|
75
|
-
return {
|
|
76
|
-
done: true,
|
|
77
|
-
value: void 0
|
|
78
|
-
};
|
|
79
|
-
},
|
|
80
|
-
throw: async (error) => {
|
|
81
|
-
close();
|
|
82
|
-
throw error;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
return iterator;
|
|
86
|
-
};
|
|
87
|
-
var renderDocumentTitle = (title, format) => {
|
|
88
|
-
if (format === "md") return `# ${title}`;
|
|
89
|
-
return [title, "=".repeat(Math.max(title.length, 3))].join("\n");
|
|
90
|
-
};
|
|
91
|
-
var renderMetadataBlock = (entries, format) => {
|
|
92
|
-
const filteredEntries = entries.filter((entry) => entry.value !== null && entry.value !== void 0 && entry.value !== "");
|
|
93
|
-
if (filteredEntries.length === 0) return "";
|
|
94
|
-
if (format === "md") {
|
|
95
|
-
const lines = ["---"];
|
|
96
|
-
for (const entry of filteredEntries) lines.push(`${entry.key}: ${toMetadataValue(entry.value, "md")}`);
|
|
97
|
-
lines.push("---");
|
|
98
|
-
return `${lines.join("\n")}\n`;
|
|
99
|
-
}
|
|
100
|
-
const lines = ["Metadata", "--------"];
|
|
101
|
-
for (const entry of filteredEntries) lines.push(`${entry.key}: ${toMetadataValue(entry.value, "txt")}`);
|
|
102
|
-
return `${lines.join("\n")}\n`;
|
|
103
|
-
};
|
|
104
|
-
var renderSection = (title, body, format) => {
|
|
105
|
-
const trimmedBody = body.trimEnd();
|
|
106
|
-
if (!trimmedBody) return "";
|
|
107
|
-
if (format === "md") return `## ${title}\n\n${trimmedBody}\n`;
|
|
108
|
-
return `${title}\n${"-".repeat(Math.max(title.length, 3))}\n${trimmedBody}\n`;
|
|
109
|
-
};
|
|
110
|
-
var renderCodeBlock = (text, format) => {
|
|
111
|
-
if (format === "md") return `\`\`\`text\n${text}\n\`\`\``;
|
|
112
|
-
return text;
|
|
113
|
-
};
|
|
114
|
-
var formatInlineLiteral = (value, format) => {
|
|
115
|
-
return format === "md" ? inlineCode(value) : value;
|
|
116
|
-
};
|
|
117
|
-
var inlineCode = (value) => {
|
|
118
|
-
const maxRunLength = (value.match(/`+/g) ?? []).reduce((max, run) => Math.max(max, run.length), 0);
|
|
119
|
-
const fence = "`".repeat(maxRunLength + 1);
|
|
120
|
-
return `${fence}${value.startsWith("`") || value.endsWith("`") ? ` ${value} ` : value}${fence}`;
|
|
121
|
-
};
|
|
122
|
-
var createExportWriteStream = async (outputPath) => {
|
|
123
|
-
await mkdir(path.dirname(outputPath), { recursive: true });
|
|
124
|
-
return createWriteStream(outputPath, { encoding: "utf8" });
|
|
125
|
-
};
|
|
126
|
-
var finalizeExportWriteStream = async (stream) => {
|
|
127
|
-
stream.end();
|
|
128
|
-
await finished(stream);
|
|
129
|
-
};
|
|
130
|
-
var toMetadataValue = (value, format) => {
|
|
131
|
-
if (Array.isArray(value) || value && typeof value === "object") return JSON.stringify(value);
|
|
132
|
-
if (typeof value === "string") return format === "md" ? JSON.stringify(value) : value;
|
|
133
|
-
if (typeof value === "boolean" || typeof value === "number") return String(value);
|
|
134
|
-
return format === "md" ? JSON.stringify(String(value)) : String(value);
|
|
135
|
-
};
|
|
136
|
-
//#endregion
|
|
137
|
-
export { cleanExtractedText as a, finalizeExportWriteStream as c, getPortablePathBasename as d, readJsonlObjects as f, renderSection as g, renderMetadataBlock as h, asString as i, formatInlineLiteral as l, renderDocumentTitle as m, asNumber as n, cleanInlineTitle as o, renderCodeBlock as p, asObject as r, createExportWriteStream as s, asBoolean as t, formatModelLabel as u };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { a as sanitizeExportFileName, n as ensureUiExportDir, o as zipExportDirectory, r as getExportMimeType, t as buildUiExportDownloadUrl } from "./ui-export-files-BHLX9bhN.js";
|
|
2
|
-
import { randomUUID } from "node:crypto";
|
|
3
|
-
import { mkdtemp, rm } from "node:fs/promises";
|
|
4
|
-
import os from "node:os";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
//#region src/lib/source-session-export-server.ts
|
|
7
|
-
var toSafeSourceExportName = (value, fallback) => {
|
|
8
|
-
return sanitizeExportFileName(value) || fallback;
|
|
9
|
-
};
|
|
10
|
-
var renderSourceSessionDownload = async ({ content, fallbackBaseName, fileBaseName, outputFormat, zipArchive }) => {
|
|
11
|
-
const safeBaseName = toSafeSourceExportName(fileBaseName, fallbackBaseName);
|
|
12
|
-
if (!zipArchive) return {
|
|
13
|
-
content,
|
|
14
|
-
fileName: `${safeBaseName}.${outputFormat}`,
|
|
15
|
-
mimeType: getExportMimeType(outputFormat),
|
|
16
|
-
mode: "download"
|
|
17
|
-
};
|
|
18
|
-
const exportDir = await ensureUiExportDir();
|
|
19
|
-
const workspaceDir = await mkdtemp(path.join(os.tmpdir(), `${safeBaseName}-`));
|
|
20
|
-
const zipPath = path.join(exportDir, `${safeBaseName}-${randomUUID()}.zip`);
|
|
21
|
-
try {
|
|
22
|
-
await Bun.write(path.join(workspaceDir, `${safeBaseName}.${outputFormat}`), content);
|
|
23
|
-
await zipExportDirectory(workspaceDir, zipPath);
|
|
24
|
-
} finally {
|
|
25
|
-
await rm(workspaceDir, {
|
|
26
|
-
force: true,
|
|
27
|
-
recursive: true
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
downloadUrl: buildUiExportDownloadUrl(zipPath),
|
|
32
|
-
fileName: `${safeBaseName}.zip`,
|
|
33
|
-
mimeType: "application/zip",
|
|
34
|
-
mode: "download_url"
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
//#endregion
|
|
38
|
-
export { renderSourceSessionDownload as t };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region ../../src/lib/sqlite-error.ts
|
|
2
|
-
var SQLITE_RETRYABLE_PATTERNS = [
|
|
3
|
-
/unable to open database file/iu,
|
|
4
|
-
/database is locked/iu,
|
|
5
|
-
/SQLITE_BUSY/iu,
|
|
6
|
-
/SQLITE_CANTOPEN/iu
|
|
7
|
-
];
|
|
8
|
-
var isRetryableSqliteError = (error) => {
|
|
9
|
-
if (!(error instanceof Error)) return false;
|
|
10
|
-
return SQLITE_RETRYABLE_PATTERNS.some((pattern) => pattern.test(error.message));
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { isRetryableSqliteError as t };
|