spiracha 1.4.0 → 2.0.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 +116 -164
- package/README.md +92 -237
- package/apps/ui/AGENTS.md +36 -7
- package/apps/ui/README.md +79 -6
- package/apps/ui/components.json +21 -0
- package/apps/ui/package.json +65 -0
- package/apps/ui/{dist/client → public}/icon.svg +2 -1
- package/apps/ui/src/components/antigravity-conversations-table.tsx +206 -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 +124 -0
- package/apps/ui/src/components/breadcrumbs.tsx +53 -0
- package/apps/ui/src/components/claude-code-sessions-table.tsx +114 -0
- package/apps/ui/src/components/claude-code-workspaces-table.tsx +55 -0
- package/apps/ui/src/components/cursor-threads-table.tsx +189 -0
- package/apps/ui/src/components/cursor-workspaces-table.tsx +140 -0
- package/apps/ui/src/components/data-table.tsx +241 -0
- package/apps/ui/src/components/delete-confirm-dialog.tsx +88 -0
- package/apps/ui/src/components/export-dialog.tsx +184 -0
- package/apps/ui/src/components/json-panel.tsx +17 -0
- package/apps/ui/src/components/kiro-sessions-table.tsx +112 -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 +128 -0
- package/apps/ui/src/components/opencode-workspaces-table.tsx +57 -0
- package/apps/ui/src/components/page-header.tsx +33 -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 +112 -0
- package/apps/ui/src/components/qoder-workspaces-table.tsx +53 -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/text-document-panel.tsx +19 -0
- package/apps/ui/src/components/theme-toggle.tsx +48 -0
- package/apps/ui/src/components/threads-table.tsx +202 -0
- package/apps/ui/src/components/transcript-view.tsx +552 -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 +28 -0
- package/apps/ui/src/lib/antigravity-queries.ts +33 -0
- package/apps/ui/src/lib/antigravity-server.ts +128 -0
- package/apps/ui/src/lib/antigravity-transcript-events.ts +335 -0
- package/apps/ui/src/lib/claude-code-queries.ts +26 -0
- package/apps/ui/src/lib/claude-code-server.ts +75 -0
- package/apps/ui/src/lib/claude-code-transcript-events.ts +154 -0
- package/apps/ui/src/lib/codex-queries.ts +66 -0
- package/apps/ui/src/lib/codex-server.ts +209 -0
- package/apps/ui/src/lib/cursor-queries.ts +37 -0
- package/apps/ui/src/lib/cursor-server.ts +272 -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 +149 -0
- package/apps/ui/src/lib/kiro-queries.ts +22 -0
- package/apps/ui/src/lib/kiro-server.ts +73 -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 +73 -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 +79 -0
- package/apps/ui/src/lib/qoder-transcript-events.ts +139 -0
- package/apps/ui/src/lib/route-search.ts +68 -0
- package/apps/ui/src/lib/settings-store.tsx +59 -0
- package/apps/ui/src/lib/source-session-export-server.ts +56 -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-stats.ts +57 -0
- package/apps/ui/src/lib/utils.ts +7 -0
- package/apps/ui/src/routeTree.gen.ts +730 -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 +438 -0
- package/apps/ui/src/routes/antigravity.$workspaceKey.tsx +127 -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 +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 +342 -0
- package/apps/ui/src/routes/claude-code.$workspaceKey.tsx +135 -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 +416 -0
- package/apps/ui/src/routes/cursor.index.tsx +120 -0
- package/apps/ui/src/routes/index.tsx +124 -0
- package/apps/ui/src/routes/kiro-sessions.$sessionId.tsx +345 -0
- package/apps/ui/src/routes/kiro.$workspaceKey.tsx +136 -0
- package/apps/ui/src/routes/kiro.index.tsx +48 -0
- package/apps/ui/src/routes/opencode-sessions.$sessionId.tsx +334 -0
- package/apps/ui/src/routes/opencode.$workspaceKey.tsx +135 -0
- package/apps/ui/src/routes/opencode.index.tsx +48 -0
- package/apps/ui/src/routes/qoder-sessions.$sessionId.tsx +341 -0
- package/apps/ui/src/routes/qoder.$workspaceKey.tsx +139 -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 +619 -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 +50 -60
- package/src/client.ts +290 -0
- package/src/lib/antigravity-db.ts +213 -19
- package/src/lib/antigravity-exporter-types.ts +1 -0
- package/src/lib/claude-code-db.ts +655 -0
- package/src/lib/claude-code-exporter-types.ts +110 -0
- package/src/lib/claude-code-transcript-phase.ts +25 -0
- package/src/lib/claude-code-transcript.ts +180 -0
- package/src/lib/codex-analytics.ts +1 -1
- package/src/lib/codex-browser-db.ts +856 -61
- package/src/lib/codex-browser-export.ts +24 -16
- package/src/lib/codex-browser-types.ts +1 -1
- package/src/lib/codex-thread-cache.ts +17 -1
- package/src/lib/{codex-exporter-types.ts → codex-thread-types.ts} +2 -30
- package/src/lib/{codex-exporter-transcript.ts → codex-transcript-renderer.ts} +64 -28
- package/src/lib/concurrency.ts +25 -0
- package/src/lib/conversation-api.ts +792 -0
- package/src/lib/conversation-data/adapter-helpers.ts +110 -0
- package/src/lib/conversation-data/antigravity-adapter.ts +148 -0
- package/src/lib/conversation-data/claude-code-adapter.ts +175 -0
- package/src/lib/conversation-data/codex-adapter.ts +245 -0
- package/src/lib/conversation-data/cursor-adapter.ts +171 -0
- package/src/lib/conversation-data/index.ts +311 -0
- package/src/lib/conversation-data/kiro-adapter.ts +140 -0
- package/src/lib/conversation-data/message-selector.ts +37 -0
- package/src/lib/conversation-data/opencode-adapter.ts +180 -0
- package/src/lib/conversation-data/path-match.ts +79 -0
- package/src/lib/conversation-data/qoder-adapter.ts +230 -0
- package/src/lib/conversation-data/types.ts +116 -0
- package/src/lib/cursor-db.ts +67 -21
- package/src/lib/cursor-exporter-types.ts +0 -19
- package/src/lib/kiro-db.ts +949 -0
- package/src/lib/kiro-exporter-types.ts +100 -0
- package/src/lib/kiro-transcript-phase.ts +41 -0
- package/src/lib/kiro-transcript.ts +115 -0
- package/src/lib/opencode-db.ts +610 -0
- package/src/lib/opencode-exporter-types.ts +129 -0
- package/src/lib/opencode-think-tags.ts +126 -0
- package/src/lib/opencode-transcript-phase.ts +50 -0
- package/src/lib/opencode-transcript.ts +194 -0
- 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 +25 -0
- package/src/lib/ui-export-archive.ts +61 -0
- package/apps/ui/dist/client/assets/_threadId-CAIeH5mq.js +0 -1
- package/apps/ui/dist/client/assets/analytics-DK2jdvmI.js +0 -1
- package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-DmD0sN8X.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-BRHVjFAM.js +0 -1
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-ByitGWki.js +0 -1
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-CGV7amas.js +0 -1
- package/apps/ui/dist/client/assets/antigravity.index-DEEkjlZa.js +0 -1
- package/apps/ui/dist/client/assets/antigravity.index-DgW25FEV.js +0 -1
- package/apps/ui/dist/client/assets/badge-DfWvPfKF.js +0 -1
- package/apps/ui/dist/client/assets/checkbox-CdHitXWQ.js +0 -1
- package/apps/ui/dist/client/assets/createServerFn-CgRRVpBH.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-Ti2gTm63.js +0 -1
- package/apps/ui/dist/client/assets/cursor._workspaceKey-CaAZjGmm.js +0 -1
- package/apps/ui/dist/client/assets/cursor._workspaceKey-DzD_c6j9.js +0 -1
- package/apps/ui/dist/client/assets/cursor.index-CrnMwDCi.js +0 -1
- package/apps/ui/dist/client/assets/cursor.index-PkCFVcl4.js +0 -2
- package/apps/ui/dist/client/assets/data-table-Br78_dk3.js +0 -4
- package/apps/ui/dist/client/assets/delete-confirm-dialog-BHRmyLHr.js +0 -11
- package/apps/ui/dist/client/assets/dist-B9pyYCVU.js +0 -1
- package/apps/ui/dist/client/assets/dist-BhZOxAPP.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-Dy5cLzTy.js +0 -1
- package/apps/ui/dist/client/assets/es2015-BkCWttyM.js +0 -41
- package/apps/ui/dist/client/assets/export-dialog-C86SYHJn.js +0 -1
- package/apps/ui/dist/client/assets/formatters-BM9kB7ed.js +0 -1
- package/apps/ui/dist/client/assets/index-CPvAP-jk.js +0 -149
- package/apps/ui/dist/client/assets/jsx-runtime-DGeXAQPT.js +0 -1
- package/apps/ui/dist/client/assets/metric-card-Dplm0ZiM.js +0 -1
- package/apps/ui/dist/client/assets/page-header-Cwa3p6Tl.js +0 -1
- package/apps/ui/dist/client/assets/projects._project-Ckf6muWZ.js +0 -1
- package/apps/ui/dist/client/assets/projects._project-DSDwH4NF.js +0 -1
- package/apps/ui/dist/client/assets/projects.index-DEfhWqa8.js +0 -1
- package/apps/ui/dist/client/assets/projects.index-V5ibNZII.js +0 -3
- 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-Df2tgpyd.js +0 -1
- package/apps/ui/dist/client/assets/scroll-text-fM0sMOB3.js +0 -1
- package/apps/ui/dist/client/assets/select-Bf2GwfPR.js +0 -1
- package/apps/ui/dist/client/assets/settings-5VQIzME0.js +0 -1
- package/apps/ui/dist/client/assets/sqlite-error-B6uZjUe8.js +0 -1
- package/apps/ui/dist/client/assets/styles-BhRkXgwB.css +0 -1
- package/apps/ui/dist/client/assets/tabs-OO4VU5KR.js +0 -7
- package/apps/ui/dist/client/assets/text-filter-DVAZySUS.js +0 -2
- package/apps/ui/dist/client/assets/threads._threadId-BB9tTsV4.js +0 -1
- package/apps/ui/dist/client/assets/threads._threadId-BgDhFj2I.js +0 -1
- package/apps/ui/dist/client/assets/useMutation-CC_B7uy5.js +0 -1
- package/apps/ui/dist/client/assets/useQuery-C5By6WKU.js +0 -1
- package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-CRW2kqj0.js +0 -232
- 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-BtexWY-K.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-zMrR6v6R.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/codex-queries-CtgeZ7VL.js +0 -99
- package/apps/ui/dist/server/assets/codex-server-CNXSJuc2.js +0 -2004
- 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-cYZEU3WQ.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-nq-kR62j.js +0 -361
- package/apps/ui/dist/server/assets/cursor-server-C3q7hrp-.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-BPJFWfJj.js +0 -18
- package/apps/ui/dist/server/assets/cursor-threads._composerId-BkMMTQ3v.js +0 -582
- package/apps/ui/dist/server/assets/cursor-transcript-2iL3KFSK.js +0 -125
- package/apps/ui/dist/server/assets/cursor._workspaceKey-C5PdTaKB.js +0 -28
- package/apps/ui/dist/server/assets/cursor._workspaceKey-Ckj7apKI.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-BItjWgkZ.js +0 -240
- package/apps/ui/dist/server/assets/formatters-FJaGZgJk.js +0 -91
- 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/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-Bpbc3C-L.js +0 -20
- package/apps/ui/dist/server/assets/projects._project-Bshqk7JA.js +0 -12
- package/apps/ui/dist/server/assets/projects._project-CvZho6EQ.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-6m-ihwqA.js +0 -410
- 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-CPRNYIql.js +0 -134
- package/apps/ui/dist/server/assets/sqlite-error-LZDrnxdd.js +0 -13
- package/apps/ui/dist/server/assets/start-CI_0bSiY.js +0 -4
- package/apps/ui/dist/server/assets/tabs-CGA13IZM.js +0 -502
- package/apps/ui/dist/server/assets/text-filter-CGKxMCKt.js +0 -36
- package/apps/ui/dist/server/assets/threads._threadId-BSSK4nkI.js +0 -26
- package/apps/ui/dist/server/assets/threads._threadId-Bs0yuqO9.js +0 -18
- package/apps/ui/dist/server/assets/threads._threadId-D2GYkVn6.js +0 -639
- 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 -5847
- 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}/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
|
@@ -42,6 +42,31 @@ export const getPortablePathBasename = (value: string): string => {
|
|
|
42
42
|
return path.win32.basename(path.posix.basename(trimmed));
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
+
export const isWorkspacePathQuery = (value: string): boolean => {
|
|
46
|
+
const raw = value.trim();
|
|
47
|
+
return raw.startsWith('/') || raw.startsWith('~') || raw.includes('/') || raw.includes('\\');
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const normalizeWorkspacePathQuery = (value: string): string => {
|
|
51
|
+
return expandHome(value.trim())
|
|
52
|
+
.replace(/[\\/]+$/u, '')
|
|
53
|
+
.replace(/\\/gu, '/');
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const workspacePathMatchesQuery = (worktree: string, query: string): boolean => {
|
|
57
|
+
const normalizedQuery = normalizeWorkspacePathQuery(query);
|
|
58
|
+
const normalizedWorktree = normalizeWorkspacePathQuery(worktree);
|
|
59
|
+
if (!normalizedQuery) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
if (normalizedWorktree === normalizedQuery) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const suffix = normalizedQuery.replace(/^\/+/u, '');
|
|
67
|
+
return Boolean(suffix) && normalizedWorktree.endsWith(`/${suffix}`);
|
|
68
|
+
};
|
|
69
|
+
|
|
45
70
|
export const cleanInlineTitle = (value: string): string => {
|
|
46
71
|
const firstLine =
|
|
47
72
|
value
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ExportFormat } from './shared';
|
|
2
|
+
|
|
3
|
+
export const sanitizeExportFileName = (value: string) => {
|
|
4
|
+
return value
|
|
5
|
+
.replace(/[<>:"/\\|?*\u0000-\u001f]/gu, ' ')
|
|
6
|
+
.replace(/\.\.+/gu, ' ')
|
|
7
|
+
.replace(/\s+/gu, ' ')
|
|
8
|
+
.trim();
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const getExportMimeType = (outputFormat: ExportFormat) => {
|
|
12
|
+
return outputFormat === 'md' ? 'text/markdown; charset=utf-8' : 'text/plain; charset=utf-8';
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const resolveUniqueExportFileBaseName = (baseName: string, usedCounts: Map<string, number>) => {
|
|
16
|
+
const count = (usedCounts.get(baseName) ?? 0) + 1;
|
|
17
|
+
usedCounts.set(baseName, count);
|
|
18
|
+
return count === 1 ? baseName : `${baseName}-${count}`;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const readPipeText = async (pipe: ReadableStream<Uint8Array> | number | undefined) => {
|
|
22
|
+
return pipe && typeof pipe !== 'number' ? new Response(pipe).text() : '';
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const runZip = async (args: string[], options: { cwd?: string } = {}) => {
|
|
26
|
+
let proc: ReturnType<typeof Bun.spawn>;
|
|
27
|
+
try {
|
|
28
|
+
proc = Bun.spawn(['zip', '-9', ...args], {
|
|
29
|
+
cwd: options.cwd,
|
|
30
|
+
stderr: 'pipe',
|
|
31
|
+
stdout: 'pipe',
|
|
32
|
+
});
|
|
33
|
+
} catch (error) {
|
|
34
|
+
throw new Error(
|
|
35
|
+
`zip command failed to start. Install the "zip" executable or choose a non-zip export. ${error instanceof Error ? error.message : String(error)}`,
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const [stdoutText, stderrText, exitCode] = await Promise.all([
|
|
40
|
+
readPipeText(proc.stdout),
|
|
41
|
+
readPipeText(proc.stderr),
|
|
42
|
+
proc.exited,
|
|
43
|
+
]);
|
|
44
|
+
|
|
45
|
+
if (exitCode !== 0) {
|
|
46
|
+
const output = (stderrText || stdoutText).trim();
|
|
47
|
+
throw new Error(
|
|
48
|
+
output
|
|
49
|
+
? `zip command failed (${exitCode}): ${output}`
|
|
50
|
+
: `zip command failed (${exitCode}). Install the "zip" executable or choose a non-zip export.`,
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const zipExportFile = async (sourcePath: string, zipPath: string) => {
|
|
56
|
+
await runZip(['-j', zipPath, sourcePath]);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const zipExportDirectory = async (sourceDirectory: string, zipPath: string) => {
|
|
60
|
+
await runZip(['-r', zipPath, '.'], { cwd: sourceDirectory });
|
|
61
|
+
};
|
|
@@ -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-BM9kB7ed.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-Bf2GwfPR.js";import{A as p,F as m,M as h,N as g,R as _,ct as v,j as y}from"./index-CPvAP-jk.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:p.fullPath}),t=r(_()).data,n=p.useSearch().project??null,o=r(m(n)).data;return(0,C.jsxs)(`div`,{className:`space-y-6`,children:[(0,C.jsx)(x,{actions:(0,C.jsxs)(f,{value:h(n),onValueChange:t=>{(0,S.startTransition)(()=>{e({replace:!0,search:e=>g(e,y(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:h(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{N as r}from"./createServerFn-CgRRVpBH.js";import{c as i,n as a,o,r as s}from"./formatters-BM9kB7ed.js";import{t as c}from"./useMutation-CC_B7uy5.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-OO4VU5KR.js";import{r as v,t as y}from"./download-Bf0QJKD3.js";import{t as b}from"./antigravity-keychain-panel-BRHVjFAM.js";import{t as x}from"./scroll-text-fM0sMOB3.js";import{J as S,d as C,g as w,l as T,m as E,p as D,t as O}from"./index-CPvAP-jk.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)(S,{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)(S,{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(C()).data,t=i(T(O.useParams().conversationId)).data,[n,r]=(0,j.useState)(!1),[s,l]=(0,j.useState)(!1),[g,v]=(0,j.useState)(!1),[x,S]=(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:()=>E({data:{conversationId:t.conversation.conversationId}}),onSuccess:e=>{y(e.filename,e.content,`text/markdown; charset=utf-8`)}}),B=c({mutationFn:()=>D({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:S,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{a as t}from"./createServerFn-CgRRVpBH.js";import{t as n}from"./useMutation-CC_B7uy5.js";import{t as r}from"./useQuery-C5By6WKU.js";import{_ as i,h as a}from"./dist-DvMS2965.js";import{J as o,d as s,h as c}from"./index-CPvAP-jk.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(s()).data??null,m=n({mutationFn:()=>c(),onSuccess:t=>{e.setQueryData(s().queryKey,t),Promise.all([e.invalidateQueries({queryKey:s().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)(o,{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{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{N as r}from"./createServerFn-CgRRVpBH.js";import{c as i,n as a,o,r as s}from"./formatters-BM9kB7ed.js";import{t as c}from"./useMutation-CC_B7uy5.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-Dy5cLzTy.js";import{n as v,t as y}from"./antigravity-keychain-panel-BRHVjFAM.js";import{t as b}from"./scroll-text-fM0sMOB3.js";import{J as x,_ as S,d as C,f as w,g as T,m as E,n as D,p as O,r as k,u as A,v as j,y as M}from"./index-CPvAP-jk.js";import{t as N}from"./page-header-Cwa3p6Tl.js";import{t as P}from"./badge-DfWvPfKF.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=j(e)||S(e),a=T(e,r),o=M(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)(x,{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=D.useParams(),t=i(w()).data,n=k(t,e.workspaceKey),r=i(A(n.key)).data,a=i(C()).data??null,[o,s]=(0,L.useState)(``),l=(0,L.useDeferredValue)(o),u=c({mutationFn:e=>E({data:{conversationId:e.conversationId}}),onSuccess:e=>{f(e.filename,e.content,`text/markdown; charset=utf-8`)}}),d=c({mutationFn:e=>O({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{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{n}from"./react-dom-DL96Jor4.js";import{N as r}from"./createServerFn-CgRRVpBH.js";import{c as i,n as a,o,r as s}from"./formatters-BM9kB7ed.js";import{n as c,t as l}from"./data-table-Br78_dk3.js";import{t as u}from"./antigravity-keychain-panel-BRHVjFAM.js";import{f as d}from"./index-CPvAP-jk.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{at as r}from"./index-CPvAP-jk.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{n}from"./react-dom-DL96Jor4.js";import{_ as r,a as i,c as a,h as o,m as s,n as c,r as l,s as u,t as d}from"./dist-DvMS2965.js";var f=r(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),p=e(n(),1);function m(e){let t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var h=t(),g=`Checkbox`,[_,v]=u(g),[y,b]=_(g);function x(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:u,value:d=`on`,internal_do_not_use_render:f}=e,[m,_]=l({prop:n,defaultProp:i??!1,onChange:c,caller:g}),[v,b]=p.useState(null),[x,S]=p.useState(null),C=p.useRef(!1),w=v?!!o||!!v.closest(`form`):!0,T={checked:m,disabled:a,setChecked:_,control:v,setControl:b,name:s,form:o,value:d,hasConsumerStoppedPropagationRef:C,required:u,defaultChecked:A(i)?!1:i,isFormControl:w,bubbleInput:x,setBubbleInput:S};return(0,h.jsx)(y,{scope:t,...T,children:k(f)?f(T):r})}var S=`CheckboxTrigger`,C=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{let{control:c,value:l,disabled:u,checked:d,required:f,setControl:m,setChecked:g,hasConsumerStoppedPropagationRef:_,isFormControl:v,bubbleInput:y}=b(S,e),x=s(o,m),C=p.useRef(d);return p.useEffect(()=>{let e=c?.form;if(e){let t=()=>g(C.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[c,g]),(0,h.jsx)(a.button,{type:`button`,role:`checkbox`,"aria-checked":A(d)?`mixed`:d,"aria-required":f,"data-state":j(d),"data-disabled":u?``:void 0,disabled:u,value:l,...r,ref:x,onKeyDown:i(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:i(n,e=>{g(e=>A(e)?!0:!e),y&&v&&(_.current=e.isPropagationStopped(),_.current||e.stopPropagation())})})});C.displayName=S;var w=p.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,h.jsx)(x,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(C,{...d,ref:t,__scopeCheckbox:n}),e&&(0,h.jsx)(O,{__scopeCheckbox:n})]})})});w.displayName=g;var T=`CheckboxIndicator`,E=p.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,o=b(T,n);return(0,h.jsx)(c,{present:r||A(o.checked)||o.checked===!0,children:(0,h.jsx)(a.span,{"data-state":j(o.checked),"data-disabled":o.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});E.displayName=T;var D=`CheckboxBubbleInput`,O=p.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:o,defaultChecked:c,required:l,disabled:u,name:f,value:g,form:_,bubbleInput:v,setBubbleInput:y}=b(D,e),x=s(n,y),S=m(o),C=d(r);p.useEffect(()=>{let e=v;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(S!==o&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=A(o),n.call(e,A(o)?!1:o),e.dispatchEvent(t)}},[v,S,o,i]);let w=p.useRef(A(o)?!1:o);return(0,h.jsx)(a.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??w.current,required:l,disabled:u,name:f,value:g,form:_,...t,tabIndex:-1,ref:x,style:{...t.style,...C,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});O.displayName=D;function k(e){return typeof e==`function`}function A(e){return e===`indeterminate`}function j(e){return A(e)?`indeterminate`:e?`checked`:`unchecked`}function M({className:e,...t}){return(0,h.jsx)(w,{"data-slot":`checkbox`,className:o(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs outline-none transition-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-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-white dark:bg-input/30 dark:data-[state=checked]:bg-primary dark:data-[state=checked]:text-primary-foreground dark:aria-invalid:ring-destructive/40`,e),...t,children:(0,h.jsx)(E,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:(0,h.jsx)(f,{className:`size-3.5`})})})}export{m as n,f as r,M as t};
|