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
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import os from 'node:os';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import type { ExportFormat, JsonValue } from './shared';
|
|
4
|
+
|
|
5
|
+
export const getDefaultQoderUserDir = (_env: NodeJS.ProcessEnv = process.env, homeDir = os.homedir()): string => {
|
|
6
|
+
return path.join(homeDir, 'Library', 'Application Support', 'Qoder', 'User');
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const DEFAULT_QODER_USER_DIR = getDefaultQoderUserDir();
|
|
10
|
+
|
|
11
|
+
export const resolveQoderUserDir = (): string => {
|
|
12
|
+
const configured =
|
|
13
|
+
process.env.SPIRACHA_QODER_USER_DIR?.trim() ||
|
|
14
|
+
process.env.SPIRACHA_QODER_DATA_DIR?.trim() ||
|
|
15
|
+
process.env.SPIRACHA_QODER_DIR?.trim();
|
|
16
|
+
return configured ? configured : DEFAULT_QODER_USER_DIR;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const resolveQoderGlobalStateDb = (): string => {
|
|
20
|
+
const configured = process.env.SPIRACHA_QODER_GLOBAL_STATE_DB?.trim();
|
|
21
|
+
return configured ? configured : path.join(resolveQoderUserDir(), 'globalStorage', 'state.vscdb');
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const resolveQoderWorkspaceStorageDir = (): string => {
|
|
25
|
+
const configured = process.env.SPIRACHA_QODER_WORKSPACE_STORAGE_DIR?.trim();
|
|
26
|
+
return configured ? configured : path.join(resolveQoderUserDir(), 'workspaceStorage');
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const resolveQoderCliProjectsDir = (): string => {
|
|
30
|
+
const configured = process.env.SPIRACHA_QODER_CLI_PROJECTS_DIR?.trim();
|
|
31
|
+
return configured
|
|
32
|
+
? configured
|
|
33
|
+
: path.join(path.dirname(resolveQoderUserDir()), 'SharedClientCache', 'cli', 'projects');
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type QoderWorkspaceGroup = {
|
|
37
|
+
assistantMessageCount: number;
|
|
38
|
+
fileOperationCount: number;
|
|
39
|
+
key: string;
|
|
40
|
+
label: string;
|
|
41
|
+
lastActiveAtIso: string | null;
|
|
42
|
+
lastActiveAtMs: number | null;
|
|
43
|
+
messageCount: number;
|
|
44
|
+
renderablePartCount: number;
|
|
45
|
+
sessionCount: number;
|
|
46
|
+
snapshotFileCount: number;
|
|
47
|
+
uri: string;
|
|
48
|
+
userMessageCount: number;
|
|
49
|
+
workspaceStorageIds: string[];
|
|
50
|
+
worktree: string;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type QoderSessionSummary = {
|
|
54
|
+
agentClass: string | null;
|
|
55
|
+
assistantMessageCount: number;
|
|
56
|
+
createdAtIso: string | null;
|
|
57
|
+
createdAtMs: number | null;
|
|
58
|
+
executionMode: string | null;
|
|
59
|
+
fileOperationCount: number;
|
|
60
|
+
historyIds: string[];
|
|
61
|
+
lastActiveAtIso: string | null;
|
|
62
|
+
lastActiveAtMs: number | null;
|
|
63
|
+
messageCount: number;
|
|
64
|
+
model: string | null;
|
|
65
|
+
query: string | null;
|
|
66
|
+
renderablePartCount: number;
|
|
67
|
+
requestId: string | null;
|
|
68
|
+
sessionId: string;
|
|
69
|
+
snapshotFileCount: number;
|
|
70
|
+
sourceStatePath: string | null;
|
|
71
|
+
status: string | null;
|
|
72
|
+
taskId: string | null;
|
|
73
|
+
title: string;
|
|
74
|
+
userMessageCount: number;
|
|
75
|
+
workspaceKey: string;
|
|
76
|
+
workspaceLabel: string;
|
|
77
|
+
workspacePath: string | null;
|
|
78
|
+
workspaceStorageId: string | null;
|
|
79
|
+
worktree: string;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export type QoderPartType = 'text' | 'unknown';
|
|
83
|
+
|
|
84
|
+
export type QoderTranscriptPart = {
|
|
85
|
+
raw: Record<string, JsonValue>;
|
|
86
|
+
text?: string;
|
|
87
|
+
type: QoderPartType;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export type QoderTranscriptEntryType = 'message' | 'tool_call' | 'tool_output';
|
|
91
|
+
|
|
92
|
+
export type QoderTranscriptEntry = {
|
|
93
|
+
entryId: string;
|
|
94
|
+
entryType: QoderTranscriptEntryType;
|
|
95
|
+
parts: QoderTranscriptPart[];
|
|
96
|
+
raw: Record<string, JsonValue>;
|
|
97
|
+
requestId: string | null;
|
|
98
|
+
role: string;
|
|
99
|
+
timestamp: string | null;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export type QoderSessionTranscript = {
|
|
103
|
+
entries: QoderTranscriptEntry[];
|
|
104
|
+
rawSession: Record<string, JsonValue>;
|
|
105
|
+
renderablePartCount: number;
|
|
106
|
+
session: QoderSessionSummary;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export type QoderExportOptions = {
|
|
110
|
+
includeCommentary: boolean;
|
|
111
|
+
includeMetadata: boolean;
|
|
112
|
+
includeTools: boolean;
|
|
113
|
+
outputFormat: ExportFormat;
|
|
114
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { QoderTranscriptEntry } from './qoder-exporter-types';
|
|
2
|
+
|
|
3
|
+
export type QoderMessagePhase = 'commentary' | 'final_answer' | null;
|
|
4
|
+
|
|
5
|
+
export const getFinalQoderAssistantMessageEntryIds = (entries: QoderTranscriptEntry[]): Set<string> => {
|
|
6
|
+
const finalEntryIds = new Set<string>();
|
|
7
|
+
let latestAssistantMessageEntryId: string | null = null;
|
|
8
|
+
|
|
9
|
+
const flushAssistantRun = () => {
|
|
10
|
+
if (latestAssistantMessageEntryId) {
|
|
11
|
+
finalEntryIds.add(latestAssistantMessageEntryId);
|
|
12
|
+
latestAssistantMessageEntryId = null;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
for (const entry of entries) {
|
|
17
|
+
if (entry.role === 'tool') {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (entry.role === 'user') {
|
|
22
|
+
flushAssistantRun();
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (entry.role === 'assistant') {
|
|
27
|
+
latestAssistantMessageEntryId = entry.entryId;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
flushAssistantRun();
|
|
32
|
+
return finalEntryIds;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const getQoderMessagePhase = (entry: QoderTranscriptEntry, finalAssistantMessageEntryIds: Set<string>) => {
|
|
36
|
+
if (entry.role !== 'assistant') {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return finalAssistantMessageEntryIds.has(entry.entryId) ? 'final_answer' : 'commentary';
|
|
41
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
QoderExportOptions,
|
|
3
|
+
QoderSessionSummary,
|
|
4
|
+
QoderSessionTranscript,
|
|
5
|
+
QoderTranscriptEntry,
|
|
6
|
+
QoderTranscriptPart,
|
|
7
|
+
} from './qoder-exporter-types';
|
|
8
|
+
import { getFinalQoderAssistantMessageEntryIds, getQoderMessagePhase } from './qoder-transcript-phase';
|
|
9
|
+
import {
|
|
10
|
+
cleanExtractedText,
|
|
11
|
+
cleanInlineTitle,
|
|
12
|
+
type MetadataEntry,
|
|
13
|
+
renderDocumentTitle,
|
|
14
|
+
renderMetadataBlock,
|
|
15
|
+
renderSection,
|
|
16
|
+
} from './shared';
|
|
17
|
+
|
|
18
|
+
const getSessionTitle = (session: QoderSessionSummary): string => {
|
|
19
|
+
return cleanInlineTitle(session.title || session.sessionId);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const buildMetadataEntries = (session: QoderSessionSummary): MetadataEntry[] => [
|
|
23
|
+
{ key: 'exported_from', value: 'qoder_local_history' },
|
|
24
|
+
{ key: 'session_id', value: session.sessionId },
|
|
25
|
+
{ key: 'task_id', value: session.taskId },
|
|
26
|
+
{ key: 'request_id', value: session.requestId },
|
|
27
|
+
{ key: 'title', value: session.title },
|
|
28
|
+
{ key: 'status', value: session.status },
|
|
29
|
+
{ key: 'workspace_key', value: session.workspaceKey },
|
|
30
|
+
{ key: 'workspace_path', value: session.workspacePath },
|
|
31
|
+
{ key: 'workspace_storage_id', value: session.workspaceStorageId },
|
|
32
|
+
{ key: 'source_state_path', value: session.sourceStatePath },
|
|
33
|
+
{ key: 'agent_class', value: session.agentClass },
|
|
34
|
+
{ key: 'model', value: session.model },
|
|
35
|
+
{ key: 'execution_mode', value: session.executionMode },
|
|
36
|
+
{ key: 'created_at_iso', value: session.createdAtIso },
|
|
37
|
+
{ key: 'last_active_at_iso', value: session.lastActiveAtIso },
|
|
38
|
+
{ key: 'message_count', value: session.messageCount },
|
|
39
|
+
{ key: 'file_operation_count', value: session.fileOperationCount },
|
|
40
|
+
{ key: 'snapshot_file_count', value: session.snapshotFileCount },
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
const roleTitle = (role: string): string => {
|
|
44
|
+
if (role === 'assistant') {
|
|
45
|
+
return 'Assistant';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (role === 'user') {
|
|
49
|
+
return 'User';
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (role === 'system') {
|
|
53
|
+
return 'System';
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return role ? cleanInlineTitle(role) : 'Message';
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const renderTextPart = (part: QoderTranscriptPart, title: string, options: QoderExportOptions): string => {
|
|
60
|
+
const text = cleanExtractedText(part.text ?? '').trim();
|
|
61
|
+
return text ? renderSection(title, text, options.outputFormat) : '';
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const renderPart = (
|
|
65
|
+
entry: QoderTranscriptEntry,
|
|
66
|
+
part: QoderTranscriptPart,
|
|
67
|
+
options: QoderExportOptions,
|
|
68
|
+
finalAssistantMessageEntryIds: Set<string>,
|
|
69
|
+
): string => {
|
|
70
|
+
if (entry.entryType === 'tool_call') {
|
|
71
|
+
return options.includeTools && part.type === 'text' ? renderTextPart(part, 'Tool call', options) : '';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (entry.entryType === 'tool_output') {
|
|
75
|
+
return options.includeTools && part.type === 'text' ? renderTextPart(part, 'Tool output', options) : '';
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (getQoderMessagePhase(entry, finalAssistantMessageEntryIds) === 'commentary' && !options.includeCommentary) {
|
|
79
|
+
return '';
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
switch (part.type) {
|
|
83
|
+
case 'text':
|
|
84
|
+
return renderTextPart(part, roleTitle(entry.role), options);
|
|
85
|
+
case 'unknown':
|
|
86
|
+
return '';
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const renderQoderTranscript = (
|
|
91
|
+
transcript: QoderSessionTranscript,
|
|
92
|
+
options: QoderExportOptions,
|
|
93
|
+
): string | null => {
|
|
94
|
+
const finalAssistantMessageEntryIds = getFinalQoderAssistantMessageEntryIds(transcript.entries);
|
|
95
|
+
const sections = transcript.entries.flatMap((entry) =>
|
|
96
|
+
entry.parts.map((part) => renderPart(entry, part, options, finalAssistantMessageEntryIds)).filter(Boolean),
|
|
97
|
+
);
|
|
98
|
+
if (sections.length === 0) {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const parts = [
|
|
103
|
+
renderDocumentTitle(getSessionTitle(transcript.session), options.outputFormat),
|
|
104
|
+
'',
|
|
105
|
+
options.includeMetadata
|
|
106
|
+
? renderMetadataBlock(buildMetadataEntries(transcript.session), options.outputFormat)
|
|
107
|
+
: '',
|
|
108
|
+
...sections,
|
|
109
|
+
].filter(Boolean);
|
|
110
|
+
|
|
111
|
+
return `${parts.join('\n').trimEnd()}\n`;
|
|
112
|
+
};
|
package/src/lib/shared.ts
CHANGED
|
@@ -86,6 +86,18 @@ export const cleanExtractedText = (text: string): string => {
|
|
|
86
86
|
return text.replace(/^\s*<\/?image>\s*$/gm, '').replace(/\n{3,}/g, '\n\n');
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
+
const CODEX_APP_DIRECTIVE_PATTERN =
|
|
90
|
+
/^::(?:code-comment|created-thread|git-commit|git-create-branch|git-create-pr|git-push|git-stage)\{.*\}\s*$/u;
|
|
91
|
+
|
|
92
|
+
export const stripCodexAppDirectiveLines = (text: string): string => {
|
|
93
|
+
return text
|
|
94
|
+
.split('\n')
|
|
95
|
+
.filter((line) => !CODEX_APP_DIRECTIVE_PATTERN.test(line.trim()))
|
|
96
|
+
.join('\n')
|
|
97
|
+
.replace(/\n{3,}/g, '\n\n')
|
|
98
|
+
.trim();
|
|
99
|
+
};
|
|
100
|
+
|
|
89
101
|
export const formatModelLabel = formatSharedModelLabel;
|
|
90
102
|
|
|
91
103
|
export const asObject = (value: JsonValue): Record<string, JsonValue> | null => {
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { createConcurrencyLimiter } from './concurrency';
|
|
2
|
+
|
|
3
|
+
const DEFAULT_TRANSCRIPT_LOAD_CONCURRENCY = 3;
|
|
4
|
+
const MAX_TRANSCRIPT_LOAD_CONCURRENCY = 16;
|
|
5
|
+
type TranscriptLoadLogContext = {
|
|
6
|
+
id?: string;
|
|
7
|
+
path?: string;
|
|
8
|
+
source?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
let nextTranscriptLoadId = 1;
|
|
12
|
+
let activeTranscriptLoads = 0;
|
|
13
|
+
let queuedTranscriptLoads = 0;
|
|
14
|
+
|
|
15
|
+
export const resolveTranscriptLoadConcurrency = (value = process.env.SPIRACHA_TRANSCRIPT_LOAD_CONCURRENCY): number => {
|
|
16
|
+
const parsed = Number.parseInt(value ?? '', 10);
|
|
17
|
+
return Number.isFinite(parsed) && parsed > 0
|
|
18
|
+
? Math.min(parsed, MAX_TRANSCRIPT_LOAD_CONCURRENCY)
|
|
19
|
+
: DEFAULT_TRANSCRIPT_LOAD_CONCURRENCY;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const transcriptLoadLimiter = createConcurrencyLimiter(resolveTranscriptLoadConcurrency());
|
|
23
|
+
|
|
24
|
+
const shouldLogTranscriptLoads = () => process.env.SPIRACHA_TRANSCRIPT_LOAD_LOGS !== '0';
|
|
25
|
+
|
|
26
|
+
const logTranscriptLoad = (event: string, details: Record<string, unknown>) => {
|
|
27
|
+
if (shouldLogTranscriptLoads()) {
|
|
28
|
+
console.info(`[spiracha:transcript-load] ${event}`, details);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const runWithTranscriptLoadLimit = async <T>(
|
|
33
|
+
loader: () => Promise<T>,
|
|
34
|
+
context: TranscriptLoadLogContext = {},
|
|
35
|
+
): Promise<T> => {
|
|
36
|
+
const loadId = nextTranscriptLoadId;
|
|
37
|
+
nextTranscriptLoadId += 1;
|
|
38
|
+
queuedTranscriptLoads += 1;
|
|
39
|
+
const queuedAt = Date.now();
|
|
40
|
+
|
|
41
|
+
return transcriptLoadLimiter(async () => {
|
|
42
|
+
queuedTranscriptLoads -= 1;
|
|
43
|
+
activeTranscriptLoads += 1;
|
|
44
|
+
const startedAt = Date.now();
|
|
45
|
+
logTranscriptLoad('start', {
|
|
46
|
+
active: activeTranscriptLoads,
|
|
47
|
+
id: context.id,
|
|
48
|
+
loadId,
|
|
49
|
+
path: context.path,
|
|
50
|
+
queued: queuedTranscriptLoads,
|
|
51
|
+
source: context.source,
|
|
52
|
+
waitMs: startedAt - queuedAt,
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
return await loader();
|
|
57
|
+
} catch (error) {
|
|
58
|
+
logTranscriptLoad('error', {
|
|
59
|
+
active: activeTranscriptLoads,
|
|
60
|
+
durationMs: Date.now() - startedAt,
|
|
61
|
+
error: error instanceof Error ? error.message : String(error),
|
|
62
|
+
id: context.id,
|
|
63
|
+
loadId,
|
|
64
|
+
path: context.path,
|
|
65
|
+
queued: queuedTranscriptLoads,
|
|
66
|
+
source: context.source,
|
|
67
|
+
});
|
|
68
|
+
throw error;
|
|
69
|
+
} finally {
|
|
70
|
+
activeTranscriptLoads -= 1;
|
|
71
|
+
logTranscriptLoad('finish', {
|
|
72
|
+
active: activeTranscriptLoads,
|
|
73
|
+
durationMs: Date.now() - startedAt,
|
|
74
|
+
id: context.id,
|
|
75
|
+
loadId,
|
|
76
|
+
path: context.path,
|
|
77
|
+
queued: queuedTranscriptLoads,
|
|
78
|
+
source: context.source,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
};
|
package/src/lib/ui-cache.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHash, randomUUID } from 'node:crypto';
|
|
2
|
-
import { mkdir, readdir, rename, rm, stat } from 'node:fs/promises';
|
|
2
|
+
import { chmod, mkdir, readdir, rename, rm, stat } from 'node:fs/promises';
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
|
|
@@ -11,8 +11,13 @@ type CacheEnvelope<T> = {
|
|
|
11
11
|
version: number;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
+
type CacheReadResult<T> = { hit: true; value: T } | { hit: false };
|
|
15
|
+
|
|
16
|
+
const inFlightCacheLoads = new Map<string, Promise<unknown>>();
|
|
17
|
+
|
|
14
18
|
const ensureCacheDir = async () => {
|
|
15
|
-
await mkdir(CACHE_DIR, { recursive: true });
|
|
19
|
+
await mkdir(CACHE_DIR, { mode: 0o700, recursive: true });
|
|
20
|
+
await chmod(CACHE_DIR, 0o700);
|
|
16
21
|
};
|
|
17
22
|
|
|
18
23
|
const toCachePath = (key: string) => {
|
|
@@ -41,12 +46,12 @@ export const getFileFingerprint = async (filePath: string) => {
|
|
|
41
46
|
return `${filePath}:${metadata.size}:${metadata.mtimeMs}`;
|
|
42
47
|
};
|
|
43
48
|
|
|
44
|
-
|
|
49
|
+
const readCachedJson = async <T>(key: string): Promise<CacheReadResult<T>> => {
|
|
45
50
|
await ensureCacheDir();
|
|
46
51
|
const filePath = toCachePath(key);
|
|
47
52
|
const file = Bun.file(filePath);
|
|
48
53
|
if (!(await file.exists())) {
|
|
49
|
-
return
|
|
54
|
+
return { hit: false };
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
let parsed: CacheEnvelope<T> | T;
|
|
@@ -54,7 +59,7 @@ export const getCachedJson = async <T>(key: string): Promise<T | null> => {
|
|
|
54
59
|
parsed = (await file.json()) as CacheEnvelope<T> | T;
|
|
55
60
|
} catch {
|
|
56
61
|
await rm(filePath, { force: true });
|
|
57
|
-
return
|
|
62
|
+
return { hit: false };
|
|
58
63
|
}
|
|
59
64
|
|
|
60
65
|
if (
|
|
@@ -64,11 +69,16 @@ export const getCachedJson = async <T>(key: string): Promise<T | null> => {
|
|
|
64
69
|
(parsed as CacheEnvelope<T>).version === CACHE_ENVELOPE_VERSION &&
|
|
65
70
|
'value' in parsed
|
|
66
71
|
) {
|
|
67
|
-
return (parsed as CacheEnvelope<T>).value;
|
|
72
|
+
return { hit: true, value: (parsed as CacheEnvelope<T>).value };
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
await rm(filePath, { force: true });
|
|
71
|
-
return
|
|
76
|
+
return { hit: false };
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const getCachedJson = async <T>(key: string): Promise<T | null> => {
|
|
80
|
+
const cached = await readCachedJson<T>(key);
|
|
81
|
+
return cached.hit ? cached.value : null;
|
|
72
82
|
};
|
|
73
83
|
|
|
74
84
|
export const setCachedJson = async <T>(key: string, value: T) => {
|
|
@@ -80,21 +90,37 @@ export const setCachedJson = async <T>(key: string, value: T) => {
|
|
|
80
90
|
version: CACHE_ENVELOPE_VERSION,
|
|
81
91
|
};
|
|
82
92
|
|
|
83
|
-
|
|
84
|
-
|
|
93
|
+
try {
|
|
94
|
+
await Bun.write(tempPath, JSON.stringify(envelope));
|
|
95
|
+
await rename(tempPath, filePath);
|
|
96
|
+
} finally {
|
|
97
|
+
await rm(tempPath, { force: true });
|
|
98
|
+
}
|
|
85
99
|
};
|
|
86
100
|
|
|
87
101
|
export const withCachedJson = async <T>(key: string, loader: () => Promise<T>): Promise<T> => {
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
102
|
+
const cached = await readCachedJson<T>(key);
|
|
103
|
+
if (cached.hit) {
|
|
104
|
+
return cached.value;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const inFlight = inFlightCacheLoads.get(key);
|
|
108
|
+
if (inFlight) {
|
|
109
|
+
return (await inFlight) as T;
|
|
93
110
|
}
|
|
94
111
|
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
112
|
+
const load = (async () => {
|
|
113
|
+
const value = await loader();
|
|
114
|
+
await setCachedJson(key, value);
|
|
115
|
+
return value;
|
|
116
|
+
})();
|
|
117
|
+
inFlightCacheLoads.set(key, load);
|
|
118
|
+
|
|
119
|
+
try {
|
|
120
|
+
return await load;
|
|
121
|
+
} finally {
|
|
122
|
+
inFlightCacheLoads.delete(key);
|
|
123
|
+
}
|
|
98
124
|
};
|
|
99
125
|
|
|
100
126
|
export const invalidateCacheByPrefix = async (...prefixes: string[]) => {
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import type { ExportFormat } from './shared';
|
|
2
2
|
|
|
3
|
+
type BatchExportNameEntry = {
|
|
4
|
+
cwd: string | null;
|
|
5
|
+
updatedAtMs: number | null;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
type ConversationExportNameEntry = BatchExportNameEntry & {
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const getPortablePathBasename = (value: string): string => {
|
|
13
|
+
const trimmed = value.replace(/[\\/]+$/u, '');
|
|
14
|
+
if (!trimmed) {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const separatorIndex = Math.max(trimmed.lastIndexOf('/'), trimmed.lastIndexOf('\\'));
|
|
19
|
+
return separatorIndex === -1 ? trimmed : trimmed.slice(separatorIndex + 1);
|
|
20
|
+
};
|
|
21
|
+
|
|
3
22
|
export const sanitizeExportFileName = (value: string) => {
|
|
4
23
|
return value
|
|
5
24
|
.replace(/[<>:"/\\|?*\u0000-\u001f]/gu, ' ')
|
|
@@ -18,6 +37,47 @@ export const resolveUniqueExportFileBaseName = (baseName: string, usedCounts: Ma
|
|
|
18
37
|
return count === 1 ? baseName : `${baseName}-${count}`;
|
|
19
38
|
};
|
|
20
39
|
|
|
40
|
+
const formatBatchExportDate = (value: number) => {
|
|
41
|
+
const date = new Date(value);
|
|
42
|
+
const year = date.getUTCFullYear();
|
|
43
|
+
const month = String(date.getUTCMonth() + 1).padStart(2, '0');
|
|
44
|
+
const day = String(date.getUTCDate()).padStart(2, '0');
|
|
45
|
+
const hours = String(date.getUTCHours()).padStart(2, '0');
|
|
46
|
+
const minutes = String(date.getUTCMinutes()).padStart(2, '0');
|
|
47
|
+
return `${year}-${month}-${day}-${hours}${minutes}`;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const resolveExportProjectName = (cwd: string | null, fallbackProjectName: string) => {
|
|
51
|
+
return sanitizeExportFileName(getPortablePathBasename(cwd ?? '') || fallbackProjectName) || 'threads';
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const buildConversationExportBaseName = (
|
|
55
|
+
{ cwd, id, updatedAtMs }: ConversationExportNameEntry,
|
|
56
|
+
fallbackProjectName: string,
|
|
57
|
+
) => {
|
|
58
|
+
const projectName = resolveExportProjectName(cwd, fallbackProjectName);
|
|
59
|
+
const shortId = sanitizeExportFileName(id).slice(0, 8) || 'conversation';
|
|
60
|
+
return Number.isFinite(updatedAtMs) && (updatedAtMs ?? 0) > 0
|
|
61
|
+
? `${projectName}-${formatBatchExportDate(updatedAtMs!)}-${shortId}`
|
|
62
|
+
: `${projectName}-${shortId}`;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const buildBatchExportBaseName = (entries: BatchExportNameEntry[], fallbackProjectName: string) => {
|
|
66
|
+
if (entries.length === 0) {
|
|
67
|
+
throw new Error('No conversations selected for export');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const firstCwd = entries.find((entry) => entry.cwd?.trim())?.cwd ?? null;
|
|
71
|
+
const projectName = resolveExportProjectName(firstCwd, fallbackProjectName);
|
|
72
|
+
const latestUpdatedAtMs = Math.max(
|
|
73
|
+
...entries.map((entry) => (Number.isFinite(entry.updatedAtMs) ? (entry.updatedAtMs ?? 0) : 0)),
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
return latestUpdatedAtMs > 0
|
|
77
|
+
? `${projectName}-${formatBatchExportDate(latestUpdatedAtMs)}-threads-${entries.length}`
|
|
78
|
+
: `${projectName}-threads-${entries.length}`;
|
|
79
|
+
};
|
|
80
|
+
|
|
21
81
|
const readPipeText = async (pipe: ReadableStream<Uint8Array> | number | undefined) => {
|
|
22
82
|
return pipe && typeof pipe !== 'number' ? new Response(pipe).text() : '';
|
|
23
83
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(){return null}export{e as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{n}from"./react-dom-DL96Jor4.js";import{c as r,o as i,s as a}from"./formatters-BtqyrX_c.js";import{n as o,t as s}from"./data-table-Br78_dk3.js";import{a as c,i as l,n as u,r as d,t as f}from"./select-CYF6pF37.js";import{$ as p,Q as m,Z as h,at as g,et as _,kt as v,nt as y}from"./index-C-STgIH4.js";import{t as b}from"./metric-card-Dplm0ZiM.js";import{t as x}from"./page-header-Cwa3p6Tl.js";var S=e(n()),C=t(),w=o(),T=[w.accessor(`name`,{cell:e=>(0,C.jsx)(`span`,{className:`font-mono text-sm`,children:e.getValue()}),header:`Tool`}),w.accessor(`count`,{cell:e=>(0,C.jsx)(`span`,{className:`font-mono text-sm`,children:i(e.getValue())}),header:`Calls`})],E=o(),D=[E.accessor(`model`,{cell:e=>(0,C.jsx)(`span`,{className:`font-mono text-sm`,children:e.getValue()}),header:`Model`}),E.accessor(`threadCount`,{cell:e=>(0,C.jsx)(`span`,{className:`font-mono text-sm`,children:i(e.getValue())}),header:`Threads`}),E.accessor(`totalTokens`,{cell:e=>(0,C.jsx)(`span`,{className:`font-mono text-sm`,children:a(e.getValue())}),header:`Tokens`})];function O(){let e=v({from:h.fullPath}),t=r(g()).data,n=h.useSearch().project??null,o=r(y(n)).data;return(0,C.jsxs)(`div`,{className:`space-y-6`,children:[(0,C.jsx)(x,{actions:(0,C.jsxs)(f,{value:p(n),onValueChange:t=>{(0,S.startTransition)(()=>{e({replace:!0,search:e=>_(e,m(t))})})},children:[(0,C.jsx)(l,{className:`h-10 w-full rounded-full border-[var(--border)] bg-[var(--panel)] sm:w-[15rem]`,children:(0,C.jsx)(c,{placeholder:`Filter by project`})}),(0,C.jsxs)(u,{children:[(0,C.jsx)(d,{value:`__all__`,children:`All projects`}),t.map(e=>(0,C.jsx)(d,{value:p(e.name),children:e.name},e.name))]})]}),eyebrow:`Analytics`,subtitle:`Inspect token load, tool-call distribution, and project-scoped usage patterns to understand where Codex is spending effort.`,title:`Analytics`}),(0,C.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2 xl:grid-cols-5`,children:[(0,C.jsx)(b,{label:`Threads`,value:i(o.summary.totalThreads)}),(0,C.jsx)(b,{label:`Projects`,value:i(o.summary.totalProjects)}),(0,C.jsx)(b,{label:`Tokens`,value:a(o.summary.totalTokens)}),(0,C.jsx)(b,{label:`Average per thread`,value:a(Math.round(o.summary.averageTokensPerThread))}),(0,C.jsx)(b,{label:`Web search threads`,value:i(o.summary.threadsWithWebSearch)})]}),(0,C.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,C.jsxs)(`section`,{className:`space-y-4`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`h3`,{className:`font-semibold text-sm`,children:`Most frequent tool calls`}),(0,C.jsx)(`p`,{className:`mt-1 text-[var(--muted-foreground)] text-sm`,children:`Useful for future prompt and tool optimization work.`})]}),(0,C.jsx)(s,{columns:T,data:o.toolUsage,emptyMessage:`No tool calls recorded.`})]}),(0,C.jsxs)(`section`,{className:`space-y-4`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`h3`,{className:`font-semibold text-sm`,children:`Model token breakdown`}),(0,C.jsx)(`p`,{className:`mt-1 text-[var(--muted-foreground)] text-sm`,children:`Compare model usage and token concentration within the current project scope.`})]}),(0,C.jsx)(s,{columns:D,data:o.modelsByTokens,emptyMessage:`No model usage recorded.`})]})]})]})}export{O as component};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{n}from"./react-dom-DL96Jor4.js";import{M as r}from"./createServerFn-B-KkwmHU.js";import{c as i,n as a,o,r as s}from"./formatters-BtqyrX_c.js";import{t as c}from"./useMutation-BSFult2i.js";import{t as l}from"./checkbox-CdHitXWQ.js";import{a as u,c as d,i as f,n as p,o as m,r as h,s as g,t as _}from"./tabs-CmuhkT-c.js";import{r as v,t as y}from"./download-Bf0QJKD3.js";import{t as b}from"./antigravity-keychain-panel-B77qJz6f.js";import{t as x}from"./scroll-text-fM0sMOB3.js";import{C as S,S as C,T as w,b as T,ht as E,t as D,v as O}from"./index-C-STgIH4.js";import{t as k}from"./metric-card-Dplm0ZiM.js";import{t as A}from"./page-header-Cwa3p6Tl.js";var j=e(n()),M=t(),N=({content:e,description:t,title:n})=>(0,M.jsxs)(`section`,{className:`rounded-[1.6rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]`,children:[(0,M.jsx)(`h3`,{className:`font-semibold text-[var(--muted-foreground)] text-sm uppercase tracking-[0.18em]`,children:n}),t?(0,M.jsx)(`p`,{className:`mt-2 text-[var(--muted-foreground)] text-sm`,children:t}):null,(0,M.jsx)(`pre`,{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]`,children:e})]}),P=/^##\s+(.+)$/u,F=/^_Timestamp:\s*(.+?)_$/u,I=/^tool:\s*(.+)$/iu,L=e=>{if(!e?.trim())return[];let t=[],n=e.split(/\r?\n/u),r=null,i=[],a=()=>{r&&t.push({body:i.join(`
|
|
2
|
-
`).trim(),heading:r,sequence:t.length*10})};for(let e of n){let t=P.exec(e);if(t){a(),r=t[1].trim(),i=[];continue}r&&i.push(e)}return a(),t},R=e=>{let t=e.split(/\r?\n/u),n=F.exec(t[0]?.trim()??``)?.[1]?.trim()??null;return{body:n?t.slice(1).join(`
|
|
3
|
-
`).trim():e.trim(),timestamp:n}},z=e=>e.split(/^###\s+/mu)[0]?.trim()??``,B=(e,t)=>{let n=e.split(/\r?\n/u),r=n.findIndex(e=>e.trim().toLowerCase()===`### ${t.toLowerCase()}`);if(r===-1)return``;let i=n.findIndex((e,t)=>t>r&&e.startsWith(`### `));return n.slice(r+1,i===-1?void 0:i).join(`
|
|
4
|
-
`).trim()},V=e=>{let t=B(e,`Tool Calls`);if(!t)return[];let n=[];for(let e of t.matchAll(/-\s+`([^`]+)`(?:\s*\n+```json\s*\n([\s\S]*?)\n```)?/gu))n.push({argumentsText:e[2]?.trim()??null,name:e[1]?.trim()||`unknown`});return n},H=e=>{let t=z(e),[n,...r]=B(e,`Thinking`).split(/\n{2,}/u).map(e=>e.trim());return{content:t||r.join(`
|
|
5
|
-
|
|
6
|
-
`).trim(),thinking:n??``,toolCalls:V(e)}},U=(e,t={})=>({heading:e.heading,source:`antigravity_markdown`,...t}),W=(e,t,n,r,i,a=0)=>({isHiddenByDefault:t!==`assistant`&&t!==`user`,kind:`message`,memoryCitation:null,model:null,phase:i,raw:U(e,{role:t}),role:t,sequence:e.sequence+a,text:n,timestamp:r,variant:t===`user`?`user_message`:t===`assistant`?`agent_message`:`message`}),G=(e,t,n,r)=>({argumentsParseFailed:!1,argumentsText:t.argumentsText,callId:null,command:[t.name,t.argumentsText].filter(Boolean).join(`
|
|
7
|
-
`),kind:`tool_call`,name:t.name,raw:U(e,{argumentsText:t.argumentsText,name:t.name}),sequence:e.sequence+r,timestamp:n,workdir:null}),K=(e,t,n,r)=>({callId:null,exitCode:null,kind:`tool_output`,outputText:n,raw:U(e,{name:t}),sequence:e.sequence,summary:n,timestamp:r,wallTime:null}),q=e=>{let t=new Set,n=null,r=()=>{n!==null&&t.add(n),n=null};for(let t of e){let e=t.heading.toLowerCase();if(e===`user`){r();continue}if(e!==`assistant`)continue;let{body:i}=R(t.body),a=H(i);a.toolCalls.length>0?n=null:a.content&&(n=t.sequence)}return r(),t},J=(e,t,n,r)=>n?[W(e,t,n,r,null)]:[],Y=(e,t,n,r)=>n?[K(e,t,n,r)]:[],X=(e,t,n,r)=>{let i=H(t),a=[];if(i.thinking&&a.push(W(e,`assistant`,i.thinking,n,`commentary`)),i.content){let t=r.has(e.sequence)?`final_answer`:`commentary`;a.push(W(e,`assistant`,i.content,n,t,1))}return i.toolCalls.forEach((t,r)=>{a.push(G(e,t,n,2+r))}),a},Z=(e,t)=>{let{body:n,timestamp:r}=R(e.body),i=e.heading.toLowerCase(),a=I.exec(e.heading);return i===`user`?J(e,`user`,n,r):a?Y(e,a[1]?.trim()||`unknown`,n,r):i===`assistant`?X(e,n,r,t):i===`system`?J(e,`system`,n,r):J(e,`event`,n,r)},Q=e=>{let t=L(e),n=q(t);return t.flatMap(e=>Z(e,n))},$=(e,t)=>{e.messageCount+=1,t.role===`assistant`&&(e.assistantMessageCount+=1),t.role===`user`&&(e.userMessageCount+=1),t.phase===`commentary`&&(e.commentaryCount+=1),t.phase===`final_answer`&&(e.finalAnswerCount+=1)},ee=e=>{let t={assistantMessageCount:0,commentaryCount:0,execCommandCount:0,finalAnswerCount:0,messageCount:0,toolCallCount:0,toolOutputCount:0,userMessageCount:0,webSearchEventCount:0};for(let n of e)n.kind===`message`&&$(t,n),n.kind===`tool_call`&&(t.toolCallCount+=1),n.kind===`tool_output`&&(t.toolOutputCount+=1);return t},te=e=>[{label:`Conversation ID`,value:(0,M.jsx)(`span`,{"data-mono":`true`,children:e.conversation.conversationId})},{label:`Workspace`,value:(0,M.jsx)(r,{className:`text-[var(--accent)]`,params:{workspaceKey:e.conversation.workspaceKey},to:`/antigravity/$workspaceKey`,children:e.conversation.workspaceLabel})},{label:`Created`,value:(0,M.jsx)(`span`,{suppressHydrationWarning:!0,children:s(e.conversation.createdAtMs)})},{label:`Updated`,value:(0,M.jsx)(`span`,{suppressHydrationWarning:!0,children:s(e.conversation.lastUpdatedAtMs)})},{label:`Transcript source`,value:e.conversation.transcriptSource??`n/a`},{label:`Conversation path`,value:e.conversation.conversationPath??`n/a`},{label:`Transcript path`,value:e.conversation.transcriptPath??`n/a`},{label:`Summary path`,value:e.conversation.summaryPath??`n/a`},{label:`Source root`,value:e.conversation.sourceRoot??`n/a`}],ne=(e,t)=>{if(e.transcriptLocked)return[{label:`Transcript load`,value:`Transcript is locked until Antigravity Keychain access is enabled.`}];if(!e.conversationMarkdown)return[{label:`Transcript load`,value:`No renderable transcript content was found.`}];let n=ee(t);return[{label:`Event kinds`,value:[...new Set(t.map(e=>e.kind))].join(`, `)||`n/a`},{label:`Messages`,value:o(n.messageCount)},{label:`User messages`,value:o(n.userMessageCount)},{label:`Assistant messages`,value:o(n.assistantMessageCount)},{label:`Commentary updates`,value:o(n.commentaryCount)},{label:`Final answers`,value:o(n.finalAnswerCount)},{label:`Tool calls`,value:o(n.toolCallCount)},{label:`Tool outputs`,value:o(n.toolOutputCount)}]};function re({canExportArtifacts:e,canExportConversation:t,exportArtifactsPending:n,exportConversationPending:r,showConversationExport:i,onExportArtifacts:a,onExportConversation:o}){return(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[i?(0,M.jsxs)(E,{className:`rounded-full`,disabled:!t||r,type:`button`,variant:`outline`,onClick:o,children:[(0,M.jsx)(v,{className:`mr-2 size-4`}),`Export conversation`]}):null,e?(0,M.jsxs)(E,{className:`rounded-full`,disabled:n,type:`button`,variant:`outline`,onClick:a,children:[(0,M.jsx)(x,{className:`mr-2 size-4`}),`Export artifacts`]}):null]})}var ie=({rawJsonDisabled:e=!1,showCommentary:t,showExtraEvents:n,showRawJson:r,showToolCalls:i,showUserMessages:a,onShowCommentaryChange:o,onShowExtraEventsChange:s,onShowRawJsonChange:c,onShowToolCallsChange:u,onShowUserMessagesChange:d})=>(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-4 rounded-xl border border-[var(--border)] bg-[var(--panel)] px-4 py-3 shadow-[var(--panel-shadow)]`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,M.jsx)(l,{checked:i,id:`antigravity-transcript-show-tool-calls`,onCheckedChange:e=>u(e===!0)}),(0,M.jsx)(`label`,{htmlFor:`antigravity-transcript-show-tool-calls`,children:`Show tool calls`})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,M.jsx)(l,{checked:t,id:`antigravity-transcript-show-commentary`,onCheckedChange:e=>o(e===!0)}),(0,M.jsx)(`label`,{htmlFor:`antigravity-transcript-show-commentary`,children:`Show commentary`})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,M.jsx)(l,{checked:n,id:`antigravity-transcript-show-extra-events`,onCheckedChange:e=>s(e===!0)}),(0,M.jsx)(`label`,{htmlFor:`antigravity-transcript-show-extra-events`,children:`Show extra events`})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,M.jsx)(l,{checked:r,disabled:e,id:`antigravity-transcript-show-raw-json`,onCheckedChange:e=>c(e===!0)}),(0,M.jsx)(`label`,{htmlFor:`antigravity-transcript-show-raw-json`,children:`Raw JSON`})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,M.jsx)(l,{checked:a,id:`antigravity-transcript-show-user-messages`,onCheckedChange:e=>d(e===!0)}),(0,M.jsx)(`label`,{htmlFor:`antigravity-transcript-show-user-messages`,children:`User`})]})]});function ae({detail:e}){return(0,M.jsxs)(`section`,{className:`rounded-[1.6rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]`,children:[(0,M.jsx)(`h3`,{className:`font-semibold text-[var(--muted-foreground)] text-sm uppercase tracking-[0.18em]`,children:`Transcript`}),(0,M.jsx)(`p`,{className:`mt-4 text-[var(--muted-foreground)] text-sm`,children:e.transcriptLocked?`Unlock Antigravity transcript export to inspect the rendered conversation content here.`:e.artifactsMarkdown?`No transcript preview is available for this conversation. Generated artifacts are available in the Raw tab.`:`No transcript preview is available for this conversation.`})]})}function oe({detail:e,events:t}){return(0,M.jsxs)(`div`,{className:`space-y-4`,children:[(0,M.jsx)(g,{title:`Conversation summary`,value:e.conversation}),(0,M.jsx)(g,{title:`Transcript events`,value:t}),e.conversationMarkdown?(0,M.jsx)(N,{content:e.conversationMarkdown,description:`Rendered transcript Markdown used for export.`,title:`Transcript Markdown`}):null,e.artifactsMarkdown?(0,M.jsx)(N,{content:e.artifactsMarkdown,description:`Generated artifacts.`,title:`Artifacts`}):null]})}function se(){let e=i(T()).data,t=i(O(D.useParams().conversationId)).data,[n,r]=(0,j.useState)(!1),[s,l]=(0,j.useState)(!1),[g,v]=(0,j.useState)(!1),[x,E]=(0,j.useState)(!1),[N,P]=(0,j.useState)(!0),F=(0,j.useMemo)(()=>Q(t.conversationMarkdown),[t.conversationMarkdown]),I=w(t.conversation,!!e?.isUnlocked),L=t.artifactsMarkdown!==null,R=I||t.transcriptLocked,z=c({mutationFn:()=>S({data:{conversationId:t.conversation.conversationId}}),onSuccess:e=>{y(e.filename,e.content,`text/markdown; charset=utf-8`)}}),B=c({mutationFn:()=>C({data:{conversationId:t.conversation.conversationId}}),onSuccess:e=>{y(e.filename,e.content,`text/markdown; charset=utf-8`)}});return(0,M.jsxs)(`div`,{className:`space-y-6`,children:[(0,M.jsx)(A,{actions:(0,M.jsx)(re,{canExportArtifacts:L,canExportConversation:I,exportArtifactsPending:B.isPending,exportConversationPending:z.isPending,showConversationExport:R,onExportArtifacts:()=>B.mutate(),onExportConversation:()=>z.mutate()}),breadcrumb:(0,M.jsx)(d,{items:[{label:`Antigravity`,to:`/antigravity`},{label:t.conversation.workspaceLabel,params:{workspaceKey:t.conversation.workspaceKey},to:`/antigravity/$workspaceKey`},{label:t.conversation.title}]}),eyebrow:`Antigravity conversation`,subtitle:`Conversation detail for the selected Antigravity workspace session.`,title:t.conversation.title}),(0,M.jsx)(b,{}),(0,M.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-4`,children:[(0,M.jsx)(k,{label:`Transcript entries`,value:o(t.conversation.transcriptEntryCount)}),(0,M.jsx)(k,{label:`Artifacts`,value:o(t.conversation.artifactCount)}),(0,M.jsx)(k,{label:`Size`,value:a(t.conversation.conversationBytes)}),(0,M.jsx)(k,{helper:t.conversation.transcriptSource??`summary`,label:`Indexed items`,value:o(t.conversation.indexedItemCount??0)})]}),(0,M.jsxs)(_,{className:`space-y-4`,defaultValue:`transcript`,children:[(0,M.jsxs)(h,{className:`grid w-fit min-w-[24rem] grid-cols-3 rounded-full border border-[var(--border)] bg-[var(--panel)] p-1`,children:[(0,M.jsx)(f,{className:`rounded-full px-5 text-sm`,value:`transcript`,children:`Transcript`}),(0,M.jsx)(f,{className:`rounded-full px-5 text-sm`,value:`metadata`,children:`Metadata`}),(0,M.jsx)(f,{className:`rounded-full px-5 text-sm`,value:`raw`,children:`Raw`})]}),(0,M.jsxs)(p,{className:`space-y-3`,value:`transcript`,children:[(0,M.jsx)(ie,{rawJsonDisabled:F.length===0,showCommentary:s,showExtraEvents:g,showRawJson:x,showToolCalls:n,showUserMessages:N,onShowCommentaryChange:l,onShowExtraEventsChange:v,onShowRawJsonChange:E,onShowToolCallsChange:r,onShowUserMessagesChange:P}),F.length>0?(0,M.jsx)(u,{assistantModel:null,events:F,projectPath:t.conversation.workspaceFolder,showCommentary:s,showExtraEvents:g,showRawJson:x,showToolCalls:n,showUserMessages:N}):(0,M.jsx)(ae,{detail:t})]}),(0,M.jsx)(p,{value:`metadata`,children:(0,M.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[0.95fr_1.05fr]`,children:[(0,M.jsx)(m,{items:te(t),title:`Conversation metadata`}),(0,M.jsx)(m,{items:ne(t,F),title:`Transcript stats`})]})}),(0,M.jsx)(p,{value:`raw`,children:(0,M.jsx)(oe,{detail:t,events:F})})]}),z.isError?(0,M.jsx)(`p`,{className:`text-[var(--destructive)] text-sm`,children:z.error instanceof Error?z.error.message:`Conversation export failed`}):null,B.isError?(0,M.jsx)(`p`,{className:`text-[var(--destructive)] text-sm`,children:B.error instanceof Error?B.error.message:`Artifact export failed`}):null]})}export{se as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DGeXAQPT.js";import{t}from"./reload-error-panel-AHqu0akK.js";var n=e();function r({error:e}){return(0,n.jsx)(t,{description:e.message,title:`Failed to load Antigravity conversation`})}export{r as errorComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DGeXAQPT.js";import{i as t}from"./createServerFn-B-KkwmHU.js";import{t as n}from"./useMutation-BSFult2i.js";import{t as r}from"./useQuery-CjINKZf1.js";import{_ as i,h as a}from"./dist-DvMS2965.js";import{b as o,ht as s,w as c}from"./index-C-STgIH4.js";var l=i(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),u=i(`lock-keyhole`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),d=i(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),f=i(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),p=e();function m(){let e=t(),i=r(o()).data??null,m=n({mutationFn:()=>c(),onSuccess:t=>{e.setQueryData(o().queryKey,t),Promise.all([e.invalidateQueries({queryKey:o().queryKey}),e.invalidateQueries({queryKey:[`antigravity-conversation`]})])}});if(!i||i.status===`unsupported`)return null;let h=i.isUnlocked,g=m.error?.message??i.error;return(0,p.jsxs)(`div`,{className:a(`flex flex-col gap-3 rounded-xl border px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,h?`border-emerald-500/30 bg-emerald-500/10`:`border-[var(--border)] bg-[var(--panel)]`),children:[(0,p.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,p.jsx)(`div`,{className:a(`mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-md`,h?`bg-emerald-500/15 text-emerald-600`:`bg-[var(--panel-secondary)]`),children:h?(0,p.jsx)(d,{className:`size-4`}):(0,p.jsx)(u,{className:`size-4`})}),(0,p.jsxs)(`div`,{className:`min-w-0`,children:[(0,p.jsx)(`p`,{className:`font-medium text-sm`,children:h?`Keychain access enabled`:`Unlock Antigravity transcript export`}),(0,p.jsx)(`p`,{className:`mt-1 text-[var(--muted-foreground)] text-xs`,children:h?`The Antigravity key is cached in this server process only. Transcript exports are available for local logs and safe-storage payloads.`:`Spiracha needs one-time access to ${i.keychainService} to decrypt Antigravity transcript data. macOS will ask for approval after you click unlock.`}),g?(0,p.jsxs)(`p`,{className:`mt-2 flex items-center gap-1 text-[var(--destructive)] text-xs`,children:[(0,p.jsx)(f,{className:`size-3`}),g]}):null]})]}),h?null:(0,p.jsxs)(s,{className:`shrink-0`,disabled:!i.canRequestAccess||m.isPending,type:`button`,onClick:()=>m.mutate(),children:[(0,p.jsx)(l,{className:`size-4`}),m.isPending?`Waiting...`:`Unlock`]})]})}export{u as n,m as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{n}from"./react-dom-DL96Jor4.js";import{M as r}from"./createServerFn-B-KkwmHU.js";import{c as i,n as a,o,r as s}from"./formatters-BtqyrX_c.js";import{t as c}from"./useMutation-BSFult2i.js";import{n as l,t as u}from"./data-table-Br78_dk3.js";import{r as d,t as f}from"./download-Bf0QJKD3.js";import{a as p,i as m,n as h,r as g,t as _}from"./dropdown-menu-D5cvPaZt.js";import{n as v,t as y}from"./antigravity-keychain-panel-B77qJz6f.js";import{t as b}from"./scroll-text-fM0sMOB3.js";import{C as x,D as S,E as C,O as w,S as T,T as E,b as D,ht as O,n as k,r as A,x as j,y as M}from"./index-C-STgIH4.js";import{t as N}from"./page-header-Cwa3p6Tl.js";import{t as P}from"./badge-C3i4OKs8.js";import{n as F,t as I}from"./text-filter-DVAZySUS.js";var L=e(n(),1),R=t(),z=l(),B=(e,t)=>{let n=e.artifactCount>0,r=!!t?.isUnlocked,i=S(e)||C(e),a=E(e,r),o=w(e,r),s=a||o;return{canExportConversation:a,hasArtifacts:n,hasTranscript:i,lockedTranscript:o,showActions:s||n,showConversationAction:s}},V=(e,t)=>t.hasTranscript?`${e.transcriptSource?e.transcriptSource.replace(/-/gu,` `):`transcript`} · ${t.lockedTranscript?`locked`:`available`}`:`Summary only`,H=(e,t,n)=>[z.accessor(`title`,{cell:t=>{let n=B(t.row.original,e);return(0,R.jsxs)(r,{className:`block w-[16rem] max-w-[22rem] space-y-1 rounded-md outline-none transition hover:opacity-80 focus-visible:ring-2 focus-visible:ring-[var(--accent)] lg:w-auto`,params:{conversationId:t.row.original.conversationId},to:`/antigravity-conversations/$conversationId`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`p`,{className:`truncate font-medium underline-offset-2 hover:underline`,children:t.getValue()}),n.hasTranscript?(0,R.jsx)(P,{variant:`secondary`,children:`transcript`}):null,n.hasArtifacts?(0,R.jsx)(P,{variant:`outline`,children:`artifact`}):null]}),(0,R.jsx)(`p`,{className:`truncate text-[var(--muted-foreground)] text-xs`,children:t.row.original.conversationId})]})},header:`Conversation`}),z.accessor(`lastUpdatedAtMs`,{cell:e=>(0,R.jsx)(`span`,{className:`whitespace-nowrap text-sm`,suppressHydrationWarning:!0,children:s(e.getValue())}),header:`Updated`}),z.display({cell:t=>{let n=B(t.row.original,e);return(0,R.jsxs)(`span`,{className:`text-sm`,children:[V(t.row.original,n),t.row.original.transcriptEntryCount>0?` · ${o(t.row.original.transcriptEntryCount)} entries`:``]})},header:`Transcript`,id:`transcript`}),z.accessor(`artifactCount`,{cell:e=>(0,R.jsx)(`span`,{className:`font-mono text-sm`,children:o(e.getValue())}),header:`Artifacts`}),z.accessor(`conversationBytes`,{cell:e=>(0,R.jsx)(`span`,{className:`font-mono text-sm`,children:a(e.getValue())}),header:`Size`}),z.display({cell:r=>{let i=B(r.row.original,e);return i.showActions?(0,R.jsxs)(_,{children:[(0,R.jsx)(m,{asChild:!0,children:(0,R.jsx)(O,{className:`rounded-full`,size:`icon`,type:`button`,variant:`ghost`,onClick:e=>e.stopPropagation(),children:(0,R.jsx)(p,{className:`size-4`})})}),(0,R.jsxs)(h,{align:`end`,children:[i.showConversationAction?(0,R.jsxs)(g,{disabled:!i.canExportConversation,onClick:()=>t(r.row.original),children:[i.lockedTranscript?(0,R.jsx)(v,{className:`mr-2 size-4`}):(0,R.jsx)(d,{className:`mr-2 size-4`}),i.lockedTranscript?`Unlock conversation export first`:`Export conversation`]}):null,i.hasArtifacts?(0,R.jsxs)(g,{onClick:()=>n(r.row.original),children:[(0,R.jsx)(b,{className:`mr-2 size-4`}),`Export artifacts`]}):null]})]}):(0,R.jsx)(`span`,{className:`text-[var(--muted-foreground)] text-sm`,children:`No export`})},header:``,id:`actions`})];function U({conversations:e,decryptionState:t,onExportArtifacts:n,onExportConversation:r}){return(0,R.jsx)(u,{columns:(0,L.useMemo)(()=>H(t,r,n),[t,n,r]),data:e,emptyMessage:`No Antigravity conversations match the current workspace filter.`})}function W(){let e=k.useParams(),t=i(j()).data,n=A(t,e.workspaceKey),r=i(M(n.key)).data,a=i(D()).data??null,[o,s]=(0,L.useState)(``),l=(0,L.useDeferredValue)(o),u=c({mutationFn:e=>x({data:{conversationId:e.conversationId}}),onSuccess:e=>{f(e.filename,e.content,`text/markdown; charset=utf-8`)}}),d=c({mutationFn:e=>T({data:{conversationId:e.conversationId}}),onSuccess:e=>{f(e.filename,e.content,`text/markdown; charset=utf-8`)}}),p=r.filter(e=>I(l,[e.title,e.conversationId,e.transcriptSource,e.workspaceLabel]));return(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsx)(N,{actions:(0,R.jsx)(F,{placeholder:`Search title, id, or transcript source`,value:o,onValueChange:s}),eyebrow:`Antigravity workspace`,subtitle:`Inspect conversation coverage across Antigravity transcripts, raw payloads, and generated artifacts.`,title:n.label}),(0,R.jsx)(y,{}),(0,R.jsx)(U,{conversations:p,decryptionState:a,onExportArtifacts:e=>d.mutate(e),onExportConversation:e=>u.mutate(e)}),u.isError?(0,R.jsx)(`p`,{className:`text-[var(--destructive)] text-sm`,children:u.error instanceof Error?u.error.message:`Conversation export failed`}):null,d.isError?(0,R.jsx)(`p`,{className:`text-[var(--destructive)] text-sm`,children:d.error instanceof Error?d.error.message:`Artifact export failed`}):null]})}export{W as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DGeXAQPT.js";import{t}from"./reload-error-panel-AHqu0akK.js";var n=e();function r({error:e}){return(0,n.jsx)(t,{description:e.message,title:`Failed to load Antigravity workspace`})}export{r as errorComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{n}from"./react-dom-DL96Jor4.js";import{M as r}from"./createServerFn-B-KkwmHU.js";import{c as i,n as a,o,r as s}from"./formatters-BtqyrX_c.js";import{n as c,t as l}from"./data-table-Br78_dk3.js";import{t as u}from"./antigravity-keychain-panel-B77qJz6f.js";import{x as d}from"./index-C-STgIH4.js";import{t as f}from"./page-header-Cwa3p6Tl.js";import{n as p,t as m}from"./text-filter-DVAZySUS.js";var h=e(n()),g=t(),_=c(),v=[_.accessor(`label`,{cell:e=>(0,g.jsxs)(r,{className:`block w-[16rem] max-w-[22rem] space-y-1 rounded-md outline-none transition hover:opacity-80 focus-visible:ring-2 focus-visible:ring-[var(--accent)] lg:w-auto`,params:{workspaceKey:e.row.original.key},to:`/antigravity/$workspaceKey`,children:[(0,g.jsx)(`p`,{className:`font-medium underline-offset-2 hover:underline`,children:e.getValue()}),(0,g.jsx)(`p`,{className:`truncate text-[var(--muted-foreground)] text-xs`,children:e.row.original.uri??`Unknown root`})]}),header:`Workspace`}),_.accessor(`conversationCount`,{cell:e=>(0,g.jsx)(`span`,{className:`font-mono text-sm`,children:o(e.getValue())}),header:`Conversations`}),_.accessor(`transcriptCount`,{cell:e=>(0,g.jsx)(`span`,{className:`font-mono text-sm`,children:o(e.getValue())}),header:`Transcripts`}),_.accessor(`artifactCount`,{cell:e=>(0,g.jsx)(`span`,{className:`font-mono text-sm`,children:o(e.getValue())}),header:`Artifacts`}),_.accessor(`conversationBytes`,{cell:e=>(0,g.jsx)(`span`,{className:`font-mono text-sm`,children:a(e.getValue())}),header:`Size`}),_.accessor(`lastActiveMs`,{cell:e=>(0,g.jsx)(`span`,{className:`whitespace-nowrap text-sm`,suppressHydrationWarning:!0,children:s(e.getValue())}),header:`Last updated`})];function y({workspaces:e}){return(0,g.jsx)(l,{columns:v,data:e,emptyMessage:`No Antigravity workspaces match the current search.`})}function b(){let e=i(d()).data,[t,n]=(0,h.useState)(``),r=(0,h.useDeferredValue)(t),a=e.filter(e=>m(r,[e.label,e.uri,e.key]));return(0,g.jsxs)(`div`,{className:`space-y-6`,children:[(0,g.jsx)(f,{actions:(0,g.jsx)(p,{placeholder:`Search workspace name or path`,value:t,onValueChange:n}),eyebrow:`Inventory`,subtitle:`Workspace groups are derived from Antigravity summary indexes, raw conversation files, local logs, and brain artifacts.`,title:`Antigravity`}),(0,g.jsx)(u,{}),(0,g.jsx)(y,{workspaces:a})]})}export{b as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DGeXAQPT.js";import{t}from"./reload-error-panel-AHqu0akK.js";var n=e();function r({error:e}){return(0,n.jsx)(t,{description:e.message,title:`Failed to load Antigravity workspaces`})}export{r as errorComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DGeXAQPT.js";import{h as t,u as n}from"./dist-DvMS2965.js";import{Et as r}from"./index-C-STgIH4.js";var i=e(),a=r(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{defaultVariants:{variant:`default`},variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,destructive:`bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`}}});function o({className:e,variant:r=`default`,asChild:o=!1,...s}){return(0,i.jsx)(o?n:`span`,{"data-slot":`badge`,"data-variant":r,className:t(a({variant:r}),e),...s})}export{o as t};
|