spiracha 1.4.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/AGENTS.md +116 -164
  2. package/README.md +92 -237
  3. package/apps/ui/AGENTS.md +36 -7
  4. package/apps/ui/README.md +79 -6
  5. package/apps/ui/components.json +21 -0
  6. package/apps/ui/package.json +65 -0
  7. package/apps/ui/{dist/client → public}/icon.svg +2 -1
  8. package/apps/ui/src/components/antigravity-conversations-table.tsx +206 -0
  9. package/apps/ui/src/components/antigravity-keychain-panel.tsx +76 -0
  10. package/apps/ui/src/components/antigravity-workspaces-table.tsx +63 -0
  11. package/apps/ui/src/components/app-shell.tsx +124 -0
  12. package/apps/ui/src/components/breadcrumbs.tsx +53 -0
  13. package/apps/ui/src/components/claude-code-sessions-table.tsx +114 -0
  14. package/apps/ui/src/components/claude-code-workspaces-table.tsx +55 -0
  15. package/apps/ui/src/components/cursor-threads-table.tsx +189 -0
  16. package/apps/ui/src/components/cursor-workspaces-table.tsx +140 -0
  17. package/apps/ui/src/components/data-table.tsx +241 -0
  18. package/apps/ui/src/components/delete-confirm-dialog.tsx +88 -0
  19. package/apps/ui/src/components/export-dialog.tsx +184 -0
  20. package/apps/ui/src/components/json-panel.tsx +17 -0
  21. package/apps/ui/src/components/kiro-sessions-table.tsx +112 -0
  22. package/apps/ui/src/components/kiro-workspaces-table.tsx +53 -0
  23. package/apps/ui/src/components/list-search-input.tsx +18 -0
  24. package/apps/ui/src/components/loading-panel.tsx +23 -0
  25. package/apps/ui/src/components/metadata-section.tsx +31 -0
  26. package/apps/ui/src/components/metric-card.tsx +19 -0
  27. package/apps/ui/src/components/opencode-sessions-table.tsx +128 -0
  28. package/apps/ui/src/components/opencode-workspaces-table.tsx +57 -0
  29. package/apps/ui/src/components/page-header.tsx +33 -0
  30. package/apps/ui/src/components/projects-loading-state.tsx +74 -0
  31. package/apps/ui/src/components/projects-table.tsx +108 -0
  32. package/apps/ui/src/components/qoder-sessions-table.tsx +112 -0
  33. package/apps/ui/src/components/qoder-workspaces-table.tsx +53 -0
  34. package/apps/ui/src/components/recent-threads-list.tsx +52 -0
  35. package/apps/ui/src/components/reload-error-panel.tsx +20 -0
  36. package/apps/ui/src/components/text-document-panel.tsx +19 -0
  37. package/apps/ui/src/components/theme-toggle.tsx +48 -0
  38. package/apps/ui/src/components/threads-table.tsx +202 -0
  39. package/apps/ui/src/components/transcript-view.tsx +552 -0
  40. package/apps/ui/src/components/ui/alert-dialog.tsx +160 -0
  41. package/apps/ui/src/components/ui/badge.tsx +45 -0
  42. package/apps/ui/src/components/ui/button.tsx +62 -0
  43. package/apps/ui/src/components/ui/checkbox.tsx +29 -0
  44. package/apps/ui/src/components/ui/dialog.tsx +137 -0
  45. package/apps/ui/src/components/ui/dropdown-menu.tsx +217 -0
  46. package/apps/ui/src/components/ui/input.tsx +21 -0
  47. package/apps/ui/src/components/ui/scroll-area.tsx +46 -0
  48. package/apps/ui/src/components/ui/select.tsx +163 -0
  49. package/apps/ui/src/components/ui/separator.tsx +28 -0
  50. package/apps/ui/src/components/ui/sheet.tsx +107 -0
  51. package/apps/ui/src/components/ui/skeleton.tsx +7 -0
  52. package/apps/ui/src/components/ui/table.tsx +76 -0
  53. package/apps/ui/src/components/ui/tabs.tsx +71 -0
  54. package/apps/ui/src/components/ui/tooltip.tsx +44 -0
  55. package/apps/ui/src/integrations/tanstack-query/devtools.tsx +6 -0
  56. package/apps/ui/src/integrations/tanstack-query/root-provider.tsx +10 -0
  57. package/apps/ui/src/lib/antigravity-conversation-state.ts +28 -0
  58. package/apps/ui/src/lib/antigravity-queries.ts +33 -0
  59. package/apps/ui/src/lib/antigravity-server.ts +128 -0
  60. package/apps/ui/src/lib/antigravity-transcript-events.ts +335 -0
  61. package/apps/ui/src/lib/claude-code-queries.ts +26 -0
  62. package/apps/ui/src/lib/claude-code-server.ts +75 -0
  63. package/apps/ui/src/lib/claude-code-transcript-events.ts +154 -0
  64. package/apps/ui/src/lib/codex-queries.ts +66 -0
  65. package/apps/ui/src/lib/codex-server.ts +209 -0
  66. package/apps/ui/src/lib/cursor-queries.ts +37 -0
  67. package/apps/ui/src/lib/cursor-server.ts +272 -0
  68. package/apps/ui/src/lib/cursor-transcript-events.ts +229 -0
  69. package/apps/ui/src/lib/download.ts +166 -0
  70. package/apps/ui/src/lib/formatters.ts +149 -0
  71. package/apps/ui/src/lib/kiro-queries.ts +22 -0
  72. package/apps/ui/src/lib/kiro-server.ts +73 -0
  73. package/apps/ui/src/lib/kiro-transcript-events.ts +113 -0
  74. package/apps/ui/src/lib/opencode-queries.ts +37 -0
  75. package/apps/ui/src/lib/opencode-server.ts +73 -0
  76. package/apps/ui/src/lib/opencode-transcript-events.ts +221 -0
  77. package/apps/ui/src/lib/package-metadata.ts +16 -0
  78. package/apps/ui/src/lib/path-utils.ts +13 -0
  79. package/apps/ui/src/lib/qoder-queries.ts +22 -0
  80. package/apps/ui/src/lib/qoder-server.ts +79 -0
  81. package/apps/ui/src/lib/qoder-transcript-events.ts +139 -0
  82. package/apps/ui/src/lib/route-search.ts +68 -0
  83. package/apps/ui/src/lib/settings-store.tsx +59 -0
  84. package/apps/ui/src/lib/source-session-export-server.ts +56 -0
  85. package/apps/ui/src/lib/text-filter.ts +22 -0
  86. package/apps/ui/src/lib/thread-id.ts +3 -0
  87. package/apps/ui/src/lib/thread-transcript-stats.ts +57 -0
  88. package/apps/ui/src/lib/utils.ts +7 -0
  89. package/apps/ui/src/routeTree.gen.ts +730 -0
  90. package/apps/ui/src/router.tsx +20 -0
  91. package/apps/ui/src/routes/$threadId.tsx +22 -0
  92. package/apps/ui/src/routes/__root.tsx +127 -0
  93. package/apps/ui/src/routes/analytics.tsx +143 -0
  94. package/apps/ui/src/routes/antigravity-conversations.$conversationId.tsx +438 -0
  95. package/apps/ui/src/routes/antigravity.$workspaceKey.tsx +127 -0
  96. package/apps/ui/src/routes/antigravity.index.tsx +51 -0
  97. package/apps/ui/src/routes/api.v1.conversation-query.ts +12 -0
  98. package/apps/ui/src/routes/api.v1.conversations.$source.$id.export.ts +12 -0
  99. package/apps/ui/src/routes/api.v1.conversations.$source.$id.ts +12 -0
  100. package/apps/ui/src/routes/api.v1.conversations.ts +12 -0
  101. package/apps/ui/src/routes/api.v1.resolve.ts +12 -0
  102. package/apps/ui/src/routes/api.v1.sources.ts +12 -0
  103. package/apps/ui/src/routes/claude-code-sessions.$sessionId.tsx +342 -0
  104. package/apps/ui/src/routes/claude-code.$workspaceKey.tsx +135 -0
  105. package/apps/ui/src/routes/claude-code.index.tsx +48 -0
  106. package/apps/ui/src/routes/codex.$project.tsx +390 -0
  107. package/apps/ui/src/routes/codex.index.tsx +116 -0
  108. package/apps/ui/src/routes/cursor-threads.$composerId.tsx +435 -0
  109. package/apps/ui/src/routes/cursor.$workspaceKey.tsx +416 -0
  110. package/apps/ui/src/routes/cursor.index.tsx +120 -0
  111. package/apps/ui/src/routes/index.tsx +124 -0
  112. package/apps/ui/src/routes/kiro-sessions.$sessionId.tsx +345 -0
  113. package/apps/ui/src/routes/kiro.$workspaceKey.tsx +136 -0
  114. package/apps/ui/src/routes/kiro.index.tsx +48 -0
  115. package/apps/ui/src/routes/opencode-sessions.$sessionId.tsx +334 -0
  116. package/apps/ui/src/routes/opencode.$workspaceKey.tsx +135 -0
  117. package/apps/ui/src/routes/opencode.index.tsx +48 -0
  118. package/apps/ui/src/routes/qoder-sessions.$sessionId.tsx +341 -0
  119. package/apps/ui/src/routes/qoder.$workspaceKey.tsx +139 -0
  120. package/apps/ui/src/routes/qoder.index.tsx +48 -0
  121. package/apps/ui/src/routes/settings.tsx +91 -0
  122. package/apps/ui/src/routes/threads.$threadId.tsx +619 -0
  123. package/apps/ui/src/styles.css +122 -0
  124. package/apps/ui/tsconfig.json +29 -0
  125. package/apps/ui/vite.config.ts +84 -0
  126. package/bin/spiracha.ts +32 -0
  127. package/package.json +50 -60
  128. package/src/client.ts +290 -0
  129. package/src/lib/antigravity-db.ts +213 -19
  130. package/src/lib/antigravity-exporter-types.ts +1 -0
  131. package/src/lib/claude-code-db.ts +655 -0
  132. package/src/lib/claude-code-exporter-types.ts +110 -0
  133. package/src/lib/claude-code-transcript-phase.ts +25 -0
  134. package/src/lib/claude-code-transcript.ts +180 -0
  135. package/src/lib/codex-analytics.ts +1 -1
  136. package/src/lib/codex-browser-db.ts +856 -61
  137. package/src/lib/codex-browser-export.ts +24 -16
  138. package/src/lib/codex-browser-types.ts +1 -1
  139. package/src/lib/codex-thread-cache.ts +17 -1
  140. package/src/lib/{codex-exporter-types.ts → codex-thread-types.ts} +2 -30
  141. package/src/lib/{codex-exporter-transcript.ts → codex-transcript-renderer.ts} +64 -28
  142. package/src/lib/concurrency.ts +25 -0
  143. package/src/lib/conversation-api.ts +792 -0
  144. package/src/lib/conversation-data/adapter-helpers.ts +110 -0
  145. package/src/lib/conversation-data/antigravity-adapter.ts +148 -0
  146. package/src/lib/conversation-data/claude-code-adapter.ts +175 -0
  147. package/src/lib/conversation-data/codex-adapter.ts +245 -0
  148. package/src/lib/conversation-data/cursor-adapter.ts +171 -0
  149. package/src/lib/conversation-data/index.ts +311 -0
  150. package/src/lib/conversation-data/kiro-adapter.ts +140 -0
  151. package/src/lib/conversation-data/message-selector.ts +37 -0
  152. package/src/lib/conversation-data/opencode-adapter.ts +180 -0
  153. package/src/lib/conversation-data/path-match.ts +79 -0
  154. package/src/lib/conversation-data/qoder-adapter.ts +230 -0
  155. package/src/lib/conversation-data/types.ts +116 -0
  156. package/src/lib/cursor-db.ts +67 -21
  157. package/src/lib/cursor-exporter-types.ts +0 -19
  158. package/src/lib/kiro-db.ts +949 -0
  159. package/src/lib/kiro-exporter-types.ts +100 -0
  160. package/src/lib/kiro-transcript-phase.ts +41 -0
  161. package/src/lib/kiro-transcript.ts +115 -0
  162. package/src/lib/opencode-db.ts +610 -0
  163. package/src/lib/opencode-exporter-types.ts +129 -0
  164. package/src/lib/opencode-think-tags.ts +126 -0
  165. package/src/lib/opencode-transcript-phase.ts +50 -0
  166. package/src/lib/opencode-transcript.ts +194 -0
  167. package/src/lib/qoder-acp-client.ts +268 -0
  168. package/src/lib/qoder-db.ts +1601 -0
  169. package/src/lib/qoder-exporter-types.ts +114 -0
  170. package/src/lib/qoder-transcript-phase.ts +41 -0
  171. package/src/lib/qoder-transcript.ts +112 -0
  172. package/src/lib/shared.ts +25 -0
  173. package/src/lib/ui-export-archive.ts +61 -0
  174. package/apps/ui/dist/client/assets/_threadId-CAIeH5mq.js +0 -1
  175. package/apps/ui/dist/client/assets/analytics-DK2jdvmI.js +0 -1
  176. package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-DmD0sN8X.js +0 -7
  177. package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-KAcXtNxI.js +0 -1
  178. package/apps/ui/dist/client/assets/antigravity-keychain-panel-BRHVjFAM.js +0 -1
  179. package/apps/ui/dist/client/assets/antigravity._workspaceKey-ByitGWki.js +0 -1
  180. package/apps/ui/dist/client/assets/antigravity._workspaceKey-CGV7amas.js +0 -1
  181. package/apps/ui/dist/client/assets/antigravity.index-DEEkjlZa.js +0 -1
  182. package/apps/ui/dist/client/assets/antigravity.index-DgW25FEV.js +0 -1
  183. package/apps/ui/dist/client/assets/badge-DfWvPfKF.js +0 -1
  184. package/apps/ui/dist/client/assets/checkbox-CdHitXWQ.js +0 -1
  185. package/apps/ui/dist/client/assets/createServerFn-CgRRVpBH.js +0 -3
  186. package/apps/ui/dist/client/assets/cursor-threads._composerId-CmBFclK8.js +0 -1
  187. package/apps/ui/dist/client/assets/cursor-threads._composerId-Ti2gTm63.js +0 -1
  188. package/apps/ui/dist/client/assets/cursor._workspaceKey-CaAZjGmm.js +0 -1
  189. package/apps/ui/dist/client/assets/cursor._workspaceKey-DzD_c6j9.js +0 -1
  190. package/apps/ui/dist/client/assets/cursor.index-CrnMwDCi.js +0 -1
  191. package/apps/ui/dist/client/assets/cursor.index-PkCFVcl4.js +0 -2
  192. package/apps/ui/dist/client/assets/data-table-Br78_dk3.js +0 -4
  193. package/apps/ui/dist/client/assets/delete-confirm-dialog-BHRmyLHr.js +0 -11
  194. package/apps/ui/dist/client/assets/dist-B9pyYCVU.js +0 -1
  195. package/apps/ui/dist/client/assets/dist-BhZOxAPP.js +0 -1
  196. package/apps/ui/dist/client/assets/dist-DvMS2965.js +0 -1
  197. package/apps/ui/dist/client/assets/download-Bf0QJKD3.js +0 -1
  198. package/apps/ui/dist/client/assets/dropdown-menu-Dy5cLzTy.js +0 -1
  199. package/apps/ui/dist/client/assets/es2015-BkCWttyM.js +0 -41
  200. package/apps/ui/dist/client/assets/export-dialog-C86SYHJn.js +0 -1
  201. package/apps/ui/dist/client/assets/formatters-BM9kB7ed.js +0 -1
  202. package/apps/ui/dist/client/assets/index-CPvAP-jk.js +0 -149
  203. package/apps/ui/dist/client/assets/jsx-runtime-DGeXAQPT.js +0 -1
  204. package/apps/ui/dist/client/assets/metric-card-Dplm0ZiM.js +0 -1
  205. package/apps/ui/dist/client/assets/page-header-Cwa3p6Tl.js +0 -1
  206. package/apps/ui/dist/client/assets/projects._project-Ckf6muWZ.js +0 -1
  207. package/apps/ui/dist/client/assets/projects._project-DSDwH4NF.js +0 -1
  208. package/apps/ui/dist/client/assets/projects.index-DEfhWqa8.js +0 -1
  209. package/apps/ui/dist/client/assets/projects.index-V5ibNZII.js +0 -3
  210. package/apps/ui/dist/client/assets/react-dom-DL96Jor4.js +0 -1
  211. package/apps/ui/dist/client/assets/refresh-ccw-BgKjOiA6.js +0 -1
  212. package/apps/ui/dist/client/assets/reload-error-panel-AHqu0akK.js +0 -1
  213. package/apps/ui/dist/client/assets/routes-Df2tgpyd.js +0 -1
  214. package/apps/ui/dist/client/assets/scroll-text-fM0sMOB3.js +0 -1
  215. package/apps/ui/dist/client/assets/select-Bf2GwfPR.js +0 -1
  216. package/apps/ui/dist/client/assets/settings-5VQIzME0.js +0 -1
  217. package/apps/ui/dist/client/assets/sqlite-error-B6uZjUe8.js +0 -1
  218. package/apps/ui/dist/client/assets/styles-BhRkXgwB.css +0 -1
  219. package/apps/ui/dist/client/assets/tabs-OO4VU5KR.js +0 -7
  220. package/apps/ui/dist/client/assets/text-filter-DVAZySUS.js +0 -2
  221. package/apps/ui/dist/client/assets/threads._threadId-BB9tTsV4.js +0 -1
  222. package/apps/ui/dist/client/assets/threads._threadId-BgDhFj2I.js +0 -1
  223. package/apps/ui/dist/client/assets/useMutation-CC_B7uy5.js +0 -1
  224. package/apps/ui/dist/client/assets/useQuery-C5By6WKU.js +0 -1
  225. package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-CRW2kqj0.js +0 -232
  226. package/apps/ui/dist/server/assets/_threadId-B6SrBR9E.js +0 -6
  227. package/apps/ui/dist/server/assets/analytics-CYP_LT5Y.js +0 -16
  228. package/apps/ui/dist/server/assets/analytics-CtpOMVMO.js +0 -146
  229. package/apps/ui/dist/server/assets/antigravity-conversation-state-HgzS302O.js +0 -16
  230. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-BtexWY-K.js +0 -613
  231. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-D426O-64.js +0 -11
  232. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-zMrR6v6R.js +0 -20
  233. package/apps/ui/dist/server/assets/antigravity-db-Bh8_U9uw.js +0 -580
  234. package/apps/ui/dist/server/assets/antigravity-keychain-DOiuHDwK.js +0 -126
  235. package/apps/ui/dist/server/assets/antigravity-keychain-panel-CC7FLmAK.js +0 -55
  236. package/apps/ui/dist/server/assets/antigravity-queries-CGrJO9Vr.js +0 -37
  237. package/apps/ui/dist/server/assets/antigravity-server-CHRjVFqN.js +0 -114
  238. package/apps/ui/dist/server/assets/antigravity._workspaceKey-3m_MzNFA.js +0 -11
  239. package/apps/ui/dist/server/assets/antigravity._workspaceKey-B0QeYUOh.js +0 -28
  240. package/apps/ui/dist/server/assets/antigravity._workspaceKey-C3kP-qyN.js +0 -210
  241. package/apps/ui/dist/server/assets/antigravity.index-CPCYkqCi.js +0 -104
  242. package/apps/ui/dist/server/assets/antigravity.index-DudTB3Tq.js +0 -11
  243. package/apps/ui/dist/server/assets/badge-EvdhKK_Z.js +0 -26
  244. package/apps/ui/dist/server/assets/button-CmTDnzOn.js +0 -46
  245. package/apps/ui/dist/server/assets/checkbox-C0hovF41.js +0 -19
  246. package/apps/ui/dist/server/assets/codex-queries-CtgeZ7VL.js +0 -99
  247. package/apps/ui/dist/server/assets/codex-server-CNXSJuc2.js +0 -2004
  248. package/apps/ui/dist/server/assets/concurrency-VXtYvlGh.js +0 -18
  249. package/apps/ui/dist/server/assets/createServerRpc-CF_DEwnm.js +0 -12
  250. package/apps/ui/dist/server/assets/createSsrRpc-C754NPki.js +0 -16
  251. package/apps/ui/dist/server/assets/cursor-db-cYZEU3WQ.js +0 -830
  252. package/apps/ui/dist/server/assets/cursor-exporter-types-CI3goo-c.js +0 -34
  253. package/apps/ui/dist/server/assets/cursor-queries-NCIM0Nat.js +0 -67
  254. package/apps/ui/dist/server/assets/cursor-recovery-nq-kR62j.js +0 -361
  255. package/apps/ui/dist/server/assets/cursor-server-C3q7hrp-.js +0 -213
  256. package/apps/ui/dist/server/assets/cursor-threads._composerId-BB0Y_Mao.js +0 -11
  257. package/apps/ui/dist/server/assets/cursor-threads._composerId-BPJFWfJj.js +0 -18
  258. package/apps/ui/dist/server/assets/cursor-threads._composerId-BkMMTQ3v.js +0 -582
  259. package/apps/ui/dist/server/assets/cursor-transcript-2iL3KFSK.js +0 -125
  260. package/apps/ui/dist/server/assets/cursor._workspaceKey-C5PdTaKB.js +0 -28
  261. package/apps/ui/dist/server/assets/cursor._workspaceKey-Ckj7apKI.js +0 -401
  262. package/apps/ui/dist/server/assets/cursor._workspaceKey-nmg3YIOQ.js +0 -11
  263. package/apps/ui/dist/server/assets/cursor.index-CcsX7DG0.js +0 -11
  264. package/apps/ui/dist/server/assets/cursor.index-DkWT-mxw.js +0 -189
  265. package/apps/ui/dist/server/assets/data-table-Cdct823O.js +0 -189
  266. package/apps/ui/dist/server/assets/delete-confirm-dialog-BcBNCxWB.js +0 -144
  267. package/apps/ui/dist/server/assets/download-DMmiy1xf.js +0 -92
  268. package/apps/ui/dist/server/assets/dropdown-menu-Dy_9t6TN.js +0 -36
  269. package/apps/ui/dist/server/assets/empty-plugin-adapters-B3lHh1La.js +0 -5
  270. package/apps/ui/dist/server/assets/export-dialog-BItjWgkZ.js +0 -240
  271. package/apps/ui/dist/server/assets/formatters-FJaGZgJk.js +0 -91
  272. package/apps/ui/dist/server/assets/loading-panel-BGFnWseS.js +0 -27
  273. package/apps/ui/dist/server/assets/metric-card-ByEeLu0r.js +0 -23
  274. package/apps/ui/dist/server/assets/model-label-B1NWGc65.js +0 -13
  275. package/apps/ui/dist/server/assets/page-header-VNSaM3xd.js +0 -29
  276. package/apps/ui/dist/server/assets/path-transforms-DL2IwtYd.js +0 -31
  277. package/apps/ui/dist/server/assets/projects._project-Bpbc3C-L.js +0 -20
  278. package/apps/ui/dist/server/assets/projects._project-Bshqk7JA.js +0 -12
  279. package/apps/ui/dist/server/assets/projects._project-CvZho6EQ.js +0 -395
  280. package/apps/ui/dist/server/assets/projects.index-BLXOx5eL.js +0 -12
  281. package/apps/ui/dist/server/assets/projects.index-BkLiF2FF.js +0 -182
  282. package/apps/ui/dist/server/assets/projects.index-DesYXwfi.js +0 -14
  283. package/apps/ui/dist/server/assets/reload-error-panel-BJMxY3U1.js +0 -25
  284. package/apps/ui/dist/server/assets/route-search-ts4W9MJ9.js +0 -38
  285. package/apps/ui/dist/server/assets/router-6m-ihwqA.js +0 -410
  286. package/apps/ui/dist/server/assets/routes-Bsact1uB.js +0 -184
  287. package/apps/ui/dist/server/assets/routes-BzkJgq4W.js +0 -34
  288. package/apps/ui/dist/server/assets/select-GW76p-ld.js +0 -76
  289. package/apps/ui/dist/server/assets/settings-OayxIYQQ.js +0 -100
  290. package/apps/ui/dist/server/assets/settings-store-DpEJEQ7M.js +0 -52
  291. package/apps/ui/dist/server/assets/shared-CPRNYIql.js +0 -134
  292. package/apps/ui/dist/server/assets/sqlite-error-LZDrnxdd.js +0 -13
  293. package/apps/ui/dist/server/assets/start-CI_0bSiY.js +0 -4
  294. package/apps/ui/dist/server/assets/tabs-CGA13IZM.js +0 -502
  295. package/apps/ui/dist/server/assets/text-filter-CGKxMCKt.js +0 -36
  296. package/apps/ui/dist/server/assets/threads._threadId-BSSK4nkI.js +0 -26
  297. package/apps/ui/dist/server/assets/threads._threadId-Bs0yuqO9.js +0 -18
  298. package/apps/ui/dist/server/assets/threads._threadId-D2GYkVn6.js +0 -639
  299. package/apps/ui/dist/server/assets/ui-export-files-BHLX9bhN.js +0 -83
  300. package/apps/ui/dist/server/assets/utils-C_uf36nf.js +0 -8
  301. package/apps/ui/dist/server/server.js +0 -5847
  302. package/bin/codex-chats-claude.js +0 -5
  303. package/bin/codex-chats.js +0 -5
  304. package/bin/spiracha.js +0 -5
  305. package/src/export-chats.ts +0 -120
  306. package/src/export-claude.ts +0 -36
  307. package/src/export-cursor.ts +0 -244
  308. package/src/lib/claude-exporter.ts +0 -864
  309. package/src/lib/codex-exporter-cli.ts +0 -277
  310. package/src/lib/codex-exporter-db.ts +0 -319
  311. package/src/lib/codex-exporter.ts +0 -115
  312. package/src/lib/cursor-exporter.ts +0 -266
  313. package/src/lib/interactive-cli.ts +0 -433
  314. package/src/lib/native-open.ts +0 -54
  315. package/src/mcp-server.ts +0 -137
  316. package/src/spiracha.ts +0 -116
  317. package/src/ui-cli.ts +0 -310
  318. /package/apps/ui/{dist/client → public}/manifest.json +0 -0
  319. /package/apps/ui/{dist/client → public}/robots.txt +0 -0
@@ -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/cursor-threads.$composerId.tsx?tsr-split=errorComponent
4
- var CursorThreadDetailErrorComponent = ({ error }) => {
5
- return /* @__PURE__ */ jsx(ReloadErrorPanel, {
6
- description: error.message,
7
- title: "Failed to load Cursor thread"
8
- });
9
- };
10
- //#endregion
11
- export { CursorThreadDetailErrorComponent as errorComponent };
@@ -1,18 +0,0 @@
1
- import { t as cursorThreadDetailQueryOptions } from "./cursor-queries-NCIM0Nat.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/cursor-threads.$composerId.tsx
6
- var $$splitErrorComponentImporter = () => import("./cursor-threads._composerId-BB0Y_Mao.js");
7
- var $$splitComponentImporter = () => import("./cursor-threads._composerId-BkMMTQ3v.js");
8
- var Route = createFileRoute("/cursor-threads/$composerId")({
9
- component: lazyRouteComponent($$splitComponentImporter, "component"),
10
- errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent"),
11
- loader: ({ context, params }) => context.queryClient.ensureQueryData(cursorThreadDetailQueryOptions(params.composerId)),
12
- pendingComponent: () => /* @__PURE__ */ jsx(LoadingPanel, {
13
- description: "Loading the Cursor transcript, thread metadata, and workspace context.",
14
- title: "Loading thread"
15
- })
16
- });
17
- //#endregion
18
- export { Route as t };
@@ -1,582 +0,0 @@
1
- import { t as Button } from "./button-CmTDnzOn.js";
2
- import { i as deleteCursorThreadsFn, o as exportCursorThreadFn, t as cursorThreadDetailQueryOptions } from "./cursor-queries-NCIM0Nat.js";
3
- import { t as Route } from "./cursor-threads._composerId-BPJFWfJj.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, n as formatBytes, o as formatNumber, r as formatDateTime } 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-CGA13IZM.js";
9
- import { n as downloadUrlFile, t as downloadTextFile } from "./download-DMmiy1xf.js";
10
- import { t as DeleteConfirmDialog } from "./delete-confirm-dialog-BcBNCxWB.js";
11
- import { t as ExportDialog } from "./export-dialog-BItjWgkZ.js";
12
- import { useMemo, useState } from "react";
13
- import { Link, useNavigate } from "@tanstack/react-router";
14
- import { jsx, jsxs } from "react/jsx-runtime";
15
- import { useMutation, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
16
- import { Download, Trash2 } from "lucide-react";
17
- //#region src/lib/cursor-transcript-events.ts
18
- var toTimestamp = (value) => {
19
- if (value === null || !Number.isFinite(value)) return null;
20
- return new Date(value).toISOString();
21
- };
22
- var toolCallToJson = (toolCall) => {
23
- if (!toolCall) return null;
24
- return {
25
- argumentsText: toolCall.argumentsText,
26
- callId: toolCall.callId,
27
- name: toolCall.name,
28
- resultText: toolCall.resultText,
29
- status: toolCall.status
30
- };
31
- };
32
- var buildBubbleRaw = (bubble, eventType, extra = {}) => ({
33
- bubbleId: bubble.bubbleId,
34
- createdAtMs: bubble.createdAtMs,
35
- eventType,
36
- kind: bubble.kind,
37
- source: "cursor_bubble",
38
- text: bubble.text,
39
- thinking: bubble.thinking,
40
- toolCall: toolCallToJson(bubble.toolCall),
41
- ...extra
42
- });
43
- var buildMessageEvent = (bubble, sequence, role, text, phase) => ({
44
- isHiddenByDefault: false,
45
- kind: "message",
46
- memoryCitation: null,
47
- model: null,
48
- phase,
49
- raw: buildBubbleRaw(bubble, phase === "commentary" ? "thinking" : "message"),
50
- role,
51
- sequence,
52
- text,
53
- timestamp: toTimestamp(bubble.createdAtMs),
54
- variant: role === "user" ? "user_message" : "agent_message"
55
- });
56
- var buildToolCallCommand = (toolCall) => {
57
- if (!toolCall.argumentsText?.trim()) return toolCall.name;
58
- return `${toolCall.name}\n${toolCall.argumentsText}`;
59
- };
60
- var buildToolCallEvent = (bubble, sequence, toolCall) => ({
61
- argumentsParseFailed: false,
62
- argumentsText: toolCall.argumentsText,
63
- callId: toolCall.callId,
64
- command: buildToolCallCommand(toolCall),
65
- kind: "tool_call",
66
- name: toolCall.name,
67
- raw: buildBubbleRaw(bubble, "tool_call", {
68
- argumentsText: toolCall.argumentsText,
69
- callId: toolCall.callId,
70
- name: toolCall.name,
71
- status: toolCall.status
72
- }),
73
- sequence,
74
- timestamp: toTimestamp(bubble.createdAtMs),
75
- workdir: null
76
- });
77
- var buildToolOutputEvent = (bubble, sequence, toolCall) => {
78
- const outputText = toolCall.resultText?.trim();
79
- if (!outputText) return null;
80
- return {
81
- callId: toolCall.callId,
82
- exitCode: null,
83
- kind: "tool_output",
84
- outputText,
85
- raw: buildBubbleRaw(bubble, "tool_output", {
86
- callId: toolCall.callId,
87
- name: toolCall.name,
88
- resultText: outputText,
89
- status: toolCall.status
90
- }),
91
- sequence,
92
- summary: outputText,
93
- timestamp: toTimestamp(bubble.createdAtMs),
94
- wallTime: null
95
- };
96
- };
97
- var getAssistantFinalTextIndexes = (bubbles) => {
98
- const finalTextIndexes = /* @__PURE__ */ new Set();
99
- let currentAssistantTextIndex = null;
100
- const flushAssistantRun = () => {
101
- if (currentAssistantTextIndex !== null) {
102
- finalTextIndexes.add(currentAssistantTextIndex);
103
- currentAssistantTextIndex = null;
104
- }
105
- };
106
- bubbles.forEach((bubble, index) => {
107
- if (bubble.kind !== "assistant") {
108
- flushAssistantRun();
109
- return;
110
- }
111
- if (bubble.text.trim()) currentAssistantTextIndex = index;
112
- });
113
- flushAssistantRun();
114
- return finalTextIndexes;
115
- };
116
- var cursorBubbleToThreadEvents = (bubble, bubbleIndex, finalTextIndexes) => {
117
- if (bubble.kind !== "assistant" && bubble.kind !== "user") return [];
118
- const baseSequence = bubbleIndex * 10;
119
- const events = [];
120
- if (bubble.kind === "assistant" && bubble.thinking?.trim()) events.push(buildMessageEvent(bubble, baseSequence, "assistant", bubble.thinking.trim(), "commentary"));
121
- if (bubble.text.trim()) {
122
- const phase = bubble.kind === "assistant" ? finalTextIndexes.has(bubbleIndex) ? "final_answer" : "commentary" : null;
123
- events.push(buildMessageEvent(bubble, baseSequence + 1, bubble.kind, bubble.text, phase));
124
- }
125
- if (bubble.kind === "assistant" && bubble.toolCall) {
126
- events.push(buildToolCallEvent(bubble, baseSequence + 2, bubble.toolCall));
127
- const output = buildToolOutputEvent(bubble, baseSequence + 3, bubble.toolCall);
128
- if (output) events.push(output);
129
- }
130
- return events;
131
- };
132
- var cursorTranscriptToThreadEvents = (transcript) => {
133
- const finalTextIndexes = getAssistantFinalTextIndexes(transcript.bubbles);
134
- return transcript.bubbles.flatMap((bubble, index) => cursorBubbleToThreadEvents(bubble, index, finalTextIndexes));
135
- };
136
- var updateMessageStats = (stats, event) => {
137
- stats.messageCount += 1;
138
- if (event.role === "assistant") stats.assistantMessageCount += 1;
139
- if (event.role === "user") stats.userMessageCount += 1;
140
- if (event.phase === "commentary") stats.commentaryCount += 1;
141
- if (event.phase === "final_answer") stats.finalAnswerCount += 1;
142
- };
143
- var updateCursorStats = (stats, event) => {
144
- switch (event.kind) {
145
- case "message":
146
- updateMessageStats(stats, event);
147
- break;
148
- case "tool_call":
149
- stats.toolCallCount += 1;
150
- break;
151
- case "tool_output":
152
- stats.toolOutputCount += 1;
153
- break;
154
- case "web_search":
155
- stats.webSearchEventCount += 1;
156
- break;
157
- default: break;
158
- }
159
- };
160
- var getCursorThreadTranscriptStats = (events) => {
161
- const stats = {
162
- assistantMessageCount: 0,
163
- commentaryCount: 0,
164
- execCommandCount: 0,
165
- finalAnswerCount: 0,
166
- messageCount: 0,
167
- toolCallCount: 0,
168
- toolOutputCount: 0,
169
- userMessageCount: 0,
170
- webSearchEventCount: 0
171
- };
172
- for (const event of events) updateCursorStats(stats, event);
173
- return stats;
174
- };
175
- //#endregion
176
- //#region src/routes/cursor-threads.$composerId.tsx?tsr-split=component
177
- var buildCursorThreadMetadata = (detail) => {
178
- return [
179
- {
180
- label: "Composer ID",
181
- value: /* @__PURE__ */ jsx("span", {
182
- "data-mono": "true",
183
- children: detail.thread.composerId
184
- })
185
- },
186
- {
187
- label: "Workspace",
188
- value: /* @__PURE__ */ jsx(Link, {
189
- className: "text-[var(--accent)]",
190
- params: { workspaceKey: detail.thread.workspaceKey },
191
- to: "/cursor/$workspaceKey",
192
- children: detail.thread.workspaceLabel
193
- })
194
- },
195
- {
196
- label: "Workspace key",
197
- value: /* @__PURE__ */ jsx("span", {
198
- "data-mono": "true",
199
- children: detail.thread.workspaceKey
200
- })
201
- },
202
- {
203
- label: "Mode",
204
- value: detail.thread.mode ?? "unknown"
205
- },
206
- {
207
- label: "Created",
208
- value: /* @__PURE__ */ jsx("span", {
209
- suppressHydrationWarning: true,
210
- children: formatDateTime(detail.thread.createdAtMs)
211
- })
212
- },
213
- {
214
- label: "Updated",
215
- value: /* @__PURE__ */ jsx("span", {
216
- suppressHydrationWarning: true,
217
- children: formatDateTime(detail.thread.lastUpdatedAtMs)
218
- })
219
- },
220
- {
221
- label: "Transcript dirs",
222
- value: detail.thread.transcriptDirs.length > 0 ? /* @__PURE__ */ jsx("div", {
223
- className: "space-y-1",
224
- children: detail.thread.transcriptDirs.map((directory) => /* @__PURE__ */ jsx("div", {
225
- "data-mono": "true",
226
- children: directory
227
- }, directory))
228
- }) : "n/a"
229
- }
230
- ];
231
- };
232
- var buildCursorTranscriptStatsItems = (detail, events, stats) => {
233
- if (!detail.transcript) return [{
234
- label: "Transcript load",
235
- value: "No renderable Cursor transcript content was found."
236
- }];
237
- return [
238
- {
239
- label: "Event kinds",
240
- value: formatList([...new Set(events.map((event) => event.kind))])
241
- },
242
- {
243
- label: "Messages",
244
- value: formatNumber(stats.messageCount)
245
- },
246
- {
247
- label: "User messages",
248
- value: formatNumber(stats.userMessageCount)
249
- },
250
- {
251
- label: "Assistant messages",
252
- value: formatNumber(stats.assistantMessageCount)
253
- },
254
- {
255
- label: "Commentary updates",
256
- value: formatNumber(stats.commentaryCount)
257
- },
258
- {
259
- label: "Tool calls",
260
- value: formatNumber(stats.toolCallCount)
261
- },
262
- {
263
- label: "Tool outputs",
264
- value: formatNumber(stats.toolOutputCount)
265
- },
266
- {
267
- label: "Renderable bubbles",
268
- value: formatNumber(detail.transcript.renderableBubbleCount)
269
- },
270
- {
271
- label: "Omitted bubbles",
272
- value: formatNumber(detail.transcript.omittedBubbleCount)
273
- }
274
- ];
275
- };
276
- var CursorTranscriptControls = ({ rawJsonDisabled = false, showCommentary, showExtraEvents, showRawJson, showToolCalls, showUserMessages, onShowCommentaryChange, onShowExtraEventsChange, onShowRawJsonChange, onShowToolCallsChange, onShowUserMessagesChange }) => {
277
- return /* @__PURE__ */ jsxs("div", {
278
- className: "flex flex-wrap gap-4 rounded-xl border border-[var(--border)] bg-[var(--panel)] px-4 py-3 shadow-[var(--panel-shadow)]",
279
- children: [
280
- /* @__PURE__ */ jsxs("div", {
281
- className: "flex items-center gap-2 text-sm",
282
- children: [/* @__PURE__ */ jsx(Checkbox, {
283
- checked: showToolCalls,
284
- id: "cursor-transcript-show-tool-calls",
285
- onCheckedChange: (checked) => onShowToolCallsChange(checked === true)
286
- }), /* @__PURE__ */ jsx("label", {
287
- htmlFor: "cursor-transcript-show-tool-calls",
288
- children: "Show tool calls"
289
- })]
290
- }),
291
- /* @__PURE__ */ jsxs("div", {
292
- className: "flex items-center gap-2 text-sm",
293
- children: [/* @__PURE__ */ jsx(Checkbox, {
294
- checked: showCommentary,
295
- id: "cursor-transcript-show-commentary",
296
- onCheckedChange: (checked) => onShowCommentaryChange(checked === true)
297
- }), /* @__PURE__ */ jsx("label", {
298
- htmlFor: "cursor-transcript-show-commentary",
299
- children: "Show commentary"
300
- })]
301
- }),
302
- /* @__PURE__ */ jsxs("div", {
303
- className: "flex items-center gap-2 text-sm",
304
- children: [/* @__PURE__ */ jsx(Checkbox, {
305
- checked: showExtraEvents,
306
- id: "cursor-transcript-show-extra-events",
307
- onCheckedChange: (checked) => onShowExtraEventsChange(checked === true)
308
- }), /* @__PURE__ */ jsx("label", {
309
- htmlFor: "cursor-transcript-show-extra-events",
310
- children: "Show extra events"
311
- })]
312
- }),
313
- /* @__PURE__ */ jsxs("div", {
314
- className: "flex items-center gap-2 text-sm",
315
- children: [/* @__PURE__ */ jsx(Checkbox, {
316
- checked: showRawJson,
317
- disabled: rawJsonDisabled,
318
- id: "cursor-transcript-show-raw-json",
319
- onCheckedChange: (checked) => onShowRawJsonChange(checked === true)
320
- }), /* @__PURE__ */ jsx("label", {
321
- htmlFor: "cursor-transcript-show-raw-json",
322
- children: "Raw JSON"
323
- })]
324
- }),
325
- /* @__PURE__ */ jsxs("div", {
326
- className: "flex items-center gap-2 text-sm",
327
- children: [/* @__PURE__ */ jsx(Checkbox, {
328
- checked: showUserMessages,
329
- id: "cursor-transcript-show-user-messages",
330
- onCheckedChange: (checked) => onShowUserMessagesChange(checked === true)
331
- }), /* @__PURE__ */ jsx("label", {
332
- htmlFor: "cursor-transcript-show-user-messages",
333
- children: "User"
334
- })]
335
- })
336
- ]
337
- });
338
- };
339
- var CursorThreadMetadataPanels = ({ detail, events, stats }) => {
340
- return /* @__PURE__ */ jsxs("div", {
341
- className: "grid gap-4 xl:grid-cols-[1.1fr_0.9fr]",
342
- children: [/* @__PURE__ */ jsx(MetadataSection, {
343
- items: buildCursorThreadMetadata(detail),
344
- title: "Thread metadata"
345
- }), /* @__PURE__ */ jsx(MetadataSection, {
346
- items: buildCursorTranscriptStatsItems(detail, events, stats),
347
- title: "Transcript stats"
348
- })]
349
- });
350
- };
351
- var CursorThreadRawPanels = ({ detail, events }) => {
352
- if (!detail.transcript) return /* @__PURE__ */ jsx("div", {
353
- className: "rounded-xl border border-[var(--border)] bg-[var(--panel)] px-5 py-4 text-sm",
354
- children: "No Cursor transcript payload was found for this thread."
355
- });
356
- return /* @__PURE__ */ jsxs("div", {
357
- className: "space-y-4",
358
- children: [
359
- /* @__PURE__ */ jsx(JsonPanel, {
360
- title: "Thread summary",
361
- value: detail.thread
362
- }),
363
- /* @__PURE__ */ jsx(JsonPanel, {
364
- title: "Transcript head",
365
- value: detail.transcript.head
366
- }),
367
- /* @__PURE__ */ jsx(JsonPanel, {
368
- title: "Cursor bubbles",
369
- value: detail.transcript.bubbles
370
- }),
371
- /* @__PURE__ */ jsx(JsonPanel, {
372
- title: "Transcript events",
373
- value: events
374
- })
375
- ]
376
- });
377
- };
378
- var CursorThreadDetailPage = () => {
379
- const navigate = useNavigate();
380
- const queryClient = useQueryClient();
381
- const detail = useSuspenseQuery(cursorThreadDetailQueryOptions(Route.useParams().composerId)).data;
382
- const [pendingDelete, setPendingDelete] = useState(false);
383
- const [pendingExport, setPendingExport] = useState(false);
384
- const [showToolCalls, setShowToolCalls] = useState(false);
385
- const [showCommentary, setShowCommentary] = useState(false);
386
- const [showExtraEvents, setShowExtraEvents] = useState(false);
387
- const [showRawJson, setShowRawJson] = useState(false);
388
- const [showUserMessages, setShowUserMessages] = useState(true);
389
- const transcriptEvents = useMemo(() => detail.transcript ? cursorTranscriptToThreadEvents(detail.transcript) : [], [detail.transcript]);
390
- const transcriptStats = useMemo(() => getCursorThreadTranscriptStats(transcriptEvents), [transcriptEvents]);
391
- const deleteThreadMutation = useMutation({
392
- mutationFn: () => deleteCursorThreadsFn({ data: { composerIds: [detail.thread.composerId] } }),
393
- onSuccess: async () => {
394
- await navigate({
395
- params: { workspaceKey: detail.thread.workspaceKey },
396
- to: "/cursor/$workspaceKey"
397
- });
398
- await Promise.all([
399
- queryClient.invalidateQueries({ queryKey: ["cursor-thread", detail.thread.composerId] }),
400
- queryClient.invalidateQueries({ queryKey: ["cursor-threads", detail.thread.workspaceKey] }),
401
- queryClient.invalidateQueries({ queryKey: ["cursor-workspaces"] })
402
- ]);
403
- }
404
- });
405
- const exportThreadMutation = useMutation({
406
- mutationFn: async (options) => {
407
- const download = await exportCursorThreadFn({ data: {
408
- ...options,
409
- composerId: detail.thread.composerId
410
- } });
411
- if (download.mode === "download") {
412
- downloadTextFile(download.fileName, download.content, download.mimeType);
413
- return;
414
- }
415
- await downloadUrlFile(download.fileName, download.downloadUrl);
416
- },
417
- onSuccess: () => {
418
- setPendingExport(false);
419
- }
420
- });
421
- return /* @__PURE__ */ jsxs("div", {
422
- className: "space-y-6",
423
- children: [
424
- /* @__PURE__ */ jsx(PageHeader, {
425
- actions: /* @__PURE__ */ jsxs("div", {
426
- className: "flex flex-wrap gap-2",
427
- children: [/* @__PURE__ */ jsxs(Button, {
428
- className: "rounded-full",
429
- type: "button",
430
- variant: "outline",
431
- onClick: () => setPendingExport(true),
432
- children: [/* @__PURE__ */ jsx(Download, { className: "mr-2 size-4" }), "Export"]
433
- }), /* @__PURE__ */ jsxs(Button, {
434
- className: "rounded-full border-[var(--destructive)]/20 text-[var(--destructive)]",
435
- type: "button",
436
- variant: "outline",
437
- onClick: () => setPendingDelete(true),
438
- children: [/* @__PURE__ */ jsx(Trash2, { className: "mr-2 size-4" }), "Delete"]
439
- })]
440
- }),
441
- breadcrumb: /* @__PURE__ */ jsx(Breadcrumbs, { items: [
442
- {
443
- label: "Cursor",
444
- to: "/cursor"
445
- },
446
- {
447
- label: detail.thread.workspaceLabel,
448
- params: { workspaceKey: detail.thread.workspaceKey },
449
- to: "/cursor/$workspaceKey"
450
- },
451
- { label: detail.thread.name }
452
- ] }),
453
- eyebrow: "Cursor thread",
454
- subtitle: "Thread detail for the selected Cursor workspace conversation.",
455
- title: detail.thread.name
456
- }),
457
- /* @__PURE__ */ jsxs("div", {
458
- className: "grid gap-3 md:grid-cols-2 xl:grid-cols-4",
459
- children: [
460
- /* @__PURE__ */ jsx(MetricCard, {
461
- label: "Messages",
462
- value: formatNumber(detail.thread.bubbleCount)
463
- }),
464
- /* @__PURE__ */ jsx(MetricCard, {
465
- label: "Size",
466
- value: formatBytes(detail.thread.bubbleBytes)
467
- }),
468
- /* @__PURE__ */ jsx(MetricCard, {
469
- label: "Mode",
470
- value: detail.thread.mode ?? "unknown"
471
- }),
472
- /* @__PURE__ */ jsx(MetricCard, {
473
- helper: `${formatNumber(detail.transcript?.renderableBubbleCount ?? 0)} renderable`,
474
- label: "Omitted",
475
- value: formatNumber(detail.transcript?.omittedBubbleCount ?? 0)
476
- })
477
- ]
478
- }),
479
- /* @__PURE__ */ jsxs(Tabs, {
480
- className: "space-y-4",
481
- defaultValue: "transcript",
482
- children: [
483
- /* @__PURE__ */ jsxs(TabsList, {
484
- className: "grid w-fit min-w-[24rem] grid-cols-3 rounded-full border border-[var(--border)] bg-[var(--panel)] p-1",
485
- children: [
486
- /* @__PURE__ */ jsx(TabsTrigger, {
487
- className: "rounded-full px-5 text-sm",
488
- value: "transcript",
489
- children: "Transcript"
490
- }),
491
- /* @__PURE__ */ jsx(TabsTrigger, {
492
- className: "rounded-full px-5 text-sm",
493
- value: "metadata",
494
- children: "Metadata"
495
- }),
496
- /* @__PURE__ */ jsx(TabsTrigger, {
497
- className: "rounded-full px-5 text-sm",
498
- value: "raw",
499
- children: "Raw"
500
- })
501
- ]
502
- }),
503
- /* @__PURE__ */ jsxs(TabsContent, {
504
- className: "space-y-3",
505
- value: "transcript",
506
- children: [/* @__PURE__ */ jsx(CursorTranscriptControls, {
507
- rawJsonDisabled: !detail.transcript,
508
- showCommentary,
509
- showExtraEvents,
510
- showRawJson,
511
- showToolCalls,
512
- showUserMessages,
513
- onShowCommentaryChange: setShowCommentary,
514
- onShowExtraEventsChange: setShowExtraEvents,
515
- onShowRawJsonChange: setShowRawJson,
516
- onShowToolCallsChange: setShowToolCalls,
517
- onShowUserMessagesChange: setShowUserMessages
518
- }), detail.transcript && transcriptEvents.length > 0 ? /* @__PURE__ */ jsx(TranscriptView, {
519
- assistantModel: null,
520
- events: transcriptEvents,
521
- projectPath: null,
522
- showCommentary,
523
- showExtraEvents,
524
- showRawJson,
525
- showToolCalls,
526
- showUserMessages
527
- }) : /* @__PURE__ */ jsxs("section", {
528
- className: "rounded-[1.6rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]",
529
- children: [/* @__PURE__ */ jsx("h3", {
530
- className: "font-semibold text-[var(--muted-foreground)] text-sm uppercase tracking-[0.18em]",
531
- children: "Transcript"
532
- }), /* @__PURE__ */ jsx("p", {
533
- className: "mt-4 text-[var(--muted-foreground)] text-sm",
534
- children: "No renderable Cursor transcript content was found for this thread."
535
- })]
536
- })]
537
- }),
538
- /* @__PURE__ */ jsx(TabsContent, {
539
- value: "metadata",
540
- children: /* @__PURE__ */ jsx(CursorThreadMetadataPanels, {
541
- detail,
542
- events: transcriptEvents,
543
- stats: transcriptStats
544
- })
545
- }),
546
- /* @__PURE__ */ jsx(TabsContent, {
547
- value: "raw",
548
- children: /* @__PURE__ */ jsx(CursorThreadRawPanels, {
549
- detail,
550
- events: transcriptEvents
551
- })
552
- })
553
- ]
554
- }),
555
- /* @__PURE__ */ jsx(DeleteConfirmDialog, {
556
- confirmLabel: deleteThreadMutation.isPending ? "Deleting..." : "Delete thread",
557
- description: `Permanently delete "${detail.thread.name}" from Cursor's database and remove any on-disk transcript directories. Quit Cursor first. This cannot be undone.`,
558
- errorMessage: deleteThreadMutation.isError ? deleteThreadMutation.error instanceof Error ? deleteThreadMutation.error.message : "Delete failed" : null,
559
- open: pendingDelete,
560
- title: "Delete Cursor thread?",
561
- onConfirm: () => deleteThreadMutation.mutate(),
562
- onOpenChange: (nextOpen) => {
563
- setPendingDelete(nextOpen);
564
- if (!nextOpen) deleteThreadMutation.reset();
565
- }
566
- }),
567
- /* @__PURE__ */ jsx(ExportDialog, {
568
- errorMessage: exportThreadMutation.isError ? exportThreadMutation.error instanceof Error ? exportThreadMutation.error.message : "Export failed" : null,
569
- open: pendingExport,
570
- pending: exportThreadMutation.isPending,
571
- title: `Export ${detail.thread.name}`,
572
- onExport: (options) => exportThreadMutation.mutate(options),
573
- onOpenChange: (nextOpen) => {
574
- setPendingExport(nextOpen);
575
- if (!nextOpen) exportThreadMutation.reset();
576
- }
577
- })
578
- ]
579
- });
580
- };
581
- //#endregion
582
- export { CursorThreadDetailPage as component };