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,74 @@
|
|
|
1
|
+
import { LoadingPanel } from '#/components/loading-panel';
|
|
2
|
+
import { PageHeader } from '#/components/page-header';
|
|
3
|
+
import { Skeleton } from '#/components/ui/skeleton';
|
|
4
|
+
|
|
5
|
+
const loadingColumns = ['Project', 'Threads', 'Tokens', 'Last updated', 'Models', 'Archived'] as const;
|
|
6
|
+
const loadingRows = ['project-a', 'project-b', 'project-c', 'project-d', 'project-e'] as const;
|
|
7
|
+
|
|
8
|
+
export function ProjectsLoadingState() {
|
|
9
|
+
return (
|
|
10
|
+
<div aria-busy="true" aria-live="polite" className="space-y-6">
|
|
11
|
+
<PageHeader
|
|
12
|
+
actions={<Skeleton className="h-10 w-full min-w-[16rem] max-w-[20rem]" />}
|
|
13
|
+
eyebrow="Inventory"
|
|
14
|
+
subtitle="Reading the local Codex database and checking fallback session files."
|
|
15
|
+
title="Codex"
|
|
16
|
+
/>
|
|
17
|
+
|
|
18
|
+
<div role="status">
|
|
19
|
+
<LoadingPanel
|
|
20
|
+
description="Scanning project summaries. Large local histories can take a moment."
|
|
21
|
+
title="Loading Codex projects"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div className="w-full overflow-x-auto rounded-[1.5rem] border border-[var(--border)] bg-[var(--panel)]">
|
|
26
|
+
<table className="w-full min-w-[56rem]">
|
|
27
|
+
<thead className="bg-[var(--panel-secondary)]">
|
|
28
|
+
<tr className="border-[var(--border)] border-b">
|
|
29
|
+
{loadingColumns.map((column) => (
|
|
30
|
+
<th
|
|
31
|
+
key={column}
|
|
32
|
+
className="h-10 whitespace-nowrap px-4 text-left font-semibold text-[11px] text-[var(--muted-foreground)] uppercase tracking-[0.18em]"
|
|
33
|
+
>
|
|
34
|
+
{column}
|
|
35
|
+
</th>
|
|
36
|
+
))}
|
|
37
|
+
</tr>
|
|
38
|
+
</thead>
|
|
39
|
+
<tbody>
|
|
40
|
+
{loadingRows.map((rowId, rowIndex) => (
|
|
41
|
+
<tr
|
|
42
|
+
key={rowId}
|
|
43
|
+
aria-label={`Loading project row ${rowIndex + 1}`}
|
|
44
|
+
className="border-[var(--border)] border-b last:border-b-0"
|
|
45
|
+
>
|
|
46
|
+
<td className="px-4 py-3">
|
|
47
|
+
<div className="space-y-2">
|
|
48
|
+
<Skeleton aria-hidden className="h-4 w-44" />
|
|
49
|
+
<Skeleton aria-hidden className="h-3 w-20" />
|
|
50
|
+
</div>
|
|
51
|
+
</td>
|
|
52
|
+
<td className="px-4 py-3">
|
|
53
|
+
<Skeleton aria-hidden className="h-4 w-12" />
|
|
54
|
+
</td>
|
|
55
|
+
<td className="px-4 py-3">
|
|
56
|
+
<Skeleton aria-hidden className="h-4 w-16" />
|
|
57
|
+
</td>
|
|
58
|
+
<td className="px-4 py-3">
|
|
59
|
+
<Skeleton aria-hidden className="h-4 w-28" />
|
|
60
|
+
</td>
|
|
61
|
+
<td className="px-4 py-3">
|
|
62
|
+
<Skeleton aria-hidden className="h-4 w-32" />
|
|
63
|
+
</td>
|
|
64
|
+
<td className="px-4 py-3">
|
|
65
|
+
<Skeleton aria-hidden className="h-4 w-10" />
|
|
66
|
+
</td>
|
|
67
|
+
</tr>
|
|
68
|
+
))}
|
|
69
|
+
</tbody>
|
|
70
|
+
</table>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { ProjectSummary } from '@spiracha/lib/codex-browser-types';
|
|
2
|
+
import { Link } from '@tanstack/react-router';
|
|
3
|
+
import { createColumnHelper } from '@tanstack/react-table';
|
|
4
|
+
import { MoreHorizontal, Trash2 } from 'lucide-react';
|
|
5
|
+
import { DataTable } from '#/components/data-table';
|
|
6
|
+
import { Button } from '#/components/ui/button';
|
|
7
|
+
import {
|
|
8
|
+
DropdownMenu,
|
|
9
|
+
DropdownMenuContent,
|
|
10
|
+
DropdownMenuItem,
|
|
11
|
+
DropdownMenuTrigger,
|
|
12
|
+
} from '#/components/ui/dropdown-menu';
|
|
13
|
+
import { formatDateTime, formatList, formatNumber, formatTokens } from '#/lib/formatters';
|
|
14
|
+
|
|
15
|
+
type ProjectsTableProps = {
|
|
16
|
+
projects: ProjectSummary[];
|
|
17
|
+
onDeleteProject: (project: ProjectSummary) => void;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const columnHelper = createColumnHelper<ProjectSummary>();
|
|
21
|
+
|
|
22
|
+
const columns = (onDeleteProject: (project: ProjectSummary) => void) =>
|
|
23
|
+
[
|
|
24
|
+
columnHelper.accessor('name', {
|
|
25
|
+
cell: (info) => (
|
|
26
|
+
<Link
|
|
27
|
+
className="block w-[14rem] max-w-[18rem] space-y-1 rounded-md outline-none transition hover:opacity-80 focus-visible:ring-2 focus-visible:ring-[var(--accent)] lg:w-auto"
|
|
28
|
+
params={{ project: info.row.original.name }}
|
|
29
|
+
to="/codex/$project"
|
|
30
|
+
>
|
|
31
|
+
<p className="font-medium underline-offset-2 hover:underline">{info.getValue()}</p>
|
|
32
|
+
<p className="text-[var(--muted-foreground)] text-xs">
|
|
33
|
+
{formatNumber(info.row.original.cwdPaths.length)} cwd path
|
|
34
|
+
{info.row.original.cwdPaths.length === 1 ? '' : 's'}
|
|
35
|
+
</p>
|
|
36
|
+
</Link>
|
|
37
|
+
),
|
|
38
|
+
header: 'Project',
|
|
39
|
+
}),
|
|
40
|
+
columnHelper.accessor('threadCount', {
|
|
41
|
+
cell: (info) => <span className="font-mono text-sm">{formatNumber(info.getValue())}</span>,
|
|
42
|
+
header: 'Threads',
|
|
43
|
+
}),
|
|
44
|
+
columnHelper.accessor('totalTokens', {
|
|
45
|
+
cell: (info) => <span className="font-mono text-sm">{formatTokens(info.getValue())}</span>,
|
|
46
|
+
header: 'Tokens',
|
|
47
|
+
}),
|
|
48
|
+
columnHelper.accessor('lastUpdatedAtMs', {
|
|
49
|
+
cell: (info) => (
|
|
50
|
+
<span className="text-sm" suppressHydrationWarning>
|
|
51
|
+
{formatDateTime(info.getValue())}
|
|
52
|
+
</span>
|
|
53
|
+
),
|
|
54
|
+
header: 'Last updated',
|
|
55
|
+
}),
|
|
56
|
+
columnHelper.display({
|
|
57
|
+
cell: (info) => (
|
|
58
|
+
<span className="text-[var(--muted-foreground)] text-sm">
|
|
59
|
+
{formatList(info.row.original.modelNames)}
|
|
60
|
+
</span>
|
|
61
|
+
),
|
|
62
|
+
header: 'Models',
|
|
63
|
+
id: 'models',
|
|
64
|
+
}),
|
|
65
|
+
columnHelper.accessor('archivedThreadCount', {
|
|
66
|
+
cell: (info) => <span className="text-sm">{formatNumber(info.getValue())}</span>,
|
|
67
|
+
header: 'Archived',
|
|
68
|
+
}),
|
|
69
|
+
columnHelper.display({
|
|
70
|
+
cell: (info) => (
|
|
71
|
+
<DropdownMenu>
|
|
72
|
+
<DropdownMenuTrigger asChild>
|
|
73
|
+
<Button
|
|
74
|
+
className="rounded-full"
|
|
75
|
+
size="icon"
|
|
76
|
+
type="button"
|
|
77
|
+
variant="ghost"
|
|
78
|
+
onClick={(event) => event.stopPropagation()}
|
|
79
|
+
>
|
|
80
|
+
<MoreHorizontal className="size-4" />
|
|
81
|
+
</Button>
|
|
82
|
+
</DropdownMenuTrigger>
|
|
83
|
+
<DropdownMenuContent align="end">
|
|
84
|
+
<DropdownMenuItem
|
|
85
|
+
className="text-[var(--destructive)]"
|
|
86
|
+
onClick={() => onDeleteProject(info.row.original)}
|
|
87
|
+
>
|
|
88
|
+
<Trash2 className="mr-2 size-4" />
|
|
89
|
+
Delete project
|
|
90
|
+
</DropdownMenuItem>
|
|
91
|
+
</DropdownMenuContent>
|
|
92
|
+
</DropdownMenu>
|
|
93
|
+
),
|
|
94
|
+
header: '',
|
|
95
|
+
id: 'actions',
|
|
96
|
+
}),
|
|
97
|
+
] as const;
|
|
98
|
+
|
|
99
|
+
export function ProjectsTable({ projects, onDeleteProject }: ProjectsTableProps) {
|
|
100
|
+
return (
|
|
101
|
+
<DataTable
|
|
102
|
+
columns={columns(onDeleteProject)}
|
|
103
|
+
data={projects}
|
|
104
|
+
emptyMessage="No projects match the current search."
|
|
105
|
+
initialSorting={[{ desc: true, id: 'lastUpdatedAtMs' }]}
|
|
106
|
+
/>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { QoderSessionSummary } from '@spiracha/lib/qoder-exporter-types';
|
|
2
|
+
import { Link } from '@tanstack/react-router';
|
|
3
|
+
import type { SortingState } from '@tanstack/react-table';
|
|
4
|
+
import { createColumnHelper } from '@tanstack/react-table';
|
|
5
|
+
import { Download, MoreHorizontal } from 'lucide-react';
|
|
6
|
+
import { useMemo } from 'react';
|
|
7
|
+
import { DataTable } from '#/components/data-table';
|
|
8
|
+
import { SelectionActionsToolbar } from '#/components/selection-actions-toolbar';
|
|
9
|
+
import { Button } from '#/components/ui/button';
|
|
10
|
+
import {
|
|
11
|
+
DropdownMenu,
|
|
12
|
+
DropdownMenuContent,
|
|
13
|
+
DropdownMenuItem,
|
|
14
|
+
DropdownMenuTrigger,
|
|
15
|
+
} from '#/components/ui/dropdown-menu';
|
|
16
|
+
import { formatDateTime, formatNumber } from '#/lib/formatters';
|
|
17
|
+
|
|
18
|
+
type QoderSessionsTableProps = {
|
|
19
|
+
onExportSession: (session: QoderSessionSummary) => void;
|
|
20
|
+
onExportSessions: (sessionIds: string[]) => void;
|
|
21
|
+
sessions: QoderSessionSummary[];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const columnHelper = createColumnHelper<QoderSessionSummary>();
|
|
25
|
+
const defaultSorting: SortingState = [{ desc: true, id: 'lastActive' }];
|
|
26
|
+
|
|
27
|
+
const columns = (onExportSession: (session: QoderSessionSummary) => void) =>
|
|
28
|
+
[
|
|
29
|
+
columnHelper.accessor('title', {
|
|
30
|
+
cell: (info) => (
|
|
31
|
+
<Link
|
|
32
|
+
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"
|
|
33
|
+
params={{ sessionId: info.row.original.sessionId }}
|
|
34
|
+
to="/qoder-sessions/$sessionId"
|
|
35
|
+
>
|
|
36
|
+
<p className="truncate font-medium underline-offset-2 hover:underline">{info.getValue()}</p>
|
|
37
|
+
<p className="truncate text-[var(--muted-foreground)] text-xs">{info.row.original.sessionId}</p>
|
|
38
|
+
</Link>
|
|
39
|
+
),
|
|
40
|
+
header: 'Session',
|
|
41
|
+
}),
|
|
42
|
+
columnHelper.accessor('lastActiveAtMs', {
|
|
43
|
+
cell: (info) => (
|
|
44
|
+
<span className="whitespace-nowrap text-sm" suppressHydrationWarning>
|
|
45
|
+
{formatDateTime(info.getValue())}
|
|
46
|
+
</span>
|
|
47
|
+
),
|
|
48
|
+
header: 'Updated',
|
|
49
|
+
id: 'lastActive',
|
|
50
|
+
}),
|
|
51
|
+
columnHelper.accessor('status', {
|
|
52
|
+
cell: (info) => <span className="font-mono text-sm">{info.getValue() ?? 'unknown'}</span>,
|
|
53
|
+
header: 'Status',
|
|
54
|
+
}),
|
|
55
|
+
columnHelper.accessor('model', {
|
|
56
|
+
cell: (info) => <span className="font-mono text-sm">{info.getValue() ?? 'unknown'}</span>,
|
|
57
|
+
header: 'Model',
|
|
58
|
+
}),
|
|
59
|
+
columnHelper.accessor('messageCount', {
|
|
60
|
+
cell: (info) => <span className="font-mono text-sm">{formatNumber(info.getValue())}</span>,
|
|
61
|
+
header: 'Prompts',
|
|
62
|
+
}),
|
|
63
|
+
columnHelper.accessor('fileOperationCount', {
|
|
64
|
+
cell: (info) => <span className="font-mono text-sm">{formatNumber(info.getValue())}</span>,
|
|
65
|
+
header: 'File ops',
|
|
66
|
+
}),
|
|
67
|
+
columnHelper.accessor('snapshotFileCount', {
|
|
68
|
+
cell: (info) => <span className="font-mono text-sm">{formatNumber(info.getValue())}</span>,
|
|
69
|
+
header: 'Snapshots',
|
|
70
|
+
}),
|
|
71
|
+
columnHelper.accessor('executionMode', {
|
|
72
|
+
cell: (info) => <span className="font-mono text-sm">{info.getValue() ?? 'unknown'}</span>,
|
|
73
|
+
header: 'Mode',
|
|
74
|
+
}),
|
|
75
|
+
columnHelper.display({
|
|
76
|
+
cell: (info) => (
|
|
77
|
+
<DropdownMenu>
|
|
78
|
+
<DropdownMenuTrigger asChild>
|
|
79
|
+
<Button
|
|
80
|
+
aria-label={`Actions for ${info.row.original.title}`}
|
|
81
|
+
className="rounded-full"
|
|
82
|
+
size="icon"
|
|
83
|
+
type="button"
|
|
84
|
+
variant="ghost"
|
|
85
|
+
onClick={(event) => event.stopPropagation()}
|
|
86
|
+
>
|
|
87
|
+
<MoreHorizontal className="size-4" />
|
|
88
|
+
</Button>
|
|
89
|
+
</DropdownMenuTrigger>
|
|
90
|
+
<DropdownMenuContent align="end">
|
|
91
|
+
<DropdownMenuItem
|
|
92
|
+
disabled={info.row.original.renderablePartCount === 0}
|
|
93
|
+
onClick={() => onExportSession(info.row.original)}
|
|
94
|
+
>
|
|
95
|
+
<Download className="mr-2 size-4" />
|
|
96
|
+
Export session
|
|
97
|
+
</DropdownMenuItem>
|
|
98
|
+
</DropdownMenuContent>
|
|
99
|
+
</DropdownMenu>
|
|
100
|
+
),
|
|
101
|
+
enableSorting: false,
|
|
102
|
+
header: '',
|
|
103
|
+
id: 'actions',
|
|
104
|
+
}),
|
|
105
|
+
] as const;
|
|
106
|
+
|
|
107
|
+
export const QoderSessionsTable = ({ onExportSession, onExportSessions, sessions }: QoderSessionsTableProps) => {
|
|
108
|
+
const tableColumns = useMemo(() => columns(onExportSession), [onExportSession]);
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<DataTable
|
|
112
|
+
columns={tableColumns}
|
|
113
|
+
data={sessions}
|
|
114
|
+
emptyMessage="No Qoder sessions match the current workspace filter."
|
|
115
|
+
enableRowSelection
|
|
116
|
+
getRowId={(row) => row.sessionId}
|
|
117
|
+
initialSorting={defaultSorting}
|
|
118
|
+
renderToolbar={({ clearSelection, selectedRows }) => {
|
|
119
|
+
const selectedSessionIds = selectedRows.map((row) => row.sessionId);
|
|
120
|
+
const hasEmptySelection = selectedRows.some((row) => row.renderablePartCount === 0);
|
|
121
|
+
return (
|
|
122
|
+
<SelectionActionsToolbar
|
|
123
|
+
clearSelection={clearSelection}
|
|
124
|
+
exportDisabled={hasEmptySelection}
|
|
125
|
+
itemLabel="session"
|
|
126
|
+
selectedCount={selectedRows.length}
|
|
127
|
+
onExportSelected={() => onExportSessions(selectedSessionIds)}
|
|
128
|
+
/>
|
|
129
|
+
);
|
|
130
|
+
}}
|
|
131
|
+
/>
|
|
132
|
+
);
|
|
133
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { QoderWorkspaceGroup } from '@spiracha/lib/qoder-exporter-types';
|
|
2
|
+
import { Link } from '@tanstack/react-router';
|
|
3
|
+
import { createColumnHelper } from '@tanstack/react-table';
|
|
4
|
+
import { DataTable } from '#/components/data-table';
|
|
5
|
+
import { formatDateTime, formatNumber } from '#/lib/formatters';
|
|
6
|
+
|
|
7
|
+
type QoderWorkspacesTableProps = {
|
|
8
|
+
workspaces: QoderWorkspaceGroup[];
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const columnHelper = createColumnHelper<QoderWorkspaceGroup>();
|
|
12
|
+
|
|
13
|
+
const columns = [
|
|
14
|
+
columnHelper.accessor('label', {
|
|
15
|
+
cell: (info) => (
|
|
16
|
+
<Link
|
|
17
|
+
className="block w-[16rem] max-w-[22rem] space-y-1 rounded-md outline-none transition hover:opacity-80 focus-visible:ring-2 focus-visible:ring-[var(--accent)] lg:w-auto"
|
|
18
|
+
params={{ workspaceKey: info.row.original.key }}
|
|
19
|
+
to="/qoder/$workspaceKey"
|
|
20
|
+
>
|
|
21
|
+
<p className="truncate font-medium underline-offset-2 hover:underline">{info.getValue()}</p>
|
|
22
|
+
<p className="truncate text-[var(--muted-foreground)] text-xs">{info.row.original.worktree}</p>
|
|
23
|
+
</Link>
|
|
24
|
+
),
|
|
25
|
+
header: 'Workspace',
|
|
26
|
+
}),
|
|
27
|
+
columnHelper.accessor('sessionCount', {
|
|
28
|
+
cell: (info) => <span className="font-mono text-sm">{formatNumber(info.getValue())}</span>,
|
|
29
|
+
header: 'Sessions',
|
|
30
|
+
}),
|
|
31
|
+
columnHelper.accessor('messageCount', {
|
|
32
|
+
cell: (info) => <span className="font-mono text-sm">{formatNumber(info.getValue())}</span>,
|
|
33
|
+
header: 'Prompts',
|
|
34
|
+
}),
|
|
35
|
+
columnHelper.accessor('fileOperationCount', {
|
|
36
|
+
cell: (info) => <span className="font-mono text-sm">{formatNumber(info.getValue())}</span>,
|
|
37
|
+
header: 'File ops',
|
|
38
|
+
}),
|
|
39
|
+
columnHelper.accessor('snapshotFileCount', {
|
|
40
|
+
cell: (info) => <span className="font-mono text-sm">{formatNumber(info.getValue())}</span>,
|
|
41
|
+
header: 'Snapshots',
|
|
42
|
+
}),
|
|
43
|
+
columnHelper.accessor('lastActiveAtMs', {
|
|
44
|
+
cell: (info) => (
|
|
45
|
+
<span className="whitespace-nowrap text-sm" suppressHydrationWarning>
|
|
46
|
+
{formatDateTime(info.getValue())}
|
|
47
|
+
</span>
|
|
48
|
+
),
|
|
49
|
+
header: 'Last active',
|
|
50
|
+
}),
|
|
51
|
+
] as const;
|
|
52
|
+
|
|
53
|
+
export const QoderWorkspacesTable = ({ workspaces }: QoderWorkspacesTableProps) => {
|
|
54
|
+
return (
|
|
55
|
+
<DataTable columns={columns} data={workspaces} emptyMessage="No Qoder workspaces match the current search." />
|
|
56
|
+
);
|
|
57
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { DashboardRecentThread } from '@spiracha/lib/codex-browser-types';
|
|
2
|
+
import { Link } from '@tanstack/react-router';
|
|
3
|
+
import { formatDateTime, formatTokens } from '#/lib/formatters';
|
|
4
|
+
|
|
5
|
+
type RecentThreadsListProps = {
|
|
6
|
+
threads: DashboardRecentThread[];
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export function RecentThreadsList({ threads }: RecentThreadsListProps) {
|
|
10
|
+
return (
|
|
11
|
+
<div className="mt-4 space-y-2">
|
|
12
|
+
{threads.map(({ project, thread }) => (
|
|
13
|
+
<article
|
|
14
|
+
key={thread.id}
|
|
15
|
+
className="grid min-w-0 grid-cols-[minmax(0,1fr)_7.5rem] gap-3 rounded-xl border border-[var(--border)] bg-[var(--panel-secondary)] p-3.5 transition-colors hover:border-[var(--accent)]/30 hover:bg-[var(--accent-muted)]"
|
|
16
|
+
>
|
|
17
|
+
<div className="min-w-0">
|
|
18
|
+
<Link
|
|
19
|
+
className="block min-w-0 rounded-md outline-none transition hover:opacity-80 focus-visible:ring-2 focus-visible:ring-[var(--accent)]"
|
|
20
|
+
params={{ threadId: thread.id }}
|
|
21
|
+
to="/threads/$threadId"
|
|
22
|
+
>
|
|
23
|
+
<p className="truncate font-medium text-sm underline-offset-2 hover:underline">
|
|
24
|
+
{thread.title}
|
|
25
|
+
</p>
|
|
26
|
+
<p className="mt-0.5 line-clamp-1 text-[var(--muted-foreground)] text-xs">
|
|
27
|
+
{thread.preview}
|
|
28
|
+
</p>
|
|
29
|
+
</Link>
|
|
30
|
+
<div className="mt-2 flex min-w-0 flex-wrap gap-3 text-[var(--muted-foreground)] text-xs">
|
|
31
|
+
<Link
|
|
32
|
+
className="max-w-[14rem] truncate font-medium text-[var(--accent)] underline-offset-2 hover:underline"
|
|
33
|
+
params={{ project }}
|
|
34
|
+
to="/codex/$project"
|
|
35
|
+
>
|
|
36
|
+
{project}
|
|
37
|
+
</Link>
|
|
38
|
+
<span className="font-mono">{thread.model ?? 'unknown model'}</span>
|
|
39
|
+
<span>{formatTokens(thread.tokens_used)}</span>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<p
|
|
43
|
+
className="justify-self-end whitespace-nowrap text-right font-mono text-[var(--muted-foreground)] text-xs"
|
|
44
|
+
suppressHydrationWarning
|
|
45
|
+
>
|
|
46
|
+
{formatDateTime(thread.updated_at_ms ?? thread.updated_at * 1000)}
|
|
47
|
+
</p>
|
|
48
|
+
</article>
|
|
49
|
+
))}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type ReloadErrorPanelProps = {
|
|
2
|
+
description: string;
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export function ReloadErrorPanel({ description, title }: ReloadErrorPanelProps) {
|
|
7
|
+
return (
|
|
8
|
+
<div className="rounded-xl border border-[var(--border)] bg-[var(--panel)] px-6 py-10 text-center">
|
|
9
|
+
<p className="font-medium text-[var(--destructive)] text-sm">{title}</p>
|
|
10
|
+
<p className="mt-2 text-[var(--muted-foreground)] text-sm">{description}</p>
|
|
11
|
+
<button
|
|
12
|
+
className="mt-4 text-[var(--accent)] text-sm underline-offset-2 hover:underline"
|
|
13
|
+
type="button"
|
|
14
|
+
onClick={() => window.location.reload()}
|
|
15
|
+
>
|
|
16
|
+
Reload
|
|
17
|
+
</button>
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Download, Trash2, X } from 'lucide-react';
|
|
2
|
+
import { Button } from '#/components/ui/button';
|
|
3
|
+
|
|
4
|
+
type SelectionActionsToolbarProps = {
|
|
5
|
+
clearSelection: () => void;
|
|
6
|
+
deleteDisabled?: boolean;
|
|
7
|
+
exportDisabled?: boolean;
|
|
8
|
+
itemLabel: string;
|
|
9
|
+
onDeleteSelected?: () => void;
|
|
10
|
+
onExportSelected?: () => void;
|
|
11
|
+
selectedCount: number;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const pluralize = (count: number, itemLabel: string) => `${itemLabel}${count === 1 ? '' : 's'}`;
|
|
15
|
+
|
|
16
|
+
export const SelectionActionsToolbar = ({
|
|
17
|
+
clearSelection,
|
|
18
|
+
deleteDisabled = false,
|
|
19
|
+
exportDisabled = false,
|
|
20
|
+
itemLabel,
|
|
21
|
+
onDeleteSelected,
|
|
22
|
+
onExportSelected,
|
|
23
|
+
selectedCount,
|
|
24
|
+
}: SelectionActionsToolbarProps) => {
|
|
25
|
+
if (selectedCount === 0) {
|
|
26
|
+
const actions = [onExportSelected ? 'export' : null, onDeleteSelected ? 'delete' : null].filter(Boolean);
|
|
27
|
+
const actionText =
|
|
28
|
+
actions.length === 2
|
|
29
|
+
? `${actions[0]} or ${actions[1]} them in a batch`
|
|
30
|
+
: actions.length === 1
|
|
31
|
+
? `${actions[0]} them in a batch`
|
|
32
|
+
: 'manage them in a batch';
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<p className="text-[var(--muted-foreground)] text-sm">
|
|
36
|
+
Select {pluralize(2, itemLabel)} to {actionText}.
|
|
37
|
+
</p>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
|
|
43
|
+
<p className="text-sm">
|
|
44
|
+
{selectedCount} {pluralize(selectedCount, itemLabel)} selected
|
|
45
|
+
</p>
|
|
46
|
+
<div className="flex flex-wrap gap-2">
|
|
47
|
+
{onExportSelected ? (
|
|
48
|
+
<Button
|
|
49
|
+
className="rounded-full"
|
|
50
|
+
disabled={exportDisabled}
|
|
51
|
+
size="sm"
|
|
52
|
+
type="button"
|
|
53
|
+
variant="outline"
|
|
54
|
+
onClick={onExportSelected}
|
|
55
|
+
>
|
|
56
|
+
<Download className="mr-2 size-4" />
|
|
57
|
+
Export selected {pluralize(selectedCount, itemLabel)}
|
|
58
|
+
</Button>
|
|
59
|
+
) : null}
|
|
60
|
+
{onDeleteSelected ? (
|
|
61
|
+
<Button
|
|
62
|
+
className="rounded-full border-[var(--destructive)]/20 text-[var(--destructive)]"
|
|
63
|
+
disabled={deleteDisabled}
|
|
64
|
+
size="sm"
|
|
65
|
+
type="button"
|
|
66
|
+
variant="outline"
|
|
67
|
+
onClick={onDeleteSelected}
|
|
68
|
+
>
|
|
69
|
+
<Trash2 className="mr-2 size-4" />
|
|
70
|
+
Delete selected {pluralize(selectedCount, itemLabel)}
|
|
71
|
+
</Button>
|
|
72
|
+
) : null}
|
|
73
|
+
<Button className="rounded-full" size="sm" type="button" variant="ghost" onClick={clearSelection}>
|
|
74
|
+
<X className="mr-2 size-4" />
|
|
75
|
+
Clear selection
|
|
76
|
+
</Button>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type TextDocumentPanelProps = {
|
|
2
|
+
content: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
title: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const TextDocumentPanel = ({ content, description, title }: TextDocumentPanelProps) => {
|
|
8
|
+
return (
|
|
9
|
+
<section className="rounded-[1.6rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]">
|
|
10
|
+
<h3 className="font-semibold text-[var(--muted-foreground)] text-sm uppercase tracking-[0.18em]">
|
|
11
|
+
{title}
|
|
12
|
+
</h3>
|
|
13
|
+
{description ? <p className="mt-2 text-[var(--muted-foreground)] text-sm">{description}</p> : null}
|
|
14
|
+
<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]">
|
|
15
|
+
{content}
|
|
16
|
+
</pre>
|
|
17
|
+
</section>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Moon, Sun } from 'lucide-react';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { Button } from '#/components/ui/button';
|
|
4
|
+
|
|
5
|
+
type ThemeMode = 'dark' | 'light';
|
|
6
|
+
|
|
7
|
+
const getPreferredTheme = (): ThemeMode => {
|
|
8
|
+
if (typeof window === 'undefined') {
|
|
9
|
+
return 'light';
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const applyTheme = (mode: ThemeMode) => {
|
|
16
|
+
document.documentElement.classList.toggle('dark', mode === 'dark');
|
|
17
|
+
document.documentElement.classList.toggle('light', mode === 'light');
|
|
18
|
+
document.documentElement.style.colorScheme = mode;
|
|
19
|
+
window.localStorage.setItem('spiracha-theme', mode);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export function ThemeToggle() {
|
|
23
|
+
const [theme, setTheme] = useState<ThemeMode>('light');
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
const storedTheme = window.localStorage.getItem('spiracha-theme');
|
|
27
|
+
const nextTheme = storedTheme === 'dark' || storedTheme === 'light' ? storedTheme : getPreferredTheme();
|
|
28
|
+
setTheme(nextTheme);
|
|
29
|
+
applyTheme(nextTheme);
|
|
30
|
+
}, []);
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<Button
|
|
34
|
+
aria-label="Toggle color theme"
|
|
35
|
+
className="h-9 rounded-full border border-[var(--border)] bg-[var(--panel)] px-3 text-[var(--panel-foreground)] shadow-none"
|
|
36
|
+
size="sm"
|
|
37
|
+
type="button"
|
|
38
|
+
variant="ghost"
|
|
39
|
+
onClick={() => {
|
|
40
|
+
const nextTheme = theme === 'light' ? 'dark' : 'light';
|
|
41
|
+
setTheme(nextTheme);
|
|
42
|
+
applyTheme(nextTheme);
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
{theme === 'light' ? <Moon className="size-4" /> : <Sun className="size-4" />}
|
|
46
|
+
</Button>
|
|
47
|
+
);
|
|
48
|
+
}
|