spiracha 1.5.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/AGENTS.md +114 -205
  2. package/README.md +94 -269
  3. package/apps/ui/AGENTS.md +17 -7
  4. package/apps/ui/README.md +52 -8
  5. package/apps/ui/components.json +21 -0
  6. package/apps/ui/package.json +65 -0
  7. package/apps/ui/src/components/antigravity-conversations-table.tsx +245 -0
  8. package/apps/ui/src/components/antigravity-keychain-panel.tsx +76 -0
  9. package/apps/ui/src/components/antigravity-workspaces-table.tsx +63 -0
  10. package/apps/ui/src/components/app-shell.tsx +125 -0
  11. package/apps/ui/src/components/breadcrumbs.tsx +71 -0
  12. package/apps/ui/src/components/claude-code-sessions-table.tsx +150 -0
  13. package/apps/ui/src/components/claude-code-workspaces-table.tsx +57 -0
  14. package/apps/ui/src/components/cursor-threads-table.tsx +152 -0
  15. package/apps/ui/src/components/cursor-workspaces-table.tsx +140 -0
  16. package/apps/ui/src/components/data-table.tsx +243 -0
  17. package/apps/ui/src/components/delete-confirm-dialog.tsx +88 -0
  18. package/apps/ui/src/components/export-dialog.tsx +174 -0
  19. package/apps/ui/src/components/grok-sessions-table.tsx +146 -0
  20. package/apps/ui/src/components/grok-workspaces-table.tsx +53 -0
  21. package/apps/ui/src/components/json-panel.tsx +17 -0
  22. package/apps/ui/src/components/kiro-sessions-table.tsx +148 -0
  23. package/apps/ui/src/components/kiro-workspaces-table.tsx +53 -0
  24. package/apps/ui/src/components/list-search-input.tsx +18 -0
  25. package/apps/ui/src/components/loading-panel.tsx +23 -0
  26. package/apps/ui/src/components/metadata-section.tsx +31 -0
  27. package/apps/ui/src/components/metric-card.tsx +19 -0
  28. package/apps/ui/src/components/opencode-sessions-table.tsx +164 -0
  29. package/apps/ui/src/components/opencode-workspaces-table.tsx +57 -0
  30. package/apps/ui/src/components/page-header.tsx +39 -0
  31. package/apps/ui/src/components/projects-loading-state.tsx +74 -0
  32. package/apps/ui/src/components/projects-table.tsx +108 -0
  33. package/apps/ui/src/components/qoder-sessions-table.tsx +133 -0
  34. package/apps/ui/src/components/qoder-workspaces-table.tsx +57 -0
  35. package/apps/ui/src/components/recent-threads-list.tsx +52 -0
  36. package/apps/ui/src/components/reload-error-panel.tsx +20 -0
  37. package/apps/ui/src/components/selection-actions-toolbar.tsx +80 -0
  38. package/apps/ui/src/components/text-document-panel.tsx +19 -0
  39. package/apps/ui/src/components/theme-toggle.tsx +48 -0
  40. package/apps/ui/src/components/threads-table.tsx +165 -0
  41. package/apps/ui/src/components/transcript-view.tsx +648 -0
  42. package/apps/ui/src/components/ui/alert-dialog.tsx +160 -0
  43. package/apps/ui/src/components/ui/badge.tsx +45 -0
  44. package/apps/ui/src/components/ui/button.tsx +62 -0
  45. package/apps/ui/src/components/ui/checkbox.tsx +29 -0
  46. package/apps/ui/src/components/ui/dialog.tsx +137 -0
  47. package/apps/ui/src/components/ui/dropdown-menu.tsx +217 -0
  48. package/apps/ui/src/components/ui/input.tsx +21 -0
  49. package/apps/ui/src/components/ui/scroll-area.tsx +46 -0
  50. package/apps/ui/src/components/ui/select.tsx +163 -0
  51. package/apps/ui/src/components/ui/separator.tsx +28 -0
  52. package/apps/ui/src/components/ui/sheet.tsx +107 -0
  53. package/apps/ui/src/components/ui/skeleton.tsx +7 -0
  54. package/apps/ui/src/components/ui/table.tsx +76 -0
  55. package/apps/ui/src/components/ui/tabs.tsx +71 -0
  56. package/apps/ui/src/components/ui/tooltip.tsx +44 -0
  57. package/apps/ui/src/integrations/tanstack-query/devtools.tsx +6 -0
  58. package/apps/ui/src/integrations/tanstack-query/root-provider.tsx +10 -0
  59. package/apps/ui/src/lib/antigravity-conversation-state.ts +41 -0
  60. package/apps/ui/src/lib/antigravity-queries.ts +33 -0
  61. package/apps/ui/src/lib/antigravity-server.ts +273 -0
  62. package/apps/ui/src/lib/antigravity-transcript-events.ts +343 -0
  63. package/apps/ui/src/lib/claude-code-queries.ts +34 -0
  64. package/apps/ui/src/lib/claude-code-server.ts +243 -0
  65. package/apps/ui/src/lib/claude-code-transcript-events.ts +161 -0
  66. package/apps/ui/src/lib/codex-queries.ts +82 -0
  67. package/apps/ui/src/lib/codex-server.ts +291 -0
  68. package/apps/ui/src/lib/cursor-queries.ts +37 -0
  69. package/apps/ui/src/lib/cursor-server.ts +315 -0
  70. package/apps/ui/src/lib/cursor-transcript-events.ts +229 -0
  71. package/apps/ui/src/lib/download.ts +166 -0
  72. package/apps/ui/src/lib/formatters.ts +147 -0
  73. package/apps/ui/src/lib/grok-queries.ts +22 -0
  74. package/apps/ui/src/lib/grok-server.ts +169 -0
  75. package/apps/ui/src/lib/grok-transcript-events.ts +149 -0
  76. package/apps/ui/src/lib/kiro-queries.ts +22 -0
  77. package/apps/ui/src/lib/kiro-server.ts +151 -0
  78. package/apps/ui/src/lib/kiro-transcript-events.ts +113 -0
  79. package/apps/ui/src/lib/opencode-queries.ts +37 -0
  80. package/apps/ui/src/lib/opencode-server.ts +151 -0
  81. package/apps/ui/src/lib/opencode-transcript-events.ts +221 -0
  82. package/apps/ui/src/lib/package-metadata.ts +16 -0
  83. package/apps/ui/src/lib/path-utils.ts +13 -0
  84. package/apps/ui/src/lib/qoder-queries.ts +22 -0
  85. package/apps/ui/src/lib/qoder-server.ts +135 -0
  86. package/apps/ui/src/lib/qoder-transcript-events.ts +139 -0
  87. package/apps/ui/src/lib/route-search.ts +182 -0
  88. package/apps/ui/src/lib/settings-store.tsx +59 -0
  89. package/apps/ui/src/lib/source-session-export-server.ts +139 -0
  90. package/apps/ui/src/lib/text-filter.ts +22 -0
  91. package/apps/ui/src/lib/thread-id.ts +3 -0
  92. package/apps/ui/src/lib/thread-transcript-load.ts +15 -0
  93. package/apps/ui/src/lib/thread-transcript-stats.ts +57 -0
  94. package/apps/ui/src/lib/utils.ts +7 -0
  95. package/apps/ui/src/lib/workspace-delete-navigation.ts +12 -0
  96. package/apps/ui/src/routeTree.gen.ts +837 -0
  97. package/apps/ui/src/router.tsx +20 -0
  98. package/apps/ui/src/routes/$threadId.tsx +22 -0
  99. package/apps/ui/src/routes/__root.tsx +127 -0
  100. package/apps/ui/src/routes/analytics.tsx +143 -0
  101. package/apps/ui/src/routes/antigravity-conversations.$conversationId.tsx +504 -0
  102. package/apps/ui/src/routes/antigravity.$workspaceKey.tsx +365 -0
  103. package/apps/ui/src/routes/antigravity.index.tsx +51 -0
  104. package/apps/ui/src/routes/api.v1.conversation-query.ts +12 -0
  105. package/apps/ui/src/routes/api.v1.conversations.$source.$id.export.ts +12 -0
  106. package/apps/ui/src/routes/api.v1.conversations.$source.$id.ts +16 -0
  107. package/apps/ui/src/routes/api.v1.conversations.delete.ts +12 -0
  108. package/apps/ui/src/routes/api.v1.conversations.export.ts +12 -0
  109. package/apps/ui/src/routes/api.v1.conversations.ts +12 -0
  110. package/apps/ui/src/routes/api.v1.resolve.ts +12 -0
  111. package/apps/ui/src/routes/api.v1.sources.ts +12 -0
  112. package/apps/ui/src/routes/claude-code-sessions.$sessionId.tsx +468 -0
  113. package/apps/ui/src/routes/claude-code.$workspaceKey.tsx +274 -0
  114. package/apps/ui/src/routes/claude-code.index.tsx +48 -0
  115. package/apps/ui/src/routes/codex.$project.tsx +390 -0
  116. package/apps/ui/src/routes/codex.index.tsx +116 -0
  117. package/apps/ui/src/routes/cursor-threads.$composerId.tsx +435 -0
  118. package/apps/ui/src/routes/cursor.$workspaceKey.tsx +426 -0
  119. package/apps/ui/src/routes/cursor.index.tsx +120 -0
  120. package/apps/ui/src/routes/grok-sessions.$sessionId.tsx +388 -0
  121. package/apps/ui/src/routes/grok.$workspaceKey.tsx +301 -0
  122. package/apps/ui/src/routes/grok.index.tsx +48 -0
  123. package/apps/ui/src/routes/index.tsx +124 -0
  124. package/apps/ui/src/routes/kiro-sessions.$sessionId.tsx +396 -0
  125. package/apps/ui/src/routes/kiro.$workspaceKey.tsx +303 -0
  126. package/apps/ui/src/routes/kiro.index.tsx +48 -0
  127. package/apps/ui/src/routes/opencode-sessions.$sessionId.tsx +420 -0
  128. package/apps/ui/src/routes/opencode.$workspaceKey.tsx +327 -0
  129. package/apps/ui/src/routes/opencode.index.tsx +61 -0
  130. package/apps/ui/src/routes/qoder-sessions.$sessionId.tsx +344 -0
  131. package/apps/ui/src/routes/qoder.$workspaceKey.tsx +186 -0
  132. package/apps/ui/src/routes/qoder.index.tsx +48 -0
  133. package/apps/ui/src/routes/settings.tsx +91 -0
  134. package/apps/ui/src/routes/threads.$threadId.tsx +1103 -0
  135. package/apps/ui/src/styles.css +122 -0
  136. package/apps/ui/tsconfig.json +29 -0
  137. package/apps/ui/vite.config.ts +84 -0
  138. package/bin/spiracha.ts +32 -0
  139. package/package.json +54 -80
  140. package/src/client.ts +423 -0
  141. package/src/lib/antigravity-db.ts +414 -44
  142. package/src/lib/antigravity-exporter-types.ts +4 -0
  143. package/src/lib/antigravity-projects.ts +201 -0
  144. package/src/lib/claude-code-db.ts +498 -32
  145. package/src/lib/claude-code-exporter-types.ts +5 -0
  146. package/src/lib/claude-code-transcript-phase.ts +60 -1
  147. package/src/lib/claude-code-transcript.ts +8 -5
  148. package/src/lib/codex-analytics.ts +1 -1
  149. package/src/lib/codex-browser-db.ts +410 -74
  150. package/src/lib/codex-browser-export.ts +29 -41
  151. package/src/lib/codex-browser-types.ts +1 -1
  152. package/src/lib/codex-thread-cache.ts +41 -13
  153. package/src/lib/codex-thread-parser.ts +86 -35
  154. package/src/lib/{codex-exporter-types.ts → codex-thread-types.ts} +2 -30
  155. package/src/lib/codex-transcript-filter.ts +31 -0
  156. package/src/lib/{codex-exporter-transcript.ts → codex-transcript-renderer.ts} +104 -48
  157. package/src/lib/concurrency.ts +41 -0
  158. package/src/lib/conversation-api.ts +1172 -0
  159. package/src/lib/conversation-data/adapter-helpers.ts +110 -0
  160. package/src/lib/conversation-data/antigravity-adapter.ts +167 -0
  161. package/src/lib/conversation-data/claude-code-adapter.ts +206 -0
  162. package/src/lib/conversation-data/codex-adapter.ts +269 -0
  163. package/src/lib/conversation-data/cursor-adapter.ts +205 -0
  164. package/src/lib/conversation-data/grok-adapter.ts +210 -0
  165. package/src/lib/conversation-data/index.ts +386 -0
  166. package/src/lib/conversation-data/kiro-adapter.ts +174 -0
  167. package/src/lib/conversation-data/message-selector.ts +37 -0
  168. package/src/lib/conversation-data/opencode-adapter.ts +202 -0
  169. package/src/lib/conversation-data/path-match.ts +79 -0
  170. package/src/lib/conversation-data/qoder-adapter.ts +255 -0
  171. package/src/lib/conversation-data/types.ts +159 -0
  172. package/src/lib/conversation-zip-export.ts +57 -0
  173. package/src/lib/cursor-db.ts +100 -25
  174. package/src/lib/cursor-exporter-types.ts +0 -19
  175. package/src/lib/grok-db.ts +1026 -0
  176. package/src/lib/grok-exporter-types.ts +110 -0
  177. package/src/lib/grok-transcript-phase.ts +52 -0
  178. package/src/lib/grok-transcript.ts +154 -0
  179. package/src/lib/kiro-db.ts +52 -1
  180. package/src/lib/model-label.ts +11 -3
  181. package/src/lib/opencode-db.ts +598 -55
  182. package/src/lib/opencode-transcript.ts +8 -5
  183. package/src/lib/qoder-acp-client.ts +268 -0
  184. package/src/lib/qoder-db.ts +1601 -0
  185. package/src/lib/qoder-exporter-types.ts +114 -0
  186. package/src/lib/qoder-transcript-phase.ts +41 -0
  187. package/src/lib/qoder-transcript.ts +112 -0
  188. package/src/lib/shared.ts +12 -0
  189. package/src/lib/transcript-load-limiter.ts +82 -0
  190. package/src/lib/ui-cache.ts +43 -17
  191. package/src/lib/ui-export-archive.ts +60 -0
  192. package/apps/ui/dist/client/assets/_threadId-CAIeH5mq.js +0 -1
  193. package/apps/ui/dist/client/assets/analytics-DOy1b6Sh.js +0 -1
  194. package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-DqySVO2K.js +0 -7
  195. package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-KAcXtNxI.js +0 -1
  196. package/apps/ui/dist/client/assets/antigravity-keychain-panel-B77qJz6f.js +0 -1
  197. package/apps/ui/dist/client/assets/antigravity._workspaceKey-B3NM6gRH.js +0 -1
  198. package/apps/ui/dist/client/assets/antigravity._workspaceKey-ByitGWki.js +0 -1
  199. package/apps/ui/dist/client/assets/antigravity.index-DP9JC2P9.js +0 -1
  200. package/apps/ui/dist/client/assets/antigravity.index-DgW25FEV.js +0 -1
  201. package/apps/ui/dist/client/assets/badge-C3i4OKs8.js +0 -1
  202. package/apps/ui/dist/client/assets/checkbox-CdHitXWQ.js +0 -1
  203. package/apps/ui/dist/client/assets/claude-code-sessions._sessionId-8pQ55ci2.js +0 -1
  204. package/apps/ui/dist/client/assets/claude-code-sessions._sessionId-DVz5UmtU.js +0 -1
  205. package/apps/ui/dist/client/assets/claude-code._workspaceKey-BBKskSum.js +0 -1
  206. package/apps/ui/dist/client/assets/claude-code._workspaceKey-OkikMUFs.js +0 -1
  207. package/apps/ui/dist/client/assets/claude-code.index-Cwu76dbb.js +0 -1
  208. package/apps/ui/dist/client/assets/claude-code.index-D6eMd08t.js +0 -1
  209. package/apps/ui/dist/client/assets/createServerFn-B-KkwmHU.js +0 -3
  210. package/apps/ui/dist/client/assets/cursor-threads._composerId-CmBFclK8.js +0 -1
  211. package/apps/ui/dist/client/assets/cursor-threads._composerId-hBWlP1D-.js +0 -1
  212. package/apps/ui/dist/client/assets/cursor._workspaceKey-BFPkIRi-.js +0 -1
  213. package/apps/ui/dist/client/assets/cursor._workspaceKey-CaAZjGmm.js +0 -1
  214. package/apps/ui/dist/client/assets/cursor.index-8y4o20kb.js +0 -2
  215. package/apps/ui/dist/client/assets/cursor.index-CrnMwDCi.js +0 -1
  216. package/apps/ui/dist/client/assets/data-table-Br78_dk3.js +0 -4
  217. package/apps/ui/dist/client/assets/delete-confirm-dialog-Bxs07u-j.js +0 -7
  218. package/apps/ui/dist/client/assets/dist-B9pyYCVU.js +0 -1
  219. package/apps/ui/dist/client/assets/dist-BrJhN2A0.js +0 -5
  220. package/apps/ui/dist/client/assets/dist-Cmd3AIfD.js +0 -1
  221. package/apps/ui/dist/client/assets/dist-DvMS2965.js +0 -1
  222. package/apps/ui/dist/client/assets/download-Bf0QJKD3.js +0 -1
  223. package/apps/ui/dist/client/assets/dropdown-menu-D5cvPaZt.js +0 -1
  224. package/apps/ui/dist/client/assets/es2015-ad6040dw.js +0 -41
  225. package/apps/ui/dist/client/assets/export-dialog-Dr8d2MqD.js +0 -1
  226. package/apps/ui/dist/client/assets/formatters-BtqyrX_c.js +0 -1
  227. package/apps/ui/dist/client/assets/index-C-STgIH4.js +0 -166
  228. package/apps/ui/dist/client/assets/jsx-runtime-DGeXAQPT.js +0 -1
  229. package/apps/ui/dist/client/assets/kiro-sessions._sessionId-CKgfJ7GR.js +0 -1
  230. package/apps/ui/dist/client/assets/kiro-sessions._sessionId-zvIJHtQF.js +0 -1
  231. package/apps/ui/dist/client/assets/kiro._workspaceKey-DhVuJuZB.js +0 -1
  232. package/apps/ui/dist/client/assets/kiro._workspaceKey-QArsjkTY.js +0 -1
  233. package/apps/ui/dist/client/assets/kiro.index-C-fr4m7i.js +0 -1
  234. package/apps/ui/dist/client/assets/kiro.index-OYgAdtZd.js +0 -1
  235. package/apps/ui/dist/client/assets/metric-card-Dplm0ZiM.js +0 -1
  236. package/apps/ui/dist/client/assets/opencode-sessions._sessionId-DLjiTst-.js +0 -1
  237. package/apps/ui/dist/client/assets/opencode-sessions._sessionId-biBwrRbt.js +0 -8
  238. package/apps/ui/dist/client/assets/opencode._workspaceKey-C7OIzMOJ.js +0 -1
  239. package/apps/ui/dist/client/assets/opencode._workspaceKey-sBakX0oI.js +0 -1
  240. package/apps/ui/dist/client/assets/opencode.index-Bl_kNs9N.js +0 -1
  241. package/apps/ui/dist/client/assets/opencode.index-CN53bVmb.js +0 -1
  242. package/apps/ui/dist/client/assets/page-header-Cwa3p6Tl.js +0 -1
  243. package/apps/ui/dist/client/assets/preload-helper-B8fFrdxC.js +0 -1
  244. package/apps/ui/dist/client/assets/projects._project-D8WloxQN.js +0 -1
  245. package/apps/ui/dist/client/assets/projects._project-DSDwH4NF.js +0 -1
  246. package/apps/ui/dist/client/assets/projects.index-5xRtuJdX.js +0 -3
  247. package/apps/ui/dist/client/assets/projects.index-DEfhWqa8.js +0 -1
  248. package/apps/ui/dist/client/assets/react-dom-DL96Jor4.js +0 -1
  249. package/apps/ui/dist/client/assets/refresh-ccw-BgKjOiA6.js +0 -1
  250. package/apps/ui/dist/client/assets/reload-error-panel-AHqu0akK.js +0 -1
  251. package/apps/ui/dist/client/assets/routes-DnzF_9CX.js +0 -1
  252. package/apps/ui/dist/client/assets/scroll-text-fM0sMOB3.js +0 -1
  253. package/apps/ui/dist/client/assets/select-CYF6pF37.js +0 -1
  254. package/apps/ui/dist/client/assets/settings-Dx70jgP_.js +0 -1
  255. package/apps/ui/dist/client/assets/sqlite-error-B6uZjUe8.js +0 -1
  256. package/apps/ui/dist/client/assets/styles-B7Zi9EFA.css +0 -1
  257. package/apps/ui/dist/client/assets/tabs-CmuhkT-c.js +0 -7
  258. package/apps/ui/dist/client/assets/text-filter-DVAZySUS.js +0 -2
  259. package/apps/ui/dist/client/assets/thread-transcript-stats-BUNz6u7F.js +0 -1
  260. package/apps/ui/dist/client/assets/threads._threadId-BB9tTsV4.js +0 -1
  261. package/apps/ui/dist/client/assets/threads._threadId-BMRSFow3.js +0 -1
  262. package/apps/ui/dist/client/assets/useMutation-BSFult2i.js +0 -1
  263. package/apps/ui/dist/client/assets/useQuery-CjINKZf1.js +0 -1
  264. package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-CQ8Jjs3B.js +0 -387
  265. package/apps/ui/dist/server/assets/_threadId-B6SrBR9E.js +0 -6
  266. package/apps/ui/dist/server/assets/analytics-CYP_LT5Y.js +0 -16
  267. package/apps/ui/dist/server/assets/analytics-CtpOMVMO.js +0 -146
  268. package/apps/ui/dist/server/assets/antigravity-conversation-state-HgzS302O.js +0 -16
  269. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-BKOyL2T6.js +0 -613
  270. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-D426O-64.js +0 -11
  271. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-eS87Dx7g.js +0 -20
  272. package/apps/ui/dist/server/assets/antigravity-db-Bh8_U9uw.js +0 -580
  273. package/apps/ui/dist/server/assets/antigravity-keychain-DOiuHDwK.js +0 -126
  274. package/apps/ui/dist/server/assets/antigravity-keychain-panel-CC7FLmAK.js +0 -55
  275. package/apps/ui/dist/server/assets/antigravity-queries-CGrJO9Vr.js +0 -37
  276. package/apps/ui/dist/server/assets/antigravity-server-CHRjVFqN.js +0 -114
  277. package/apps/ui/dist/server/assets/antigravity._workspaceKey-3m_MzNFA.js +0 -11
  278. package/apps/ui/dist/server/assets/antigravity._workspaceKey-B0QeYUOh.js +0 -28
  279. package/apps/ui/dist/server/assets/antigravity._workspaceKey-C3kP-qyN.js +0 -210
  280. package/apps/ui/dist/server/assets/antigravity.index-CPCYkqCi.js +0 -104
  281. package/apps/ui/dist/server/assets/antigravity.index-DudTB3Tq.js +0 -11
  282. package/apps/ui/dist/server/assets/badge-EvdhKK_Z.js +0 -26
  283. package/apps/ui/dist/server/assets/button-CmTDnzOn.js +0 -46
  284. package/apps/ui/dist/server/assets/checkbox-C0hovF41.js +0 -19
  285. package/apps/ui/dist/server/assets/claude-code-db-Ik3VStKZ.js +0 -361
  286. package/apps/ui/dist/server/assets/claude-code-queries-Cgzi4K-e.js +0 -37
  287. package/apps/ui/dist/server/assets/claude-code-server-PfraClXS.js +0 -72
  288. package/apps/ui/dist/server/assets/claude-code-sessions._sessionId-C55oe6zj.js +0 -18
  289. package/apps/ui/dist/server/assets/claude-code-sessions._sessionId-D1RYYi3j.js +0 -473
  290. package/apps/ui/dist/server/assets/claude-code-sessions._sessionId-DSvPLEUL.js +0 -11
  291. package/apps/ui/dist/server/assets/claude-code-transcript-C-bxh3cS.js +0 -139
  292. package/apps/ui/dist/server/assets/claude-code-transcript-phase-DmUMc8VU.js +0 -10
  293. package/apps/ui/dist/server/assets/claude-code._workspaceKey-B5Xg_-tE.js +0 -28
  294. package/apps/ui/dist/server/assets/claude-code._workspaceKey-BPlzyXPa.js +0 -11
  295. package/apps/ui/dist/server/assets/claude-code._workspaceKey-DqDve2wl.js +0 -191
  296. package/apps/ui/dist/server/assets/claude-code.index-B7yYR7dD.js +0 -92
  297. package/apps/ui/dist/server/assets/claude-code.index-BUHThG1W.js +0 -11
  298. package/apps/ui/dist/server/assets/codex-queries-CtgeZ7VL.js +0 -99
  299. package/apps/ui/dist/server/assets/codex-server-CGXU4H8-.js +0 -2294
  300. package/apps/ui/dist/server/assets/concurrency-VXtYvlGh.js +0 -18
  301. package/apps/ui/dist/server/assets/createServerRpc-CF_DEwnm.js +0 -12
  302. package/apps/ui/dist/server/assets/createSsrRpc-C754NPki.js +0 -16
  303. package/apps/ui/dist/server/assets/cursor-db-CZnYy7aT.js +0 -830
  304. package/apps/ui/dist/server/assets/cursor-exporter-types-CI3goo-c.js +0 -34
  305. package/apps/ui/dist/server/assets/cursor-queries-NCIM0Nat.js +0 -67
  306. package/apps/ui/dist/server/assets/cursor-recovery-CXpO8KcD.js +0 -361
  307. package/apps/ui/dist/server/assets/cursor-server-DNu52A3K.js +0 -213
  308. package/apps/ui/dist/server/assets/cursor-threads._composerId-BB0Y_Mao.js +0 -11
  309. package/apps/ui/dist/server/assets/cursor-threads._composerId-Ckn6ItHI.js +0 -582
  310. package/apps/ui/dist/server/assets/cursor-threads._composerId-p9-ARAzc.js +0 -18
  311. package/apps/ui/dist/server/assets/cursor-transcript-B7tGnqtn.js +0 -125
  312. package/apps/ui/dist/server/assets/cursor._workspaceKey-CZuohIUL.js +0 -28
  313. package/apps/ui/dist/server/assets/cursor._workspaceKey-DPp5JSjy.js +0 -401
  314. package/apps/ui/dist/server/assets/cursor._workspaceKey-nmg3YIOQ.js +0 -11
  315. package/apps/ui/dist/server/assets/cursor.index-CcsX7DG0.js +0 -11
  316. package/apps/ui/dist/server/assets/cursor.index-DkWT-mxw.js +0 -189
  317. package/apps/ui/dist/server/assets/data-table-Cdct823O.js +0 -189
  318. package/apps/ui/dist/server/assets/delete-confirm-dialog-BcBNCxWB.js +0 -144
  319. package/apps/ui/dist/server/assets/download-DMmiy1xf.js +0 -92
  320. package/apps/ui/dist/server/assets/dropdown-menu-Dy_9t6TN.js +0 -36
  321. package/apps/ui/dist/server/assets/empty-plugin-adapters-B3lHh1La.js +0 -5
  322. package/apps/ui/dist/server/assets/export-dialog-D88ze9Gy.js +0 -240
  323. package/apps/ui/dist/server/assets/formatters-FJaGZgJk.js +0 -91
  324. package/apps/ui/dist/server/assets/kiro-db--fXrED_-.js +0 -552
  325. package/apps/ui/dist/server/assets/kiro-queries-CzNlM2ok.js +0 -37
  326. package/apps/ui/dist/server/assets/kiro-server-9WRxg2Au.js +0 -72
  327. package/apps/ui/dist/server/assets/kiro-sessions._sessionId-CRY2c7YO.js +0 -11
  328. package/apps/ui/dist/server/assets/kiro-sessions._sessionId-F1UlwxmR.js +0 -449
  329. package/apps/ui/dist/server/assets/kiro-sessions._sessionId-bvTulT7C.js +0 -18
  330. package/apps/ui/dist/server/assets/kiro-transcript-DoekQBaH.js +0 -112
  331. package/apps/ui/dist/server/assets/kiro-transcript-phase-CJG40nQg.js +0 -27
  332. package/apps/ui/dist/server/assets/kiro._workspaceKey-BDe9sQwo.js +0 -11
  333. package/apps/ui/dist/server/assets/kiro._workspaceKey-CJsjgNwO.js +0 -28
  334. package/apps/ui/dist/server/assets/kiro._workspaceKey-D_-4Qb7y.js +0 -193
  335. package/apps/ui/dist/server/assets/kiro.index-C__-UROk.js +0 -11
  336. package/apps/ui/dist/server/assets/kiro.index-CmTbqeYj.js +0 -93
  337. package/apps/ui/dist/server/assets/loading-panel-BGFnWseS.js +0 -27
  338. package/apps/ui/dist/server/assets/metric-card-ByEeLu0r.js +0 -23
  339. package/apps/ui/dist/server/assets/model-label-B1NWGc65.js +0 -13
  340. package/apps/ui/dist/server/assets/opencode-db-BM7KjOzc.js +0 -397
  341. package/apps/ui/dist/server/assets/opencode-queries-BeNYXnQv.js +0 -50
  342. package/apps/ui/dist/server/assets/opencode-server-BpQ_kRze.js +0 -72
  343. package/apps/ui/dist/server/assets/opencode-sessions._sessionId-CGQ-t0vD.js +0 -518
  344. package/apps/ui/dist/server/assets/opencode-sessions._sessionId-D8Q7in_Z.js +0 -18
  345. package/apps/ui/dist/server/assets/opencode-sessions._sessionId-DKOvi0lV.js +0 -11
  346. package/apps/ui/dist/server/assets/opencode-think-tags-CAoD-EcZ.js +0 -87
  347. package/apps/ui/dist/server/assets/opencode-transcript-BNTcGNym.js +0 -141
  348. package/apps/ui/dist/server/assets/opencode-transcript-phase-OqLkiQD0.js +0 -32
  349. package/apps/ui/dist/server/assets/opencode._workspaceKey-BdqcWHw1.js +0 -11
  350. package/apps/ui/dist/server/assets/opencode._workspaceKey-CfH96HTT.js +0 -28
  351. package/apps/ui/dist/server/assets/opencode._workspaceKey-DdbHPDrO.js +0 -207
  352. package/apps/ui/dist/server/assets/opencode.index-BbVzkJXP.js +0 -11
  353. package/apps/ui/dist/server/assets/opencode.index-Vh_Gq_1L.js +0 -93
  354. package/apps/ui/dist/server/assets/page-header-VNSaM3xd.js +0 -29
  355. package/apps/ui/dist/server/assets/path-transforms-DL2IwtYd.js +0 -31
  356. package/apps/ui/dist/server/assets/projects._project-4io5LO0E.js +0 -20
  357. package/apps/ui/dist/server/assets/projects._project-Bshqk7JA.js +0 -12
  358. package/apps/ui/dist/server/assets/projects._project-D6ZoGhJ8.js +0 -395
  359. package/apps/ui/dist/server/assets/projects.index-BLXOx5eL.js +0 -12
  360. package/apps/ui/dist/server/assets/projects.index-BkLiF2FF.js +0 -182
  361. package/apps/ui/dist/server/assets/projects.index-DesYXwfi.js +0 -14
  362. package/apps/ui/dist/server/assets/reload-error-panel-BJMxY3U1.js +0 -25
  363. package/apps/ui/dist/server/assets/route-search-ts4W9MJ9.js +0 -38
  364. package/apps/ui/dist/server/assets/router-Sac2DGk6.js +0 -518
  365. package/apps/ui/dist/server/assets/routes-Bsact1uB.js +0 -184
  366. package/apps/ui/dist/server/assets/routes-BzkJgq4W.js +0 -34
  367. package/apps/ui/dist/server/assets/select-GW76p-ld.js +0 -76
  368. package/apps/ui/dist/server/assets/settings-OayxIYQQ.js +0 -100
  369. package/apps/ui/dist/server/assets/settings-store-DpEJEQ7M.js +0 -52
  370. package/apps/ui/dist/server/assets/shared-DyhChtHf.js +0 -137
  371. package/apps/ui/dist/server/assets/source-session-export-server-DNutCawb.js +0 -38
  372. package/apps/ui/dist/server/assets/sqlite-error-LZDrnxdd.js +0 -13
  373. package/apps/ui/dist/server/assets/start-B_HFwkkk.js +0 -4
  374. package/apps/ui/dist/server/assets/tabs-DkaChNVg.js +0 -501
  375. package/apps/ui/dist/server/assets/text-filter-CGKxMCKt.js +0 -36
  376. package/apps/ui/dist/server/assets/thread-transcript-stats-Dh34mt2u.js +0 -45
  377. package/apps/ui/dist/server/assets/threads._threadId-BSSK4nkI.js +0 -26
  378. package/apps/ui/dist/server/assets/threads._threadId-BeXEc4Lo.js +0 -648
  379. package/apps/ui/dist/server/assets/threads._threadId-Ci0S4mKU.js +0 -18
  380. package/apps/ui/dist/server/assets/ui-export-files-BHLX9bhN.js +0 -83
  381. package/apps/ui/dist/server/assets/utils-C_uf36nf.js +0 -8
  382. package/apps/ui/dist/server/server.js +0 -5895
  383. package/bin/codex-chats-claude.js +0 -5
  384. package/bin/codex-chats.js +0 -5
  385. package/bin/spiracha.js +0 -5
  386. package/src/export-chats.ts +0 -120
  387. package/src/export-claude.ts +0 -36
  388. package/src/export-cursor.ts +0 -244
  389. package/src/lib/claude-exporter.ts +0 -864
  390. package/src/lib/codex-exporter-cli.ts +0 -277
  391. package/src/lib/codex-exporter-db.ts +0 -319
  392. package/src/lib/codex-exporter.ts +0 -115
  393. package/src/lib/cursor-exporter.ts +0 -266
  394. package/src/lib/interactive-cli.ts +0 -433
  395. package/src/lib/native-open.ts +0 -54
  396. package/src/mcp-server.ts +0 -137
  397. package/src/spiracha.ts +0 -116
  398. package/src/ui-cli.ts +0 -310
  399. /package/apps/ui/{dist/client → public}/icon.svg +0 -0
  400. /package/apps/ui/{dist/client → public}/manifest.json +0 -0
  401. /package/apps/ui/{dist/client → public}/robots.txt +0 -0
@@ -1,395 +0,0 @@
1
- import { t as Button } from "./button-CmTDnzOn.js";
2
- import { n as useSettings } from "./settings-store-DpEJEQ7M.js";
3
- import { c as deleteThreadFn, d as exportThreadsFn, f as recoverProjectThreadsFn, l as deleteThreadsFn, r as projectThreadsQueryOptions, u as exportThreadFn } from "./codex-queries-CtgeZ7VL.js";
4
- import { o as withTextQuerySearch } from "./route-search-ts4W9MJ9.js";
5
- import { t as Route } from "./projects._project-4io5LO0E.js";
6
- import { t as DataTable } from "./data-table-Cdct823O.js";
7
- import { t as PageHeader } from "./page-header-VNSaM3xd.js";
8
- import { n as formatBytes, o as formatNumber, r as formatDateTime, s as formatTokens } from "./formatters-FJaGZgJk.js";
9
- import { n as downloadUrlFile, t as downloadTextFile } from "./download-DMmiy1xf.js";
10
- import { i as DropdownMenuTrigger, n as DropdownMenuContent, r as DropdownMenuItem, t as DropdownMenu } from "./dropdown-menu-Dy_9t6TN.js";
11
- import { n as ListSearchInput, t as matchesTextQuery } from "./text-filter-CGKxMCKt.js";
12
- import { t as ExportDialog } from "./export-dialog-D88ze9Gy.js";
13
- import { t as DeleteConfirmDialog } from "./delete-confirm-dialog-BcBNCxWB.js";
14
- import { startTransition, useDeferredValue, useMemo, useState } from "react";
15
- import { Link, useNavigate } from "@tanstack/react-router";
16
- import { jsx, jsxs } from "react/jsx-runtime";
17
- import { useMutation, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
18
- import { Download, MoreHorizontal, RefreshCcw, Trash2, X } from "lucide-react";
19
- import { createColumnHelper } from "@tanstack/react-table";
20
- //#region src/components/threads-table.tsx
21
- var columnHelper = createColumnHelper();
22
- var defaultSorting = [{
23
- desc: true,
24
- id: "updatedAt"
25
- }];
26
- var columns = (onDeleteThread, onExportThread) => [
27
- columnHelper.accessor((row) => row.thread.title, {
28
- cell: (info) => /* @__PURE__ */ jsxs(Link, {
29
- className: "block w-[16rem] max-w-[20rem] space-y-1 rounded-md outline-none transition hover:opacity-80 focus-visible:ring-2 focus-visible:ring-[var(--accent)] lg:w-auto",
30
- params: { threadId: info.row.original.thread.id },
31
- to: "/threads/$threadId",
32
- children: [/* @__PURE__ */ jsx("p", {
33
- className: "truncate font-medium underline-offset-2 hover:underline",
34
- children: info.getValue()
35
- }), /* @__PURE__ */ jsx("p", {
36
- className: "line-clamp-2 text-[var(--muted-foreground)] text-xs",
37
- children: info.row.original.thread.preview
38
- })]
39
- }),
40
- header: "Thread",
41
- id: "title"
42
- }),
43
- columnHelper.accessor((row) => row.thread.updated_at_ms ?? row.thread.updated_at * 1e3, {
44
- cell: (info) => /* @__PURE__ */ jsx("span", {
45
- className: "whitespace-nowrap text-sm",
46
- suppressHydrationWarning: true,
47
- children: formatDateTime(info.getValue())
48
- }),
49
- header: "Updated",
50
- id: "updatedAt"
51
- }),
52
- columnHelper.accessor((row) => row.thread.created_at_ms ?? row.thread.created_at * 1e3, {
53
- cell: (info) => /* @__PURE__ */ jsx("span", {
54
- className: "whitespace-nowrap text-sm",
55
- suppressHydrationWarning: true,
56
- children: formatDateTime(info.getValue())
57
- }),
58
- header: "Created",
59
- id: "createdAt"
60
- }),
61
- columnHelper.accessor((row) => row.thread.model ?? "unknown", {
62
- cell: (info) => /* @__PURE__ */ jsx("span", {
63
- className: "truncate font-mono text-sm",
64
- children: info.getValue()
65
- }),
66
- header: "Model",
67
- id: "model"
68
- }),
69
- columnHelper.accessor((row) => row.thread.tokens_used, {
70
- cell: (info) => /* @__PURE__ */ jsx("span", {
71
- className: "whitespace-nowrap font-mono text-sm",
72
- children: formatTokens(info.getValue())
73
- }),
74
- header: "Tokens",
75
- id: "tokens"
76
- }),
77
- columnHelper.accessor((row) => row.rolloutSizeBytes, {
78
- cell: (info) => /* @__PURE__ */ jsx("span", {
79
- className: "whitespace-nowrap font-mono text-sm",
80
- children: formatBytes(info.getValue() ?? 0)
81
- }),
82
- header: "Size",
83
- id: "size"
84
- }),
85
- columnHelper.accessor((row) => row.stats.toolCallCount, {
86
- cell: (info) => info.row.original.stats.deferred ? /* @__PURE__ */ jsx("span", {
87
- className: "text-[var(--muted-foreground)] text-sm",
88
- children: "Deferred"
89
- }) : /* @__PURE__ */ jsx("span", {
90
- className: "font-mono text-sm",
91
- children: formatNumber(info.getValue())
92
- }),
93
- header: "Tools",
94
- id: "tools"
95
- }),
96
- columnHelper.accessor((row) => row.thread.archived, {
97
- cell: (info) => /* @__PURE__ */ jsx("span", {
98
- className: "text-sm",
99
- children: info.getValue() ? "Archived" : "Active"
100
- }),
101
- header: "State",
102
- id: "state"
103
- }),
104
- columnHelper.display({
105
- cell: (info) => /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
106
- asChild: true,
107
- children: /* @__PURE__ */ jsx(Button, {
108
- className: "rounded-full",
109
- size: "icon",
110
- type: "button",
111
- variant: "ghost",
112
- onClick: (event) => event.stopPropagation(),
113
- children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" })
114
- })
115
- }), /* @__PURE__ */ jsxs(DropdownMenuContent, {
116
- align: "end",
117
- children: [/* @__PURE__ */ jsxs(DropdownMenuItem, {
118
- onClick: () => onExportThread(info.row.original),
119
- children: [/* @__PURE__ */ jsx(Download, { className: "mr-2 size-4" }), "Export thread"]
120
- }), /* @__PURE__ */ jsxs(DropdownMenuItem, {
121
- className: "text-[var(--destructive)]",
122
- onClick: () => onDeleteThread(info.row.original),
123
- children: [/* @__PURE__ */ jsx(Trash2, { className: "mr-2 size-4" }), "Delete thread"]
124
- })]
125
- })] }),
126
- enableSorting: false,
127
- header: "",
128
- id: "actions"
129
- })
130
- ];
131
- function ThreadsTable({ threads, onDeleteThread, onDeleteThreads, onExportThread, onExportThreads }) {
132
- return /* @__PURE__ */ jsx(DataTable, {
133
- columns: columns(onDeleteThread, onExportThread),
134
- data: threads,
135
- emptyMessage: "No threads match the current project filter.",
136
- enableRowSelection: true,
137
- getRowId: (row) => row.thread.id,
138
- initialSorting: defaultSorting,
139
- renderToolbar: ({ clearSelection, selectedRows }) => {
140
- if (selectedRows.length === 0) return /* @__PURE__ */ jsx("p", {
141
- className: "text-[var(--muted-foreground)] text-sm",
142
- children: "Select threads to export or delete them in a batch."
143
- });
144
- const selectedThreadIds = selectedRows.map((row) => row.thread.id);
145
- return /* @__PURE__ */ jsxs("div", {
146
- className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
147
- children: [/* @__PURE__ */ jsxs("p", {
148
- className: "text-sm",
149
- children: [
150
- selectedRows.length,
151
- " thread",
152
- selectedRows.length === 1 ? "" : "s",
153
- " selected"
154
- ]
155
- }), /* @__PURE__ */ jsxs("div", {
156
- className: "flex flex-wrap gap-2",
157
- children: [
158
- /* @__PURE__ */ jsxs(Button, {
159
- className: "rounded-full",
160
- size: "sm",
161
- type: "button",
162
- variant: "outline",
163
- onClick: () => onExportThreads(selectedThreadIds),
164
- children: [/* @__PURE__ */ jsx(Download, { className: "mr-2 size-4" }), "Export selected threads"]
165
- }),
166
- /* @__PURE__ */ jsxs(Button, {
167
- className: "rounded-full border-[var(--destructive)]/20 text-[var(--destructive)]",
168
- size: "sm",
169
- type: "button",
170
- variant: "outline",
171
- onClick: () => onDeleteThreads(selectedThreadIds),
172
- children: [/* @__PURE__ */ jsx(Trash2, { className: "mr-2 size-4" }), "Delete selected threads"]
173
- }),
174
- /* @__PURE__ */ jsxs(Button, {
175
- className: "rounded-full",
176
- size: "sm",
177
- type: "button",
178
- variant: "ghost",
179
- onClick: clearSelection,
180
- children: [/* @__PURE__ */ jsx(X, { className: "mr-2 size-4" }), "Clear selection"]
181
- })
182
- ]
183
- })]
184
- });
185
- }
186
- });
187
- }
188
- //#endregion
189
- //#region src/routes/projects.$project.tsx?tsr-split=component
190
- var shouldForceZipArchive = (pendingExport) => {
191
- return Boolean(pendingExport && pendingExport.threadIds.length > 1);
192
- };
193
- var getDeleteConfirmLabel = (pendingDelete, isPending) => {
194
- if (isPending) return "Deleting...";
195
- if (pendingDelete && pendingDelete.threads.length > 1) return "Delete threads";
196
- return "Delete thread";
197
- };
198
- var getDeleteDescription = (pendingDelete) => {
199
- if (!pendingDelete) return "";
200
- if (pendingDelete.threads.length === 1) return `Delete the thread "${pendingDelete.threads[0].thread.title}" from the Codex database. Leave Session files unchecked if you only want to remove the current DB row.`;
201
- return `Delete ${pendingDelete.threads.length} selected threads from the Codex database. Enable Delete Session files if you also want to remove their rollout JSONL files.`;
202
- };
203
- var getDeleteTitle = (pendingDelete) => {
204
- if (pendingDelete && pendingDelete.threads.length > 1) return `Delete ${pendingDelete.threads.length} Codex threads?`;
205
- return "Delete Codex thread?";
206
- };
207
- function ProjectDetailPage() {
208
- const navigate = useNavigate({ from: Route.fullPath });
209
- const params = Route.useParams();
210
- const queryClient = useQueryClient();
211
- const threads = useSuspenseQuery(projectThreadsQueryOptions(params.project)).data;
212
- const { settings } = useSettings();
213
- const searchInput = Route.useSearch().q ?? "";
214
- const [pendingDelete, setPendingDelete] = useState(null);
215
- const [pendingExport, setPendingExport] = useState(null);
216
- const deferredSearch = useDeferredValue(searchInput.trim().toLowerCase());
217
- const deleteThreadMutation = useMutation({
218
- mutationFn: (input) => {
219
- if (input.threadIds.length === 1) return deleteThreadFn({ data: {
220
- deleteSessionFiles: input.deleteSessionFiles,
221
- threadId: input.threadIds[0]
222
- } });
223
- return deleteThreadsFn({ data: input });
224
- },
225
- onSuccess: async () => {
226
- await Promise.all([
227
- queryClient.invalidateQueries({ queryKey: ["analytics"] }),
228
- queryClient.invalidateQueries({ queryKey: ["dashboard"] }),
229
- queryClient.invalidateQueries({ queryKey: ["project-threads", params.project] }),
230
- queryClient.invalidateQueries({ queryKey: ["projects"] })
231
- ]);
232
- setPendingDelete(null);
233
- }
234
- });
235
- const recoverProjectMutation = useMutation({
236
- mutationFn: () => recoverProjectThreadsFn({ data: { project: params.project } }),
237
- onSuccess: async () => {
238
- await Promise.all([
239
- queryClient.invalidateQueries({ queryKey: ["analytics"] }),
240
- queryClient.invalidateQueries({ queryKey: ["dashboard"] }),
241
- queryClient.invalidateQueries({ queryKey: ["project-threads", params.project] }),
242
- queryClient.invalidateQueries({ queryKey: ["projects"] })
243
- ]);
244
- }
245
- });
246
- const exportThreadMutation = useMutation({
247
- mutationFn: async (options) => {
248
- if (!pendingExport) throw new Error("No thread selected for export");
249
- console.info("[spiracha:export-ui] request", {
250
- outputFormat: options.outputFormat,
251
- project: params.project,
252
- selectedThreadCount: pendingExport.threadIds.length,
253
- selectedThreadIds: pendingExport.threadIds,
254
- zipArchive: options.zipArchive
255
- });
256
- const download = pendingExport.threadIds.length === 1 ? await exportThreadFn({ data: {
257
- ...options,
258
- ...settings,
259
- threadId: pendingExport.threadIds[0]
260
- } }) : await exportThreadsFn({ data: {
261
- ...options,
262
- ...settings,
263
- threadIds: pendingExport.threadIds
264
- } });
265
- console.info("[spiracha:export-ui] response", {
266
- downloadUrl: download.mode === "download_url" ? download.downloadUrl : null,
267
- fileName: download.fileName,
268
- mode: download.mode,
269
- project: params.project,
270
- selectedThreadCount: pendingExport.threadIds.length
271
- });
272
- if (download.mode === "download") {
273
- downloadTextFile(download.fileName, download.content, download.mimeType);
274
- return;
275
- }
276
- await downloadUrlFile(download.fileName, download.downloadUrl);
277
- },
278
- onError: (error) => {
279
- console.error("[spiracha:export-ui] failed", {
280
- error: error instanceof Error ? error.message : String(error),
281
- project: params.project,
282
- selectedThreadCount: pendingExport?.threadIds.length ?? 0,
283
- selectedThreadIds: pendingExport?.threadIds ?? []
284
- });
285
- },
286
- onSuccess: () => {
287
- setPendingExport(null);
288
- }
289
- });
290
- const visibleThreads = [...threads].filter((thread) => {
291
- return matchesTextQuery(deferredSearch, [
292
- thread.thread.title,
293
- thread.thread.preview,
294
- thread.thread.model,
295
- thread.thread.id
296
- ]);
297
- });
298
- const visibleThreadsById = useMemo(() => new Map(visibleThreads.map((thread) => [thread.thread.id, thread])), [visibleThreads]);
299
- const updateSearchInput = (value) => {
300
- startTransition(() => {
301
- navigate({
302
- params: true,
303
- replace: true,
304
- search: (previous) => withTextQuerySearch(previous, value)
305
- });
306
- });
307
- };
308
- const lookupSelectedThreads = (threadIds) => {
309
- return threadIds.map((threadId) => visibleThreadsById.get(threadId) ?? null).filter((thread) => thread !== null);
310
- };
311
- return /* @__PURE__ */ jsxs("div", {
312
- className: "space-y-6",
313
- children: [
314
- /* @__PURE__ */ jsx(PageHeader, {
315
- actions: /* @__PURE__ */ jsxs("div", {
316
- className: "flex flex-col gap-2 sm:flex-row",
317
- children: [/* @__PURE__ */ jsxs(Button, {
318
- className: "rounded-full",
319
- disabled: recoverProjectMutation.isPending,
320
- type: "button",
321
- variant: "outline",
322
- onClick: () => recoverProjectMutation.mutate(),
323
- children: [/* @__PURE__ */ jsx(RefreshCcw, { className: "mr-2 size-4" }), recoverProjectMutation.isPending ? "Recovering..." : "Recover"]
324
- }), /* @__PURE__ */ jsx(ListSearchInput, {
325
- placeholder: "Search thread title, preview, or model",
326
- value: searchInput,
327
- onValueChange: updateSearchInput
328
- })]
329
- }),
330
- eyebrow: "Codex project",
331
- subtitle: "Sort by any column, inspect tool call volume, manage thread records, or repair stale Codex thread metadata for this derived project.",
332
- title: params.project
333
- }),
334
- recoverProjectMutation.isError ? /* @__PURE__ */ jsx("p", {
335
- className: "text-[var(--destructive)] text-sm",
336
- children: recoverProjectMutation.error instanceof Error ? recoverProjectMutation.error.message : "Project recovery failed"
337
- }) : null,
338
- recoverProjectMutation.isSuccess ? /* @__PURE__ */ jsx("p", {
339
- className: "text-[var(--success)] text-sm",
340
- children: "Project thread metadata recovery completed."
341
- }) : null,
342
- /* @__PURE__ */ jsx(ThreadsTable, {
343
- threads: visibleThreads,
344
- onDeleteThread: (thread) => setPendingDelete({ threads: [thread] }),
345
- onDeleteThreads: (threadIds) => {
346
- const selectedThreads = lookupSelectedThreads(threadIds);
347
- if (selectedThreads.length === 0) return;
348
- setPendingDelete({ threads: selectedThreads });
349
- },
350
- onExportThread: (thread) => setPendingExport({
351
- threadIds: [thread.thread.id],
352
- threadLabel: thread.thread.title
353
- }),
354
- onExportThreads: (threadIds) => {
355
- const selectedThreads = lookupSelectedThreads(threadIds);
356
- if (selectedThreads.length === 0) return;
357
- setPendingExport({
358
- threadIds: selectedThreads.map((thread) => thread.thread.id),
359
- threadLabel: selectedThreads.length === 1 ? selectedThreads[0].thread.title : `${selectedThreads.length} selected threads`
360
- });
361
- }
362
- }),
363
- /* @__PURE__ */ jsx(DeleteConfirmDialog, {
364
- confirmLabel: getDeleteConfirmLabel(pendingDelete, deleteThreadMutation.isPending),
365
- defaultDeleteSessionFiles: true,
366
- description: getDeleteDescription(pendingDelete),
367
- open: pendingDelete !== null,
368
- showDeleteSessionFilesOption: true,
369
- title: getDeleteTitle(pendingDelete),
370
- onConfirm: ({ deleteSessionFiles }) => {
371
- if (!pendingDelete) return;
372
- deleteThreadMutation.mutate({
373
- deleteSessionFiles,
374
- threadIds: pendingDelete.threads.map((thread) => thread.thread.id)
375
- });
376
- },
377
- onOpenChange: (open) => {
378
- if (!open) setPendingDelete(null);
379
- }
380
- }),
381
- /* @__PURE__ */ jsx(ExportDialog, {
382
- forceZipArchive: shouldForceZipArchive(pendingExport),
383
- open: pendingExport !== null,
384
- pending: exportThreadMutation.isPending,
385
- title: pendingExport ? `Export ${pendingExport.threadLabel}` : "Export thread",
386
- onExport: (options) => exportThreadMutation.mutate(options),
387
- onOpenChange: (open) => {
388
- if (!open) setPendingExport(null);
389
- }
390
- })
391
- ]
392
- });
393
- }
394
- //#endregion
395
- export { ProjectDetailPage as component };
@@ -1,12 +0,0 @@
1
- import { t as ReloadErrorPanel } from "./reload-error-panel-BJMxY3U1.js";
2
- import { jsx } from "react/jsx-runtime";
3
- //#region src/routes/projects.index.tsx?tsr-split=errorComponent
4
- function ProjectsErrorComponent({ error }) {
5
- const isSqlite = error.message.includes("unable to open database") || error.message.includes("database is locked");
6
- return /* @__PURE__ */ jsx(ReloadErrorPanel, {
7
- description: isSqlite ? "Codex may have an exclusive lock on the database. Reload to retry." : error.message,
8
- title: isSqlite ? "Database unavailable" : "Failed to load Codex inventory"
9
- });
10
- }
11
- //#endregion
12
- export { ProjectsErrorComponent as errorComponent };
@@ -1,182 +0,0 @@
1
- import { t as Button } from "./button-CmTDnzOn.js";
2
- import { i as projectsQueryOptions, s as deleteProjectFn } from "./codex-queries-CtgeZ7VL.js";
3
- import { o as withTextQuerySearch } from "./route-search-ts4W9MJ9.js";
4
- import { t as Route } from "./projects.index-DesYXwfi.js";
5
- import { t as DataTable } from "./data-table-Cdct823O.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 { i as DropdownMenuTrigger, n as DropdownMenuContent, r as DropdownMenuItem, t as DropdownMenu } from "./dropdown-menu-Dy_9t6TN.js";
9
- import { n as ListSearchInput, t as matchesTextQuery } from "./text-filter-CGKxMCKt.js";
10
- import { t as DeleteConfirmDialog } from "./delete-confirm-dialog-BcBNCxWB.js";
11
- import { startTransition, useDeferredValue, useState } from "react";
12
- import { Link, useNavigate } from "@tanstack/react-router";
13
- import { jsx, jsxs } from "react/jsx-runtime";
14
- import { useMutation, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
15
- import { MoreHorizontal, Trash2 } from "lucide-react";
16
- import { createColumnHelper } from "@tanstack/react-table";
17
- //#region src/components/projects-table.tsx
18
- var columnHelper = createColumnHelper();
19
- var columns = (onDeleteProject) => [
20
- columnHelper.accessor("name", {
21
- cell: (info) => /* @__PURE__ */ jsxs(Link, {
22
- className: "block w-[14rem] max-w-[18rem] space-y-1 rounded-md outline-none transition hover:opacity-80 focus-visible:ring-2 focus-visible:ring-[var(--accent)] lg:w-auto",
23
- params: { project: info.row.original.name },
24
- to: "/projects/$project",
25
- children: [/* @__PURE__ */ jsx("p", {
26
- className: "font-medium underline-offset-2 hover:underline",
27
- children: info.getValue()
28
- }), /* @__PURE__ */ jsxs("p", {
29
- className: "text-[var(--muted-foreground)] text-xs",
30
- children: [
31
- formatNumber(info.row.original.cwdPaths.length),
32
- " cwd path",
33
- info.row.original.cwdPaths.length === 1 ? "" : "s"
34
- ]
35
- })]
36
- }),
37
- header: "Project"
38
- }),
39
- columnHelper.accessor("threadCount", {
40
- cell: (info) => /* @__PURE__ */ jsx("span", {
41
- className: "font-mono text-sm",
42
- children: formatNumber(info.getValue())
43
- }),
44
- header: "Threads"
45
- }),
46
- columnHelper.accessor("totalTokens", {
47
- cell: (info) => /* @__PURE__ */ jsx("span", {
48
- className: "font-mono text-sm",
49
- children: formatTokens(info.getValue())
50
- }),
51
- header: "Tokens"
52
- }),
53
- columnHelper.accessor("lastUpdatedAtMs", {
54
- cell: (info) => /* @__PURE__ */ jsx("span", {
55
- className: "text-sm",
56
- suppressHydrationWarning: true,
57
- children: formatDateTime(info.getValue())
58
- }),
59
- header: "Last updated"
60
- }),
61
- columnHelper.display({
62
- cell: (info) => /* @__PURE__ */ jsx("span", {
63
- className: "text-[var(--muted-foreground)] text-sm",
64
- children: formatList(info.row.original.modelNames)
65
- }),
66
- header: "Models",
67
- id: "models"
68
- }),
69
- columnHelper.accessor("archivedThreadCount", {
70
- cell: (info) => /* @__PURE__ */ jsx("span", {
71
- className: "text-sm",
72
- children: formatNumber(info.getValue())
73
- }),
74
- header: "Archived"
75
- }),
76
- columnHelper.display({
77
- cell: (info) => /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
78
- asChild: true,
79
- children: /* @__PURE__ */ jsx(Button, {
80
- className: "rounded-full",
81
- size: "icon",
82
- type: "button",
83
- variant: "ghost",
84
- onClick: (event) => event.stopPropagation(),
85
- children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" })
86
- })
87
- }), /* @__PURE__ */ jsx(DropdownMenuContent, {
88
- align: "end",
89
- children: /* @__PURE__ */ jsxs(DropdownMenuItem, {
90
- className: "text-[var(--destructive)]",
91
- onClick: () => onDeleteProject(info.row.original),
92
- children: [/* @__PURE__ */ jsx(Trash2, { className: "mr-2 size-4" }), "Delete project"]
93
- })
94
- })] }),
95
- header: "",
96
- id: "actions"
97
- })
98
- ];
99
- function ProjectsTable({ projects, onDeleteProject }) {
100
- return /* @__PURE__ */ jsx(DataTable, {
101
- columns: columns(onDeleteProject),
102
- data: projects,
103
- emptyMessage: "No projects match the current search.",
104
- initialSorting: [{
105
- desc: true,
106
- id: "lastUpdatedAtMs"
107
- }]
108
- });
109
- }
110
- //#endregion
111
- //#region src/routes/projects.index.tsx?tsr-split=component
112
- function ProjectsPage() {
113
- const navigate = useNavigate({ from: Route.fullPath });
114
- const queryClient = useQueryClient();
115
- const projects = useSuspenseQuery(projectsQueryOptions()).data;
116
- const searchInput = Route.useSearch().q ?? "";
117
- const [pendingDelete, setPendingDelete] = useState(null);
118
- const deferredSearch = useDeferredValue(searchInput.trim().toLowerCase());
119
- const deleteProjectMutation = useMutation({
120
- mutationFn: (input) => deleteProjectFn({ data: input }),
121
- onSuccess: async () => {
122
- await Promise.all([
123
- queryClient.invalidateQueries({ queryKey: ["analytics"] }),
124
- queryClient.invalidateQueries({ queryKey: ["dashboard"] }),
125
- queryClient.invalidateQueries({ queryKey: ["projects"] })
126
- ]);
127
- setPendingDelete(null);
128
- }
129
- });
130
- const visibleProjects = projects.filter((project) => {
131
- return matchesTextQuery(deferredSearch, [
132
- project.name,
133
- project.cwdPaths.join("\n"),
134
- project.modelNames.join("\n")
135
- ]);
136
- });
137
- return /* @__PURE__ */ jsxs("div", {
138
- className: "space-y-6",
139
- children: [
140
- /* @__PURE__ */ jsx(PageHeader, {
141
- actions: /* @__PURE__ */ jsx(ListSearchInput, {
142
- placeholder: "Search project name, cwd, or model",
143
- value: searchInput,
144
- onValueChange: (value) => {
145
- startTransition(() => {
146
- navigate({
147
- replace: true,
148
- search: (previous) => withTextQuerySearch(previous, value)
149
- });
150
- });
151
- }
152
- }),
153
- eyebrow: "Inventory",
154
- subtitle: "Derived projects are grouped from the final basename of each thread cwd, matching the existing CLI behavior.",
155
- title: "Codex"
156
- }),
157
- /* @__PURE__ */ jsx(ProjectsTable, {
158
- projects: visibleProjects,
159
- onDeleteProject: setPendingDelete
160
- }),
161
- /* @__PURE__ */ jsx(DeleteConfirmDialog, {
162
- confirmLabel: deleteProjectMutation.isPending ? "Deleting..." : "Delete project",
163
- description: pendingDelete ? `Delete ${pendingDelete.threadCount} thread records for the derived project "${pendingDelete.name}" from the Codex database. Enable Delete Session files to remove the rollout JSONL files too.` : "",
164
- open: pendingDelete !== null,
165
- showDeleteSessionFilesOption: true,
166
- title: "Delete Codex project?",
167
- onConfirm: ({ deleteSessionFiles }) => {
168
- if (!pendingDelete) return;
169
- deleteProjectMutation.mutate({
170
- deleteSessionFiles,
171
- project: pendingDelete.name
172
- });
173
- },
174
- onOpenChange: (open) => {
175
- if (!open) setPendingDelete(null);
176
- }
177
- })
178
- ]
179
- });
180
- }
181
- //#endregion
182
- export { ProjectsPage as component };
@@ -1,14 +0,0 @@
1
- import { i as projectsQueryOptions } from "./codex-queries-CtgeZ7VL.js";
2
- import { i as parseTextQuerySearch } from "./route-search-ts4W9MJ9.js";
3
- import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
4
- //#region src/routes/projects.index.tsx
5
- var $$splitErrorComponentImporter = () => import("./projects.index-BLXOx5eL.js");
6
- var $$splitComponentImporter = () => import("./projects.index-BkLiF2FF.js");
7
- var Route = createFileRoute("/projects/")({
8
- component: lazyRouteComponent($$splitComponentImporter, "component"),
9
- errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent"),
10
- loader: ({ context }) => context.queryClient.ensureQueryData(projectsQueryOptions()),
11
- validateSearch: parseTextQuerySearch
12
- });
13
- //#endregion
14
- export { Route as t };
@@ -1,25 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- //#region src/components/reload-error-panel.tsx
3
- function ReloadErrorPanel({ description, title }) {
4
- return /* @__PURE__ */ jsxs("div", {
5
- className: "rounded-xl border border-[var(--border)] bg-[var(--panel)] px-6 py-10 text-center",
6
- children: [
7
- /* @__PURE__ */ jsx("p", {
8
- className: "font-medium text-[var(--destructive)] text-sm",
9
- children: title
10
- }),
11
- /* @__PURE__ */ jsx("p", {
12
- className: "mt-2 text-[var(--muted-foreground)] text-sm",
13
- children: description
14
- }),
15
- /* @__PURE__ */ jsx("button", {
16
- className: "mt-4 text-[var(--accent)] text-sm underline-offset-2 hover:underline",
17
- type: "button",
18
- onClick: () => window.location.reload(),
19
- children: "Reload"
20
- })
21
- ]
22
- });
23
- }
24
- //#endregion
25
- export { ReloadErrorPanel as t };
@@ -1,38 +0,0 @@
1
- //#region src/lib/route-search.ts
2
- var asNonBlankString = (value) => {
3
- if (typeof value !== "string") return;
4
- const trimmed = value.trim();
5
- return trimmed.length > 0 ? trimmed : void 0;
6
- };
7
- var parseTextQuerySearch = (search) => {
8
- const q = asNonBlankString(search.q);
9
- return q ? { q } : {};
10
- };
11
- var parseAnalyticsSearch = (search) => {
12
- const project = asNonBlankString(search.project);
13
- return project ? { project } : {};
14
- };
15
- var withTextQuerySearch = (current, query) => {
16
- const next = { ...current };
17
- const q = asNonBlankString(query);
18
- if (q) next.q = q;
19
- else delete next.q;
20
- return next;
21
- };
22
- var withAnalyticsProjectSearch = (current, project) => {
23
- const next = { ...current };
24
- const trimmedProject = asNonBlankString(project);
25
- if (trimmedProject) next.project = trimmedProject;
26
- else delete next.project;
27
- return next;
28
- };
29
- var ALL_PROJECTS_SELECT_VALUE = "__all__";
30
- var PROJECT_SELECT_PREFIX = "project:";
31
- var encodeAnalyticsProjectSelectValue = (project) => {
32
- return project ? `${PROJECT_SELECT_PREFIX}${project}` : ALL_PROJECTS_SELECT_VALUE;
33
- };
34
- var decodeAnalyticsProjectSelectValue = (value) => {
35
- return value === ALL_PROJECTS_SELECT_VALUE || !value.startsWith(PROJECT_SELECT_PREFIX) ? null : value.slice(8);
36
- };
37
- //#endregion
38
- export { withAnalyticsProjectSearch as a, parseTextQuerySearch as i, encodeAnalyticsProjectSelectValue as n, withTextQuerySearch as o, parseAnalyticsSearch as r, decodeAnalyticsProjectSelectValue as t };