spiracha 1.5.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 +114 -205
- package/README.md +89 -269
- package/apps/ui/AGENTS.md +17 -7
- package/apps/ui/README.md +34 -8
- package/apps/ui/components.json +21 -0
- package/apps/ui/package.json +65 -0
- 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 +46 -73
- 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/codex-analytics.ts +1 -1
- package/src/lib/codex-browser-db.ts +410 -74
- package/src/lib/codex-browser-export.ts +6 -14
- package/src/lib/codex-browser-types.ts +1 -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/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/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/apps/ui/dist/client/assets/_threadId-CAIeH5mq.js +0 -1
- package/apps/ui/dist/client/assets/analytics-DOy1b6Sh.js +0 -1
- package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-DqySVO2K.js +0 -7
- package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-KAcXtNxI.js +0 -1
- package/apps/ui/dist/client/assets/antigravity-keychain-panel-B77qJz6f.js +0 -1
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-B3NM6gRH.js +0 -1
- package/apps/ui/dist/client/assets/antigravity._workspaceKey-ByitGWki.js +0 -1
- package/apps/ui/dist/client/assets/antigravity.index-DP9JC2P9.js +0 -1
- package/apps/ui/dist/client/assets/antigravity.index-DgW25FEV.js +0 -1
- package/apps/ui/dist/client/assets/badge-C3i4OKs8.js +0 -1
- package/apps/ui/dist/client/assets/checkbox-CdHitXWQ.js +0 -1
- package/apps/ui/dist/client/assets/claude-code-sessions._sessionId-8pQ55ci2.js +0 -1
- package/apps/ui/dist/client/assets/claude-code-sessions._sessionId-DVz5UmtU.js +0 -1
- package/apps/ui/dist/client/assets/claude-code._workspaceKey-BBKskSum.js +0 -1
- package/apps/ui/dist/client/assets/claude-code._workspaceKey-OkikMUFs.js +0 -1
- package/apps/ui/dist/client/assets/claude-code.index-Cwu76dbb.js +0 -1
- package/apps/ui/dist/client/assets/claude-code.index-D6eMd08t.js +0 -1
- package/apps/ui/dist/client/assets/createServerFn-B-KkwmHU.js +0 -3
- package/apps/ui/dist/client/assets/cursor-threads._composerId-CmBFclK8.js +0 -1
- package/apps/ui/dist/client/assets/cursor-threads._composerId-hBWlP1D-.js +0 -1
- package/apps/ui/dist/client/assets/cursor._workspaceKey-BFPkIRi-.js +0 -1
- package/apps/ui/dist/client/assets/cursor._workspaceKey-CaAZjGmm.js +0 -1
- package/apps/ui/dist/client/assets/cursor.index-8y4o20kb.js +0 -2
- package/apps/ui/dist/client/assets/cursor.index-CrnMwDCi.js +0 -1
- package/apps/ui/dist/client/assets/data-table-Br78_dk3.js +0 -4
- package/apps/ui/dist/client/assets/delete-confirm-dialog-Bxs07u-j.js +0 -7
- package/apps/ui/dist/client/assets/dist-B9pyYCVU.js +0 -1
- package/apps/ui/dist/client/assets/dist-BrJhN2A0.js +0 -5
- package/apps/ui/dist/client/assets/dist-Cmd3AIfD.js +0 -1
- package/apps/ui/dist/client/assets/dist-DvMS2965.js +0 -1
- package/apps/ui/dist/client/assets/download-Bf0QJKD3.js +0 -1
- package/apps/ui/dist/client/assets/dropdown-menu-D5cvPaZt.js +0 -1
- package/apps/ui/dist/client/assets/es2015-ad6040dw.js +0 -41
- package/apps/ui/dist/client/assets/export-dialog-Dr8d2MqD.js +0 -1
- package/apps/ui/dist/client/assets/formatters-BtqyrX_c.js +0 -1
- package/apps/ui/dist/client/assets/index-C-STgIH4.js +0 -166
- package/apps/ui/dist/client/assets/jsx-runtime-DGeXAQPT.js +0 -1
- package/apps/ui/dist/client/assets/kiro-sessions._sessionId-CKgfJ7GR.js +0 -1
- package/apps/ui/dist/client/assets/kiro-sessions._sessionId-zvIJHtQF.js +0 -1
- package/apps/ui/dist/client/assets/kiro._workspaceKey-DhVuJuZB.js +0 -1
- package/apps/ui/dist/client/assets/kiro._workspaceKey-QArsjkTY.js +0 -1
- package/apps/ui/dist/client/assets/kiro.index-C-fr4m7i.js +0 -1
- package/apps/ui/dist/client/assets/kiro.index-OYgAdtZd.js +0 -1
- package/apps/ui/dist/client/assets/metric-card-Dplm0ZiM.js +0 -1
- package/apps/ui/dist/client/assets/opencode-sessions._sessionId-DLjiTst-.js +0 -1
- package/apps/ui/dist/client/assets/opencode-sessions._sessionId-biBwrRbt.js +0 -8
- package/apps/ui/dist/client/assets/opencode._workspaceKey-C7OIzMOJ.js +0 -1
- package/apps/ui/dist/client/assets/opencode._workspaceKey-sBakX0oI.js +0 -1
- package/apps/ui/dist/client/assets/opencode.index-Bl_kNs9N.js +0 -1
- package/apps/ui/dist/client/assets/opencode.index-CN53bVmb.js +0 -1
- package/apps/ui/dist/client/assets/page-header-Cwa3p6Tl.js +0 -1
- package/apps/ui/dist/client/assets/preload-helper-B8fFrdxC.js +0 -1
- package/apps/ui/dist/client/assets/projects._project-D8WloxQN.js +0 -1
- package/apps/ui/dist/client/assets/projects._project-DSDwH4NF.js +0 -1
- package/apps/ui/dist/client/assets/projects.index-5xRtuJdX.js +0 -3
- package/apps/ui/dist/client/assets/projects.index-DEfhWqa8.js +0 -1
- package/apps/ui/dist/client/assets/react-dom-DL96Jor4.js +0 -1
- package/apps/ui/dist/client/assets/refresh-ccw-BgKjOiA6.js +0 -1
- package/apps/ui/dist/client/assets/reload-error-panel-AHqu0akK.js +0 -1
- package/apps/ui/dist/client/assets/routes-DnzF_9CX.js +0 -1
- package/apps/ui/dist/client/assets/scroll-text-fM0sMOB3.js +0 -1
- package/apps/ui/dist/client/assets/select-CYF6pF37.js +0 -1
- package/apps/ui/dist/client/assets/settings-Dx70jgP_.js +0 -1
- package/apps/ui/dist/client/assets/sqlite-error-B6uZjUe8.js +0 -1
- package/apps/ui/dist/client/assets/styles-B7Zi9EFA.css +0 -1
- package/apps/ui/dist/client/assets/tabs-CmuhkT-c.js +0 -7
- package/apps/ui/dist/client/assets/text-filter-DVAZySUS.js +0 -2
- package/apps/ui/dist/client/assets/thread-transcript-stats-BUNz6u7F.js +0 -1
- package/apps/ui/dist/client/assets/threads._threadId-BB9tTsV4.js +0 -1
- package/apps/ui/dist/client/assets/threads._threadId-BMRSFow3.js +0 -1
- package/apps/ui/dist/client/assets/useMutation-BSFult2i.js +0 -1
- package/apps/ui/dist/client/assets/useQuery-CjINKZf1.js +0 -1
- package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-CQ8Jjs3B.js +0 -387
- package/apps/ui/dist/server/assets/_threadId-B6SrBR9E.js +0 -6
- package/apps/ui/dist/server/assets/analytics-CYP_LT5Y.js +0 -16
- package/apps/ui/dist/server/assets/analytics-CtpOMVMO.js +0 -146
- package/apps/ui/dist/server/assets/antigravity-conversation-state-HgzS302O.js +0 -16
- package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-BKOyL2T6.js +0 -613
- package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-D426O-64.js +0 -11
- package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-eS87Dx7g.js +0 -20
- package/apps/ui/dist/server/assets/antigravity-db-Bh8_U9uw.js +0 -580
- package/apps/ui/dist/server/assets/antigravity-keychain-DOiuHDwK.js +0 -126
- package/apps/ui/dist/server/assets/antigravity-keychain-panel-CC7FLmAK.js +0 -55
- package/apps/ui/dist/server/assets/antigravity-queries-CGrJO9Vr.js +0 -37
- package/apps/ui/dist/server/assets/antigravity-server-CHRjVFqN.js +0 -114
- package/apps/ui/dist/server/assets/antigravity._workspaceKey-3m_MzNFA.js +0 -11
- package/apps/ui/dist/server/assets/antigravity._workspaceKey-B0QeYUOh.js +0 -28
- package/apps/ui/dist/server/assets/antigravity._workspaceKey-C3kP-qyN.js +0 -210
- package/apps/ui/dist/server/assets/antigravity.index-CPCYkqCi.js +0 -104
- package/apps/ui/dist/server/assets/antigravity.index-DudTB3Tq.js +0 -11
- package/apps/ui/dist/server/assets/badge-EvdhKK_Z.js +0 -26
- package/apps/ui/dist/server/assets/button-CmTDnzOn.js +0 -46
- package/apps/ui/dist/server/assets/checkbox-C0hovF41.js +0 -19
- package/apps/ui/dist/server/assets/claude-code-db-Ik3VStKZ.js +0 -361
- package/apps/ui/dist/server/assets/claude-code-queries-Cgzi4K-e.js +0 -37
- package/apps/ui/dist/server/assets/claude-code-server-PfraClXS.js +0 -72
- package/apps/ui/dist/server/assets/claude-code-sessions._sessionId-C55oe6zj.js +0 -18
- package/apps/ui/dist/server/assets/claude-code-sessions._sessionId-D1RYYi3j.js +0 -473
- package/apps/ui/dist/server/assets/claude-code-sessions._sessionId-DSvPLEUL.js +0 -11
- package/apps/ui/dist/server/assets/claude-code-transcript-C-bxh3cS.js +0 -139
- package/apps/ui/dist/server/assets/claude-code-transcript-phase-DmUMc8VU.js +0 -10
- package/apps/ui/dist/server/assets/claude-code._workspaceKey-B5Xg_-tE.js +0 -28
- package/apps/ui/dist/server/assets/claude-code._workspaceKey-BPlzyXPa.js +0 -11
- package/apps/ui/dist/server/assets/claude-code._workspaceKey-DqDve2wl.js +0 -191
- package/apps/ui/dist/server/assets/claude-code.index-B7yYR7dD.js +0 -92
- package/apps/ui/dist/server/assets/claude-code.index-BUHThG1W.js +0 -11
- package/apps/ui/dist/server/assets/codex-queries-CtgeZ7VL.js +0 -99
- package/apps/ui/dist/server/assets/codex-server-CGXU4H8-.js +0 -2294
- package/apps/ui/dist/server/assets/concurrency-VXtYvlGh.js +0 -18
- package/apps/ui/dist/server/assets/createServerRpc-CF_DEwnm.js +0 -12
- package/apps/ui/dist/server/assets/createSsrRpc-C754NPki.js +0 -16
- package/apps/ui/dist/server/assets/cursor-db-CZnYy7aT.js +0 -830
- package/apps/ui/dist/server/assets/cursor-exporter-types-CI3goo-c.js +0 -34
- package/apps/ui/dist/server/assets/cursor-queries-NCIM0Nat.js +0 -67
- package/apps/ui/dist/server/assets/cursor-recovery-CXpO8KcD.js +0 -361
- package/apps/ui/dist/server/assets/cursor-server-DNu52A3K.js +0 -213
- package/apps/ui/dist/server/assets/cursor-threads._composerId-BB0Y_Mao.js +0 -11
- package/apps/ui/dist/server/assets/cursor-threads._composerId-Ckn6ItHI.js +0 -582
- package/apps/ui/dist/server/assets/cursor-threads._composerId-p9-ARAzc.js +0 -18
- package/apps/ui/dist/server/assets/cursor-transcript-B7tGnqtn.js +0 -125
- package/apps/ui/dist/server/assets/cursor._workspaceKey-CZuohIUL.js +0 -28
- package/apps/ui/dist/server/assets/cursor._workspaceKey-DPp5JSjy.js +0 -401
- package/apps/ui/dist/server/assets/cursor._workspaceKey-nmg3YIOQ.js +0 -11
- package/apps/ui/dist/server/assets/cursor.index-CcsX7DG0.js +0 -11
- package/apps/ui/dist/server/assets/cursor.index-DkWT-mxw.js +0 -189
- package/apps/ui/dist/server/assets/data-table-Cdct823O.js +0 -189
- package/apps/ui/dist/server/assets/delete-confirm-dialog-BcBNCxWB.js +0 -144
- package/apps/ui/dist/server/assets/download-DMmiy1xf.js +0 -92
- package/apps/ui/dist/server/assets/dropdown-menu-Dy_9t6TN.js +0 -36
- package/apps/ui/dist/server/assets/empty-plugin-adapters-B3lHh1La.js +0 -5
- package/apps/ui/dist/server/assets/export-dialog-D88ze9Gy.js +0 -240
- package/apps/ui/dist/server/assets/formatters-FJaGZgJk.js +0 -91
- package/apps/ui/dist/server/assets/kiro-db--fXrED_-.js +0 -552
- package/apps/ui/dist/server/assets/kiro-queries-CzNlM2ok.js +0 -37
- package/apps/ui/dist/server/assets/kiro-server-9WRxg2Au.js +0 -72
- package/apps/ui/dist/server/assets/kiro-sessions._sessionId-CRY2c7YO.js +0 -11
- package/apps/ui/dist/server/assets/kiro-sessions._sessionId-F1UlwxmR.js +0 -449
- package/apps/ui/dist/server/assets/kiro-sessions._sessionId-bvTulT7C.js +0 -18
- package/apps/ui/dist/server/assets/kiro-transcript-DoekQBaH.js +0 -112
- package/apps/ui/dist/server/assets/kiro-transcript-phase-CJG40nQg.js +0 -27
- package/apps/ui/dist/server/assets/kiro._workspaceKey-BDe9sQwo.js +0 -11
- package/apps/ui/dist/server/assets/kiro._workspaceKey-CJsjgNwO.js +0 -28
- package/apps/ui/dist/server/assets/kiro._workspaceKey-D_-4Qb7y.js +0 -193
- package/apps/ui/dist/server/assets/kiro.index-C__-UROk.js +0 -11
- package/apps/ui/dist/server/assets/kiro.index-CmTbqeYj.js +0 -93
- package/apps/ui/dist/server/assets/loading-panel-BGFnWseS.js +0 -27
- package/apps/ui/dist/server/assets/metric-card-ByEeLu0r.js +0 -23
- package/apps/ui/dist/server/assets/model-label-B1NWGc65.js +0 -13
- package/apps/ui/dist/server/assets/opencode-db-BM7KjOzc.js +0 -397
- package/apps/ui/dist/server/assets/opencode-queries-BeNYXnQv.js +0 -50
- package/apps/ui/dist/server/assets/opencode-server-BpQ_kRze.js +0 -72
- package/apps/ui/dist/server/assets/opencode-sessions._sessionId-CGQ-t0vD.js +0 -518
- package/apps/ui/dist/server/assets/opencode-sessions._sessionId-D8Q7in_Z.js +0 -18
- package/apps/ui/dist/server/assets/opencode-sessions._sessionId-DKOvi0lV.js +0 -11
- package/apps/ui/dist/server/assets/opencode-think-tags-CAoD-EcZ.js +0 -87
- package/apps/ui/dist/server/assets/opencode-transcript-BNTcGNym.js +0 -141
- package/apps/ui/dist/server/assets/opencode-transcript-phase-OqLkiQD0.js +0 -32
- package/apps/ui/dist/server/assets/opencode._workspaceKey-BdqcWHw1.js +0 -11
- package/apps/ui/dist/server/assets/opencode._workspaceKey-CfH96HTT.js +0 -28
- package/apps/ui/dist/server/assets/opencode._workspaceKey-DdbHPDrO.js +0 -207
- package/apps/ui/dist/server/assets/opencode.index-BbVzkJXP.js +0 -11
- package/apps/ui/dist/server/assets/opencode.index-Vh_Gq_1L.js +0 -93
- package/apps/ui/dist/server/assets/page-header-VNSaM3xd.js +0 -29
- package/apps/ui/dist/server/assets/path-transforms-DL2IwtYd.js +0 -31
- package/apps/ui/dist/server/assets/projects._project-4io5LO0E.js +0 -20
- package/apps/ui/dist/server/assets/projects._project-Bshqk7JA.js +0 -12
- package/apps/ui/dist/server/assets/projects._project-D6ZoGhJ8.js +0 -395
- package/apps/ui/dist/server/assets/projects.index-BLXOx5eL.js +0 -12
- package/apps/ui/dist/server/assets/projects.index-BkLiF2FF.js +0 -182
- package/apps/ui/dist/server/assets/projects.index-DesYXwfi.js +0 -14
- package/apps/ui/dist/server/assets/reload-error-panel-BJMxY3U1.js +0 -25
- package/apps/ui/dist/server/assets/route-search-ts4W9MJ9.js +0 -38
- package/apps/ui/dist/server/assets/router-Sac2DGk6.js +0 -518
- package/apps/ui/dist/server/assets/routes-Bsact1uB.js +0 -184
- package/apps/ui/dist/server/assets/routes-BzkJgq4W.js +0 -34
- package/apps/ui/dist/server/assets/select-GW76p-ld.js +0 -76
- package/apps/ui/dist/server/assets/settings-OayxIYQQ.js +0 -100
- package/apps/ui/dist/server/assets/settings-store-DpEJEQ7M.js +0 -52
- package/apps/ui/dist/server/assets/shared-DyhChtHf.js +0 -137
- package/apps/ui/dist/server/assets/source-session-export-server-DNutCawb.js +0 -38
- package/apps/ui/dist/server/assets/sqlite-error-LZDrnxdd.js +0 -13
- package/apps/ui/dist/server/assets/start-B_HFwkkk.js +0 -4
- package/apps/ui/dist/server/assets/tabs-DkaChNVg.js +0 -501
- package/apps/ui/dist/server/assets/text-filter-CGKxMCKt.js +0 -36
- package/apps/ui/dist/server/assets/thread-transcript-stats-Dh34mt2u.js +0 -45
- package/apps/ui/dist/server/assets/threads._threadId-BSSK4nkI.js +0 -26
- package/apps/ui/dist/server/assets/threads._threadId-BeXEc4Lo.js +0 -648
- package/apps/ui/dist/server/assets/threads._threadId-Ci0S4mKU.js +0 -18
- package/apps/ui/dist/server/assets/ui-export-files-BHLX9bhN.js +0 -83
- package/apps/ui/dist/server/assets/utils-C_uf36nf.js +0 -8
- package/apps/ui/dist/server/server.js +0 -5895
- package/bin/codex-chats-claude.js +0 -5
- package/bin/codex-chats.js +0 -5
- package/bin/spiracha.js +0 -5
- package/src/export-chats.ts +0 -120
- package/src/export-claude.ts +0 -36
- package/src/export-cursor.ts +0 -244
- package/src/lib/claude-exporter.ts +0 -864
- package/src/lib/codex-exporter-cli.ts +0 -277
- package/src/lib/codex-exporter-db.ts +0 -319
- package/src/lib/codex-exporter.ts +0 -115
- package/src/lib/cursor-exporter.ts +0 -266
- package/src/lib/interactive-cli.ts +0 -433
- package/src/lib/native-open.ts +0 -54
- package/src/mcp-server.ts +0 -137
- package/src/spiracha.ts +0 -116
- package/src/ui-cli.ts +0 -310
- /package/apps/ui/{dist/client → public}/icon.svg +0 -0
- /package/apps/ui/{dist/client → public}/manifest.json +0 -0
- /package/apps/ui/{dist/client → public}/robots.txt +0 -0
|
@@ -1,518 +0,0 @@
|
|
|
1
|
-
import { t as Button } from "./button-CmTDnzOn.js";
|
|
2
|
-
import { i as exportOpenCodeSessionFn, t as openCodeSessionDetailQueryOptions } from "./opencode-queries-BeNYXnQv.js";
|
|
3
|
-
import { t as Route } from "./opencode-sessions._sessionId-D8Q7in_Z.js";
|
|
4
|
-
import { t as Checkbox } from "./checkbox-C0hovF41.js";
|
|
5
|
-
import { t as MetricCard } from "./metric-card-ByEeLu0r.js";
|
|
6
|
-
import { t as PageHeader } from "./page-header-VNSaM3xd.js";
|
|
7
|
-
import { i as formatList, o as formatNumber, r as formatDateTime, s as formatTokens } from "./formatters-FJaGZgJk.js";
|
|
8
|
-
import { a as TranscriptView, c as Breadcrumbs, i as TabsTrigger, n as TabsContent, o as MetadataSection, r as TabsList, s as JsonPanel, t as Tabs } from "./tabs-DkaChNVg.js";
|
|
9
|
-
import { n as downloadUrlFile, t as downloadTextFile } from "./download-DMmiy1xf.js";
|
|
10
|
-
import { t as ExportDialog } from "./export-dialog-D88ze9Gy.js";
|
|
11
|
-
import { t as getThreadTranscriptStats } from "./thread-transcript-stats-Dh34mt2u.js";
|
|
12
|
-
import { t as splitOpenCodeThinkTaggedText } from "./opencode-think-tags-CAoD-EcZ.js";
|
|
13
|
-
import { n as getOpenCodeTextPartPhase, t as getFinalOpenCodeAssistantTextPartIds } from "./opencode-transcript-phase-OqLkiQD0.js";
|
|
14
|
-
import { useMemo, useState } from "react";
|
|
15
|
-
import { Link } from "@tanstack/react-router";
|
|
16
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
-
import { useMutation, useSuspenseQuery } from "@tanstack/react-query";
|
|
18
|
-
import { Download } from "lucide-react";
|
|
19
|
-
//#region src/lib/opencode-transcript-events.ts
|
|
20
|
-
var toTimestamp = (value) => {
|
|
21
|
-
if (value === null || value === void 0 || !Number.isFinite(value)) return null;
|
|
22
|
-
return new Date(value).toISOString();
|
|
23
|
-
};
|
|
24
|
-
var buildRaw = (part, eventType) => ({
|
|
25
|
-
eventType,
|
|
26
|
-
messageId: part.messageId,
|
|
27
|
-
partId: part.partId,
|
|
28
|
-
role: part.role,
|
|
29
|
-
source: "opencode_part",
|
|
30
|
-
type: part.type,
|
|
31
|
-
...part.raw
|
|
32
|
-
});
|
|
33
|
-
var buildMessageEvent = (part, sequence, text, phase) => ({
|
|
34
|
-
isHiddenByDefault: part.role !== "assistant" && part.role !== "user",
|
|
35
|
-
kind: "message",
|
|
36
|
-
memoryCitation: null,
|
|
37
|
-
model: null,
|
|
38
|
-
phase,
|
|
39
|
-
raw: buildRaw(part, "message"),
|
|
40
|
-
role: part.role,
|
|
41
|
-
sequence,
|
|
42
|
-
text,
|
|
43
|
-
timestamp: toTimestamp(part.createdAtMs),
|
|
44
|
-
variant: part.role === "user" ? "user_message" : part.role === "assistant" ? "agent_message" : "message"
|
|
45
|
-
});
|
|
46
|
-
var buildReasoningEventFromText = (part, sequence, textValue) => {
|
|
47
|
-
const text = textValue?.trim();
|
|
48
|
-
if (!text) return null;
|
|
49
|
-
return {
|
|
50
|
-
content: text,
|
|
51
|
-
hasEncryptedContent: false,
|
|
52
|
-
kind: "reasoning",
|
|
53
|
-
raw: buildRaw(part, "reasoning"),
|
|
54
|
-
sequence,
|
|
55
|
-
summary: [text],
|
|
56
|
-
timestamp: toTimestamp(part.createdAtMs)
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
var buildReasoningEvent = (part, sequence) => {
|
|
60
|
-
const { reasoningBlocks, visibleText } = splitOpenCodeThinkTaggedText(part.text ?? "");
|
|
61
|
-
return buildReasoningEventFromText(part, sequence, [...reasoningBlocks, visibleText].filter(Boolean).join("\n\n"));
|
|
62
|
-
};
|
|
63
|
-
var buildToolCallCommand = (part) => {
|
|
64
|
-
const toolName = part.toolName ?? "unknown";
|
|
65
|
-
if (!part.argumentsText?.trim()) return toolName;
|
|
66
|
-
return `${toolName}\n${part.argumentsText}`;
|
|
67
|
-
};
|
|
68
|
-
var buildToolCallEvent = (part, sequence) => ({
|
|
69
|
-
argumentsParseFailed: false,
|
|
70
|
-
argumentsText: part.argumentsText ?? null,
|
|
71
|
-
callId: part.callId ?? null,
|
|
72
|
-
command: buildToolCallCommand(part),
|
|
73
|
-
kind: "tool_call",
|
|
74
|
-
name: part.toolName ?? "unknown",
|
|
75
|
-
raw: buildRaw(part, "tool_call"),
|
|
76
|
-
sequence,
|
|
77
|
-
timestamp: toTimestamp(part.createdAtMs),
|
|
78
|
-
workdir: null
|
|
79
|
-
});
|
|
80
|
-
var buildToolOutputEvent = (part, sequence) => {
|
|
81
|
-
const outputText = part.outputText?.trim();
|
|
82
|
-
if (!outputText) return null;
|
|
83
|
-
return {
|
|
84
|
-
callId: part.callId ?? null,
|
|
85
|
-
exitCode: null,
|
|
86
|
-
kind: "tool_output",
|
|
87
|
-
outputText,
|
|
88
|
-
raw: buildRaw(part, "tool_output"),
|
|
89
|
-
sequence,
|
|
90
|
-
summary: outputText,
|
|
91
|
-
timestamp: toTimestamp(part.createdAtMs),
|
|
92
|
-
wallTime: null
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
var buildStepStartedEvent = (part, sequence) => ({
|
|
96
|
-
collaborationModeKind: null,
|
|
97
|
-
kind: "task_started",
|
|
98
|
-
modelContextWindow: null,
|
|
99
|
-
raw: buildRaw(part, "step_start"),
|
|
100
|
-
sequence,
|
|
101
|
-
startedAt: part.startTimeMs ?? part.createdAtMs,
|
|
102
|
-
timestamp: toTimestamp(part.createdAtMs),
|
|
103
|
-
turnId: part.messageId
|
|
104
|
-
});
|
|
105
|
-
var buildStepCompleteEvent = (part, sequence) => ({
|
|
106
|
-
completedAt: part.endTimeMs ?? part.updatedAtMs,
|
|
107
|
-
durationMs: part.startTimeMs && part.endTimeMs ? part.endTimeMs - part.startTimeMs : null,
|
|
108
|
-
kind: "task_complete",
|
|
109
|
-
lastAgentMessage: part.reason ?? null,
|
|
110
|
-
raw: buildRaw(part, "step_finish"),
|
|
111
|
-
sequence,
|
|
112
|
-
timestamp: toTimestamp(part.updatedAtMs),
|
|
113
|
-
timeToFirstTokenMs: null,
|
|
114
|
-
turnId: part.messageId
|
|
115
|
-
});
|
|
116
|
-
var flattenParts = (transcript) => {
|
|
117
|
-
return transcript.messages.flatMap((message) => message.parts);
|
|
118
|
-
};
|
|
119
|
-
var textPartToEvents = (part, sequence, finalAssistantTextPartIds) => {
|
|
120
|
-
const { reasoningBlocks, visibleText } = part.role === "assistant" ? splitOpenCodeThinkTaggedText(part.text ?? "") : {
|
|
121
|
-
reasoningBlocks: [],
|
|
122
|
-
visibleText: part.text ?? ""
|
|
123
|
-
};
|
|
124
|
-
const events = [];
|
|
125
|
-
if (part.role === "assistant") events.push(...reasoningBlocks.map((block, index) => buildReasoningEventFromText(part, sequence + index, block)).filter((event) => event !== null));
|
|
126
|
-
const text = visibleText.trim();
|
|
127
|
-
if (!text) return events;
|
|
128
|
-
const messageSequence = sequence + events.length;
|
|
129
|
-
const phase = getOpenCodeTextPartPhase(part, finalAssistantTextPartIds);
|
|
130
|
-
events.push(buildMessageEvent(part, messageSequence, text, phase));
|
|
131
|
-
return events;
|
|
132
|
-
};
|
|
133
|
-
var toolPartToEvents = (part, sequence) => {
|
|
134
|
-
const output = buildToolOutputEvent(part, sequence + 1);
|
|
135
|
-
return [buildToolCallEvent(part, sequence), output].filter((event) => event !== null);
|
|
136
|
-
};
|
|
137
|
-
var partToEvents = (part, sequence, finalAssistantTextPartIds) => {
|
|
138
|
-
if (part.type === "text") return textPartToEvents(part, sequence, finalAssistantTextPartIds);
|
|
139
|
-
if (part.type === "reasoning") {
|
|
140
|
-
const event = buildReasoningEvent(part, sequence);
|
|
141
|
-
return event ? [event] : [];
|
|
142
|
-
}
|
|
143
|
-
if (part.type === "tool") return toolPartToEvents(part, sequence);
|
|
144
|
-
if (part.type === "step-start") return [buildStepStartedEvent(part, sequence)];
|
|
145
|
-
if (part.type === "step-finish") return [buildStepCompleteEvent(part, sequence)];
|
|
146
|
-
return [];
|
|
147
|
-
};
|
|
148
|
-
var openCodeTranscriptToThreadEvents = (transcript) => {
|
|
149
|
-
const parts = flattenParts(transcript);
|
|
150
|
-
const finalAssistantTextPartIds = getFinalOpenCodeAssistantTextPartIds(parts);
|
|
151
|
-
const events = [];
|
|
152
|
-
let sequence = 0;
|
|
153
|
-
for (const part of parts) {
|
|
154
|
-
const partEvents = partToEvents(part, sequence, finalAssistantTextPartIds);
|
|
155
|
-
events.push(...partEvents);
|
|
156
|
-
sequence += Math.max(partEvents.length, 1);
|
|
157
|
-
}
|
|
158
|
-
return events;
|
|
159
|
-
};
|
|
160
|
-
var getOpenCodeThreadTranscriptStats = (events) => {
|
|
161
|
-
return getThreadTranscriptStats(events);
|
|
162
|
-
};
|
|
163
|
-
//#endregion
|
|
164
|
-
//#region src/routes/opencode-sessions.$sessionId.tsx?tsr-split=component
|
|
165
|
-
var buildSessionMetadata = (detail) => [
|
|
166
|
-
{
|
|
167
|
-
label: "Session ID",
|
|
168
|
-
value: /* @__PURE__ */ jsx("span", {
|
|
169
|
-
"data-mono": "true",
|
|
170
|
-
children: detail.session.sessionId
|
|
171
|
-
})
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
label: "Workspace",
|
|
175
|
-
value: /* @__PURE__ */ jsx(Link, {
|
|
176
|
-
className: "text-[var(--accent)]",
|
|
177
|
-
params: { workspaceKey: detail.session.workspaceKey },
|
|
178
|
-
to: "/opencode/$workspaceKey",
|
|
179
|
-
children: detail.session.workspaceLabel
|
|
180
|
-
})
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
label: "Worktree",
|
|
184
|
-
value: detail.session.worktree
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
label: "Directory",
|
|
188
|
-
value: detail.session.directory
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
label: "Slug",
|
|
192
|
-
value: detail.session.slug
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
label: "Agent",
|
|
196
|
-
value: detail.session.agent ?? "unknown"
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
label: "Model",
|
|
200
|
-
value: detail.session.modelLabel ?? "unknown"
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
label: "Created",
|
|
204
|
-
value: /* @__PURE__ */ jsx("span", {
|
|
205
|
-
suppressHydrationWarning: true,
|
|
206
|
-
children: formatDateTime(detail.session.createdAtMs)
|
|
207
|
-
})
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
label: "Updated",
|
|
211
|
-
value: /* @__PURE__ */ jsx("span", {
|
|
212
|
-
suppressHydrationWarning: true,
|
|
213
|
-
children: formatDateTime(detail.session.lastUpdatedAtMs)
|
|
214
|
-
})
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
label: "Archived",
|
|
218
|
-
value: /* @__PURE__ */ jsx("span", {
|
|
219
|
-
suppressHydrationWarning: true,
|
|
220
|
-
children: formatDateTime(detail.session.archivedAtMs)
|
|
221
|
-
})
|
|
222
|
-
}
|
|
223
|
-
];
|
|
224
|
-
var buildTranscriptStatsItems = (detail, events, stats) => [
|
|
225
|
-
{
|
|
226
|
-
label: "Event kinds",
|
|
227
|
-
value: formatList([...new Set(events.map((event) => event.kind))])
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
label: "Messages",
|
|
231
|
-
value: formatNumber(stats.messageCount)
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
label: "User messages",
|
|
235
|
-
value: formatNumber(stats.userMessageCount)
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
label: "Assistant messages",
|
|
239
|
-
value: formatNumber(stats.assistantMessageCount)
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
label: "Reasoning events",
|
|
243
|
-
value: formatNumber(events.filter((event) => event.kind === "reasoning").length)
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
label: "Final answers",
|
|
247
|
-
value: formatNumber(stats.finalAnswerCount)
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
label: "Tool calls",
|
|
251
|
-
value: formatNumber(stats.toolCallCount)
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
label: "Tool outputs",
|
|
255
|
-
value: formatNumber(stats.toolOutputCount)
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
label: "Renderable parts",
|
|
259
|
-
value: formatNumber(detail.renderablePartCount)
|
|
260
|
-
}
|
|
261
|
-
];
|
|
262
|
-
var OpenCodeTranscriptControls = ({ rawJsonDisabled = false, showCommentary, showExtraEvents, showRawJson, showToolCalls, showUserMessages, onShowCommentaryChange, onShowExtraEventsChange, onShowRawJsonChange, onShowToolCallsChange, onShowUserMessagesChange }) => {
|
|
263
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
264
|
-
className: "flex flex-wrap gap-4 rounded-xl border border-[var(--border)] bg-[var(--panel)] px-4 py-3 shadow-[var(--panel-shadow)]",
|
|
265
|
-
children: [
|
|
266
|
-
/* @__PURE__ */ jsxs("div", {
|
|
267
|
-
className: "flex items-center gap-2 text-sm",
|
|
268
|
-
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
269
|
-
checked: showToolCalls,
|
|
270
|
-
id: "opencode-transcript-show-tool-calls",
|
|
271
|
-
onCheckedChange: (checked) => onShowToolCallsChange(checked === true)
|
|
272
|
-
}), /* @__PURE__ */ jsx("label", {
|
|
273
|
-
htmlFor: "opencode-transcript-show-tool-calls",
|
|
274
|
-
children: "Show tool calls"
|
|
275
|
-
})]
|
|
276
|
-
}),
|
|
277
|
-
/* @__PURE__ */ jsxs("div", {
|
|
278
|
-
className: "flex items-center gap-2 text-sm",
|
|
279
|
-
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
280
|
-
checked: showCommentary,
|
|
281
|
-
id: "opencode-transcript-show-commentary",
|
|
282
|
-
onCheckedChange: (checked) => onShowCommentaryChange(checked === true)
|
|
283
|
-
}), /* @__PURE__ */ jsx("label", {
|
|
284
|
-
htmlFor: "opencode-transcript-show-commentary",
|
|
285
|
-
children: "Show commentary"
|
|
286
|
-
})]
|
|
287
|
-
}),
|
|
288
|
-
/* @__PURE__ */ jsxs("div", {
|
|
289
|
-
className: "flex items-center gap-2 text-sm",
|
|
290
|
-
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
291
|
-
checked: showExtraEvents,
|
|
292
|
-
id: "opencode-transcript-show-extra-events",
|
|
293
|
-
onCheckedChange: (checked) => onShowExtraEventsChange(checked === true)
|
|
294
|
-
}), /* @__PURE__ */ jsx("label", {
|
|
295
|
-
htmlFor: "opencode-transcript-show-extra-events",
|
|
296
|
-
children: "Show extra events"
|
|
297
|
-
})]
|
|
298
|
-
}),
|
|
299
|
-
/* @__PURE__ */ jsxs("div", {
|
|
300
|
-
className: "flex items-center gap-2 text-sm",
|
|
301
|
-
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
302
|
-
checked: showRawJson,
|
|
303
|
-
disabled: rawJsonDisabled,
|
|
304
|
-
id: "opencode-transcript-show-raw-json",
|
|
305
|
-
onCheckedChange: (checked) => onShowRawJsonChange(checked === true)
|
|
306
|
-
}), /* @__PURE__ */ jsx("label", {
|
|
307
|
-
htmlFor: "opencode-transcript-show-raw-json",
|
|
308
|
-
children: "Raw JSON"
|
|
309
|
-
})]
|
|
310
|
-
}),
|
|
311
|
-
/* @__PURE__ */ jsxs("div", {
|
|
312
|
-
className: "flex items-center gap-2 text-sm",
|
|
313
|
-
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
314
|
-
checked: showUserMessages,
|
|
315
|
-
id: "opencode-transcript-show-user-messages",
|
|
316
|
-
onCheckedChange: (checked) => onShowUserMessagesChange(checked === true)
|
|
317
|
-
}), /* @__PURE__ */ jsx("label", {
|
|
318
|
-
htmlFor: "opencode-transcript-show-user-messages",
|
|
319
|
-
children: "User"
|
|
320
|
-
})]
|
|
321
|
-
})
|
|
322
|
-
]
|
|
323
|
-
});
|
|
324
|
-
};
|
|
325
|
-
var OpenCodeRawPanels = ({ detail, events }) => {
|
|
326
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
327
|
-
className: "space-y-4",
|
|
328
|
-
children: [
|
|
329
|
-
/* @__PURE__ */ jsx(JsonPanel, {
|
|
330
|
-
title: "Session summary",
|
|
331
|
-
value: detail.session
|
|
332
|
-
}),
|
|
333
|
-
/* @__PURE__ */ jsx(JsonPanel, {
|
|
334
|
-
title: "OpenCode messages",
|
|
335
|
-
value: detail.messages
|
|
336
|
-
}),
|
|
337
|
-
/* @__PURE__ */ jsx(JsonPanel, {
|
|
338
|
-
title: "Transcript events",
|
|
339
|
-
value: events
|
|
340
|
-
})
|
|
341
|
-
]
|
|
342
|
-
});
|
|
343
|
-
};
|
|
344
|
-
var OpenCodeSessionDetailPage = () => {
|
|
345
|
-
const detail = useSuspenseQuery(openCodeSessionDetailQueryOptions(Route.useParams().sessionId)).data;
|
|
346
|
-
const [pendingExport, setPendingExport] = useState(false);
|
|
347
|
-
const [showToolCalls, setShowToolCalls] = useState(false);
|
|
348
|
-
const [showCommentary, setShowCommentary] = useState(false);
|
|
349
|
-
const [showExtraEvents, setShowExtraEvents] = useState(false);
|
|
350
|
-
const [showRawJson, setShowRawJson] = useState(false);
|
|
351
|
-
const [showUserMessages, setShowUserMessages] = useState(true);
|
|
352
|
-
const transcriptEvents = useMemo(() => openCodeTranscriptToThreadEvents(detail), [detail]);
|
|
353
|
-
const transcriptStats = useMemo(() => getOpenCodeThreadTranscriptStats(transcriptEvents), [transcriptEvents]);
|
|
354
|
-
const exportSessionMutation = useMutation({
|
|
355
|
-
mutationFn: async (options) => {
|
|
356
|
-
const download = await exportOpenCodeSessionFn({ data: {
|
|
357
|
-
includeCommentary: options.includeCommentary,
|
|
358
|
-
includeMetadata: options.includeMetadata,
|
|
359
|
-
includeTools: options.includeTools,
|
|
360
|
-
outputFormat: options.outputFormat,
|
|
361
|
-
sessionId: detail.session.sessionId,
|
|
362
|
-
zipArchive: options.zipArchive
|
|
363
|
-
} });
|
|
364
|
-
if (download.mode === "download") {
|
|
365
|
-
downloadTextFile(download.fileName, download.content, download.mimeType);
|
|
366
|
-
return;
|
|
367
|
-
}
|
|
368
|
-
await downloadUrlFile(download.fileName, download.downloadUrl);
|
|
369
|
-
},
|
|
370
|
-
onSuccess: () => {
|
|
371
|
-
setPendingExport(false);
|
|
372
|
-
}
|
|
373
|
-
});
|
|
374
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
375
|
-
className: "space-y-6",
|
|
376
|
-
children: [
|
|
377
|
-
/* @__PURE__ */ jsx(PageHeader, {
|
|
378
|
-
actions: /* @__PURE__ */ jsxs(Button, {
|
|
379
|
-
className: "rounded-full",
|
|
380
|
-
type: "button",
|
|
381
|
-
variant: "outline",
|
|
382
|
-
onClick: () => setPendingExport(true),
|
|
383
|
-
children: [/* @__PURE__ */ jsx(Download, { className: "mr-2 size-4" }), "Export"]
|
|
384
|
-
}),
|
|
385
|
-
breadcrumb: /* @__PURE__ */ jsx(Breadcrumbs, { items: [
|
|
386
|
-
{
|
|
387
|
-
label: "OpenCode",
|
|
388
|
-
to: "/opencode"
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
label: detail.session.workspaceLabel,
|
|
392
|
-
params: { workspaceKey: detail.session.workspaceKey },
|
|
393
|
-
to: "/opencode/$workspaceKey"
|
|
394
|
-
},
|
|
395
|
-
{ label: detail.session.title }
|
|
396
|
-
] }),
|
|
397
|
-
eyebrow: "OpenCode session",
|
|
398
|
-
subtitle: "Session detail for the selected OpenCode project conversation.",
|
|
399
|
-
title: detail.session.title
|
|
400
|
-
}),
|
|
401
|
-
/* @__PURE__ */ jsxs("div", {
|
|
402
|
-
className: "grid gap-3 md:grid-cols-2 xl:grid-cols-4",
|
|
403
|
-
children: [
|
|
404
|
-
/* @__PURE__ */ jsx(MetricCard, {
|
|
405
|
-
label: "Messages",
|
|
406
|
-
value: formatNumber(detail.session.messageCount)
|
|
407
|
-
}),
|
|
408
|
-
/* @__PURE__ */ jsx(MetricCard, {
|
|
409
|
-
label: "Parts",
|
|
410
|
-
value: formatNumber(detail.partCount)
|
|
411
|
-
}),
|
|
412
|
-
/* @__PURE__ */ jsx(MetricCard, {
|
|
413
|
-
label: "Tool calls",
|
|
414
|
-
value: formatNumber(detail.session.toolPartCount)
|
|
415
|
-
}),
|
|
416
|
-
/* @__PURE__ */ jsx(MetricCard, {
|
|
417
|
-
label: "Tokens",
|
|
418
|
-
value: formatTokens(detail.session.totalTokens)
|
|
419
|
-
})
|
|
420
|
-
]
|
|
421
|
-
}),
|
|
422
|
-
/* @__PURE__ */ jsxs(Tabs, {
|
|
423
|
-
className: "space-y-4",
|
|
424
|
-
defaultValue: "transcript",
|
|
425
|
-
children: [
|
|
426
|
-
/* @__PURE__ */ jsxs(TabsList, {
|
|
427
|
-
className: "grid w-fit min-w-[24rem] grid-cols-3 rounded-full border border-[var(--border)] bg-[var(--panel)] p-1",
|
|
428
|
-
children: [
|
|
429
|
-
/* @__PURE__ */ jsx(TabsTrigger, {
|
|
430
|
-
className: "rounded-full px-5 text-sm",
|
|
431
|
-
value: "transcript",
|
|
432
|
-
children: "Transcript"
|
|
433
|
-
}),
|
|
434
|
-
/* @__PURE__ */ jsx(TabsTrigger, {
|
|
435
|
-
className: "rounded-full px-5 text-sm",
|
|
436
|
-
value: "metadata",
|
|
437
|
-
children: "Metadata"
|
|
438
|
-
}),
|
|
439
|
-
/* @__PURE__ */ jsx(TabsTrigger, {
|
|
440
|
-
className: "rounded-full px-5 text-sm",
|
|
441
|
-
value: "raw",
|
|
442
|
-
children: "Raw"
|
|
443
|
-
})
|
|
444
|
-
]
|
|
445
|
-
}),
|
|
446
|
-
/* @__PURE__ */ jsxs(TabsContent, {
|
|
447
|
-
className: "space-y-3",
|
|
448
|
-
value: "transcript",
|
|
449
|
-
children: [/* @__PURE__ */ jsx(OpenCodeTranscriptControls, {
|
|
450
|
-
rawJsonDisabled: transcriptEvents.length === 0,
|
|
451
|
-
showCommentary,
|
|
452
|
-
showExtraEvents,
|
|
453
|
-
showRawJson,
|
|
454
|
-
showToolCalls,
|
|
455
|
-
showUserMessages,
|
|
456
|
-
onShowCommentaryChange: setShowCommentary,
|
|
457
|
-
onShowExtraEventsChange: setShowExtraEvents,
|
|
458
|
-
onShowRawJsonChange: setShowRawJson,
|
|
459
|
-
onShowToolCallsChange: setShowToolCalls,
|
|
460
|
-
onShowUserMessagesChange: setShowUserMessages
|
|
461
|
-
}), transcriptEvents.length > 0 ? /* @__PURE__ */ jsx(TranscriptView, {
|
|
462
|
-
assistantModel: detail.session.modelLabel,
|
|
463
|
-
events: transcriptEvents,
|
|
464
|
-
projectPath: detail.session.worktree,
|
|
465
|
-
showCommentary,
|
|
466
|
-
showExtraEvents,
|
|
467
|
-
showRawJson,
|
|
468
|
-
showToolCalls,
|
|
469
|
-
showUserMessages
|
|
470
|
-
}) : /* @__PURE__ */ jsxs("section", {
|
|
471
|
-
className: "rounded-[1.6rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]",
|
|
472
|
-
children: [/* @__PURE__ */ jsx("h3", {
|
|
473
|
-
className: "font-semibold text-[var(--muted-foreground)] text-sm uppercase tracking-[0.18em]",
|
|
474
|
-
children: "Transcript"
|
|
475
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
476
|
-
className: "mt-4 text-[var(--muted-foreground)] text-sm",
|
|
477
|
-
children: "No renderable OpenCode transcript content was found for this session."
|
|
478
|
-
})]
|
|
479
|
-
})]
|
|
480
|
-
}),
|
|
481
|
-
/* @__PURE__ */ jsx(TabsContent, {
|
|
482
|
-
value: "metadata",
|
|
483
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
484
|
-
className: "grid gap-4 xl:grid-cols-[0.95fr_1.05fr]",
|
|
485
|
-
children: [/* @__PURE__ */ jsx(MetadataSection, {
|
|
486
|
-
items: buildSessionMetadata(detail),
|
|
487
|
-
title: "Session metadata"
|
|
488
|
-
}), /* @__PURE__ */ jsx(MetadataSection, {
|
|
489
|
-
items: buildTranscriptStatsItems(detail, transcriptEvents, transcriptStats),
|
|
490
|
-
title: "Transcript stats"
|
|
491
|
-
})]
|
|
492
|
-
})
|
|
493
|
-
}),
|
|
494
|
-
/* @__PURE__ */ jsx(TabsContent, {
|
|
495
|
-
value: "raw",
|
|
496
|
-
children: /* @__PURE__ */ jsx(OpenCodeRawPanels, {
|
|
497
|
-
detail,
|
|
498
|
-
events: transcriptEvents
|
|
499
|
-
})
|
|
500
|
-
})
|
|
501
|
-
]
|
|
502
|
-
}),
|
|
503
|
-
/* @__PURE__ */ jsx(ExportDialog, {
|
|
504
|
-
errorMessage: exportSessionMutation.isError ? exportSessionMutation.error instanceof Error ? exportSessionMutation.error.message : "Export failed" : null,
|
|
505
|
-
open: pendingExport,
|
|
506
|
-
pending: exportSessionMutation.isPending,
|
|
507
|
-
title: `Export ${detail.session.title}`,
|
|
508
|
-
onExport: (options) => exportSessionMutation.mutate(options),
|
|
509
|
-
onOpenChange: (open) => {
|
|
510
|
-
setPendingExport(open);
|
|
511
|
-
if (!open) exportSessionMutation.reset();
|
|
512
|
-
}
|
|
513
|
-
})
|
|
514
|
-
]
|
|
515
|
-
});
|
|
516
|
-
};
|
|
517
|
-
//#endregion
|
|
518
|
-
export { OpenCodeSessionDetailPage as component };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { t as openCodeSessionDetailQueryOptions } from "./opencode-queries-BeNYXnQv.js";
|
|
2
|
-
import { t as LoadingPanel } from "./loading-panel-BGFnWseS.js";
|
|
3
|
-
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
//#region src/routes/opencode-sessions.$sessionId.tsx
|
|
6
|
-
var $$splitErrorComponentImporter = () => import("./opencode-sessions._sessionId-DKOvi0lV.js");
|
|
7
|
-
var $$splitComponentImporter = () => import("./opencode-sessions._sessionId-CGQ-t0vD.js");
|
|
8
|
-
var Route = createFileRoute("/opencode-sessions/$sessionId")({
|
|
9
|
-
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
10
|
-
errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent"),
|
|
11
|
-
loader: ({ context, params }) => context.queryClient.ensureQueryData(openCodeSessionDetailQueryOptions(params.sessionId)),
|
|
12
|
-
pendingComponent: () => /* @__PURE__ */ jsx(LoadingPanel, {
|
|
13
|
-
description: "Loading the OpenCode transcript, parts, and session metadata.",
|
|
14
|
-
title: "Loading session"
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
//#endregion
|
|
18
|
-
export { Route as t };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { t as ReloadErrorPanel } from "./reload-error-panel-BJMxY3U1.js";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
//#region src/routes/opencode-sessions.$sessionId.tsx?tsr-split=errorComponent
|
|
4
|
-
var OpenCodeSessionDetailErrorComponent = ({ error }) => {
|
|
5
|
-
return /* @__PURE__ */ jsx(ReloadErrorPanel, {
|
|
6
|
-
description: error.message,
|
|
7
|
-
title: "Failed to load OpenCode session"
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { OpenCodeSessionDetailErrorComponent as errorComponent };
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
//#region ../../src/lib/opencode-think-tags.ts
|
|
2
|
-
var THINK_OPEN_PATTERN = /<think\b[^>]*>/iy;
|
|
3
|
-
var THINK_CLOSE_PATTERN = /<\/think>/gi;
|
|
4
|
-
var THINK_CLOSE_TAG_LENGTH = 8;
|
|
5
|
-
var normalizeExtractedText = (text) => {
|
|
6
|
-
return text.replace(/\n{3,}/g, "\n\n").trim();
|
|
7
|
-
};
|
|
8
|
-
var getBacktickRunLength = (text, start) => {
|
|
9
|
-
let end = start;
|
|
10
|
-
while (text[end] === "`") end += 1;
|
|
11
|
-
return end - start;
|
|
12
|
-
};
|
|
13
|
-
var findClosingBackticks = (text, start, runLength) => {
|
|
14
|
-
const marker = "`".repeat(runLength);
|
|
15
|
-
const index = text.indexOf(marker, start + runLength);
|
|
16
|
-
return index === -1 ? text.length : index + runLength;
|
|
17
|
-
};
|
|
18
|
-
var findThinkCloseIndex = (text, start) => {
|
|
19
|
-
THINK_CLOSE_PATTERN.lastIndex = start;
|
|
20
|
-
const match = THINK_CLOSE_PATTERN.exec(text);
|
|
21
|
-
return match ? match.index : -1;
|
|
22
|
-
};
|
|
23
|
-
var getLastVisibleChar = (parts) => {
|
|
24
|
-
for (let index = parts.length - 1; index >= 0; index -= 1) {
|
|
25
|
-
const part = parts[index];
|
|
26
|
-
if (part) return part.at(-1) ?? "";
|
|
27
|
-
}
|
|
28
|
-
return "";
|
|
29
|
-
};
|
|
30
|
-
var getThinkReplacement = (previous, next) => {
|
|
31
|
-
if (previous === "\n" || next === "\n") return "\n";
|
|
32
|
-
if (previous && /\s/u.test(previous) || next && /\s/u.test(next)) return "";
|
|
33
|
-
return " ";
|
|
34
|
-
};
|
|
35
|
-
var shouldSkipFollowingSpace = (replacement, previous, next) => {
|
|
36
|
-
return (replacement === " " || Boolean(previous && /[^\S\n]/u.test(previous))) && /[^\S\n]/u.test(next);
|
|
37
|
-
};
|
|
38
|
-
var readThinkBlock = (text, cursor, visibleParts) => {
|
|
39
|
-
THINK_OPEN_PATTERN.lastIndex = cursor;
|
|
40
|
-
if (THINK_OPEN_PATTERN.exec(text)?.index !== cursor) return null;
|
|
41
|
-
const reasoningStart = THINK_OPEN_PATTERN.lastIndex;
|
|
42
|
-
const closeIndex = findThinkCloseIndex(text, reasoningStart);
|
|
43
|
-
const reasoningEnd = closeIndex === -1 ? text.length : closeIndex;
|
|
44
|
-
const normalizedReasoning = normalizeExtractedText(text.slice(reasoningStart, reasoningEnd));
|
|
45
|
-
let nextCursor = closeIndex === -1 ? text.length : closeIndex + THINK_CLOSE_TAG_LENGTH;
|
|
46
|
-
const previous = getLastVisibleChar(visibleParts);
|
|
47
|
-
const replacement = getThinkReplacement(previous, text[nextCursor] ?? "");
|
|
48
|
-
if (shouldSkipFollowingSpace(replacement, previous, text[nextCursor] ?? "")) nextCursor += 1;
|
|
49
|
-
return {
|
|
50
|
-
nextCursor,
|
|
51
|
-
reasoning: normalizedReasoning || null,
|
|
52
|
-
replacement
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* OpenCode can store MiniMax reasoning inline as <think> blocks. Preserve literal
|
|
57
|
-
* examples in Markdown code while extracting model-emitted tags as commentary.
|
|
58
|
-
*/
|
|
59
|
-
var splitOpenCodeThinkTaggedText = (text) => {
|
|
60
|
-
const reasoningBlocks = [];
|
|
61
|
-
const visibleParts = [];
|
|
62
|
-
let cursor = 0;
|
|
63
|
-
while (cursor < text.length) {
|
|
64
|
-
if (text[cursor] === "`") {
|
|
65
|
-
const runLength = getBacktickRunLength(text, cursor);
|
|
66
|
-
const end = findClosingBackticks(text, cursor, runLength);
|
|
67
|
-
visibleParts.push(text.slice(cursor, end));
|
|
68
|
-
cursor = end;
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
const thinkBlock = readThinkBlock(text, cursor, visibleParts);
|
|
72
|
-
if (thinkBlock) {
|
|
73
|
-
if (thinkBlock.reasoning) reasoningBlocks.push(thinkBlock.reasoning);
|
|
74
|
-
visibleParts.push(thinkBlock.replacement);
|
|
75
|
-
cursor = thinkBlock.nextCursor;
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
78
|
-
visibleParts.push(text[cursor]);
|
|
79
|
-
cursor += 1;
|
|
80
|
-
}
|
|
81
|
-
return {
|
|
82
|
-
reasoningBlocks,
|
|
83
|
-
visibleText: normalizeExtractedText(visibleParts.join(""))
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
//#endregion
|
|
87
|
-
export { splitOpenCodeThinkTaggedText as t };
|