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,410 +0,0 @@
1
- import { t as cn } from "./utils-C_uf36nf.js";
2
- import { t as Button } from "./button-CmTDnzOn.js";
3
- import { t as SettingsProvider } from "./settings-store-DpEJEQ7M.js";
4
- import { t as Route$5 } from "./analytics-CYP_LT5Y.js";
5
- import { t as Route$6 } from "./routes-BzkJgq4W.js";
6
- import { t as Route$7 } from "./projects.index-DesYXwfi.js";
7
- import { r as cursorWorkspacesQueryOptions } from "./cursor-queries-NCIM0Nat.js";
8
- import { i as antigravityWorkspacesQueryOptions } from "./antigravity-queries-CGrJO9Vr.js";
9
- import { t as Route$8 } from "./threads._threadId-Bs0yuqO9.js";
10
- import { t as Route$9 } from "./projects._project-Bpbc3C-L.js";
11
- import { t as Route$10 } from "./cursor._workspaceKey-C5PdTaKB.js";
12
- import { t as Route$11 } from "./cursor-threads._composerId-BPJFWfJj.js";
13
- import { t as Route$12 } from "./antigravity._workspaceKey-B0QeYUOh.js";
14
- import { t as Route$13 } from "./antigravity-conversations._conversationId-zMrR6v6R.js";
15
- import { useEffect, useState } from "react";
16
- import { HeadContent, Link, Outlet, Scripts, createFileRoute, createRootRouteWithContext, createRouter, lazyRouteComponent, notFound, redirect, useRouterState } from "@tanstack/react-router";
17
- import { jsx, jsxs } from "react/jsx-runtime";
18
- import { setupRouterSsrQueryIntegration } from "@tanstack/react-router-ssr-query";
19
- import { QueryClient } from "@tanstack/react-query";
20
- import { BarChart3, FolderOpen, LayoutDashboard, Moon, Settings2, Sparkles, SquareTerminal, Sun } from "lucide-react";
21
- import { Tooltip } from "radix-ui";
22
- //#region src/integrations/tanstack-query/root-provider.tsx
23
- function getContext() {
24
- return { queryClient: new QueryClient() };
25
- }
26
- //#endregion
27
- //#region ../../package.json?raw
28
- var package_default = "{\n \"author\": {\n \"name\": \"Ragaeeb Haq\",\n \"url\": \"https://github.com/ragaeeb\"\n },\n \"bin\": {\n \"codex-chats\": \"./bin/codex-chats.js\",\n \"codex-chats-claude\": \"./bin/codex-chats-claude.js\",\n \"spiracha\": \"./bin/spiracha.js\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/ragaeeb/spiracha/issues\"\n },\n \"dependencies\": {\n \"@inquirer/prompts\": \"^8.5.2\",\n \"@modelcontextprotocol/sdk\": \"^1.29.0\",\n \"@tanstack/react-query\": \"5.101.0\",\n \"@tanstack/react-router\": \"1.170.15\",\n \"@tanstack/react-router-ssr-query\": \"1.167.1\",\n \"@tanstack/react-table\": \"8.21.3\",\n \"@tanstack/react-virtual\": \"3.14.2\",\n \"class-variance-authority\": \"0.7.1\",\n \"clsx\": \"2.1.1\",\n \"iconv-lite\": \"^0.7.2\",\n \"lucide-react\": \"1.17.0\",\n \"radix-ui\": \"1.5.0\",\n \"react\": \"19.2.7\",\n \"react-dom\": \"19.2.7\",\n \"tailwind-merge\": \"3.6.0\",\n \"zod\": \"4.4.3\"\n },\n \"description\": \"Export local Codex, Claude Code, and Cursor transcripts, and browse Codex, Cursor, and Antigravity history through a local UI.\",\n \"devDependencies\": {\n \"@types/bun\": \"^1.3.14\",\n \"@types/node\": \"^25.9.2\",\n \"typescript\": \"^6.0.3\"\n },\n \"engines\": {\n \"bun\": \">=1.3.14\"\n },\n \"files\": [\n \"bin/codex-chats.js\",\n \"bin/codex-chats-claude.js\",\n \"bin/spiracha.js\",\n \"src/export-chats.ts\",\n \"src/export-claude.ts\",\n \"src/export-cursor.ts\",\n \"src/mcp-server.ts\",\n \"src/spiracha.ts\",\n \"src/ui-cli.ts\",\n \"src/lib/antigravity-db.ts\",\n \"src/lib/antigravity-exporter-types.ts\",\n \"src/lib/antigravity-keychain.ts\",\n \"src/lib/claude-exporter.ts\",\n \"src/lib/cursor-db.ts\",\n \"src/lib/cursor-exporter.ts\",\n \"src/lib/cursor-exporter-types.ts\",\n \"src/lib/cursor-recovery.ts\",\n \"src/lib/cursor-transcript.ts\",\n \"src/lib/codex-exporter-cli.ts\",\n \"src/lib/codex-exporter-db.ts\",\n \"src/lib/codex-exporter-transcript.ts\",\n \"src/lib/codex-exporter-types.ts\",\n \"src/lib/codex-exporter.ts\",\n \"src/lib/codex-browser-db.ts\",\n \"src/lib/codex-browser-export.ts\",\n \"src/lib/codex-browser-types.ts\",\n \"src/lib/codex-thread-recovery.ts\",\n \"src/lib/codex-thread-cache.ts\",\n \"src/lib/codex-thread-parser.ts\",\n \"src/lib/codex-analytics.ts\",\n \"src/lib/path-transforms.ts\",\n \"src/lib/sqlite-error.ts\",\n \"src/lib/sqlite-retry.ts\",\n \"src/lib/ui-export-files.ts\",\n \"src/lib/ui-cache.ts\",\n \"src/lib/interactive-cli.ts\",\n \"src/lib/model-label.ts\",\n \"src/lib/native-open.ts\",\n \"src/lib/shared.ts\",\n \"apps/ui/dist/client/assets/**/*\",\n \"apps/ui/dist/client/icon.svg\",\n \"apps/ui/dist/client/manifest.json\",\n \"apps/ui/dist/client/robots.txt\",\n \"apps/ui/dist/server/**/*\",\n \"README.md\",\n \"AGENTS.md\"\n ],\n \"homepage\": \"https://github.com/ragaeeb/spiracha\",\n \"keywords\": [\n \"codex\",\n \"claude\",\n \"cursor\",\n \"antigravity\",\n \"transcripts\",\n \"export\",\n \"markdown\",\n \"bun\"\n ],\n \"license\": \"MIT\",\n \"name\": \"spiracha\",\n \"packageManager\": \"bun@1.3.14\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/ragaeeb/spiracha.git\"\n },\n \"scripts\": {\n \"build\": \"bun run typecheck && bun run --cwd apps/ui build\",\n \"coverage\": \"bun run coverage:root && bun run coverage:ui\",\n \"coverage:root\": \"bun test --coverage --coverage-reporter=lcov --coverage-dir coverage && bun run ./src/coverage-check.ts root\",\n \"coverage:ui\": \"bun run --cwd apps/ui coverage && bun run ./src/coverage-check.ts ui\",\n \"export:claude\": \"bun run ./src/export-claude.ts\",\n \"format\": \"biome check . --write && biome lint . --write\",\n \"lint\": \"biome check .\",\n \"mcp\": \"bun run ./src/mcp-server.ts\",\n \"smoke:package-ui\": \"bun run ./src/package-ui-smoke.ts\",\n \"start\": \"bun run ./src/export-chats.ts\",\n \"typecheck\": \"bun run typecheck:root && bun run typecheck:ui\",\n \"typecheck:root\": \"bunx tsc --noEmit\",\n \"typecheck:ui\": \"bun run --cwd apps/ui typecheck\",\n \"ui:dev\": \"bun run --cwd apps/ui dev\",\n \"ui:preview\": \"bun run --cwd apps/ui preview\"\n },\n \"type\": \"module\",\n \"version\": \"1.4.0\",\n \"workspaces\": [\n \"apps/*\"\n ]\n}\n";
29
- //#endregion
30
- //#region src/lib/package-metadata.ts
31
- var parsePackageMetadata = () => {
32
- const packageJson = JSON.parse(package_default);
33
- return {
34
- homepage: typeof packageJson.homepage === "string" ? packageJson.homepage : "",
35
- version: typeof packageJson.version === "string" ? packageJson.version : "0.0.0"
36
- };
37
- };
38
- var packageMetadata = parsePackageMetadata();
39
- //#endregion
40
- //#region src/components/theme-toggle.tsx
41
- var getPreferredTheme = () => {
42
- if (typeof window === "undefined") return "light";
43
- return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
44
- };
45
- var applyTheme = (mode) => {
46
- document.documentElement.classList.toggle("dark", mode === "dark");
47
- document.documentElement.classList.toggle("light", mode === "light");
48
- document.documentElement.style.colorScheme = mode;
49
- window.localStorage.setItem("spiracha-theme", mode);
50
- };
51
- function ThemeToggle() {
52
- const [theme, setTheme] = useState("light");
53
- useEffect(() => {
54
- const storedTheme = window.localStorage.getItem("spiracha-theme");
55
- const nextTheme = storedTheme === "dark" || storedTheme === "light" ? storedTheme : getPreferredTheme();
56
- setTheme(nextTheme);
57
- applyTheme(nextTheme);
58
- }, []);
59
- return /* @__PURE__ */ jsx(Button, {
60
- "aria-label": "Toggle color theme",
61
- className: "h-9 rounded-full border border-[var(--border)] bg-[var(--panel)] px-3 text-[var(--panel-foreground)] shadow-none",
62
- size: "sm",
63
- type: "button",
64
- variant: "ghost",
65
- onClick: () => {
66
- const nextTheme = theme === "light" ? "dark" : "light";
67
- setTheme(nextTheme);
68
- applyTheme(nextTheme);
69
- },
70
- children: theme === "light" ? /* @__PURE__ */ jsx(Moon, { className: "size-4" }) : /* @__PURE__ */ jsx(Sun, { className: "size-4" })
71
- });
72
- }
73
- //#endregion
74
- //#region src/components/app-shell.tsx
75
- var navItems = [
76
- {
77
- icon: LayoutDashboard,
78
- label: "Dashboard",
79
- to: "/"
80
- },
81
- {
82
- activePrefixes: ["/projects", "/threads"],
83
- icon: FolderOpen,
84
- label: "Codex",
85
- to: "/projects"
86
- },
87
- {
88
- activePrefixes: ["/antigravity", "/antigravity-conversations"],
89
- icon: Sparkles,
90
- label: "Antigravity",
91
- to: "/antigravity"
92
- },
93
- {
94
- activePrefixes: ["/cursor", "/cursor-threads"],
95
- icon: SquareTerminal,
96
- label: "Cursor",
97
- to: "/cursor"
98
- },
99
- {
100
- icon: BarChart3,
101
- label: "Analytics",
102
- to: "/analytics"
103
- },
104
- {
105
- icon: Settings2,
106
- label: "Settings",
107
- to: "/settings"
108
- }
109
- ];
110
- var isNavItemActive = (pathname, item) => {
111
- return (item.activePrefixes ?? [item.to]).some((prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`));
112
- };
113
- var GitHubIcon = ({ className }) => /* @__PURE__ */ jsx("svg", {
114
- "aria-hidden": "true",
115
- className,
116
- fill: "currentColor",
117
- viewBox: "0 0 24 24",
118
- children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.59 2 12.25c0 4.53 2.87 8.36 6.84 9.72.5.09.68-.22.68-.49v-1.9c-2.78.62-3.37-1.22-3.37-1.22-.45-1.18-1.11-1.49-1.11-1.49-.91-.64.07-.63.07-.63 1 .07 1.53 1.06 1.53 1.06.9 1.56 2.35 1.11 2.92.85.09-.67.35-1.11.63-1.37-2.22-.26-4.56-1.14-4.56-5.06 0-1.12.39-2.03 1.03-2.75-.1-.26-.45-1.3.1-2.71 0 0 .84-.28 2.75 1.05A9.35 9.35 0 0 1 12 6.98c.85 0 1.7.12 2.5.35 1.9-1.33 2.74-1.05 2.74-1.05.55 1.41.2 2.45.1 2.71.64.72 1.03 1.63 1.03 2.75 0 3.93-2.34 4.79-4.57 5.05.36.32.68.95.68 1.91v2.78c0 .27.18.59.69.49A10.22 10.22 0 0 0 22 12.25C22 6.59 17.52 2 12 2Z" })
119
- });
120
- function AppShell({ children }) {
121
- const pathname = useRouterState({ select: (state) => state.location.pathname });
122
- return /* @__PURE__ */ jsx("div", {
123
- className: "min-h-screen bg-[var(--background)] text-[var(--foreground)]",
124
- children: /* @__PURE__ */ jsxs("div", {
125
- className: "flex min-h-screen w-full flex-col lg:flex-row",
126
- children: [/* @__PURE__ */ jsxs("aside", {
127
- className: "border-[var(--border)] border-b bg-[var(--panel)]/90 px-5 py-5 backdrop-blur lg:sticky lg:top-0 lg:h-screen lg:w-[240px] lg:border-r lg:border-b-0 lg:px-5",
128
- children: [/* @__PURE__ */ jsxs("div", {
129
- className: "flex items-start justify-between gap-4 lg:flex-col lg:items-stretch",
130
- children: [/* @__PURE__ */ jsxs("div", {
131
- className: "space-y-1.5",
132
- children: [/* @__PURE__ */ jsxs("p", {
133
- className: "font-semibold text-[10px] text-[var(--muted-foreground)] uppercase tracking-[0.18em]",
134
- children: ["Spiracha ", /* @__PURE__ */ jsxs("span", {
135
- className: "tracking-normal",
136
- children: ["v", packageMetadata.version]
137
- })]
138
- }), /* @__PURE__ */ jsxs("div", {
139
- className: "space-y-1",
140
- children: [/* @__PURE__ */ jsx("h1", {
141
- className: "font-['IBM_Plex_Sans'] font-semibold text-lg tracking-[-0.02em]",
142
- children: "Spiracha Console"
143
- }), packageMetadata.homepage ? /* @__PURE__ */ jsx("a", {
144
- "aria-label": "Open Spiracha GitHub repository",
145
- className: "inline-flex size-7 items-center justify-center rounded-md text-[var(--muted-foreground)] transition-colors hover:bg-[var(--panel-secondary)] hover:text-[var(--foreground)]",
146
- href: packageMetadata.homepage,
147
- rel: "noreferrer",
148
- target: "_blank",
149
- children: /* @__PURE__ */ jsx(GitHubIcon, { className: "size-4" })
150
- }) : null]
151
- })]
152
- }), /* @__PURE__ */ jsx(ThemeToggle, {})]
153
- }), /* @__PURE__ */ jsx("nav", {
154
- className: "mt-5 grid gap-1",
155
- children: navItems.map((item) => {
156
- const active = isNavItemActive(pathname, item);
157
- const Icon = item.icon;
158
- return /* @__PURE__ */ jsxs(Link, {
159
- className: cn("flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm transition-colors", active ? "bg-[var(--accent-muted)] font-medium text-[var(--accent-foreground)]" : "text-[var(--muted-foreground)] hover:bg-[var(--panel-secondary)] hover:text-[var(--foreground)]"),
160
- to: item.to,
161
- children: [/* @__PURE__ */ jsx(Icon, { className: "size-4 shrink-0" }), /* @__PURE__ */ jsx("span", { children: item.label })]
162
- }, item.to);
163
- })
164
- })]
165
- }), /* @__PURE__ */ jsx("main", {
166
- className: "min-w-0 flex-1 px-4 py-4 sm:px-5 sm:py-5 lg:px-6",
167
- children
168
- })]
169
- })
170
- });
171
- }
172
- //#endregion
173
- //#region src/components/ui/tooltip.tsx
174
- function TooltipProvider({ delayDuration = 0, ...props }) {
175
- return /* @__PURE__ */ jsx(Tooltip.Provider, {
176
- "data-slot": "tooltip-provider",
177
- delayDuration,
178
- ...props
179
- });
180
- }
181
- //#endregion
182
- //#region src/styles.css?url
183
- var styles_default = "/assets/styles-BhRkXgwB.css";
184
- //#endregion
185
- //#region src/routes/__root.tsx
186
- var themeInitScript = `
187
- (() => {
188
- try {
189
- const stored = window.localStorage.getItem('spiracha-theme')
190
- const preferred = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
191
- const mode = stored === 'dark' || stored === 'light' ? stored : preferred
192
- document.documentElement.classList.add(mode)
193
- document.documentElement.style.colorScheme = mode
194
- } catch {}
195
- })()
196
- `;
197
- function RootErrorComponent({ error }) {
198
- const isSqliteError = error.message.includes("unable to open database") || error.message.includes("database is locked") || error.message.includes("SQLITE_");
199
- return /* @__PURE__ */ jsx("div", {
200
- className: "flex min-h-screen items-center justify-center bg-[#101418] px-4 text-[#eef3f7]",
201
- children: /* @__PURE__ */ jsxs("div", {
202
- className: "max-w-[30rem] text-center",
203
- children: [
204
- /* @__PURE__ */ jsx("h1", {
205
- className: "mb-3 font-semibold text-base",
206
- children: isSqliteError ? "Database unavailable" : "Something went wrong"
207
- }),
208
- isSqliteError ? /* @__PURE__ */ jsx("p", {
209
- className: "my-2 text-[#99a3af] text-[0.875rem] leading-6",
210
- children: "Spiracha could not open the Codex SQLite database. Codex may have an exclusive lock on the file, or the database does not exist yet. Close Codex or wait a moment, then reload."
211
- }) : /* @__PURE__ */ jsx("p", {
212
- className: "my-2 text-[#99a3af] text-[0.875rem] leading-6",
213
- children: /* @__PURE__ */ jsx("code", {
214
- className: "rounded border border-white/10 bg-[#12181e] px-1.5 py-1 text-[0.8em]",
215
- children: error.message
216
- })
217
- }),
218
- /* @__PURE__ */ jsx("button", {
219
- className: "mt-6 rounded-full border border-white/15 bg-[#1a222b] px-5 py-2 text-sm hover:bg-[#222e3a]",
220
- type: "button",
221
- onClick: () => window.location.reload(),
222
- children: "Reload"
223
- })
224
- ]
225
- })
226
- });
227
- }
228
- var Route$4 = createRootRouteWithContext()({
229
- component: RootComponent,
230
- errorComponent: RootErrorComponent,
231
- head: () => ({
232
- links: [
233
- {
234
- href: styles_default,
235
- rel: "stylesheet"
236
- },
237
- {
238
- href: "/icon.svg",
239
- rel: "icon",
240
- type: "image/svg+xml"
241
- },
242
- {
243
- href: "/manifest.json",
244
- rel: "manifest"
245
- }
246
- ],
247
- meta: [
248
- { charSet: "utf-8" },
249
- {
250
- content: "width=device-width, initial-scale=1",
251
- name: "viewport"
252
- },
253
- {
254
- content: "Browse local Codex, Cursor, and Antigravity history through a compact workspace UI.",
255
- name: "description"
256
- },
257
- { title: "Spiracha UI" }
258
- ]
259
- })
260
- });
261
- function RootComponent() {
262
- return /* @__PURE__ */ jsx(RootDocument, { children: /* @__PURE__ */ jsx(SettingsProvider, { children: /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(AppShell, { children: /* @__PURE__ */ jsx(Outlet, {}) }) }) }) });
263
- }
264
- function RootDocument({ children }) {
265
- return /* @__PURE__ */ jsxs("html", {
266
- lang: "en",
267
- suppressHydrationWarning: true,
268
- children: [/* @__PURE__ */ jsxs("head", { children: [/* @__PURE__ */ jsx("script", { children: themeInitScript }), /* @__PURE__ */ jsx(HeadContent, {})] }), /* @__PURE__ */ jsxs("body", { children: [children, /* @__PURE__ */ jsx(Scripts, {})] })]
269
- });
270
- }
271
- //#endregion
272
- //#region src/routes/settings.tsx
273
- var $$splitComponentImporter$3 = () => import("./settings-OayxIYQQ.js");
274
- var Route$3 = createFileRoute("/settings")({ component: lazyRouteComponent($$splitComponentImporter$3, "component") });
275
- //#endregion
276
- //#region src/lib/thread-id.ts
277
- var THREAD_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;
278
- var isCodexThreadId = (value) => THREAD_ID_PATTERN.test(value);
279
- //#endregion
280
- //#region src/routes/$threadId.tsx
281
- var $$splitComponentImporter$2 = () => import("./_threadId-B6SrBR9E.js");
282
- var Route$2 = createFileRoute("/$threadId")({
283
- beforeLoad: ({ params }) => {
284
- if (!isCodexThreadId(params.threadId)) throw notFound();
285
- throw redirect({
286
- params: { threadId: params.threadId },
287
- to: "/threads/$threadId"
288
- });
289
- },
290
- component: lazyRouteComponent($$splitComponentImporter$2, "component")
291
- });
292
- //#endregion
293
- //#region src/routes/cursor.index.tsx
294
- var $$splitErrorComponentImporter$1 = () => import("./cursor.index-CcsX7DG0.js");
295
- var $$splitComponentImporter$1 = () => import("./cursor.index-DkWT-mxw.js");
296
- var Route$1 = createFileRoute("/cursor/")({
297
- component: lazyRouteComponent($$splitComponentImporter$1, "component"),
298
- errorComponent: lazyRouteComponent($$splitErrorComponentImporter$1, "errorComponent"),
299
- loader: ({ context }) => context.queryClient.ensureQueryData(cursorWorkspacesQueryOptions())
300
- });
301
- //#endregion
302
- //#region src/routes/antigravity.index.tsx
303
- var $$splitErrorComponentImporter = () => import("./antigravity.index-DudTB3Tq.js");
304
- var $$splitComponentImporter = () => import("./antigravity.index-CPCYkqCi.js");
305
- var Route = createFileRoute("/antigravity/")({
306
- component: lazyRouteComponent($$splitComponentImporter, "component"),
307
- errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent"),
308
- loader: ({ context }) => context.queryClient.ensureQueryData(antigravityWorkspacesQueryOptions())
309
- });
310
- //#endregion
311
- //#region src/routeTree.gen.ts
312
- var SettingsRoute = Route$3.update({
313
- id: "/settings",
314
- path: "/settings",
315
- getParentRoute: () => Route$4
316
- });
317
- var AnalyticsRoute = Route$5.update({
318
- id: "/analytics",
319
- path: "/analytics",
320
- getParentRoute: () => Route$4
321
- });
322
- var ThreadIdRoute = Route$2.update({
323
- id: "/$threadId",
324
- path: "/$threadId",
325
- getParentRoute: () => Route$4
326
- });
327
- var IndexRoute = Route$6.update({
328
- id: "/",
329
- path: "/",
330
- getParentRoute: () => Route$4
331
- });
332
- var ProjectsIndexRoute = Route$7.update({
333
- id: "/projects/",
334
- path: "/projects/",
335
- getParentRoute: () => Route$4
336
- });
337
- var CursorIndexRoute = Route$1.update({
338
- id: "/cursor/",
339
- path: "/cursor/",
340
- getParentRoute: () => Route$4
341
- });
342
- var AntigravityIndexRoute = Route.update({
343
- id: "/antigravity/",
344
- path: "/antigravity/",
345
- getParentRoute: () => Route$4
346
- });
347
- var ThreadsThreadIdRoute = Route$8.update({
348
- id: "/threads/$threadId",
349
- path: "/threads/$threadId",
350
- getParentRoute: () => Route$4
351
- });
352
- var ProjectsProjectRoute = Route$9.update({
353
- id: "/projects/$project",
354
- path: "/projects/$project",
355
- getParentRoute: () => Route$4
356
- });
357
- var CursorWorkspaceKeyRoute = Route$10.update({
358
- id: "/cursor/$workspaceKey",
359
- path: "/cursor/$workspaceKey",
360
- getParentRoute: () => Route$4
361
- });
362
- var CursorThreadsComposerIdRoute = Route$11.update({
363
- id: "/cursor-threads/$composerId",
364
- path: "/cursor-threads/$composerId",
365
- getParentRoute: () => Route$4
366
- });
367
- var AntigravityWorkspaceKeyRoute = Route$12.update({
368
- id: "/antigravity/$workspaceKey",
369
- path: "/antigravity/$workspaceKey",
370
- getParentRoute: () => Route$4
371
- });
372
- var rootRouteChildren = {
373
- IndexRoute,
374
- ThreadIdRoute,
375
- AnalyticsRoute,
376
- SettingsRoute,
377
- AntigravityConversationsConversationIdRoute: Route$13.update({
378
- id: "/antigravity-conversations/$conversationId",
379
- path: "/antigravity-conversations/$conversationId",
380
- getParentRoute: () => Route$4
381
- }),
382
- AntigravityWorkspaceKeyRoute,
383
- CursorThreadsComposerIdRoute,
384
- CursorWorkspaceKeyRoute,
385
- ProjectsProjectRoute,
386
- ThreadsThreadIdRoute,
387
- AntigravityIndexRoute,
388
- CursorIndexRoute,
389
- ProjectsIndexRoute
390
- };
391
- var routeTree = Route$4._addFileChildren(rootRouteChildren)._addFileTypes();
392
- //#endregion
393
- //#region src/router.tsx
394
- function getRouter() {
395
- const context = getContext();
396
- const router = createRouter({
397
- context,
398
- defaultPreload: "intent",
399
- defaultPreloadStaleTime: 0,
400
- routeTree,
401
- scrollRestoration: true
402
- });
403
- setupRouterSsrQueryIntegration({
404
- queryClient: context.queryClient,
405
- router
406
- });
407
- return router;
408
- }
409
- //#endregion
410
- export { getRouter };
@@ -1,184 +0,0 @@
1
- import { n as dashboardQueryOptions } from "./codex-queries-CtgeZ7VL.js";
2
- import { t as Route } from "./routes-BzkJgq4W.js";
3
- import { t as MetricCard } from "./metric-card-ByEeLu0r.js";
4
- import { t as PageHeader } from "./page-header-VNSaM3xd.js";
5
- import { o as formatNumber, r as formatDateTime, s as formatTokens } from "./formatters-FJaGZgJk.js";
6
- import { Link } from "@tanstack/react-router";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
- import { useSuspenseQuery } from "@tanstack/react-query";
9
- //#region src/components/recent-threads-list.tsx
10
- function RecentThreadsList({ threads }) {
11
- return /* @__PURE__ */ jsx("div", {
12
- className: "mt-4 space-y-2",
13
- children: threads.map(({ project, thread }) => /* @__PURE__ */ jsxs("article", {
14
- className: "grid min-w-0 grid-cols-[minmax(0,1fr)_7.5rem] gap-3 rounded-xl border border-[var(--border)] bg-[var(--panel-secondary)] p-3.5 transition-colors hover:border-[var(--accent)]/30 hover:bg-[var(--accent-muted)]",
15
- children: [/* @__PURE__ */ jsxs("div", {
16
- className: "min-w-0",
17
- children: [/* @__PURE__ */ jsxs(Link, {
18
- className: "block min-w-0 rounded-md outline-none transition hover:opacity-80 focus-visible:ring-2 focus-visible:ring-[var(--accent)]",
19
- params: { threadId: thread.id },
20
- to: "/threads/$threadId",
21
- children: [/* @__PURE__ */ jsx("p", {
22
- className: "truncate font-medium text-sm underline-offset-2 hover:underline",
23
- children: thread.title
24
- }), /* @__PURE__ */ jsx("p", {
25
- className: "mt-0.5 line-clamp-1 text-[var(--muted-foreground)] text-xs",
26
- children: thread.preview
27
- })]
28
- }), /* @__PURE__ */ jsxs("div", {
29
- className: "mt-2 flex min-w-0 flex-wrap gap-3 text-[var(--muted-foreground)] text-xs",
30
- children: [
31
- /* @__PURE__ */ jsx(Link, {
32
- className: "max-w-[14rem] truncate font-medium text-[var(--accent)] underline-offset-2 hover:underline",
33
- params: { project },
34
- to: "/projects/$project",
35
- children: project
36
- }),
37
- /* @__PURE__ */ jsx("span", {
38
- className: "font-mono",
39
- children: thread.model ?? "unknown model"
40
- }),
41
- /* @__PURE__ */ jsx("span", { children: formatTokens(thread.tokens_used) })
42
- ]
43
- })]
44
- }), /* @__PURE__ */ jsx("p", {
45
- className: "justify-self-end whitespace-nowrap text-right font-mono text-[var(--muted-foreground)] text-xs",
46
- suppressHydrationWarning: true,
47
- children: formatDateTime(thread.updated_at_ms ?? thread.updated_at * 1e3)
48
- })]
49
- }, thread.id))
50
- });
51
- }
52
- //#endregion
53
- //#region src/routes/index.tsx?tsr-split=component
54
- function DashboardErrorComponent({ error }) {
55
- const isSqlite = error.message.includes("unable to open database") || error.message.includes("database is locked");
56
- return /* @__PURE__ */ jsxs("div", {
57
- className: "rounded-xl border border-[var(--border)] bg-[var(--panel)] px-6 py-10 text-center",
58
- children: [
59
- /* @__PURE__ */ jsx("p", {
60
- className: "font-medium text-[var(--destructive)] text-sm",
61
- children: isSqlite ? "Database unavailable" : "Failed to load dashboard"
62
- }),
63
- /* @__PURE__ */ jsx("p", {
64
- className: "mt-2 text-[var(--muted-foreground)] text-sm",
65
- children: isSqlite ? "Codex may have an exclusive lock on the database. Reload to retry." : error.message
66
- }),
67
- /* @__PURE__ */ jsx("button", {
68
- className: "mt-4 text-[var(--accent)] text-sm underline-offset-2 hover:underline",
69
- type: "button",
70
- onClick: () => window.location.reload(),
71
- children: "Reload"
72
- })
73
- ]
74
- });
75
- }
76
- Route.update({ errorComponent: DashboardErrorComponent });
77
- function DashboardPage() {
78
- const dashboard = useSuspenseQuery(dashboardQueryOptions()).data;
79
- return /* @__PURE__ */ jsxs("div", {
80
- className: "space-y-6",
81
- children: [
82
- /* @__PURE__ */ jsx(PageHeader, {
83
- actions: /* @__PURE__ */ jsx("img", {
84
- alt: "Spiracha icon",
85
- className: "size-16 shrink-0 rounded-2xl border border-[var(--border)] bg-white/95 p-2 shadow-[var(--panel-shadow)]",
86
- src: "/icon.svg"
87
- }),
88
- eyebrow: "Overview",
89
- subtitle: "A compact readout of local Codex activity, project distribution, and recent thread movement.",
90
- title: "Dashboard"
91
- }),
92
- /* @__PURE__ */ jsxs("div", {
93
- className: "grid gap-3 md:grid-cols-2 xl:grid-cols-4",
94
- children: [
95
- /* @__PURE__ */ jsx(MetricCard, {
96
- label: "Threads",
97
- value: formatNumber(dashboard.totalThreads)
98
- }),
99
- /* @__PURE__ */ jsx(MetricCard, {
100
- label: "Projects",
101
- value: formatNumber(dashboard.totalProjects)
102
- }),
103
- /* @__PURE__ */ jsx(MetricCard, {
104
- label: "Tokens",
105
- value: formatTokens(dashboard.totalTokens)
106
- }),
107
- /* @__PURE__ */ jsx(MetricCard, {
108
- helper: `${formatNumber(dashboard.archivedThreads)} archived`,
109
- label: "Active",
110
- value: formatNumber(dashboard.activeThreads)
111
- })
112
- ]
113
- }),
114
- /* @__PURE__ */ jsxs("div", {
115
- className: "grid min-w-0 gap-4 xl:grid-cols-[1.4fr_1fr]",
116
- children: [/* @__PURE__ */ jsxs("section", {
117
- className: "min-w-0 overflow-hidden rounded-[1.8rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]",
118
- children: [/* @__PURE__ */ jsxs("div", {
119
- className: "flex items-center justify-between gap-3",
120
- children: [/* @__PURE__ */ jsxs("div", {
121
- className: "min-w-0",
122
- children: [/* @__PURE__ */ jsx("p", {
123
- className: "font-semibold text-sm",
124
- children: "Recent threads"
125
- }), /* @__PURE__ */ jsx("p", {
126
- className: "mt-0.5 text-[var(--muted-foreground)] text-xs",
127
- children: "Most recently updated threads across the local Codex database."
128
- })]
129
- }), /* @__PURE__ */ jsx(Link, {
130
- className: "shrink-0 font-medium text-[var(--accent)] text-sm",
131
- to: "/projects",
132
- children: "View Codex"
133
- })]
134
- }), /* @__PURE__ */ jsx(RecentThreadsList, { threads: dashboard.recentThreads })]
135
- }), /* @__PURE__ */ jsxs("div", {
136
- className: "grid min-w-0 gap-4",
137
- children: [/* @__PURE__ */ jsxs("section", {
138
- className: "min-w-0 overflow-hidden rounded-[1.8rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]",
139
- children: [/* @__PURE__ */ jsx("p", {
140
- className: "font-semibold text-sm",
141
- children: "Top projects by thread count"
142
- }), /* @__PURE__ */ jsx("div", {
143
- className: "mt-3 space-y-2",
144
- children: dashboard.topProjectsByThreadCount.map((project) => /* @__PURE__ */ jsxs(Link, {
145
- className: "flex items-center justify-between gap-3 rounded-lg border border-[var(--border)] bg-[var(--panel-secondary)] px-3.5 py-2.5 text-sm",
146
- params: { project: project.name },
147
- to: "/projects/$project",
148
- children: [/* @__PURE__ */ jsx("span", {
149
- className: "truncate",
150
- children: project.name
151
- }), /* @__PURE__ */ jsx("span", {
152
- className: "shrink-0 font-mono text-[var(--muted-foreground)]",
153
- children: formatNumber(project.threadCount)
154
- })]
155
- }, project.name))
156
- })]
157
- }), /* @__PURE__ */ jsxs("section", {
158
- className: "min-w-0 overflow-hidden rounded-[1.8rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]",
159
- children: [/* @__PURE__ */ jsx("p", {
160
- className: "font-semibold text-sm",
161
- children: "Top projects by tokens"
162
- }), /* @__PURE__ */ jsx("div", {
163
- className: "mt-3 space-y-2",
164
- children: dashboard.topProjectsByTokens.map((project) => /* @__PURE__ */ jsxs(Link, {
165
- className: "flex items-center justify-between gap-3 rounded-lg border border-[var(--border)] bg-[var(--panel-secondary)] px-3.5 py-2.5 text-sm",
166
- params: { project: project.name },
167
- to: "/projects/$project",
168
- children: [/* @__PURE__ */ jsx("span", {
169
- className: "truncate",
170
- children: project.name
171
- }), /* @__PURE__ */ jsx("span", {
172
- className: "shrink-0 font-mono text-[var(--muted-foreground)]",
173
- children: formatTokens(project.totalTokens)
174
- })]
175
- }, project.name))
176
- })]
177
- })]
178
- })]
179
- })
180
- ]
181
- });
182
- }
183
- //#endregion
184
- export { DashboardPage as component };
@@ -1,34 +0,0 @@
1
- import { n as dashboardQueryOptions } from "./codex-queries-CtgeZ7VL.js";
2
- import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- //#region src/routes/index.tsx
5
- var $$splitComponentImporter = () => import("./routes-Bsact1uB.js");
6
- var Route = createFileRoute("/")({
7
- component: lazyRouteComponent($$splitComponentImporter, "component"),
8
- loader: ({ context }) => context.queryClient.ensureQueryData(dashboardQueryOptions())
9
- });
10
- function DashboardErrorComponent({ error }) {
11
- const isSqlite = error.message.includes("unable to open database") || error.message.includes("database is locked");
12
- return /* @__PURE__ */ jsxs("div", {
13
- className: "rounded-xl border border-[var(--border)] bg-[var(--panel)] px-6 py-10 text-center",
14
- children: [
15
- /* @__PURE__ */ jsx("p", {
16
- className: "font-medium text-[var(--destructive)] text-sm",
17
- children: isSqlite ? "Database unavailable" : "Failed to load dashboard"
18
- }),
19
- /* @__PURE__ */ jsx("p", {
20
- className: "mt-2 text-[var(--muted-foreground)] text-sm",
21
- children: isSqlite ? "Codex may have an exclusive lock on the database. Reload to retry." : error.message
22
- }),
23
- /* @__PURE__ */ jsx("button", {
24
- className: "mt-4 text-[var(--accent)] text-sm underline-offset-2 hover:underline",
25
- type: "button",
26
- onClick: () => window.location.reload(),
27
- children: "Reload"
28
- })
29
- ]
30
- });
31
- }
32
- Route.update({ errorComponent: DashboardErrorComponent });
33
- //#endregion
34
- export { Route as t };