@codeyam/codeyam-cli 0.1.10 → 0.1.12

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 (207) hide show
  1. package/analyzer-template/.build-info.json +7 -7
  2. package/analyzer-template/log.txt +3 -3
  3. package/analyzer-template/package.json +2 -2
  4. package/analyzer-template/packages/ai/package.json +1 -1
  5. package/analyzer-template/packages/aws/package.json +1 -1
  6. package/analyzer-template/packages/database/package.json +1 -1
  7. package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +42 -16
  8. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +3 -1
  9. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -1
  10. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +44 -16
  11. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -1
  12. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js +11 -0
  13. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js.map +1 -1
  14. package/codeyam-cli/src/commands/editor.js +1214 -217
  15. package/codeyam-cli/src/commands/editor.js.map +1 -1
  16. package/codeyam-cli/src/commands/init.js +1 -0
  17. package/codeyam-cli/src/commands/init.js.map +1 -1
  18. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +893 -1
  19. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -1
  20. package/codeyam-cli/src/utils/__tests__/editorBroadcastViewport.test.js +76 -0
  21. package/codeyam-cli/src/utils/__tests__/editorBroadcastViewport.test.js.map +1 -0
  22. package/codeyam-cli/src/utils/__tests__/editorDeleteScenario.test.js +100 -0
  23. package/codeyam-cli/src/utils/__tests__/editorDeleteScenario.test.js.map +1 -0
  24. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js +6 -3
  25. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js.map +1 -1
  26. package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js +261 -0
  27. package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js.map +1 -0
  28. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js +75 -1
  29. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js.map +1 -1
  30. package/codeyam-cli/src/utils/__tests__/editorMigration.test.js +435 -0
  31. package/codeyam-cli/src/utils/__tests__/editorMigration.test.js.map +1 -0
  32. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +441 -17
  33. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -1
  34. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +67 -0
  35. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -1
  36. package/codeyam-cli/src/utils/__tests__/editorSeedAdapterPrismaValidation.test.js +143 -0
  37. package/codeyam-cli/src/utils/__tests__/editorSeedAdapterPrismaValidation.test.js.map +1 -0
  38. package/codeyam-cli/src/utils/__tests__/editorSessionFilter.test.js +66 -0
  39. package/codeyam-cli/src/utils/__tests__/editorSessionFilter.test.js.map +1 -0
  40. package/codeyam-cli/src/utils/__tests__/editorShouldRevalidate.test.js +53 -0
  41. package/codeyam-cli/src/utils/__tests__/editorShouldRevalidate.test.js.map +1 -0
  42. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +125 -10
  43. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -1
  44. package/codeyam-cli/src/utils/__tests__/routePatternMatching.test.js +118 -0
  45. package/codeyam-cli/src/utils/__tests__/routePatternMatching.test.js.map +1 -0
  46. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +40 -1
  47. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -1
  48. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +1 -0
  49. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
  50. package/codeyam-cli/src/utils/analysisRunner.js +3 -1
  51. package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
  52. package/codeyam-cli/src/utils/editorAudit.js +145 -0
  53. package/codeyam-cli/src/utils/editorAudit.js.map +1 -1
  54. package/codeyam-cli/src/utils/editorBroadcastViewport.js +26 -0
  55. package/codeyam-cli/src/utils/editorBroadcastViewport.js.map +1 -0
  56. package/codeyam-cli/src/utils/editorDeleteScenario.js +67 -0
  57. package/codeyam-cli/src/utils/editorDeleteScenario.js.map +1 -0
  58. package/codeyam-cli/src/utils/editorEntityChangeStatus.js +1 -1
  59. package/codeyam-cli/src/utils/editorEntityChangeStatus.js.map +1 -1
  60. package/codeyam-cli/src/utils/editorEntityHelpers.js +129 -0
  61. package/codeyam-cli/src/utils/editorEntityHelpers.js.map +1 -0
  62. package/codeyam-cli/src/utils/editorLoaderHelpers.js +40 -1
  63. package/codeyam-cli/src/utils/editorLoaderHelpers.js.map +1 -1
  64. package/codeyam-cli/src/utils/editorMigration.js +224 -0
  65. package/codeyam-cli/src/utils/editorMigration.js.map +1 -0
  66. package/codeyam-cli/src/utils/editorScenarios.js +163 -2
  67. package/codeyam-cli/src/utils/editorScenarios.js.map +1 -1
  68. package/codeyam-cli/src/utils/editorSeedAdapter.js +253 -4
  69. package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -1
  70. package/codeyam-cli/src/utils/editorShouldRevalidate.js +21 -0
  71. package/codeyam-cli/src/utils/editorShouldRevalidate.js.map +1 -0
  72. package/codeyam-cli/src/utils/entityChangeStatus.js +19 -2
  73. package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -1
  74. package/codeyam-cli/src/utils/entityChangeStatus.server.js +41 -3
  75. package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -1
  76. package/codeyam-cli/src/utils/fileWatcher.js +38 -0
  77. package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
  78. package/codeyam-cli/src/utils/install-skills.js +9 -0
  79. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  80. package/codeyam-cli/src/utils/routePatternMatching.js +129 -0
  81. package/codeyam-cli/src/utils/routePatternMatching.js.map +1 -0
  82. package/codeyam-cli/src/utils/scenarioCoverage.js +8 -9
  83. package/codeyam-cli/src/utils/scenarioCoverage.js.map +1 -1
  84. package/codeyam-cli/src/utils/scenariosManifest.js +18 -10
  85. package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -1
  86. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +1 -0
  87. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
  88. package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js +35 -0
  89. package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js.map +1 -0
  90. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js +33 -0
  91. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -1
  92. package/codeyam-cli/src/webserver/app/types/editor.js +8 -0
  93. package/codeyam-cli/src/webserver/app/types/editor.js.map +1 -0
  94. package/codeyam-cli/src/webserver/backgroundServer.js +18 -4
  95. package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
  96. package/codeyam-cli/src/webserver/build/client/assets/CopyButton-CzTDWkF2.js +1 -0
  97. package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-BcgbViKV.js → EntityItem-BFbq6iFk.js} +3 -3
  98. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeBadge-CQgyEGV-.js +1 -0
  99. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-CQIG2qda.js → EntityTypeIcon-B6OMi58N.js} +1 -1
  100. package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-DuYodzo1.js +1 -0
  101. package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-CXo9EeCl.js +25 -0
  102. package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-DYCNb2It.js +3 -0
  103. package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-BU_OAEMP.js → LoadingDots-By5zI316.js} +1 -1
  104. package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-ceAyBX-H.js → LogViewer-CZgY3sxX.js} +3 -3
  105. package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-BzHcG7SE.js → ReportIssueModal-CnYYwRDw.js} +2 -2
  106. package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-CDoF7ZpU.js +1 -0
  107. package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-TSD3C211.js → ScenarioViewer-DrnfvaLL.js} +3 -3
  108. package/codeyam-cli/src/webserver/build/client/assets/Spinner-Df3UCi8k.js +34 -0
  109. package/codeyam-cli/src/webserver/build/client/assets/TruncatedFilePath-CK7-NaPZ.js +1 -0
  110. package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-DRKR9T0U.js +1 -0
  111. package/codeyam-cli/src/webserver/build/client/assets/{_index-DLxKhri3.js → _index-ClR-g3tY.js} +2 -2
  112. package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-BcY3q6nt.js → activity.(_tab)-DTH6ydEA.js} +3 -3
  113. package/codeyam-cli/src/webserver/build/client/assets/{addon-web-links-Duc5hnl7.js → addon-web-links-74hnHF59.js} +1 -1
  114. package/codeyam-cli/src/webserver/build/client/assets/{agent-transcripts-Bni3iiUj.js → agent-transcripts-B8CYhCO9.js} +3 -3
  115. package/codeyam-cli/src/webserver/build/client/assets/api.editor-rename-scenario-l0sNRNKZ.js +1 -0
  116. package/codeyam-cli/src/webserver/build/client/assets/api.editor-save-seed-state-l0sNRNKZ.js +1 -0
  117. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-prompt-l0sNRNKZ.js +1 -0
  118. package/codeyam-cli/src/webserver/build/client/assets/api.editor-session-l0sNRNKZ.js +1 -0
  119. package/codeyam-cli/src/webserver/build/client/assets/{book-open-BYOypzCa.js → book-open-CLaoh4ac.js} +1 -1
  120. package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-C_Pmso5S.js → chevron-down-BZ2DZxbW.js} +1 -1
  121. package/codeyam-cli/src/webserver/build/client/assets/{chunk-JZWAC4HX-C4pqxYJB.js → chunk-JZWAC4HX-BBXArFPl.js} +13 -21
  122. package/codeyam-cli/src/webserver/build/client/assets/{circle-check-BVMi9VA5.js → circle-check-CT4unAk-.js} +1 -1
  123. package/codeyam-cli/src/webserver/build/client/assets/{copy-n2FB0_Sw.js → copy-zK0B6Nu-.js} +1 -1
  124. package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-CC6AbExI.js → createLucideIcon-DJB0YQJL.js} +1 -1
  125. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-CkXFP_i-.js +1 -0
  126. package/codeyam-cli/src/webserver/build/client/assets/editor._tab-DPw7NZHc.js +1 -0
  127. package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-DmBK1JBK.js +58 -0
  128. package/codeyam-cli/src/webserver/build/client/assets/editorPreview-DBa7T2FK.js +41 -0
  129. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-DwCV5__E.js → entity._sha._-BqAN7hyG.js} +2 -2
  130. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-BOi8kpwd.js +6 -0
  131. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-Dg1NhIms.js +6 -0
  132. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-CJX6kkkV.js +6 -0
  133. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-BMvVHNXU.js → entity._sha_.edit._scenarioId-BhVjZhKg.js} +2 -2
  134. package/codeyam-cli/src/webserver/build/client/assets/{entry.client-DTvKq3TY.js → entry.client-_gzKltPN.js} +6 -6
  135. package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-Daa96Fr1.js +1 -0
  136. package/codeyam-cli/src/webserver/build/client/assets/files-CV_17tZS.js +1 -0
  137. package/codeyam-cli/src/webserver/build/client/assets/git-D-YXmMbR.js +1 -0
  138. package/codeyam-cli/src/webserver/build/client/assets/globals-CGrDAxj0.css +1 -0
  139. package/codeyam-cli/src/webserver/build/client/assets/{index-yHOVb4rc.js → index-Blo6EK8G.js} +1 -1
  140. package/codeyam-cli/src/webserver/build/client/assets/{index-10oVnAAH.js → index-BsX0F-9C.js} +1 -1
  141. package/codeyam-cli/src/webserver/build/client/assets/{index-BcvgDzbZ.js → index-CCrgCshv.js} +1 -1
  142. package/codeyam-cli/src/webserver/build/client/assets/jsx-runtime-D_zvdyIk.js +9 -0
  143. package/codeyam-cli/src/webserver/build/client/assets/labs-Byazq8Pv.js +1 -0
  144. package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-DaAZ_H2w.js → loader-circle-DVQ0oHR7.js} +1 -1
  145. package/codeyam-cli/src/webserver/build/client/assets/manifest-b3f77062.js +1 -0
  146. package/codeyam-cli/src/webserver/build/client/assets/{memory-9gnxSZlb.js → memory-b-VmA2Vj.js} +2 -2
  147. package/codeyam-cli/src/webserver/build/client/assets/{pause-f5-1lKBt.js → pause-DGcndCAa.js} +1 -1
  148. package/codeyam-cli/src/webserver/build/client/assets/{root-BWAyuj0r.js → root-D5Zi3U2Z.js} +4 -4
  149. package/codeyam-cli/src/webserver/build/client/assets/{search-Di64LWVb.js → search-C0Uw0bcK.js} +1 -1
  150. package/codeyam-cli/src/webserver/build/client/assets/settings-OoNgHIfW.js +1 -0
  151. package/codeyam-cli/src/webserver/build/client/assets/simulations-Bcemfu8a.js +1 -0
  152. package/codeyam-cli/src/webserver/build/client/assets/{terminal-Br7MOqts.js → terminal-BgMmG7R9.js} +1 -1
  153. package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-BLdiCuG-.js → triangle-alert-Cs87hJYK.js} +1 -1
  154. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-BR3Rs7JY.js +1 -0
  155. package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-C14nCb1q.js → useLastLogLine-BxxP_XF9.js} +1 -1
  156. package/codeyam-cli/src/webserver/build/client/assets/useReportContext-BermyNU5.js +1 -0
  157. package/codeyam-cli/src/webserver/build/client/assets/useToast-a_QN_W9_.js +1 -0
  158. package/codeyam-cli/src/webserver/build/server/assets/analysisRunner-yTyb36j3.js +13 -0
  159. package/codeyam-cli/src/webserver/build/server/assets/{index-ChX0hPcu.js → index-Cr7d_IsG.js} +1 -1
  160. package/codeyam-cli/src/webserver/build/server/assets/init-M_wqNAfu.js +10 -0
  161. package/codeyam-cli/src/webserver/build/server/assets/progress-CHTtrxFG.js +1 -0
  162. package/codeyam-cli/src/webserver/build/server/assets/server-build-_ybRgrlc.js +551 -0
  163. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  164. package/codeyam-cli/src/webserver/build-info.json +5 -5
  165. package/codeyam-cli/src/webserver/editorProxy.js +93 -11
  166. package/codeyam-cli/src/webserver/editorProxy.js.map +1 -1
  167. package/codeyam-cli/src/webserver/mockStateEvents.js +28 -0
  168. package/codeyam-cli/src/webserver/mockStateEvents.js.map +1 -0
  169. package/codeyam-cli/src/webserver/server.js +9 -0
  170. package/codeyam-cli/src/webserver/server.js.map +1 -1
  171. package/codeyam-cli/src/webserver/terminalServer.js +105 -9
  172. package/codeyam-cli/src/webserver/terminalServer.js.map +1 -1
  173. package/codeyam-cli/templates/editor-step-hook.py +104 -20
  174. package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +42 -7
  175. package/codeyam-cli/templates/seed-adapters/supabase.ts +282 -0
  176. package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +62 -0
  177. package/package.json +1 -1
  178. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +44 -16
  179. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -1
  180. package/codeyam-cli/src/webserver/build/client/assets/CopyButton-BPXZwM4t.js +0 -1
  181. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeBadge-g3saevPb.js +0 -1
  182. package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-Bu6c6aDe.js +0 -1
  183. package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-DYFW3lDD.js +0 -25
  184. package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-DLeucoVX.js +0 -3
  185. package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-BED4B6sP.js +0 -1
  186. package/codeyam-cli/src/webserver/build/client/assets/Spinner-Bb5uFQ5V.js +0 -34
  187. package/codeyam-cli/src/webserver/build/client/assets/TruncatedFilePath-C8OKAR5x.js +0 -1
  188. package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-oAf2Kqsf.js +0 -1
  189. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-Ii3inc0_.js +0 -1
  190. package/codeyam-cli/src/webserver/build/client/assets/editor-COWCNVyV.js +0 -10
  191. package/codeyam-cli/src/webserver/build/client/assets/editorPreview-CNB06EIa.js +0 -41
  192. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-CXSi2aeZ.js +0 -6
  193. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-CHMiAog3.js +0 -6
  194. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-p9hhkjJM.js +0 -6
  195. package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-cPo8LiG3.js +0 -1
  196. package/codeyam-cli/src/webserver/build/client/assets/files-BZrlFE1F.js +0 -1
  197. package/codeyam-cli/src/webserver/build/client/assets/git-DdZcvjGh.js +0 -1
  198. package/codeyam-cli/src/webserver/build/client/assets/globals-phvmGvat.css +0 -1
  199. package/codeyam-cli/src/webserver/build/client/assets/labs-Zk7ryIM1.js +0 -1
  200. package/codeyam-cli/src/webserver/build/client/assets/manifest-6134dc40.js +0 -1
  201. package/codeyam-cli/src/webserver/build/client/assets/settings-0OrEMU6J.js +0 -1
  202. package/codeyam-cli/src/webserver/build/client/assets/simulations-DWT-CvLy.js +0 -1
  203. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-C-_hOl_g.js +0 -1
  204. package/codeyam-cli/src/webserver/build/client/assets/useReportContext-O-jkvSPx.js +0 -1
  205. package/codeyam-cli/src/webserver/build/client/assets/useToast-9FIWuYfK.js +0 -1
  206. package/codeyam-cli/src/webserver/build/server/assets/init-kSNsMjj8.js +0 -10
  207. package/codeyam-cli/src/webserver/build/server/assets/server-build-Bm2xIhmh.js +0 -439
@@ -0,0 +1 @@
1
+ window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-_gzKltPN.js","imports":["/assets/jsx-runtime-D_zvdyIk.js","/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/index-BsX0F-9C.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/root-D5Zi3U2Z.js","imports":["/assets/jsx-runtime-D_zvdyIk.js","/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/index-BsX0F-9C.js","/assets/preload-helper-ckwbz45p.js","/assets/cy-logo-cli-DcX-ZS3p.js","/assets/ReportIssueModal-CnYYwRDw.js","/assets/useReportContext-BermyNU5.js","/assets/loader-circle-DVQ0oHR7.js","/assets/createLucideIcon-DJB0YQJL.js","/assets/book-open-CLaoh4ac.js","/assets/useToast-a_QN_W9_.js","/assets/useLastLogLine-BxxP_XF9.js","/assets/LogViewer-CZgY3sxX.js","/assets/EntityTypeIcon-B6OMi58N.js","/assets/TruncatedFilePath-CK7-NaPZ.js","/assets/chevron-down-BZ2DZxbW.js","/assets/circle-check-CT4unAk-.js","/assets/CopyButton-CzTDWkF2.js","/assets/triangle-alert-Cs87hJYK.js","/assets/copy-zK0B6Nu-.js"],"css":[]},"routes/entity.$sha.scenarios.$scenarioId.fullscreen":{"id":"routes/entity.$sha.scenarios.$scenarioId.fullscreen","parentId":"root","path":"entity/:sha/scenarios/:scenarioId/fullscreen","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/entity._sha.scenarios._scenarioId.fullscreen-Dg1NhIms.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/Spinner-Df3UCi8k.js","/assets/useLastLogLine-BxxP_XF9.js","/assets/ViewportInspectBar-DRKR9T0U.js","/assets/useCustomSizes-BR3Rs7JY.js","/assets/cy-logo-cli-DcX-ZS3p.js","/assets/InlineSpinner-DuYodzo1.js"],"css":[]},"routes/entity.$sha.scenarios.$scenarioId.dev":{"id":"routes/entity.$sha.scenarios.$scenarioId.dev","parentId":"root","path":"entity/:sha/scenarios/:scenarioId/dev","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/entity._sha.scenarios._scenarioId.dev-BOi8kpwd.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/Spinner-Df3UCi8k.js","/assets/useLastLogLine-BxxP_XF9.js","/assets/ViewportInspectBar-DRKR9T0U.js","/assets/useCustomSizes-BR3Rs7JY.js","/assets/cy-logo-cli-DcX-ZS3p.js","/assets/InlineSpinner-DuYodzo1.js","/assets/editorPreview-DBa7T2FK.js","/assets/SafeScreenshot-CDoF7ZpU.js","/assets/preload-helper-ckwbz45p.js"],"css":[]},"routes/api.editor-journal-screenshot":{"id":"routes/api.editor-journal-screenshot","parentId":"root","path":"api/editor-journal-screenshot","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-journal-screenshot-l0sNRNKZ.js","imports":[],"css":[]},"routes/entity.$sha_.edit.$scenarioId":{"id":"routes/entity.$sha_.edit.$scenarioId","parentId":"root","path":"entity/:sha/edit/:scenarioId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/entity._sha_.edit._scenarioId-BhVjZhKg.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/InteractivePreview-CXo9EeCl.js","/assets/Spinner-Df3UCi8k.js","/assets/preload-helper-ckwbz45p.js","/assets/useLastLogLine-BxxP_XF9.js","/assets/InlineSpinner-DuYodzo1.js"],"css":[]},"routes/api.editor-register-scenario":{"id":"routes/api.editor-register-scenario","parentId":"root","path":"api/editor-register-scenario","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-register-scenario-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-scenario-coverage":{"id":"routes/api.editor-scenario-coverage","parentId":"root","path":"api/editor-scenario-coverage","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-scenario-coverage-l0sNRNKZ.js","imports":[],"css":[]},"routes/entity.$sha_.create-scenario":{"id":"routes/entity.$sha_.create-scenario","parentId":"root","path":"entity/:sha/create-scenario","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/entity._sha_.create-scenario-CJX6kkkV.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/InteractivePreview-CXo9EeCl.js","/assets/Spinner-Df3UCi8k.js","/assets/executionFlowCoverage-BWhdfn70.js","/assets/preload-helper-ckwbz45p.js","/assets/useLastLogLine-BxxP_XF9.js","/assets/InlineSpinner-DuYodzo1.js"],"css":[]},"routes/api.editor-capture-scenario":{"id":"routes/api.editor-capture-scenario","parentId":"root","path":"api/editor-capture-scenario","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-capture-scenario-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-scenario-image.$":{"id":"routes/api.editor-scenario-image.$","parentId":"root","path":"api/editor-scenario-image/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-scenario-image._-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-journal-image.$":{"id":"routes/api.editor-journal-image.$","parentId":"root","path":"api/editor-journal-image/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-journal-image._-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-rename-scenario":{"id":"routes/api.editor-rename-scenario","parentId":"root","path":"api/editor-rename-scenario","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-rename-scenario-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-save-seed-state":{"id":"routes/api.editor-save-seed-state","parentId":"root","path":"api/editor-save-seed-state","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-save-seed-state-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-scenario-prompt":{"id":"routes/api.editor-scenario-prompt","parentId":"root","path":"api/editor-scenario-prompt","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-scenario-prompt-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-switch-scenario":{"id":"routes/api.editor-switch-scenario","parentId":"root","path":"api/editor-switch-scenario","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-switch-scenario-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.generate-scenario-data":{"id":"routes/api.generate-scenario-data","parentId":"root","path":"api/generate-scenario-data","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.generate-scenario-data-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-journal-update":{"id":"routes/api.editor-journal-update","parentId":"root","path":"api/editor-journal-update","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-journal-update-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-client-errors":{"id":"routes/api.editor-client-errors","parentId":"root","path":"api/editor-client-errors","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-client-errors-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-entity-status":{"id":"routes/api.editor-entity-status","parentId":"root","path":"api/editor-entity-status","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-entity-status-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-journal-entry":{"id":"routes/api.editor-journal-entry","parentId":"root","path":"api/editor-journal-entry","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-journal-entry-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-scenario-data":{"id":"routes/api.editor-scenario-data","parentId":"root","path":"api/editor-scenario-data","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-scenario-data-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.llm-calls.$entitySha":{"id":"routes/api.llm-calls.$entitySha","parentId":"root","path":"api/llm-calls/:entitySha","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.llm-calls._entitySha-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-project-info":{"id":"routes/api.editor-project-info","parentId":"root","path":"api/editor-project-info","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-project-info-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-test-results":{"id":"routes/api.editor-test-results","parentId":"root","path":"api/editor-test-results","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-test-results-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.branch-entity-diff":{"id":"routes/api.branch-entity-diff","parentId":"root","path":"api/branch-entity-diff","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.branch-entity-diff-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.capture-screenshot":{"id":"routes/api.capture-screenshot","parentId":"root","path":"api/capture-screenshot","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.capture-screenshot-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-load-commit":{"id":"routes/api.editor-load-commit","parentId":"root","path":"api/editor-load-commit","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-load-commit-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.recapture-scenario":{"id":"routes/api.recapture-scenario","parentId":"root","path":"api/recapture-scenario","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.recapture-scenario-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.agent-transcripts":{"id":"routes/api.agent-transcripts","parentId":"root","path":"api/agent-transcripts","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.agent-transcripts-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-dev-server":{"id":"routes/api.editor-dev-server","parentId":"root","path":"api/editor-dev-server","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-dev-server-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.logs.$projectSlug":{"id":"routes/api.logs.$projectSlug","parentId":"root","path":"api/logs/:projectSlug","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.logs._projectSlug-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-file-diff":{"id":"routes/api.editor-file-diff","parentId":"root","path":"api/editor-file-diff","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-file-diff-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-scenarios":{"id":"routes/api.editor-scenarios","parentId":"root","path":"api/editor-scenarios","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-scenarios-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.execute-function":{"id":"routes/api.execute-function","parentId":"root","path":"api/execute-function","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.execute-function-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.interactive-mode":{"id":"routes/api.interactive-mode","parentId":"root","path":"api/interactive-mode","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.interactive-mode-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.delete-scenario":{"id":"routes/api.delete-scenario","parentId":"root","path":"api/delete-scenario","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.delete-scenario-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.dev-mode-events":{"id":"routes/api.dev-mode-events","parentId":"root","path":"api/dev-mode-events","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.dev-mode-events-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.generate-report":{"id":"routes/api.generate-report","parentId":"root","path":"api/generate-report","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.generate-report-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-journal":{"id":"routes/api.editor-journal","parentId":"root","path":"api/editor-journal","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-journal-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-refresh":{"id":"routes/api.editor-refresh","parentId":"root","path":"api/editor-refresh","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-refresh-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-session":{"id":"routes/api.editor-session","parentId":"root","path":"api/editor-session","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-session-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.memory-profile":{"id":"routes/api.memory-profile","parentId":"root","path":"api/memory-profile","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.memory-profile-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.process-status":{"id":"routes/api.process-status","parentId":"root","path":"api/process-status","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.process-status-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.restart-server":{"id":"routes/api.restart-server","parentId":"root","path":"api/restart-server","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.restart-server-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.save-scenarios":{"id":"routes/api.save-scenarios","parentId":"root","path":"api/save-scenarios","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.save-scenarios-l0sNRNKZ.js","imports":[],"css":[]},"routes/agent-transcripts":{"id":"routes/agent-transcripts","parentId":"root","path":"agent-transcripts","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/agent-transcripts-B8CYhCO9.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/useReportContext-BermyNU5.js","/assets/createLucideIcon-DJB0YQJL.js","/assets/terminal-BgMmG7R9.js","/assets/search-C0Uw0bcK.js","/assets/chevron-down-BZ2DZxbW.js","/assets/book-open-CLaoh4ac.js","/assets/triangle-alert-Cs87hJYK.js","/assets/copy-zK0B6Nu-.js"],"css":[]},"routes/api.editor-commit":{"id":"routes/api.editor-commit","parentId":"root","path":"api/editor-commit","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-commit-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-audit":{"id":"routes/api.editor-audit","parentId":"root","path":"api/editor-audit","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-audit-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.kill-process":{"id":"routes/api.kill-process","parentId":"root","path":"api/kill-process","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.kill-process-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.save-fixture":{"id":"routes/api.save-fixture","parentId":"root","path":"api/save-fixture","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.save-fixture-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.screenshot.$":{"id":"routes/api.screenshot.$","parentId":"root","path":"api/screenshot/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.screenshot._-l0sNRNKZ.js","imports":[],"css":[]},"routes/activity.($tab)":{"id":"routes/activity.($tab)","parentId":"root","path":"activity/:tab?","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/activity.(_tab)-DTH6ydEA.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/LogViewer-CZgY3sxX.js","/assets/useLastLogLine-BxxP_XF9.js","/assets/useReportContext-BermyNU5.js","/assets/EntityTypeIcon-B6OMi58N.js","/assets/EntityTypeBadge-CQgyEGV-.js","/assets/SafeScreenshot-CDoF7ZpU.js","/assets/LoadingDots-By5zI316.js","/assets/loader-circle-DVQ0oHR7.js","/assets/pause-DGcndCAa.js","/assets/createLucideIcon-DJB0YQJL.js"],"css":[]},"routes/api.debug-setup":{"id":"routes/api.debug-setup","parentId":"root","path":"api/debug-setup","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.debug-setup-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.editor-file":{"id":"routes/api.editor-file","parentId":"root","path":"api/editor-file","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.editor-file-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.labs-unlock":{"id":"routes/api.labs-unlock","parentId":"root","path":"api/labs-unlock","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.labs-unlock-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.recapture":{"id":"routes/api.recapture","parentId":"root","path":"api/recapture","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.recapture-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.rule-path":{"id":"routes/api.rule-path","parentId":"root","path":"api/rule-path","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.rule-path-l0sNRNKZ.js","imports":[],"css":[]},"routes/entity.$sha.$":{"id":"routes/entity.$sha.$","parentId":"root","path":"entity/:sha/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/entity._sha._-BqAN7hyG.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/useLastLogLine-BxxP_XF9.js","/assets/Spinner-Df3UCi8k.js","/assets/InteractivePreview-CXo9EeCl.js","/assets/SafeScreenshot-CDoF7ZpU.js","/assets/LibraryFunctionPreview-DYCNb2It.js","/assets/LoadingDots-By5zI316.js","/assets/scenarioStatus-B_8jpV3e.js","/assets/ScenarioViewer-DrnfvaLL.js","/assets/createLucideIcon-DJB0YQJL.js","/assets/executionFlowCoverage-BWhdfn70.js","/assets/EntityTypeIcon-B6OMi58N.js","/assets/CopyButton-CzTDWkF2.js","/assets/LogViewer-CZgY3sxX.js","/assets/useReportContext-BermyNU5.js","/assets/preload-helper-ckwbz45p.js","/assets/InlineSpinner-DuYodzo1.js","/assets/ViewportInspectBar-DRKR9T0U.js","/assets/useCustomSizes-BR3Rs7JY.js","/assets/ReportIssueModal-CnYYwRDw.js","/assets/circle-check-CT4unAk-.js","/assets/triangle-alert-Cs87hJYK.js","/assets/copy-zK0B6Nu-.js"],"css":[]},"routes/api.analyze":{"id":"routes/api.analyze","parentId":"root","path":"api/analyze","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.analyze-l0sNRNKZ.js","imports":[],"css":[]},"routes/simulations":{"id":"routes/simulations","parentId":"root","path":"simulations","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/simulations-Bcemfu8a.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/useReportContext-BermyNU5.js","/assets/SafeScreenshot-CDoF7ZpU.js","/assets/LoadingDots-By5zI316.js","/assets/EntityTypeIcon-B6OMi58N.js","/assets/fileTableUtils-Daa96Fr1.js","/assets/chevron-down-BZ2DZxbW.js","/assets/search-C0Uw0bcK.js","/assets/loader-circle-DVQ0oHR7.js","/assets/createLucideIcon-DJB0YQJL.js"],"css":[]},"routes/api.events":{"id":"routes/api.events","parentId":"root","path":"api/events","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.events-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.health":{"id":"routes/api.health","parentId":"root","path":"api/health","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.health-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.memory":{"id":"routes/api.memory","parentId":"root","path":"api/memory","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.memory-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.queue":{"id":"routes/api.queue","parentId":"root","path":"api/queue","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.queue-l0sNRNKZ.js","imports":[],"css":[]},"routes/dev.empty":{"id":"routes/dev.empty","parentId":"root","path":"dev/empty","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/dev.empty-CkXFP_i-.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/ScenarioViewer-DrnfvaLL.js","/assets/InteractivePreview-CXo9EeCl.js","/assets/ViewportInspectBar-DRKR9T0U.js","/assets/useCustomSizes-BR3Rs7JY.js","/assets/LogViewer-CZgY3sxX.js","/assets/SafeScreenshot-CDoF7ZpU.js","/assets/useLastLogLine-BxxP_XF9.js","/assets/Spinner-Df3UCi8k.js","/assets/preload-helper-ckwbz45p.js","/assets/ReportIssueModal-CnYYwRDw.js","/assets/createLucideIcon-DJB0YQJL.js","/assets/circle-check-CT4unAk-.js","/assets/triangle-alert-Cs87hJYK.js","/assets/copy-zK0B6Nu-.js","/assets/scenarioStatus-B_8jpV3e.js","/assets/InlineSpinner-DuYodzo1.js"],"css":[]},"routes/settings":{"id":"routes/settings","parentId":"root","path":"settings","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/settings-OoNgHIfW.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/useReportContext-BermyNU5.js","/assets/CopyButton-CzTDWkF2.js","/assets/copy-zK0B6Nu-.js","/assets/createLucideIcon-DJB0YQJL.js"],"css":[]},"routes/static.$":{"id":"routes/static.$","parentId":"root","path":"static/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/static._-l0sNRNKZ.js","imports":[],"css":[]},"routes/_index":{"id":"routes/_index","parentId":"root","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/_index-ClR-g3tY.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/useLastLogLine-BxxP_XF9.js","/assets/useToast-a_QN_W9_.js","/assets/useReportContext-BermyNU5.js","/assets/LogViewer-CZgY3sxX.js","/assets/EntityTypeIcon-B6OMi58N.js","/assets/SafeScreenshot-CDoF7ZpU.js","/assets/scenarioStatus-B_8jpV3e.js","/assets/createLucideIcon-DJB0YQJL.js","/assets/circle-check-CT4unAk-.js","/assets/loader-circle-DVQ0oHR7.js"],"css":[]},"routes/memory":{"id":"routes/memory","parentId":"root","path":"memory","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/memory-b-VmA2Vj.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/useReportContext-BermyNU5.js","/assets/createLucideIcon-DJB0YQJL.js","/assets/terminal-BgMmG7R9.js","/assets/copy-zK0B6Nu-.js","/assets/CopyButton-CzTDWkF2.js","/assets/chevron-down-BZ2DZxbW.js","/assets/search-C0Uw0bcK.js","/assets/pause-DGcndCAa.js","/assets/book-open-CLaoh4ac.js"],"css":[]},"routes/files":{"id":"routes/files","parentId":"root","path":"files","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/files-CV_17tZS.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/useReportContext-BermyNU5.js","/assets/EntityItem-BFbq6iFk.js","/assets/fileTableUtils-Daa96Fr1.js","/assets/chevron-down-BZ2DZxbW.js","/assets/search-C0Uw0bcK.js","/assets/createLucideIcon-DJB0YQJL.js","/assets/useToast-a_QN_W9_.js","/assets/TruncatedFilePath-CK7-NaPZ.js","/assets/SafeScreenshot-CDoF7ZpU.js","/assets/LibraryFunctionPreview-DYCNb2It.js","/assets/scenarioStatus-B_8jpV3e.js","/assets/triangle-alert-Cs87hJYK.js","/assets/EntityTypeIcon-B6OMi58N.js","/assets/EntityTypeBadge-CQgyEGV-.js"],"css":[]},"routes/labs":{"id":"routes/labs","parentId":"root","path":"labs","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/labs-Byazq8Pv.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/useReportContext-BermyNU5.js"],"css":[]},"routes/git":{"id":"routes/git","parentId":"root","path":"git","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/git-D-YXmMbR.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/useReportContext-BermyNU5.js","/assets/EntityItem-BFbq6iFk.js","/assets/LogViewer-CZgY3sxX.js","/assets/index-Blo6EK8G.js","/assets/fileTableUtils-Daa96Fr1.js","/assets/createLucideIcon-DJB0YQJL.js","/assets/useToast-a_QN_W9_.js","/assets/TruncatedFilePath-CK7-NaPZ.js","/assets/SafeScreenshot-CDoF7ZpU.js","/assets/LibraryFunctionPreview-DYCNb2It.js","/assets/scenarioStatus-B_8jpV3e.js","/assets/triangle-alert-Cs87hJYK.js","/assets/EntityTypeIcon-B6OMi58N.js","/assets/EntityTypeBadge-CQgyEGV-.js"],"css":[]},"routes/editor.entity.($sha)":{"id":"routes/editor.entity.($sha)","parentId":"root","path":"editor","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/editor.entity.(_sha)-DmBK1JBK.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js","/assets/jsx-runtime-D_zvdyIk.js","/assets/useCustomSizes-BR3Rs7JY.js","/assets/editorPreview-DBa7T2FK.js","/assets/CopyButton-CzTDWkF2.js","/assets/preload-helper-ckwbz45p.js","/assets/cy-logo-cli-DcX-ZS3p.js","/assets/Spinner-Df3UCi8k.js","/assets/copy-zK0B6Nu-.js","/assets/createLucideIcon-DJB0YQJL.js","/assets/useLastLogLine-BxxP_XF9.js"],"css":[]},"editor-tab-index":{"id":"editor-tab-index","parentId":"routes/editor.entity.($sha)","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/editor._tab-DPw7NZHc.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js"],"css":[]},"editor-tab-build":{"id":"editor-tab-build","parentId":"routes/editor.entity.($sha)","path":"build","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/editor._tab-DPw7NZHc.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js"],"css":[]},"editor-tab-structure":{"id":"editor-tab-structure","parentId":"routes/editor.entity.($sha)","path":"structure","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/editor._tab-DPw7NZHc.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js"],"css":[]},"editor-tab-journal":{"id":"editor-tab-journal","parentId":"routes/editor.entity.($sha)","path":"journal","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/editor._tab-DPw7NZHc.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js"],"css":[]},"editor-tab-entity":{"id":"editor-tab-entity","parentId":"routes/editor.entity.($sha)","path":"entity/:sha","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/editor._tab-DPw7NZHc.js","imports":["/assets/chunk-JZWAC4HX-BBXArFPl.js"],"css":[]}},"url":"/assets/manifest-b3f77062.js","version":"b3f77062"};
@@ -1,4 +1,4 @@
1
- import{g as br,j as a,r as I,w as Bi,u as $i,d as Hi,f as Ui,L as Vi}from"./chunk-JZWAC4HX-C4pqxYJB.js";import{u as qi}from"./useReportContext-O-jkvSPx.js";import{c as Se}from"./createLucideIcon-CC6AbExI.js";import{T as kr,C as Jt}from"./terminal-Br7MOqts.js";import{C as Ie,a as _e}from"./copy-n2FB0_Sw.js";import{C as wr}from"./CopyButton-BPXZwM4t.js";import{C as _t}from"./chevron-down-C_Pmso5S.js";import{S as Cr}from"./search-Di64LWVb.js";import{F as Ot,P as Wi}from"./pause-f5-1lKBt.js";import{B as Yi}from"./book-open-BYOypzCa.js";/**
1
+ import{g as br,r as I,w as Bi,u as $i,d as Hi,f as Ui,L as Vi}from"./chunk-JZWAC4HX-BBXArFPl.js";import{j as a}from"./jsx-runtime-D_zvdyIk.js";import{u as qi}from"./useReportContext-BermyNU5.js";import{c as Se}from"./createLucideIcon-DJB0YQJL.js";import{T as kr,C as Jt}from"./terminal-BgMmG7R9.js";import{C as Ie,a as _e}from"./copy-zK0B6Nu-.js";import{C as wr}from"./CopyButton-CzTDWkF2.js";import{C as _t}from"./chevron-down-BZ2DZxbW.js";import{S as Cr}from"./search-C0Uw0bcK.js";import{F as Ot,P as Wi}from"./pause-DGcndCAa.js";import{B as Yi}from"./book-open-CLaoh4ac.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -98,4 +98,4 @@ Note: Each rule may apply to multiple files, not just the file listed above. Con
98
98
  ${e.map(n=>`- \`.claude/rules/${n}\``).join(`
99
99
  `)}
100
100
 
101
- Are they organized properly? Ideally they should be in a folder that is the best representation of the files they impact (e.g. if the rule impacts \`folder1/folder2/file1\` and \`folder1/folder2/folder3/file2\` then the rule should be in \`.claude/rules/folder1/folder2\`). Do they make sense? Are they oriented toward avoiding future confusion (vs documenting bug fixes or temporary workarounds, etc)? Please literally read each one to ensure you understand what it is saying and learn something useful from it. Are they concise and efficient in their communication? We want to be respectful of the context window so any information in a rule that does not make sense, is not particularly helpful, or is repetitive should be removed. All other information should be presented as directly as possible. Bullets and tables can help with this as opposed to paragraphs. Take into consideration how rules interact as any one file may have multiple rules applied to it. Please look at the impacted files as well to ensure that it is an appropriate rule for them and to ensure the rule is not just repeating information that can be ascertained from the code. We don't want Claude to have to read a large number of files (or a single very large file) to figure out how everything works, so architectural guidance can be quite valuable, but information that is specific to one file and can be ascertained by the code and comments in that file is unnecessary. Too often rules reflect past confusion that has been resolved and is unlikely to happen again. Content and rules like this should be removed. If you have any questions please ask!`}const xr="Can you mark all of these rules as reviewed in `.claude/codeyam-rule-state.json`?";function yr({text:e}){const[t,n]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return a.jsx("button",{onClick:r,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:t?a.jsxs(a.Fragment,{children:[a.jsx(Ie,{className:"w-4 h-4"}),"Copied!"]}):a.jsxs(a.Fragment,{children:[a.jsx(_e,{className:"w-4 h-4"}),"Copy Prompt"]})})}function Kh({onClose:e,unreviewedRulePaths:t}){const n=Xh(t);return a.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:a.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative max-h-[90vh] overflow-y-auto",onClick:r=>r.stopPropagation(),children:[a.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:a.jsx($e,{className:"w-6 h-6"})}),a.jsx("h2",{className:"text-xl font-bold mb-2",children:"Audit Unreviewed Rules"}),a.jsxs("p",{className:"text-gray-600 text-sm mb-4",children:["Claude will review only the ",t.length," unreviewed"," ",t.length===1?"rule":"rules"," for quality, relevance, and organization."]}),a.jsx("textarea",{readOnly:!0,value:n,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),a.jsx("div",{className:"flex justify-end mt-3",children:a.jsx(yr,{text:n})}),a.jsxs("div",{className:"border-t border-gray-200 mt-6 pt-5",children:[a.jsx("p",{className:"text-gray-500 text-sm mb-3",children:"If you would like to avoid reviewing all of the changes Claude makes you can ask Claude to mark all rules as reviewed."}),a.jsx("textarea",{readOnly:!0,value:xr,className:"w-full h-16 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),a.jsx("div",{className:"flex justify-end mt-3",children:a.jsx(yr,{text:xr})})]})]})})}function Gh({unreviewedRulePaths:e}){const[t,n]=I.useState(!1);return e.length===0?a.jsxs("div",{className:"border border-gray-200 rounded-lg px-5 py-4 flex items-center gap-3 opacity-50",children:[a.jsx("h3",{className:"text-[14px] leading-6 text-[#232323] flex-shrink-0",style:{fontFamily:"Sora",fontWeight:600},children:"Audit Unreviewed Rules"}),a.jsx("p",{className:"text-sm text-gray-500",children:"All rules have been reviewed."})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"border border-gray-200 rounded-lg px-5 py-4 flex items-center gap-3",children:[a.jsx("h3",{className:"text-[14px] leading-6 text-[#232323] flex-shrink-0",style:{fontFamily:"Sora",fontWeight:600},children:"Audit Unreviewed Rules"}),a.jsxs("p",{className:"text-sm text-gray-500",children:["Ask Claude to review the ",e.length," unreviewed"," ",e.length===1?"rule":"rules","."]}),a.jsx("button",{onClick:()=>n(!0),className:"px-4 py-2 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer flex-shrink-0",children:"Get Prompt"})]}),t&&a.jsx(Kh,{onClose:()=>n(!1),unreviewedRulePaths:e})]})}const uf=()=>[{title:"Memory - CodeYam"},{name:"description",content:"Manage Claude Memory documentation"}],cf=Bi(function(){const{memories:t,reviewedStatus:n,memoryInitialized:r,error:i}=$i(),o=Hi(),l=Ui(),[s,c]=I.useState(""),[u,f]=I.useState(null),[h,p]=I.useState(new Set(["root"])),[d,m]=I.useState(null),[k,C]=I.useState(!1),[y,j]=I.useState(null),[S,A]=I.useState(0),[P,b]=I.useState(!1),[R,_]=I.useState(null),[q,w]=I.useState(null),[F,D]=I.useState({}),Y=M=>{p(H=>{const ee=new Set(H);return ee.has(M)?ee.delete(M):ee.add(M),ee})};qi({source:"memory-page"});const L=I.useMemo(()=>({...n,...F}),[n,F]),v=I.useRef(o.state);I.useEffect(()=>{const M=v.current==="loading"||v.current==="submitting",H=o.state==="idle";M&&H&&o.data&&(l.revalidate(),m(null),C(!1),A(ee=>ee+1)),v.current=o.state},[o.state,o.data,l]),I.useEffect(()=>{D(M=>{const H={};for(const[ee,ue]of Object.entries(M))n[ee]!==ue&&(H[ee]=ue);return Object.keys(H).length===Object.keys(M).length?M:H})},[n]);const z=(M,H)=>{D(ee=>({...ee,[M]:!0})),o.submit({action:"mark-reviewed",filePath:M,lastModified:H},{method:"POST",action:"/api/memory",encType:"application/json"})},B=M=>{D(H=>({...H,[M]:!1})),o.submit({action:"mark-unreviewed",filePath:M},{method:"POST",action:"/api/memory",encType:"application/json"})},K=(M,H)=>{_(M),w(H??null)},X=I.useMemo(()=>{let M=t;if(s.trim()){const H=s.toLowerCase();M=M.filter(ee=>{var be;return(((be=ee.filePath.split("/").pop())==null?void 0:be.replace(".md",""))||"").toLowerCase().includes(H)||ee.body.toLowerCase().includes(H)})}return M},[t,s]),g=I.useMemo(()=>u?X.some(H=>H.filePath===u)?X.filter(H=>H.filePath===u):X.filter(H=>H.filePath.startsWith(u+"/")||H.filePath===u):X,[X,u]),le=(M,H)=>{const ee=d?"update":"create";o.submit({action:ee,filePath:M,content:H},{method:"POST",action:"/api/memory",encType:"application/json"})},se=M=>{o.submit({action:"delete",filePath:M.filePath},{method:"POST",action:"/api/memory",encType:"application/json"}),j(null)},x=I.useMemo(()=>{const M=t.filter(H=>L[H.filePath]).length;return{total:t.length,reviewed:M,unreviewed:t.length-M,stale:0}},[t,L]),G=I.useMemo(()=>{const M=new Set(["root"]);for(const H of X){const ee=H.filePath.split("/");ee.pop();let ue="";for(const be of ee)ue=ue?`${ue}/${be}`:be,M.add(ue)}return M},[X]),re=G.size===h.size&&[...G].every(M=>h.has(M)),ne=()=>{p(re?new Set(["root"]):new Set(G))};return i?a.jsx("div",{className:"bg-[#F8F7F6] min-h-screen",children:a.jsxs("div",{className:"px-12 py-6 font-sans",children:[a.jsx("h1",{className:"text-[28px] font-semibold text-gray-900",children:"Error"}),a.jsx("p",{className:"text-base text-gray-500",children:i})]})}):r?a.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:a.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans",children:[a.jsx(Vh,{searchFilter:s,onSearchChange:c,onCreateNew:()=>C(!0),onLearnMore:()=>b(!0),reviewCounts:x}),(k||d)&&a.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:()=>{C(!1),m(null)},children:a.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",onClick:M=>M.stopPropagation(),children:a.jsx(Rh,{rule:d,onSave:le,onCancel:()=>{C(!1),m(null)}})})}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8 mb-8",children:[a.jsx(Mh,{memories:X,reviewedStatus:L,onViewRule:K,refreshKey:S}),a.jsx(Oh,{onEditRule:m,onDeleteRule:j,refreshKey:S,reviewedStatus:L,onMarkReviewed:z,onMarkUnreviewed:B,memories:t,onViewRule:K})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8 mb-8",children:[a.jsx(Gh,{unreviewedRulePaths:t.filter(M=>!L[M.filePath]).map(M=>M.filePath)}),a.jsx(Qh,{})]}),a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("h2",{className:"text-xl leading-6 text-[#232323]",style:{fontFamily:"Sora",fontWeight:600},children:"All Rules"}),a.jsx("div",{className:"flex items-center gap-4",children:G.size>1&&a.jsx("button",{onClick:ne,className:"text-xs text-[#005C75] hover:underline cursor-pointer font-mono uppercase font-semibold",children:re?"Collapse All":"Expand All"})})]}),a.jsxs("div",{className:"flex gap-6",children:[a.jsx("div",{className:"hidden lg:block w-80 flex-shrink-0",children:a.jsx(Dh,{memories:X,selectedPath:u,onSelectPath:f,expandedFolders:h,onToggleFolder:Y})}),a.jsx("div",{className:"flex-1 min-w-0",children:t.length===0?a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-12 text-center",children:[a.jsx(Gi,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Rules Yet"}),a.jsxs("p",{className:"text-gray-500 mb-4",children:["Run"," ",a.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"/codeyam-memory"})," ","to generate initial memories for your codebase."]}),a.jsxs("button",{onClick:()=>C(!0),className:"inline-flex items-center gap-2 px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] cursor-pointer",children:[a.jsx(Zt,{className:"w-4 h-4"}),"Create Your First Memory"]})]}):a.jsxs("div",{children:[u&&a.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 mb-4",children:["Showing rules in"," ",a.jsx("span",{className:"font-mono bg-gray-100 px-1.5 py-0.5 rounded",children:u||"(root)"}),a.jsx("button",{onClick:()=>f(null),className:"text-[#005C75] hover:underline cursor-pointer",children:"Clear filter"})]}),a.jsx(Lh,{memories:g,onEdit:m,onDelete:j,expandedFolders:h,onToggleFolder:Y,reviewedStatus:L,onMarkReviewed:z,onMarkUnreviewed:B,onViewRule:K})]})})]}),a.jsx("div",{className:"mt-8 mb-8",children:a.jsx(Vi,{to:"/agent-transcripts",className:"block bg-white border border-gray-200 rounded-lg p-5 hover:border-[#005C75] hover:shadow-sm transition-all group",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#EDF1F3] flex items-center justify-center",children:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#005C75",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("polyline",{points:"4 17 10 11 4 5"}),a.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-semibold text-[#232323] group-hover:text-[#005C75]",style:{fontFamily:"Sora"},children:"Agent Transcripts"}),a.jsx("p",{className:"text-xs text-gray-500",children:"View background agent transcripts and tool call history"})]})]})})}),R&&!d&&(()=>{const M=t.find(H=>H.filePath===R.filePath)??R;return a.jsx(Bh,{rule:M,changeInfo:q??void 0,isReviewed:L[M.filePath]??!1,onApprove:()=>{L[M.filePath]??!1?B(M.filePath):z(M.filePath,M.lastModified),_(null)},onEdit:()=>{m(M)},onDelete:()=>{j(M),_(null)},onClose:()=>_(null)})})(),P&&a.jsx(qh,{onClose:()=>b(!1),onCreateNew:()=>{b(!1),C(!0)}}),y&&a.jsx(Wh,{rule:y,onConfirm:se,onCancel:()=>j(null)})]})}):a.jsx(Uh,{})});export{cf as default,uf as meta};
101
+ Are they organized properly? Ideally they should be in a folder that is the best representation of the files they impact (e.g. if the rule impacts \`folder1/folder2/file1\` and \`folder1/folder2/folder3/file2\` then the rule should be in \`.claude/rules/folder1/folder2\`). Do they make sense? Are they oriented toward avoiding future confusion (vs documenting bug fixes or temporary workarounds, etc)? Please literally read each one to ensure you understand what it is saying and learn something useful from it. Are they concise and efficient in their communication? We want to be respectful of the context window so any information in a rule that does not make sense, is not particularly helpful, or is repetitive should be removed. All other information should be presented as directly as possible. Bullets and tables can help with this as opposed to paragraphs. Take into consideration how rules interact as any one file may have multiple rules applied to it. Please look at the impacted files as well to ensure that it is an appropriate rule for them and to ensure the rule is not just repeating information that can be ascertained from the code. We don't want Claude to have to read a large number of files (or a single very large file) to figure out how everything works, so architectural guidance can be quite valuable, but information that is specific to one file and can be ascertained by the code and comments in that file is unnecessary. Too often rules reflect past confusion that has been resolved and is unlikely to happen again. Content and rules like this should be removed. If you have any questions please ask!`}const xr="Can you mark all of these rules as reviewed in `.claude/codeyam-rule-state.json`?";function yr({text:e}){const[t,n]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return a.jsx("button",{onClick:r,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:t?a.jsxs(a.Fragment,{children:[a.jsx(Ie,{className:"w-4 h-4"}),"Copied!"]}):a.jsxs(a.Fragment,{children:[a.jsx(_e,{className:"w-4 h-4"}),"Copy Prompt"]})})}function Kh({onClose:e,unreviewedRulePaths:t}){const n=Xh(t);return a.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:a.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative max-h-[90vh] overflow-y-auto",onClick:r=>r.stopPropagation(),children:[a.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:a.jsx($e,{className:"w-6 h-6"})}),a.jsx("h2",{className:"text-xl font-bold mb-2",children:"Audit Unreviewed Rules"}),a.jsxs("p",{className:"text-gray-600 text-sm mb-4",children:["Claude will review only the ",t.length," unreviewed"," ",t.length===1?"rule":"rules"," for quality, relevance, and organization."]}),a.jsx("textarea",{readOnly:!0,value:n,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),a.jsx("div",{className:"flex justify-end mt-3",children:a.jsx(yr,{text:n})}),a.jsxs("div",{className:"border-t border-gray-200 mt-6 pt-5",children:[a.jsx("p",{className:"text-gray-500 text-sm mb-3",children:"If you would like to avoid reviewing all of the changes Claude makes you can ask Claude to mark all rules as reviewed."}),a.jsx("textarea",{readOnly:!0,value:xr,className:"w-full h-16 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),a.jsx("div",{className:"flex justify-end mt-3",children:a.jsx(yr,{text:xr})})]})]})})}function Gh({unreviewedRulePaths:e}){const[t,n]=I.useState(!1);return e.length===0?a.jsxs("div",{className:"border border-gray-200 rounded-lg px-5 py-4 flex items-center gap-3 opacity-50",children:[a.jsx("h3",{className:"text-[14px] leading-6 text-[#232323] flex-shrink-0",style:{fontFamily:"Sora",fontWeight:600},children:"Audit Unreviewed Rules"}),a.jsx("p",{className:"text-sm text-gray-500",children:"All rules have been reviewed."})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"border border-gray-200 rounded-lg px-5 py-4 flex items-center gap-3",children:[a.jsx("h3",{className:"text-[14px] leading-6 text-[#232323] flex-shrink-0",style:{fontFamily:"Sora",fontWeight:600},children:"Audit Unreviewed Rules"}),a.jsxs("p",{className:"text-sm text-gray-500",children:["Ask Claude to review the ",e.length," unreviewed"," ",e.length===1?"rule":"rules","."]}),a.jsx("button",{onClick:()=>n(!0),className:"px-4 py-2 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer flex-shrink-0",children:"Get Prompt"})]}),t&&a.jsx(Kh,{onClose:()=>n(!1),unreviewedRulePaths:e})]})}const cf=()=>[{title:"Memory - CodeYam"},{name:"description",content:"Manage Claude Memory documentation"}],hf=Bi(function(){const{memories:t,reviewedStatus:n,memoryInitialized:r,error:i}=$i(),o=Hi(),l=Ui(),[s,c]=I.useState(""),[u,f]=I.useState(null),[h,p]=I.useState(new Set(["root"])),[d,m]=I.useState(null),[k,C]=I.useState(!1),[y,j]=I.useState(null),[S,A]=I.useState(0),[P,b]=I.useState(!1),[R,_]=I.useState(null),[q,w]=I.useState(null),[F,D]=I.useState({}),Y=M=>{p(H=>{const ee=new Set(H);return ee.has(M)?ee.delete(M):ee.add(M),ee})};qi({source:"memory-page"});const L=I.useMemo(()=>({...n,...F}),[n,F]),v=I.useRef(o.state);I.useEffect(()=>{const M=v.current==="loading"||v.current==="submitting",H=o.state==="idle";M&&H&&o.data&&(l.revalidate(),m(null),C(!1),A(ee=>ee+1)),v.current=o.state},[o.state,o.data,l]),I.useEffect(()=>{D(M=>{const H={};for(const[ee,ue]of Object.entries(M))n[ee]!==ue&&(H[ee]=ue);return Object.keys(H).length===Object.keys(M).length?M:H})},[n]);const z=(M,H)=>{D(ee=>({...ee,[M]:!0})),o.submit({action:"mark-reviewed",filePath:M,lastModified:H},{method:"POST",action:"/api/memory",encType:"application/json"})},B=M=>{D(H=>({...H,[M]:!1})),o.submit({action:"mark-unreviewed",filePath:M},{method:"POST",action:"/api/memory",encType:"application/json"})},K=(M,H)=>{_(M),w(H??null)},X=I.useMemo(()=>{let M=t;if(s.trim()){const H=s.toLowerCase();M=M.filter(ee=>{var be;return(((be=ee.filePath.split("/").pop())==null?void 0:be.replace(".md",""))||"").toLowerCase().includes(H)||ee.body.toLowerCase().includes(H)})}return M},[t,s]),g=I.useMemo(()=>u?X.some(H=>H.filePath===u)?X.filter(H=>H.filePath===u):X.filter(H=>H.filePath.startsWith(u+"/")||H.filePath===u):X,[X,u]),le=(M,H)=>{const ee=d?"update":"create";o.submit({action:ee,filePath:M,content:H},{method:"POST",action:"/api/memory",encType:"application/json"})},se=M=>{o.submit({action:"delete",filePath:M.filePath},{method:"POST",action:"/api/memory",encType:"application/json"}),j(null)},x=I.useMemo(()=>{const M=t.filter(H=>L[H.filePath]).length;return{total:t.length,reviewed:M,unreviewed:t.length-M,stale:0}},[t,L]),G=I.useMemo(()=>{const M=new Set(["root"]);for(const H of X){const ee=H.filePath.split("/");ee.pop();let ue="";for(const be of ee)ue=ue?`${ue}/${be}`:be,M.add(ue)}return M},[X]),re=G.size===h.size&&[...G].every(M=>h.has(M)),ne=()=>{p(re?new Set(["root"]):new Set(G))};return i?a.jsx("div",{className:"bg-[#F8F7F6] min-h-screen",children:a.jsxs("div",{className:"px-12 py-6 font-sans",children:[a.jsx("h1",{className:"text-[28px] font-semibold text-gray-900",children:"Error"}),a.jsx("p",{className:"text-base text-gray-500",children:i})]})}):r?a.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:a.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans",children:[a.jsx(Vh,{searchFilter:s,onSearchChange:c,onCreateNew:()=>C(!0),onLearnMore:()=>b(!0),reviewCounts:x}),(k||d)&&a.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:()=>{C(!1),m(null)},children:a.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",onClick:M=>M.stopPropagation(),children:a.jsx(Rh,{rule:d,onSave:le,onCancel:()=>{C(!1),m(null)}})})}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8 mb-8",children:[a.jsx(Mh,{memories:X,reviewedStatus:L,onViewRule:K,refreshKey:S}),a.jsx(Oh,{onEditRule:m,onDeleteRule:j,refreshKey:S,reviewedStatus:L,onMarkReviewed:z,onMarkUnreviewed:B,memories:t,onViewRule:K})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8 mb-8",children:[a.jsx(Gh,{unreviewedRulePaths:t.filter(M=>!L[M.filePath]).map(M=>M.filePath)}),a.jsx(Qh,{})]}),a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("h2",{className:"text-xl leading-6 text-[#232323]",style:{fontFamily:"Sora",fontWeight:600},children:"All Rules"}),a.jsx("div",{className:"flex items-center gap-4",children:G.size>1&&a.jsx("button",{onClick:ne,className:"text-xs text-[#005C75] hover:underline cursor-pointer font-mono uppercase font-semibold",children:re?"Collapse All":"Expand All"})})]}),a.jsxs("div",{className:"flex gap-6",children:[a.jsx("div",{className:"hidden lg:block w-80 flex-shrink-0",children:a.jsx(Dh,{memories:X,selectedPath:u,onSelectPath:f,expandedFolders:h,onToggleFolder:Y})}),a.jsx("div",{className:"flex-1 min-w-0",children:t.length===0?a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-12 text-center",children:[a.jsx(Gi,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Rules Yet"}),a.jsxs("p",{className:"text-gray-500 mb-4",children:["Run"," ",a.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"/codeyam-memory"})," ","to generate initial memories for your codebase."]}),a.jsxs("button",{onClick:()=>C(!0),className:"inline-flex items-center gap-2 px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] cursor-pointer",children:[a.jsx(Zt,{className:"w-4 h-4"}),"Create Your First Memory"]})]}):a.jsxs("div",{children:[u&&a.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 mb-4",children:["Showing rules in"," ",a.jsx("span",{className:"font-mono bg-gray-100 px-1.5 py-0.5 rounded",children:u||"(root)"}),a.jsx("button",{onClick:()=>f(null),className:"text-[#005C75] hover:underline cursor-pointer",children:"Clear filter"})]}),a.jsx(Lh,{memories:g,onEdit:m,onDelete:j,expandedFolders:h,onToggleFolder:Y,reviewedStatus:L,onMarkReviewed:z,onMarkUnreviewed:B,onViewRule:K})]})})]}),a.jsx("div",{className:"mt-8 mb-8",children:a.jsx(Vi,{to:"/agent-transcripts",className:"block bg-white border border-gray-200 rounded-lg p-5 hover:border-[#005C75] hover:shadow-sm transition-all group",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#EDF1F3] flex items-center justify-center",children:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#005C75",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("polyline",{points:"4 17 10 11 4 5"}),a.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-semibold text-[#232323] group-hover:text-[#005C75]",style:{fontFamily:"Sora"},children:"Agent Transcripts"}),a.jsx("p",{className:"text-xs text-gray-500",children:"View background agent transcripts and tool call history"})]})]})})}),R&&!d&&(()=>{const M=t.find(H=>H.filePath===R.filePath)??R;return a.jsx(Bh,{rule:M,changeInfo:q??void 0,isReviewed:L[M.filePath]??!1,onApprove:()=>{L[M.filePath]??!1?B(M.filePath):z(M.filePath,M.lastModified),_(null)},onEdit:()=>{m(M)},onDelete:()=>{j(M),_(null)},onClose:()=>_(null)})})(),P&&a.jsx(qh,{onClose:()=>b(!1),onCreateNew:()=>{b(!1),C(!0)}}),y&&a.jsx(Wh,{rule:y,onConfirm:se,onCancel:()=>j(null)})]})}):a.jsx(Uh,{})});export{hf as default,cf as meta};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./createLucideIcon-CC6AbExI.js";/**
1
+ import{c as e}from"./createLucideIcon-DJB0YQJL.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{r as o,j as e,c as ie,a as ae,d as oe,L as Y,w as re,M as le,G as ce,S as de,H as me,u as he,f as xe,O as pe}from"./chunk-JZWAC4HX-C4pqxYJB.js";import{_ as fe}from"./preload-helper-ckwbz45p.js";import{c as ue}from"./cy-logo-cli-DcX-ZS3p.js";import{B as ye,R as ve,S as ge}from"./ReportIssueModal-BzHcG7SE.js";import{a as je,R as ke}from"./useReportContext-O-jkvSPx.js";import{L as K}from"./loader-circle-DaAZ_H2w.js";import{c as A}from"./createLucideIcon-CC6AbExI.js";import{B as be}from"./book-open-BYOypzCa.js";import{T as Ce,u as we}from"./useToast-9FIWuYfK.js";import{u as Ne}from"./useLastLogLine-C14nCb1q.js";import{L as Se}from"./LogViewer-ceAyBX-H.js";import{E as Le}from"./EntityTypeIcon-CQIG2qda.js";import{T as Ae}from"./TruncatedFilePath-C8OKAR5x.js";import{C as ze}from"./chevron-down-C_Pmso5S.js";import{C as Ee}from"./circle-check-BVMi9VA5.js";import{C as Me}from"./CopyButton-BPXZwM4t.js";import"./triangle-alert-BLdiCuG-.js";import"./copy-n2FB0_Sw.js";function Te({id:t,selected:n,onClick:a,icon:c,name:r}){const[d,i]=o.useState(!1);o.useEffect(()=>{i(!0)},[]);const w=o.useCallback(()=>{a==null||a(t)},[a,t]);return e.jsxs("button",{className:`
1
+ import{r as o,c as ie,a as ae,d as oe,L as Y,w as re,M as le,D as ce,S as de,G as me,u as he,f as xe,O as pe}from"./chunk-JZWAC4HX-BBXArFPl.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{_ as fe}from"./preload-helper-ckwbz45p.js";import{c as ue}from"./cy-logo-cli-DcX-ZS3p.js";import{B as ye,R as ve,S as ge}from"./ReportIssueModal-CnYYwRDw.js";import{a as je,R as ke}from"./useReportContext-BermyNU5.js";import{L as K}from"./loader-circle-DVQ0oHR7.js";import{c as A}from"./createLucideIcon-DJB0YQJL.js";import{B as be}from"./book-open-CLaoh4ac.js";import{T as Ce,u as we}from"./useToast-a_QN_W9_.js";import{u as Ne}from"./useLastLogLine-BxxP_XF9.js";import{L as Se}from"./LogViewer-CZgY3sxX.js";import{E as Le}from"./EntityTypeIcon-B6OMi58N.js";import{T as Ae}from"./TruncatedFilePath-CK7-NaPZ.js";import{C as ze}from"./chevron-down-BZ2DZxbW.js";import{C as Ee}from"./circle-check-CT4unAk-.js";import{C as Me}from"./CopyButton-CzTDWkF2.js";import"./triangle-alert-Cs87hJYK.js";import"./copy-zK0B6Nu-.js";function Te({id:t,selected:n,onClick:a,icon:c,name:r}){const[d,i]=o.useState(!1);o.useEffect(()=>{i(!0)},[]);const w=o.useCallback(()=>{a==null||a(t)},[a,t]);return e.jsxs("button",{className:`
2
2
  w-full px-1.5 py-2 cursor-pointer focus:outline-none
3
3
  flex flex-col items-center justify-center gap-1 transition-colors
4
4
  ${n?"text-[#CBF3FA]":"text-[#568B94] hover:text-[#CBF3FA]"}
@@ -37,7 +37,7 @@ import{r as o,j as e,c as ie,a as ae,d as oe,L as Y,w as re,M as le,G as ce,S as
37
37
  *
38
38
  * This source code is licensed under the ISC license.
39
39
  * See the LICENSE file in the root directory of this source tree.
40
- */const He=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Oe=A("house",He);/**
40
+ */const Oe=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],He=A("house",Oe);/**
41
41
  * @license lucide-react v0.577.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
@@ -52,7 +52,7 @@ import{r as o,j as e,c as ie,a as ae,d as oe,L as Y,w as re,M as le,G as ce,S as
52
52
  *
53
53
  * This source code is licensed under the ISC license.
54
54
  * See the LICENSE file in the root directory of this source tree.
55
- */const Ge=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Qe=A("refresh-cw",Ge);function Xe({labs:t,isAdmin:n,editorMode:a}){var y;const c=ie(),r=ae(),[d,i]=o.useState(),[w,z]=o.useState(!1),[j,x]=o.useState(!1),[_,N]=o.useState(null),k=oe();o.useEffect(()=>{k.state==="idle"&&!k.data&&k.load("/api/generate-report")},[k]);const V=((y=k.data)==null?void 0:y.defaultEmail)||"",p={width:"20px",height:"20px",strokeWidth:1.5},E=(t==null?void 0:t.simulations)??!1,D=[{id:"editor",icon:e.jsx(Ye,{style:p}),link:"/editor",name:"Editor",hidden:!a},{id:"dashboard",icon:e.jsx(Oe,{style:p}),link:"/",name:"Dashboard",hidden:!E},{id:"simulations",icon:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:p,children:[e.jsx("path",{d:"M9 12.75V15.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 15.75H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6.75 12.7498L11.325 8.17483C11.6067 7.89873 11.9858 7.7447 12.3803 7.7461C12.7747 7.74751 13.1528 7.90423 13.4325 8.18233L16.5 11.2498",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 8.25C6.82843 8.25 7.5 7.57843 7.5 6.75C7.5 5.92157 6.82843 5.25 6 5.25C5.17157 5.25 4.5 5.92157 4.5 6.75C4.5 7.57843 5.17157 8.25 6 8.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M15 2.25H3C2.17157 2.25 1.5 2.92157 1.5 3.75V11.25C1.5 12.0784 2.17157 12.75 3 12.75H15C15.8284 12.75 16.5 12.0784 16.5 11.25V3.75C16.5 2.92157 15.8284 2.25 15 2.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),link:"/simulations",name:"Simulations",hidden:!E},{id:"git",icon:e.jsx(te,{style:p}),link:"/git",name:"Git",hidden:!E},{id:"files",icon:e.jsx($e,{style:p}),link:"/files",name:"Files",hidden:!E},{id:"activity",icon:e.jsx(Qe,{style:p}),link:"/activity",name:"Activity",hidden:!E},{id:"memory",icon:e.jsx(be,{style:p}),link:"/memory",name:"Memory"},{id:"labs",icon:e.jsx(Ve,{style:p}),link:"/labs",name:"Labs"},{id:"settings",icon:e.jsx(ge,{style:p}),link:"/settings",name:"Settings"},{id:"commits",icon:e.jsx(te,{style:p}),link:"/commits",name:"Commits",hidden:!0},{id:"pages",icon:e.jsx(Je,{style:p}),link:"/pages",name:"Pages",hidden:!0},{id:"components",icon:e.jsx(Ie,{style:p}),link:"/components",name:"Components",hidden:!0}],B=o.useCallback(l=>{const m=D.find(h=>h.id===l);m!=null&&m.link&&r(m.link),i(h=>h===l?void 0:l)},[D,r]);o.useEffect(()=>{const l={editor:["editor"],dashboard:["/","/home"],git:["git"],commits:["commits"],simulations:["simulations"],activity:["activity"],memory:["memory","agent-transcripts"],files:["files"],labs:["labs"],settings:["settings"],pages:["pages"],components:["components"]};for(const[m,h]of Object.entries(l))if(h.some(b=>b==="/"?c.pathname==="/":c.pathname.includes(b))){i(m);return}i(void 0)},[c]);const F=async()=>{x(!0);try{const{default:l}=await fe(async()=>{const{default:b}=await import("./html2canvas-pro.esm-fmIEn3Bc.js");return{default:b}},[]),h=(await l(document.body)).toDataURL("image/jpeg",.8);N(h),z(!0)}catch(l){console.error("Screenshot capture failed:",l),z(!0)}finally{x(!1)}},v=()=>{z(!1),N(null)},S=je();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{id:"sidebar",className:"sticky top-0 w-full h-screen bg-[#051C22] flex flex-col justify-between py-3",children:[e.jsxs("div",{className:"w-full flex flex-col items-center",children:[e.jsx("div",{className:"py-3 mt-2 mb-4",children:e.jsx(Y,{to:"/",className:"flex items-center justify-center cursor-pointer",children:e.jsx("img",{src:ue,alt:"CodeYam",className:"h-6"})})}),D.filter(l=>!l.hidden).map(l=>e.jsx(Te,{id:l.id,selected:l.id===d,onClick:B,icon:l.icon,name:l.name},`sidebar-button-${l.id}`))]}),n&&e.jsx("div",{className:"w-full flex flex-col items-center pb-2",children:e.jsxs("button",{onClick:()=>void F(),disabled:j,className:"w-full px-1.5 py-2 flex flex-col items-center justify-center gap-1 text-[#568B94] hover:text-[#CBF3FA] transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-wait",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",children:j?e.jsx(K,{style:{width:"20px",height:"20px",strokeWidth:1.5},className:"animate-spin"}):e.jsx(ye,{style:{width:"20px",height:"20px",strokeWidth:1.5}})}),e.jsx("span",{className:"text-[9px] font-normal text-center leading-tight whitespace-pre-line",children:j?"Capturing...":`Report
55
+ */const Ge=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Qe=A("refresh-cw",Ge);function Xe({labs:t,isAdmin:n,editorMode:a}){var y;const c=ie(),r=ae(),[d,i]=o.useState(),[w,z]=o.useState(!1),[j,x]=o.useState(!1),[_,N]=o.useState(null),k=oe();o.useEffect(()=>{k.state==="idle"&&!k.data&&k.load("/api/generate-report")},[k]);const V=((y=k.data)==null?void 0:y.defaultEmail)||"",p={width:"20px",height:"20px",strokeWidth:1.5},E=(t==null?void 0:t.simulations)??!1,D=[{id:"editor",icon:e.jsx(Ye,{style:p}),link:"/editor",name:"Editor",hidden:!a},{id:"dashboard",icon:e.jsx(He,{style:p}),link:"/",name:"Dashboard",hidden:!E},{id:"simulations",icon:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:p,children:[e.jsx("path",{d:"M9 12.75V15.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 15.75H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6.75 12.7498L11.325 8.17483C11.6067 7.89873 11.9858 7.7447 12.3803 7.7461C12.7747 7.74751 13.1528 7.90423 13.4325 8.18233L16.5 11.2498",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 8.25C6.82843 8.25 7.5 7.57843 7.5 6.75C7.5 5.92157 6.82843 5.25 6 5.25C5.17157 5.25 4.5 5.92157 4.5 6.75C4.5 7.57843 5.17157 8.25 6 8.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M15 2.25H3C2.17157 2.25 1.5 2.92157 1.5 3.75V11.25C1.5 12.0784 2.17157 12.75 3 12.75H15C15.8284 12.75 16.5 12.0784 16.5 11.25V3.75C16.5 2.92157 15.8284 2.25 15 2.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),link:"/simulations",name:"Simulations",hidden:!E},{id:"git",icon:e.jsx(te,{style:p}),link:"/git",name:"Git",hidden:!E},{id:"files",icon:e.jsx($e,{style:p}),link:"/files",name:"Files",hidden:!E},{id:"activity",icon:e.jsx(Qe,{style:p}),link:"/activity",name:"Activity",hidden:!E},{id:"memory",icon:e.jsx(be,{style:p}),link:"/memory",name:"Memory"},{id:"labs",icon:e.jsx(Ve,{style:p}),link:"/labs",name:"Labs"},{id:"settings",icon:e.jsx(ge,{style:p}),link:"/settings",name:"Settings"},{id:"commits",icon:e.jsx(te,{style:p}),link:"/commits",name:"Commits",hidden:!0},{id:"pages",icon:e.jsx(Je,{style:p}),link:"/pages",name:"Pages",hidden:!0},{id:"components",icon:e.jsx(Ie,{style:p}),link:"/components",name:"Components",hidden:!0}],B=o.useCallback(l=>{const m=D.find(h=>h.id===l);m!=null&&m.link&&r(m.link),i(h=>h===l?void 0:l)},[D,r]);o.useEffect(()=>{const l={editor:["editor"],dashboard:["/","/home"],git:["git"],commits:["commits"],simulations:["simulations"],activity:["activity"],memory:["memory","agent-transcripts"],files:["files"],labs:["labs"],settings:["settings"],pages:["pages"],components:["components"]};for(const[m,h]of Object.entries(l))if(h.some(b=>b==="/"?c.pathname==="/":c.pathname.includes(b))){i(m);return}i(void 0)},[c]);const F=async()=>{x(!0);try{const{default:l}=await fe(async()=>{const{default:b}=await import("./html2canvas-pro.esm-fmIEn3Bc.js");return{default:b}},[]),h=(await l(document.body)).toDataURL("image/jpeg",.8);N(h),z(!0)}catch(l){console.error("Screenshot capture failed:",l),z(!0)}finally{x(!1)}},v=()=>{z(!1),N(null)},S=je();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{id:"sidebar",className:"sticky top-0 w-full h-screen bg-[#051C22] flex flex-col justify-between py-3",children:[e.jsxs("div",{className:"w-full flex flex-col items-center",children:[e.jsx("div",{className:"py-3 mt-2 mb-4",children:e.jsx(Y,{to:"/",className:"flex items-center justify-center cursor-pointer",children:e.jsx("img",{src:ue,alt:"CodeYam",className:"h-6"})})}),D.filter(l=>!l.hidden).map(l=>e.jsx(Te,{id:l.id,selected:l.id===d,onClick:B,icon:l.icon,name:l.name},`sidebar-button-${l.id}`))]}),n&&e.jsx("div",{className:"w-full flex flex-col items-center pb-2",children:e.jsxs("button",{onClick:()=>void F(),disabled:j,className:"w-full px-1.5 py-2 flex flex-col items-center justify-center gap-1 text-[#568B94] hover:text-[#CBF3FA] transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-wait",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",children:j?e.jsx(K,{style:{width:"20px",height:"20px",strokeWidth:1.5},className:"animate-spin"}):e.jsx(ye,{style:{width:"20px",height:"20px",strokeWidth:1.5}})}),e.jsx("span",{className:"text-[9px] font-normal text-center leading-tight whitespace-pre-line",children:j?"Capturing...":`Report
56
56
  Bug`})]})})]}),w&&e.jsx(ve,{isOpen:!0,onClose:v,context:S,defaultEmail:V,screenshotDataUrl:_??void 0})]})}function Ke({toast:t,onClose:n}){o.useEffect(()=>{const r=t.duration||5e3;if(r>0){const d=setTimeout(()=>{n(t.id)},r);return()=>clearTimeout(d)}},[t.id,t.duration,n]);const a={success:"✅",error:"❌",info:"ℹ️",warning:"⚠️"},c={success:"bg-emerald-50 border-emerald-200 text-emerald-900",error:"bg-red-50 border-red-200 text-red-900",info:"bg-blue-50 border-blue-200 text-blue-900",warning:"bg-amber-50 border-amber-200 text-amber-900"};return e.jsxs("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg border-2 shadow-lg min-w-[320px] max-w-[500px] animate-[slideIn_0.3s_ease-out] ${c[t.type]}`,children:[e.jsx("span",{className:"text-2xl",children:a[t.type]}),e.jsx("p",{className:"flex-1 text-sm font-medium m-0",children:t.message}),e.jsx("button",{onClick:()=>n(t.id),className:"text-gray-500 hover:text-gray-700 text-xl leading-none bg-transparent border-none cursor-pointer p-0 w-6 h-6 flex items-center justify-center rounded transition-colors hover:bg-black/10",children:"×"})]})}function Ze({toasts:t,onClose:n}){return t.length===0?null:e.jsxs("div",{className:"fixed top-4 right-4 z-10000 flex flex-col gap-2",children:[e.jsx("style",{children:`
57
57
  @keyframes slideIn {
58
58
  from {
@@ -64,4 +64,4 @@ Bug`})]})})]}),w&&e.jsx(ve,{isOpen:!0,onClose:v,context:S,defaultEmail:V,screens
64
64
  opacity: 1;
65
65
  }
66
66
  }
67
- `}),t.map(a=>e.jsx(Ke,{toast:a,onClose:n},a.id))]})}function Q({entity:t,nameSize:n="11px",pathSize:a="10px",pathMaxLength:c=50,showScenarioCount:r=!1,scenarioCount:d=0,additionalContent:i}){return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Le,{type:t.entityType||"other"}),e.jsxs(Y,{to:`/entity/${t.sha}`,className:"hover:underline shrink-0 cursor-pointer",style:{fontSize:n,fontWeight:500,color:"#000",whiteSpace:"nowrap"},children:[t.name,r&&d>0&&` (${d})`]}),e.jsx(Ae,{filePath:t.filePath,maxLength:c,style:{fontSize:a,color:"#8E8E8E"}})]}),i]})}const X={fontSize:"9px",color:"#005C75",fontStyle:"italic"};function et({currentRun:t,projectSlug:n,currentEntities:a=[],isAnalysisStarting:c=!1,queuedJobCount:r=0,queueJobs:d=[],currentlyExecuting:i=null,historicalRuns:w=[]}){var H,O,Z;const[z,j]=o.useState(!1),[x,_]=o.useState(!1),[N,k]=o.useState(null),[V,p]=o.useState(new Set),[E,D]=o.useState(new Set),[B,F]=o.useState(!1),v=!!i||d.length>0,S=!!i,y=(i==null?void 0:i.entities)||a,l=!!(t!=null&&t.analysisCompletedAt),m=(t==null?void 0:t.readyToBeCaptured)??0,h=(t==null?void 0:t.capturesCompleted)??0;t!=null&&t.captureCompletedAt||l&&(m===0||h>=m);const b=(t==null?void 0:t.currentEntityShas)&&t.currentEntityShas.length>0,J=v,{lastLine:I}=Ne(n,J),M=S||d.length>0,U=new Set(((H=i==null?void 0:i.entities)==null?void 0:H.map(s=>s.sha))||[]),$=w.filter(s=>!(s.currentEntityShas||[]).some(f=>U.has(f))),R=(()=>{const u=Date.now()-1440*60*1e3;if(t!=null&&t.createdAt&&b){const f=t.analysisCompletedAt||t.createdAt;if(new Date(f).getTime()>u)return!0}if($.length>0){const f=$[0],T=f.analysisCompletedAt||f.archivedAt||f.createdAt;if(T&&new Date(T).getTime()>u)return!0}return!1})();return o.useEffect(()=>{const s=(i==null?void 0:i.id)||null;v&&!x&&s!==N&&_(!0),!v&&N!==null&&k(null)},[v,i==null?void 0:i.id,x,N]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`fixed bottom-4 right-4 z-9998 bg-white rounded shadow-lg border-2 border-primary-100 transition-all duration-200 ${x?"min-w-[350px] max-w-[500px]":"w-auto"}`,children:[!x&&e.jsxs("div",{onClick:()=>{_(!0),k(null)},className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-gray-50 transition-colors",title:"Click to expand",children:[M?e.jsx(K,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(G,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:M?"Analyzing...":"Activity: No Activity Yet"}),M&&e.jsx("button",{onClick:s=>{s.stopPropagation(),j(!0)},className:"ml-auto px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"})]}),x&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[M?e.jsx(K,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(G,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:M?"Analyzing...":"Activity"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>j(!0),className:"px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"}),e.jsx("button",{onClick:()=>{_(!1),k((i==null?void 0:i.id)||null)},className:"p-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC"},title:"Collapse","aria-label":"Collapse",children:e.jsx(ze,{size:16,style:{color:"#646464"}})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsxs("div",{className:"px-3 pt-2 pb-3 space-y-3",children:[M&&i&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(G,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Current Activity"})]}),e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:y.length>0?e.jsxs("div",{className:"space-y-1.5",children:[(B?y:y.slice(0,3)).map(s=>e.jsx(Q,{entity:s,nameSize:"11px",pathSize:"10px",pathMaxLength:150},s.sha)),y.length>3&&e.jsx("button",{onClick:()=>F(s=>!s),className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:X,"aria-label":B?"Show fewer entities":`Show ${y.length-3} more entities`,children:B?"Show less":`+${y.length-3} more`}),I&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:I})]}):e.jsxs("div",{children:[i.entityNames&&i.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[i.entityNames.slice(0,5).map((s,u)=>e.jsx("div",{style:{fontSize:"11px",color:"#343434"},children:s},u)),i.entityNames.length>5&&e.jsxs("div",{className:"italic",style:{fontSize:"10px",color:"#666"},children:["+",i.entityNames.length-5," ","more"]})]}):e.jsxs("div",{style:{fontSize:"11px",color:"#343434"},children:["Analyzing"," ",((O=i.entityShas)==null?void 0:O.length)||0," ",((Z=i.entityShas)==null?void 0:Z.length)===1?"entity":"entities","..."]}),I&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:I})]})})]}),d.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(Be,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Queued Activity"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:d.map(s=>{var T,P;const u=V.has(s.id),f=u?s.entities:s.entities.slice(0,3);return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:s.entities.length>0?e.jsxs("div",{className:"space-y-1.5",children:[f.map(L=>e.jsx(Q,{entity:L,nameSize:"10px",pathSize:"9px",pathMaxLength:120},L.sha)),s.entities.length>3&&e.jsx("button",{onClick:()=>{p(L=>{const W=new Set(L);return W.has(s.id)?W.delete(s.id):W.add(s.id),W})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:X,"aria-label":u?"Show fewer entities":`Show ${s.entities.length-3} more entities`,children:u?"Show less":`+${s.entities.length-3} more`})]}):e.jsxs("div",{style:{fontSize:"10px",color:"#343434"},children:[s.type==="analysis"&&e.jsx(e.Fragment,{children:s.entityNames&&s.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[s.entityNames.slice(0,5).map((L,W)=>e.jsx("div",{children:L},W)),s.entityNames.length>5&&e.jsxs("div",{className:"italic",children:["+",s.entityNames.length-5," more"]})]}):`Analyzing ${((T=s.entityShas)==null?void 0:T.length)||0} ${((P=s.entityShas)==null?void 0:P.length)===1?"entity":"entities"}`}),s.type==="recapture"&&"Recapturing scenario",s.type==="debug-setup"&&"Setting up debug environment"]})},s.id)})})]}),R&&$.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(Ee,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Recently Completed"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:$.slice(0,3).map((s,u)=>{const f=s.entities||[],T=s.analysisCompletedAt||s.archivedAt||s.createdAt||"",P=(()=>{if(!T)return"";const C=Date.now()-new Date(T).getTime(),g=Math.floor(C/6e4),q=Math.floor(C/36e5);return q>0?`${q}h ago`:g>0?`${g}m ago`:"just now"})(),L=E.has(u),ne=(L?f:f.slice(0,3)).map(C=>{var g,q,ee;return{...C,scenarioCount:((ee=(q=(g=C.analyses)==null?void 0:g[0])==null?void 0:q.scenarios)==null?void 0:ee.length)||0}});return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:f.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[ne.map((C,g)=>e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(Q,{entity:C,nameSize:"10px",pathSize:"9px",pathMaxLength:100,showScenarioCount:!0,scenarioCount:C.scenarioCount})}),g===0&&P&&e.jsx("div",{style:{fontSize:"9px",color:"#8E8E8E",whiteSpace:"nowrap",paddingTop:"2px"},children:P})]},C.sha)),f.length>3&&e.jsx("button",{onClick:()=>{D(C=>{const g=new Set(C);return g.has(u)?g.delete(u):g.add(u),g})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:X,"aria-label":L?"Show fewer entities":`Show ${f.length-3} more entities`,children:L?"Show less":`+${f.length-3} more`})]})},u)})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsx("div",{className:"px-3 pb-2",children:e.jsx(Y,{to:"/activity",className:"text-xs font-medium hover:underline cursor-pointer",style:{color:"#005C75"},children:"View All Activity →"})})]})]}),z&&n&&e.jsx(Se,{projectSlug:n,onClose:()=>j(!1)})]})}const tt="/assets/globals-phvmGvat.css";function se({text:t,subtext:n,linkText:a,linkTo:c}){const[r,d]=o.useState(!1);return r?null:e.jsx("div",{className:"bg-blue-100 border rounded border-blue-800 shadow-sm mx-6 mt-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-yellow-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-blue-900",children:t}),e.jsx("p",{className:"text-xs text-blue-700 mt-0.5",children:n})]}),e.jsx(Y,{to:c,className:"shrink-0 px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded hover:bg-blue-700 transition-colors",children:a})]}),e.jsx("button",{type:"button",onClick:()=>d(!0),className:"shrink-0 ml-4 p-1 rounded text-blue-600 hover:text-blue-800 hover:bg-blue-100 transition-colors cursor-pointer","aria-label":"Dismiss banner",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})})]})})}function st({version:t}){return e.jsx("div",{className:"px-6 sm:px-12 pb-8 mt-auto pt-8",children:e.jsxs("div",{className:"border-t border-cygray-30 pt-6 flex flex-wrap justify-between items-center gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"font-mono text-sm font-semibold tracking-widest text-cyblack-100",children:"CODEYAM"}),t&&e.jsx("span",{className:"font-mono text-xs text-gray-400",children:t})]}),e.jsxs("div",{className:"flex items-center gap-4 font-mono text-xs uppercase tracking-widest",children:[e.jsx("a",{href:"https://blog.codeyam.com/",target:"_blank",rel:"noopener noreferrer",className:"text-cyblack-100 underline underline-offset-4 hover:text-primary-100",children:"Read the Blog"}),e.jsx("span",{className:"text-cygray-30",children:"|"}),e.jsx("a",{href:"https://discord.gg/x4uAgaRdwF",target:"_blank",rel:"noopener noreferrer",className:"text-cyblack-100 underline underline-offset-4 hover:text-primary-100",children:"Join Discord"})]})]})})}function it({serverVersion:t}){const[n,a]=o.useState("stale"),[c,r]=o.useState(null),d=async()=>{a("restarting"),r(null);try{if(!(await fetch("/api/restart-server",{method:"POST"})).ok)throw new Error("Failed to restart server");a("reconnecting");let w=0;const z=30,j=1e3,x=async()=>{try{if((await fetch("/api/health")).ok){window.location.reload();return}}catch{}w++,w<z?setTimeout(()=>void x(),j):(r("Server took too long to restart. Please refresh manually."),a("stale"))};setTimeout(()=>void x(),500)}catch(i){r(i instanceof Error?i.message:"Failed to restart server"),a("stale")}};return e.jsx("div",{className:"bg-amber-100 border rounded border-amber-700 shadow-sm mx-6 mt-6",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-amber-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),e.jsxs("div",{className:"flex-1",children:[n==="stale"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Dashboard server is out of date"}),e.jsxs("p",{className:"text-xs text-amber-700 mt-0.5",children:["Server version: ",t,". A newer version of CodeYam CLI is installed. Restart the server to get the latest features."]}),c&&e.jsx("p",{className:"text-xs text-red-600 mt-1",children:c})]}),n==="restarting"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Restarting server..."}),e.jsx("p",{className:"text-xs text-amber-700 mt-0.5",children:"Please wait while the server restarts."})]}),n==="reconnecting"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Reconnecting..."}),e.jsx("p",{className:"text-xs text-amber-700 mt-0.5",children:"Waiting for the server to come back online."})]})]}),n==="stale"&&e.jsx("button",{type:"button",onClick:()=>void d(),className:"shrink-0 px-4 py-2 bg-amber-600 text-white text-sm font-medium rounded hover:bg-amber-700 transition-colors cursor-pointer",children:"Restart Server"}),(n==="restarting"||n==="reconnecting")&&e.jsxs("div",{className:"shrink-0 flex items-center gap-2 px-4 py-2 text-amber-700 text-sm",children:[e.jsxs("svg",{className:"w-4 h-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),n==="restarting"?"Stopping...":"Reconnecting..."]})]})})})}function nt({currentVersion:t,latestVersion:n}){const[a,c]=o.useState(!1);if(a)return null;const r="npm install -g @codeyam/codeyam-cli@latest && codeyam stop && codeyam";return e.jsx("div",{className:"bg-emerald-100 border rounded border-emerald-700 shadow-sm mx-6 mt-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-emerald-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M7 11l5-5m0 0l5 5m-5-5v12"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-emerald-900",children:"A new version of CodeYam CLI is available"}),e.jsxs("p",{className:"text-xs text-emerald-700 mt-0.5",children:["Current: ",t," → Latest: ",n]})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-2",children:[e.jsx("code",{className:"text-xs bg-emerald-200 text-emerald-900 px-2 py-1.5 rounded font-mono",children:r}),e.jsx(Me,{content:r,label:"Copy",copiedLabel:"Copied!",className:"px-3 py-1.5 bg-emerald-600 text-white text-xs font-medium rounded hover:bg-emerald-700 transition-colors"})]})]}),e.jsx("button",{type:"button",onClick:()=>c(!0),className:"shrink-0 ml-4 p-1 rounded text-emerald-600 hover:text-emerald-800 hover:bg-emerald-200 transition-colors cursor-pointer","aria-label":"Dismiss banner",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})})]})})}const wt=()=>[{rel:"stylesheet",href:tt},{rel:"icon",type:"image/x-icon",href:"/favicon.ico"}];function at(){const{currentRun:t,projectSlug:n,currentEntities:a,availableAPIKeys:c,queuedJobCount:r,queueJobs:d,currentlyExecuting:i,historicalRuns:w,isServerOutOfDate:z,serverVersion:j,npmUpdate:x,labs:_,simulationsEnabled:N,isSimulationsReady:k,isAdmin:V,editorMode:p,displayVersion:E}=he(),{toasts:D,closeToast:B}=we(),F=xe(),v=o.useRef(F),S=ie();o.useEffect(()=>{v.current=F},[F]);const y=S.pathname.startsWith("/entity/")&&S.pathname.includes("/edit/")||S.pathname.startsWith("/dev/")||S.pathname.startsWith("/editor"),l=S.pathname.includes("/fullscreen")||S.pathname.startsWith("/editor");return o.useEffect(()=>{let m=null,h=null,b=0;const J=2e3;function I(){m||(m=new EventSource("/api/events"),m.addEventListener("message",$=>{const R=JSON.parse($.data);if(R.type==="queue")v.current.revalidate(),b=Date.now();else if(R.type==="db-change"||R.type==="unknown"){const H=Date.now(),O=H-b;O<J?(h&&clearTimeout(h),h=setTimeout(()=>{v.current.revalidate(),b=Date.now(),h=null},J-O)):(v.current.revalidate(),b=H)}}),m.addEventListener("error",()=>{}))}function M(){h&&(clearTimeout(h),h=null),m&&(m.close(),m=null)}function U(){document.hidden?M():(I(),v.current.revalidate())}return document.hidden||I(),document.addEventListener("visibilitychange",U),()=>{document.removeEventListener("visibilitychange",U),M()}},[]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`min-h-screen ${y?"":"grid"} bg-cygray-10`,style:y?void 0:{gridTemplateColumns:"65px minmax(0, 1fr)"},children:[!y&&e.jsx(Xe,{labs:_,isAdmin:V,editorMode:p}),e.jsxs("div",{className:"max-h-screen overflow-auto bg-cygray-10 flex flex-col min-h-screen",children:[z&&e.jsx(it,{serverVersion:j}),x&&x.currentVersion&&e.jsx(nt,{currentVersion:x.currentVersion,latestVersion:x.latestVersion}),N&&c.length===0&&e.jsx(se,{text:"No AI API keys configured. Please provide an AI API key at your earliest convenience.",subtext:"An API key is required for stable, frequent use of CodeYam",linkText:"Configure API Keys",linkTo:"/settings"}),N&&!k&&e.jsx(se,{text:"Simulations enabled but not yet configured",subtext:"Run /codeyam-setup in Claude Code to install the analyzer and configure your dev server",linkText:"View Labs",linkTo:"/labs"}),e.jsx("div",{className:"flex-1",children:e.jsx(pe,{})}),e.jsx(st,{version:E})]})]}),e.jsx(Ze,{toasts:D,onClose:B}),!l&&N&&e.jsx(et,{currentRun:t,projectSlug:n,currentEntities:a,isAnalysisStarting:!1,queuedJobCount:r,queueJobs:d,currentlyExecuting:i,historicalRuns:w})]})}const Nt=re(function(){return e.jsxs("html",{lang:"en",children:[e.jsxs("head",{children:[e.jsx("meta",{charSet:"utf-8"}),e.jsx("meta",{name:"viewport",content:"width=device-width,initial-scale=1"}),e.jsx(le,{}),e.jsx(ce,{})]}),e.jsxs("body",{children:[e.jsx(Ce,{children:e.jsx(ke,{children:e.jsx(at,{})})}),e.jsx(de,{}),e.jsx(me,{})]})]})});export{Nt as default,wt as links};
67
+ `}),t.map(a=>e.jsx(Ke,{toast:a,onClose:n},a.id))]})}function Q({entity:t,nameSize:n="11px",pathSize:a="10px",pathMaxLength:c=50,showScenarioCount:r=!1,scenarioCount:d=0,additionalContent:i}){return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Le,{type:t.entityType||"other"}),e.jsxs(Y,{to:`/entity/${t.sha}`,className:"hover:underline shrink-0 cursor-pointer",style:{fontSize:n,fontWeight:500,color:"#000",whiteSpace:"nowrap"},children:[t.name,r&&d>0&&` (${d})`]}),e.jsx(Ae,{filePath:t.filePath,maxLength:c,style:{fontSize:a,color:"#8E8E8E"}})]}),i]})}const X={fontSize:"9px",color:"#005C75",fontStyle:"italic"};function et({currentRun:t,projectSlug:n,currentEntities:a=[],isAnalysisStarting:c=!1,queuedJobCount:r=0,queueJobs:d=[],currentlyExecuting:i=null,historicalRuns:w=[]}){var O,H,Z;const[z,j]=o.useState(!1),[x,_]=o.useState(!1),[N,k]=o.useState(null),[V,p]=o.useState(new Set),[E,D]=o.useState(new Set),[B,F]=o.useState(!1),v=!!i||d.length>0,S=!!i,y=(i==null?void 0:i.entities)||a,l=!!(t!=null&&t.analysisCompletedAt),m=(t==null?void 0:t.readyToBeCaptured)??0,h=(t==null?void 0:t.capturesCompleted)??0;t!=null&&t.captureCompletedAt||l&&(m===0||h>=m);const b=(t==null?void 0:t.currentEntityShas)&&t.currentEntityShas.length>0,J=v,{lastLine:I}=Ne(n,J),M=S||d.length>0,U=new Set(((O=i==null?void 0:i.entities)==null?void 0:O.map(s=>s.sha))||[]),$=w.filter(s=>!(s.currentEntityShas||[]).some(f=>U.has(f))),R=(()=>{const u=Date.now()-1440*60*1e3;if(t!=null&&t.createdAt&&b){const f=t.analysisCompletedAt||t.createdAt;if(new Date(f).getTime()>u)return!0}if($.length>0){const f=$[0],T=f.analysisCompletedAt||f.archivedAt||f.createdAt;if(T&&new Date(T).getTime()>u)return!0}return!1})();return o.useEffect(()=>{const s=(i==null?void 0:i.id)||null;v&&!x&&s!==N&&_(!0),!v&&N!==null&&k(null)},[v,i==null?void 0:i.id,x,N]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`fixed bottom-4 right-4 z-9998 bg-white rounded shadow-lg border-2 border-primary-100 transition-all duration-200 ${x?"min-w-[350px] max-w-[500px]":"w-auto"}`,children:[!x&&e.jsxs("div",{onClick:()=>{_(!0),k(null)},className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-gray-50 transition-colors",title:"Click to expand",children:[M?e.jsx(K,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(G,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:M?"Analyzing...":"Activity: No Activity Yet"}),M&&e.jsx("button",{onClick:s=>{s.stopPropagation(),j(!0)},className:"ml-auto px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"})]}),x&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[M?e.jsx(K,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(G,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:M?"Analyzing...":"Activity"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>j(!0),className:"px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"}),e.jsx("button",{onClick:()=>{_(!1),k((i==null?void 0:i.id)||null)},className:"p-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC"},title:"Collapse","aria-label":"Collapse",children:e.jsx(ze,{size:16,style:{color:"#646464"}})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsxs("div",{className:"px-3 pt-2 pb-3 space-y-3",children:[M&&i&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(G,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Current Activity"})]}),e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:y.length>0?e.jsxs("div",{className:"space-y-1.5",children:[(B?y:y.slice(0,3)).map(s=>e.jsx(Q,{entity:s,nameSize:"11px",pathSize:"10px",pathMaxLength:150},s.sha)),y.length>3&&e.jsx("button",{onClick:()=>F(s=>!s),className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:X,"aria-label":B?"Show fewer entities":`Show ${y.length-3} more entities`,children:B?"Show less":`+${y.length-3} more`}),I&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:I})]}):e.jsxs("div",{children:[i.entityNames&&i.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[i.entityNames.slice(0,5).map((s,u)=>e.jsx("div",{style:{fontSize:"11px",color:"#343434"},children:s},u)),i.entityNames.length>5&&e.jsxs("div",{className:"italic",style:{fontSize:"10px",color:"#666"},children:["+",i.entityNames.length-5," ","more"]})]}):e.jsxs("div",{style:{fontSize:"11px",color:"#343434"},children:["Analyzing"," ",((H=i.entityShas)==null?void 0:H.length)||0," ",((Z=i.entityShas)==null?void 0:Z.length)===1?"entity":"entities","..."]}),I&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:I})]})})]}),d.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(Be,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Queued Activity"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:d.map(s=>{var T,P;const u=V.has(s.id),f=u?s.entities:s.entities.slice(0,3);return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:s.entities.length>0?e.jsxs("div",{className:"space-y-1.5",children:[f.map(L=>e.jsx(Q,{entity:L,nameSize:"10px",pathSize:"9px",pathMaxLength:120},L.sha)),s.entities.length>3&&e.jsx("button",{onClick:()=>{p(L=>{const W=new Set(L);return W.has(s.id)?W.delete(s.id):W.add(s.id),W})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:X,"aria-label":u?"Show fewer entities":`Show ${s.entities.length-3} more entities`,children:u?"Show less":`+${s.entities.length-3} more`})]}):e.jsxs("div",{style:{fontSize:"10px",color:"#343434"},children:[s.type==="analysis"&&e.jsx(e.Fragment,{children:s.entityNames&&s.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[s.entityNames.slice(0,5).map((L,W)=>e.jsx("div",{children:L},W)),s.entityNames.length>5&&e.jsxs("div",{className:"italic",children:["+",s.entityNames.length-5," more"]})]}):`Analyzing ${((T=s.entityShas)==null?void 0:T.length)||0} ${((P=s.entityShas)==null?void 0:P.length)===1?"entity":"entities"}`}),s.type==="recapture"&&"Recapturing scenario",s.type==="debug-setup"&&"Setting up debug environment"]})},s.id)})})]}),R&&$.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(Ee,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Recently Completed"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:$.slice(0,3).map((s,u)=>{const f=s.entities||[],T=s.analysisCompletedAt||s.archivedAt||s.createdAt||"",P=(()=>{if(!T)return"";const C=Date.now()-new Date(T).getTime(),g=Math.floor(C/6e4),q=Math.floor(C/36e5);return q>0?`${q}h ago`:g>0?`${g}m ago`:"just now"})(),L=E.has(u),ne=(L?f:f.slice(0,3)).map(C=>{var g,q,ee;return{...C,scenarioCount:((ee=(q=(g=C.analyses)==null?void 0:g[0])==null?void 0:q.scenarios)==null?void 0:ee.length)||0}});return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:f.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[ne.map((C,g)=>e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(Q,{entity:C,nameSize:"10px",pathSize:"9px",pathMaxLength:100,showScenarioCount:!0,scenarioCount:C.scenarioCount})}),g===0&&P&&e.jsx("div",{style:{fontSize:"9px",color:"#8E8E8E",whiteSpace:"nowrap",paddingTop:"2px"},children:P})]},C.sha)),f.length>3&&e.jsx("button",{onClick:()=>{D(C=>{const g=new Set(C);return g.has(u)?g.delete(u):g.add(u),g})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:X,"aria-label":L?"Show fewer entities":`Show ${f.length-3} more entities`,children:L?"Show less":`+${f.length-3} more`})]})},u)})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsx("div",{className:"px-3 pb-2",children:e.jsx(Y,{to:"/activity",className:"text-xs font-medium hover:underline cursor-pointer",style:{color:"#005C75"},children:"View All Activity →"})})]})]}),z&&n&&e.jsx(Se,{projectSlug:n,onClose:()=>j(!1)})]})}const tt="/assets/globals-CGrDAxj0.css";function se({text:t,subtext:n,linkText:a,linkTo:c}){const[r,d]=o.useState(!1);return r?null:e.jsx("div",{className:"bg-blue-100 border rounded border-blue-800 shadow-sm mx-6 mt-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-yellow-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-blue-900",children:t}),e.jsx("p",{className:"text-xs text-blue-700 mt-0.5",children:n})]}),e.jsx(Y,{to:c,className:"shrink-0 px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded hover:bg-blue-700 transition-colors",children:a})]}),e.jsx("button",{type:"button",onClick:()=>d(!0),className:"shrink-0 ml-4 p-1 rounded text-blue-600 hover:text-blue-800 hover:bg-blue-100 transition-colors cursor-pointer","aria-label":"Dismiss banner",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})})]})})}function st({version:t}){return e.jsx("div",{className:"px-6 sm:px-12 pb-8 mt-auto pt-8",children:e.jsxs("div",{className:"border-t border-cygray-30 pt-6 flex flex-wrap justify-between items-center gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"font-mono text-sm font-semibold tracking-widest text-cyblack-100",children:"CODEYAM"}),t&&e.jsx("span",{className:"font-mono text-xs text-gray-400",children:t})]}),e.jsxs("div",{className:"flex items-center gap-4 font-mono text-xs uppercase tracking-widest",children:[e.jsx("a",{href:"https://blog.codeyam.com/",target:"_blank",rel:"noopener noreferrer",className:"text-cyblack-100 underline underline-offset-4 hover:text-primary-100",children:"Read the Blog"}),e.jsx("span",{className:"text-cygray-30",children:"|"}),e.jsx("a",{href:"https://discord.gg/x4uAgaRdwF",target:"_blank",rel:"noopener noreferrer",className:"text-cyblack-100 underline underline-offset-4 hover:text-primary-100",children:"Join Discord"})]})]})})}function it({serverVersion:t}){const[n,a]=o.useState("stale"),[c,r]=o.useState(null),d=async()=>{a("restarting"),r(null);try{if(!(await fetch("/api/restart-server",{method:"POST"})).ok)throw new Error("Failed to restart server");a("reconnecting");let w=0;const z=30,j=1e3,x=async()=>{try{if((await fetch("/api/health")).ok){window.location.reload();return}}catch{}w++,w<z?setTimeout(()=>void x(),j):(r("Server took too long to restart. Please refresh manually."),a("stale"))};setTimeout(()=>void x(),500)}catch(i){r(i instanceof Error?i.message:"Failed to restart server"),a("stale")}};return e.jsx("div",{className:"bg-amber-100 border rounded border-amber-700 shadow-sm mx-6 mt-6",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-amber-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),e.jsxs("div",{className:"flex-1",children:[n==="stale"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Dashboard server is out of date"}),e.jsxs("p",{className:"text-xs text-amber-700 mt-0.5",children:["Server version: ",t,". A newer version of CodeYam CLI is installed. Restart the server to get the latest features."]}),c&&e.jsx("p",{className:"text-xs text-red-600 mt-1",children:c})]}),n==="restarting"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Restarting server..."}),e.jsx("p",{className:"text-xs text-amber-700 mt-0.5",children:"Please wait while the server restarts."})]}),n==="reconnecting"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Reconnecting..."}),e.jsx("p",{className:"text-xs text-amber-700 mt-0.5",children:"Waiting for the server to come back online."})]})]}),n==="stale"&&e.jsx("button",{type:"button",onClick:()=>void d(),className:"shrink-0 px-4 py-2 bg-amber-600 text-white text-sm font-medium rounded hover:bg-amber-700 transition-colors cursor-pointer",children:"Restart Server"}),(n==="restarting"||n==="reconnecting")&&e.jsxs("div",{className:"shrink-0 flex items-center gap-2 px-4 py-2 text-amber-700 text-sm",children:[e.jsxs("svg",{className:"w-4 h-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),n==="restarting"?"Stopping...":"Reconnecting..."]})]})})})}function nt({currentVersion:t,latestVersion:n}){const[a,c]=o.useState(!1);if(a)return null;const r="npm install -g @codeyam/codeyam-cli@latest && codeyam stop && codeyam";return e.jsx("div",{className:"bg-emerald-100 border rounded border-emerald-700 shadow-sm mx-6 mt-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-emerald-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M7 11l5-5m0 0l5 5m-5-5v12"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-emerald-900",children:"A new version of CodeYam CLI is available"}),e.jsxs("p",{className:"text-xs text-emerald-700 mt-0.5",children:["Current: ",t," → Latest: ",n]})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-2",children:[e.jsx("code",{className:"text-xs bg-emerald-200 text-emerald-900 px-2 py-1.5 rounded font-mono",children:r}),e.jsx(Me,{content:r,label:"Copy",copiedLabel:"Copied!",className:"px-3 py-1.5 bg-emerald-600 text-white text-xs font-medium rounded hover:bg-emerald-700 transition-colors"})]})]}),e.jsx("button",{type:"button",onClick:()=>c(!0),className:"shrink-0 ml-4 p-1 rounded text-emerald-600 hover:text-emerald-800 hover:bg-emerald-200 transition-colors cursor-pointer","aria-label":"Dismiss banner",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})})]})})}const Nt=()=>[{rel:"stylesheet",href:tt},{rel:"icon",type:"image/x-icon",href:"/favicon.ico"}];function at(){const{currentRun:t,projectSlug:n,currentEntities:a,availableAPIKeys:c,queuedJobCount:r,queueJobs:d,currentlyExecuting:i,historicalRuns:w,isServerOutOfDate:z,serverVersion:j,npmUpdate:x,labs:_,simulationsEnabled:N,isSimulationsReady:k,isAdmin:V,editorMode:p,displayVersion:E}=he(),{toasts:D,closeToast:B}=we(),F=xe(),v=o.useRef(F),S=ie();o.useEffect(()=>{v.current=F},[F]);const y=S.pathname.startsWith("/entity/")&&S.pathname.includes("/edit/")||S.pathname.startsWith("/dev/")||S.pathname.startsWith("/editor"),l=S.pathname.includes("/fullscreen")||S.pathname.startsWith("/editor");return o.useEffect(()=>{let m=null,h=null,b=0;const J=2e3;function I(){m||(m=new EventSource("/api/events"),m.addEventListener("message",$=>{const R=JSON.parse($.data);if(R.type==="queue")v.current.revalidate(),b=Date.now();else if(R.type==="db-change"||R.type==="unknown"){const O=Date.now(),H=O-b;H<J?(h&&clearTimeout(h),h=setTimeout(()=>{v.current.revalidate(),b=Date.now(),h=null},J-H)):(v.current.revalidate(),b=O)}}),m.addEventListener("error",()=>{}))}function M(){h&&(clearTimeout(h),h=null),m&&(m.close(),m=null)}function U(){document.hidden?M():(I(),v.current.revalidate())}return document.hidden||I(),document.addEventListener("visibilitychange",U),()=>{document.removeEventListener("visibilitychange",U),M()}},[]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`min-h-screen ${y?"":"grid"} bg-cygray-10`,style:y?void 0:{gridTemplateColumns:"65px minmax(0, 1fr)"},children:[!y&&e.jsx(Xe,{labs:_,isAdmin:V,editorMode:p}),e.jsxs("div",{className:"max-h-screen overflow-auto bg-cygray-10 flex flex-col min-h-screen",children:[z&&e.jsx(it,{serverVersion:j}),x&&x.currentVersion&&e.jsx(nt,{currentVersion:x.currentVersion,latestVersion:x.latestVersion}),N&&c.length===0&&e.jsx(se,{text:"No AI API keys configured. Please provide an AI API key at your earliest convenience.",subtext:"An API key is required for stable, frequent use of CodeYam",linkText:"Configure API Keys",linkTo:"/settings"}),N&&!k&&e.jsx(se,{text:"Simulations enabled but not yet configured",subtext:"Run /codeyam-setup in Claude Code to install the analyzer and configure your dev server",linkText:"View Labs",linkTo:"/labs"}),e.jsx("div",{className:"flex-1",children:e.jsx(pe,{})}),e.jsx(st,{version:E})]})]}),e.jsx(Ze,{toasts:D,onClose:B}),!l&&N&&e.jsx(et,{currentRun:t,projectSlug:n,currentEntities:a,isAnalysisStarting:!1,queuedJobCount:r,queueJobs:d,currentlyExecuting:i,historicalRuns:w})]})}const St=re(function(){return e.jsxs("html",{lang:"en",children:[e.jsxs("head",{children:[e.jsx("meta",{charSet:"utf-8"}),e.jsx("meta",{name:"viewport",content:"width=device-width,initial-scale=1"}),e.jsx(le,{}),e.jsx(ce,{})]}),e.jsxs("body",{children:[e.jsx(Ce,{children:e.jsx(ke,{children:e.jsx(at,{})})}),e.jsx(de,{}),e.jsx(me,{})]})]})});export{St as default,Nt as links};
@@ -1,4 +1,4 @@
1
- import{c}from"./createLucideIcon-CC6AbExI.js";/**
1
+ import{c}from"./createLucideIcon-DJB0YQJL.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1 @@
1
+ import{w as ge,u as be,e as ye,d as fe,f as je,r}from"./chunk-JZWAC4HX-BBXArFPl.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{u as ve}from"./useReportContext-BermyNU5.js";import{C as Ne}from"./CopyButton-CzTDWkF2.js";import"./copy-zK0B6Nu-.js";import"./createLucideIcon-DJB0YQJL.js";const Ie=()=>[{title:"Settings - CodeYam"},{name:"description",content:"Configure project settings"}];function X(d){if(!d)return"";const t=[d.command];return d.args&&d.args.length>0&&t.push(...d.args),t.join(" ")}function Z({mock:d,onSave:t,onCancel:o}){const[i,b]=r.useState(d.entityName),[h,c]=r.useState(d.filePath),[n,y]=r.useState(d.content),m=()=>{if(!i.trim()||!h.trim()||!n.trim()){alert("All fields are required");return}t({entityName:i,filePath:h,content:n})};return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Entity Name"}),e.jsx("input",{type:"text",value:i,onChange:x=>b(x.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]",placeholder:"e.g., determineDatabaseType"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"File Path"}),e.jsx("input",{type:"text",value:h,onChange:x=>c(x.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]",placeholder:"e.g., packages/database/src/lib/kysely/db.ts"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Content"}),e.jsx("textarea",{value:n,onChange:x=>y(x.target.value),rows:6,className:"w-full px-3 py-2 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]",placeholder:"e.g., function determineDatabaseType() { return 'postgresql' }"})]}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx("button",{type:"button",onClick:o,className:"px-4 py-2 bg-gray-200 text-gray-800 border-none rounded text-sm cursor-pointer hover:bg-gray-300",children:"Cancel"}),e.jsx("button",{type:"button",onClick:m,className:"px-4 py-2 bg-[#005C75] text-white border-none rounded text-sm cursor-pointer hover:bg-[#004a5d]",children:"Save"})]})]})}function we(d){try{return new Date(d).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return d}}const Ke=ge(function(){var G,Y,H,U,B;const{config:t,secrets:o,versionInfo:i,simulationsEnabled:b,error:h}=be(),c=ye(),n=fe(),y=je(),[m,x]=r.useState(b?"project-metadata":"memory");ve({source:"settings-page"});const[u,f]=r.useState((t==null?void 0:t.universalMocks)||[]),[N,P]=r.useState(((t==null?void 0:t.pathsToIgnore)||[]).join(", ")),[I,ee]=r.useState(((t==null?void 0:t.pathsToIgnore)||[]).join(", ")),[se,K]=r.useState((o==null?void 0:o.GROQ_API_KEY)||""),[te,R]=r.useState((o==null?void 0:o.ANTHROPIC_API_KEY)||""),[ae,T]=r.useState((o==null?void 0:o.OPENAI_API_KEY)||""),[w,re]=r.useState(!1),[C,ne]=r.useState(!1),[k,ie]=r.useState(!1),[E,j]=r.useState(!1),[_,oe]=r.useState(!1),[q,F]=r.useState(!1),[le,S]=r.useState(null),[de,v]=r.useState(!1),[A,O]=r.useState({}),[p,$]=r.useState(((G=t==null?void 0:t.memory)==null?void 0:G.conversationReflection)??!0),[g,D]=r.useState(((Y=t==null?void 0:t.memory)==null?void 0:Y.ruleMaintenance)??!0),[M,V]=r.useState(((H=t==null?void 0:t.memory)==null?void 0:H.promptModel)??"haiku");r.useEffect(()=>{var s,a,l,L;if(t){f(t.universalMocks||[]);const W=(t.pathsToIgnore||[]).join(", ");P(W),ee(W);const J={};(s=t.webapps)==null||s.forEach((Q,pe)=>{Q.startCommand&&(J[pe]=X(Q.startCommand))}),O(J),$(((a=t.memory)==null?void 0:a.conversationReflection)??!0),D(((l=t.memory)==null?void 0:l.ruleMaintenance)??!0),V(((L=t.memory)==null?void 0:L.promptModel)??"haiku")}o&&(K(o.GROQ_API_KEY||""),R(o.ANTHROPIC_API_KEY||""),T(o.OPENAI_API_KEY||""))},[t,o]),r.useEffect(()=>{if(c!=null&&c.success){j(!0);const s=setTimeout(()=>j(!1),3e3);return()=>clearTimeout(s)}},[c]),r.useEffect(()=>{if(n.state==="idle"&&n.data&&!q){console.log("[Settings] Fetcher data:",n.data);const s=n.data;if(s.success){console.log("[Settings] Save successful, revalidating..."),j(!0),F(!0),(N!==I||s.requiresRestart)&&oe(!0),y.revalidate();const a=setTimeout(()=>{j(!1),F(!1)},3e3);return()=>clearTimeout(a)}}},[n.state,n.data,q,y,N,I]);const ce=s=>{s.preventDefault();const a=new FormData(s.currentTarget);a.set("universalMocks",JSON.stringify(u)),a.set("startCommands",JSON.stringify(A)),a.set("memorySettings",JSON.stringify({conversationReflection:p,ruleMaintenance:g,promptModel:M})),console.log("[Settings] Submitting form data:",{universalMocks:a.get("universalMocks"),startCommands:a.get("startCommands"),openAiApiKey:a.get("openAiApiKey")?"***":"(empty)"}),n.submit(a,{method:"post"})},me=s=>{f([...u,s]),v(!1)},xe=(s,a)=>{const l=[...u];l[s]=a,f(l),S(null)},ue=s=>{f(u.filter((a,l)=>l!==s))};if(h)return e.jsxs("div",{className:"max-w-6xl mx-auto p-8 font-sans",children:[e.jsx("header",{className:"mb-6 pb-4 border-b border-gray-200",children:e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Settings"})})}),e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:e.jsx("p",{className:"text-red-700",children:h})})]});const z=[{id:"project-metadata",label:"Project Metadata"},{id:"ai-provider",label:"AI Provider Configuration"},{id:"commands",label:"Commands"},{id:"paths-to-ignore",label:"Paths To Ignore"},{id:"universal-mocks",label:"Universal Mocks"},{id:"memory",label:"Memory"},{id:"current-configuration",label:"Current Configuration"}],he=b?z:z.filter(s=>s.id==="memory");return e.jsx("div",{className:"bg-[#F8F7F6] min-h-screen",children:e.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 pt-8 pb-12 font-sans",children:[e.jsxs("div",{className:"mb-8 flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-[28px] font-semibold text-gray-900 mb-2",children:"Settings"}),e.jsx("p",{className:"text-[15px] text-gray-500",children:"Project Configuration"})]}),e.jsx("button",{type:"submit",form:"settings-form",disabled:n.state==="submitting",className:"px-6 py-2 bg-[#005C75] text-white border-none rounded text-sm font-medium cursor-pointer disabled:cursor-not-allowed disabled:opacity-60 hover:bg-[#004a5d] whitespace-nowrap",children:n.state==="submitting"?"Saving...":"Save Settings"})]}),(E||_||(c==null?void 0:c.error)||n.data&&typeof n.data=="object"&&"error"in n.data)&&e.jsxs("div",{className:"mb-4 space-y-3",children:[E&&e.jsx("div",{className:"text-emerald-600 text-sm font-medium bg-emerald-50 border border-emerald-200 rounded px-4 py-2",children:"Settings saved successfully!"}),_&&e.jsxs("div",{className:"text-amber-700 text-sm font-medium bg-amber-50 border border-amber-200 rounded px-4 py-2",children:[e.jsx("div",{children:"Settings changed. Please restart CodeYam for changes to take effect:"}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx("code",{className:"bg-amber-100 px-2 py-1 rounded text-xs",children:"codeyam stop && codeyam"}),e.jsx(Ne,{content:"codeyam stop && codeyam",className:"px-2 py-1 text-xs bg-amber-200 hover:bg-amber-300 text-amber-800 rounded border-none transition-colors"})]})]}),(c==null?void 0:c.error)&&e.jsx("div",{className:"text-red-600 text-sm font-medium bg-red-50 border border-red-200 rounded px-4 py-2",children:c.error}),(()=>{if(n.data&&typeof n.data=="object"&&"error"in n.data){const s=n.data;return typeof s.error=="string"?e.jsx("div",{className:"text-red-600 text-sm font-medium bg-red-50 border border-red-200 rounded px-4 py-2",children:s.error}):null}return null})()]}),e.jsxs("div",{className:"flex flex-col lg:flex-row gap-6 lg:gap-8 items-start",children:[e.jsx("nav",{className:"w-full lg:w-64 flex-shrink-0",children:e.jsx("ul",{className:"flex lg:flex-col overflow-x-auto gap-1",children:he.map(s=>e.jsx("li",{children:e.jsx("button",{type:"button",onClick:()=>x(s.id),className:`w-full text-left px-3 lg:px-0 py-2.5 text-sm transition-colors cursor-pointer whitespace-nowrap ${m===s.id?"text-[#005C75] font-medium":"text-gray-600 hover:text-gray-900"}`,children:s.label})},s.id))})}),e.jsx("div",{className:"flex-1 min-w-0 -mt-2",children:e.jsxs("form",{id:"settings-form",onSubmit:ce,className:"space-y-6",children:[m==="project-metadata"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Project Metadata"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"block mb-2 font-medium text-gray-700",children:"Web Applications"}),t!=null&&t.webapps&&t.webapps.length>0?e.jsx("div",{className:"space-y-3",children:t.webapps.map((s,a)=>{var l;return e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Path:"})," ",e.jsx("span",{className:"text-gray-900",children:s.path==="."?"Root":s.path})]}),s.appDirectory&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"App Directory:"})," ",e.jsx("span",{className:"text-gray-900",children:s.appDirectory})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Framework:"})," ",e.jsx("span",{className:"text-gray-900",children:s.framework})]}),s.startCommand&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Start Command:"})," ",e.jsxs("span",{className:"text-gray-900 font-mono text-xs",children:[s.startCommand.command," ",(l=s.startCommand.args)==null?void 0:l.join(" ")]})]})]})},a)})}):e.jsx("p",{className:"text-sm text-gray-600 italic",children:"No web applications configured"}),e.jsx("p",{className:"mt-2 text-sm text-gray-600",children:"Web applications are detected during initialization. To modify, edit `.codeyam/config.json` or re-run `codeyam init`."})]})]}),m==="ai-provider"&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"AI Provider API Keys"}),e.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Configure API keys for AI-powered analysis. Choose the provider that best fits your needs."}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Groq"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Lightning-fast inference with industry-leading speed. Groq's LPU architecture delivers exceptional performance for real-time AI applications with competitive pricing."}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," ","$0.10/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-cyan-100 text-cyan-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 850 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Less reliable, but capable of producing reasonable results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"groqApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:w?"text":"password",id:"groqApiKey",name:"groqApiKey",value:se,onChange:s=>K(s.target.value),placeholder:"gsk_...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("button",{type:"button",onClick:()=>re(!w),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none cursor-pointer",children:w?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Anthropic Claude"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Advanced reasoning and coding capabilities with superior context understanding. Claude excels at complex analysis tasks and provides highly accurate results with detailed explanations."}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," ","$3.00/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-cyan-100 text-cyan-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 120 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Consistent, high quality results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"anthropicApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:C?"text":"password",id:"anthropicApiKey",name:"anthropicApiKey",value:te,onChange:s=>R(s.target.value),placeholder:"sk-ant-...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("button",{type:"button",onClick:()=>ne(!C),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none cursor-pointer",children:C?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"OpenAI GPT"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Industry-standard AI with broad capabilities and extensive ecosystem. GPT models offer reliable performance across diverse tasks with good balance of speed and quality."}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," ","$2.50/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-cyan-100 text-cyan-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 150 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Consistent, high quality results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"openAiApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:k?"text":"password",id:"openAiApiKey",name:"openAiApiKey",value:ae,onChange:s=>T(s.target.value),placeholder:"sk-...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("button",{type:"button",onClick:()=>ie(!k),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none cursor-pointer",children:k?"Hide":"Show"})]})]})]})]})]}),m==="commands"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Commands"}),e.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Configure start commands for your web applications"}),t!=null&&t.webapps&&t.webapps.length>0?e.jsx("div",{className:"space-y-4",children:t.webapps.map((s,a)=>e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"text-base font-semibold text-gray-900 mb-1",children:s.path==="."?"Root":s.path}),e.jsx("div",{className:"text-sm text-gray-600",children:s.framework})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:`startCommand-${a}`,className:"block text-sm font-medium text-gray-700 mb-2",children:"Start Command"}),e.jsx("input",{type:"text",id:`startCommand-${a}`,name:`startCommand-${a}`,value:A[a]||"",onChange:l=>O({...A,[a]:l.target.value}),placeholder:"e.g., pnpm dev --port $PORT",className:"w-full px-3 py-2 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("p",{className:"mt-2 text-xs text-gray-500",children:"Use $PORT as a placeholder for the dynamic port number"})]})]},a))}):e.jsx("p",{className:"text-sm text-gray-600 italic",children:"No web applications configured"})]}),m==="paths-to-ignore"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Paths To Ignore"}),e.jsx("input",{type:"text",id:"pathsToIgnore",name:"pathsToIgnore",value:N,onChange:s=>P(s.target.value),placeholder:"e.g., __tests__, \\.test\\.ts$, ^background (no quotes needed)",className:"w-full px-3 py-3 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-[#005C75] focus:ring-2 focus:ring-[#005C75]/10"}),e.jsxs("p",{className:"mt-2 text-sm text-gray-600",children:["Comma-separated list of regex patterns for paths to ignore during file watching. Examples:"," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"__tests__"}),","," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"\\.test\\.tsx?$"}),","," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"^background"}),e.jsx("br",{}),e.jsx("span",{className:"text-xs text-gray-500 mt-1 inline-block",children:"Note: Files matching patterns in .gitignore are also automatically ignored"})]})]}),m==="universal-mocks"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Universal Mocks"}),e.jsx("p",{className:"mb-3 text-sm text-gray-600",children:"Mock functions that will be applied across all entity simulations"}),u.length===0?e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"text-sm text-gray-500 mb-3",children:"No universal mocks configured"}),e.jsx("button",{type:"button",onClick:()=>v(!0),className:"px-4 py-2 bg-[#005C75] text-white border-none rounded text-sm cursor-pointer hover:bg-[#004a5d]",children:"Add Mock"})]}):e.jsx("div",{className:"space-y-3",children:u.map((s,a)=>e.jsx("div",{className:"p-4 bg-gray-50 rounded border border-gray-200",children:le===a?e.jsx(Z,{mock:s,onSave:l=>xe(a,l),onCancel:()=>S(null)}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-gray-800 mb-1",children:s.entityName}),e.jsx("div",{className:"text-sm text-gray-600 mb-2",children:s.filePath}),e.jsx("pre",{className:"text-xs bg-white p-2 rounded border border-gray-200 overflow-x-auto",children:s.content})]}),e.jsxs("div",{className:"flex gap-2 ml-3",children:[e.jsx("button",{type:"button",onClick:()=>S(a),className:"px-3 py-1 bg-teal-600 text-white border-none rounded text-sm cursor-pointer hover:bg-teal-700",children:"Edit"}),e.jsx("button",{type:"button",onClick:()=>ue(a),className:"px-3 py-1 bg-red-600 text-white border-none rounded text-sm cursor-pointer hover:bg-red-700",children:"Delete"})]})]})})},a))}),u.length>0&&e.jsx("button",{type:"button",onClick:()=>v(!0),className:"mt-4 px-4 py-2 bg-[#005C75] text-white border-none rounded text-sm cursor-pointer hover:bg-[#004a5d]",children:"Add Mock"})]}),m==="memory"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Memory"}),e.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Configure how CodeYam reflects on conversations and maintains rules between sessions."}),e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1 mr-4",children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Conversation Reflection"}),e.jsx("p",{className:"text-sm text-gray-600",children:"After each conversation, an agent reviews the session for architectural decisions, tribal knowledge, confusion, or corrections that future sessions would benefit from knowing. It creates or updates Claude Rules based on what it learns."})]}),e.jsx("button",{type:"button",role:"switch","aria-checked":p,onClick:()=>$(!p),className:`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none ${p?"bg-[#005C75]":"bg-gray-200"}`,children:e.jsx("span",{className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${p?"translate-x-5":"translate-x-0"}`})})]})}),e.jsx("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1 mr-4",children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Rule Maintenance"}),e.jsx("p",{className:"text-sm text-gray-600",children:"After each conversation, an agent checks if any existing Claude Rules have become stale based on recent code changes. It reviews the rule content against file diffs and updates rules that are out of date."})]}),e.jsx("button",{type:"button",role:"switch","aria-checked":g,onClick:()=>D(!g),className:`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none ${g?"bg-[#005C75]":"bg-gray-200"}`,children:e.jsx("span",{className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${g?"translate-x-5":"translate-x-0"}`})})]})}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Memory Prompt Model"}),e.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Choose the Claude model used for conversation reflection and rule maintenance tasks."}),e.jsx("div",{className:"space-y-3",children:[{value:"haiku",label:"Haiku",badge:"Default, Recommended",description:"Fastest and cheapest. Good for routine reflection tasks."},{value:"sonnet",label:"Sonnet",badge:null,description:"Balanced speed and quality. Better at nuanced rule writing."},{value:"opus",label:"Opus",badge:null,description:"Highest quality. Best for complex architectural decisions. Costs significantly more."}].map(s=>e.jsxs("label",{className:`flex items-start gap-3 p-3 rounded-lg border cursor-pointer transition-colors ${M===s.value?"border-[#005C75] bg-[#005C75]/5":"border-gray-200 hover:border-gray-300"}`,children:[e.jsx("input",{type:"radio",name:"promptModel",value:s.value,checked:M===s.value,onChange:()=>V(s.value),className:"mt-1 accent-[#005C75]"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-900",children:s.label}),s.badge&&e.jsx("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs",children:s.badge})]}),e.jsx("p",{className:"text-sm text-gray-600 mt-0.5",children:s.description})]})]},s.value))})]})]})]}),m==="current-configuration"&&e.jsxs("div",{className:"space-y-6",children:[t&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Current Configuration"}),e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded mb-6",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[t.projectSlug&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Project Slug:"})," ",e.jsx("span",{className:"text-gray-900",children:t.projectSlug})]}),t.packageManager&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Package Manager:"})," ",e.jsx("span",{className:"text-gray-900",children:t.packageManager})]})]})}),t.webapps&&t.webapps.length>0&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"Web Applications"}),e.jsx("div",{className:"space-y-3",children:t.webapps.map((s,a)=>e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Path:"})," ",e.jsx("span",{className:"text-gray-900",children:s.path==="."?"Root":s.path})]}),s.appDirectory&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"App Directory:"})," ",e.jsx("span",{className:"text-gray-900",children:s.appDirectory})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Framework:"})," ",e.jsx("span",{className:"text-gray-900",children:s.framework})]}),s.startCommand&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Start Command:"})," ",e.jsx("span",{className:"text-gray-900 font-mono text-xs",children:X(s.startCommand)})]})]})},a))})]})]}),i&&e.jsxs("div",{className:"mt-6",children:[e.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"Version Information"}),e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[i.webserverVersion&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Webserver:"})," ",e.jsx("span",{className:"text-gray-900 font-mono",children:i.webserverVersion.version||"unknown"})]}),i.templateVersion&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Analyzer Template:"})," ",e.jsx("span",{className:"font-mono text-gray-900",children:i.templateVersion.version||((U=i.templateVersion.gitCommit)==null?void 0:U.slice(0,7))||"unknown"}),i.templateVersion.buildTimestamp&&e.jsxs("span",{className:"text-gray-500 ml-2",children:["(built"," ",we(i.templateVersion.buildTimestamp),")"]})]}),i.cachedAnalyzerVersion&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Cached Analyzer:"})," ",e.jsx("span",{className:"font-mono text-gray-900",children:i.cachedAnalyzerVersion.version||((B=i.cachedAnalyzerVersion.gitCommit)==null?void 0:B.slice(0,7))||"unknown"}),i.isCacheStale?e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-amber-100 text-amber-800 rounded text-xs",children:"Stale - will update on next analysis"}):e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs",children:"Up to date"})]}),!i.cachedAnalyzerVersion&&(t==null?void 0:t.projectSlug)&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Cached Analyzer:"})," ",e.jsx("span",{className:"text-gray-500 italic",children:"Not initialized - will be created on first analysis"})]})]})})]})]})]})})]}),de&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50",children:e.jsxs("div",{className:"bg-white rounded-lg max-w-2xl w-full p-6",children:[e.jsx("h2",{className:"text-2xl font-bold mb-4 text-gray-900",children:"Add Universal Mock"}),e.jsx(Z,{mock:{entityName:"",filePath:"",content:""},onSave:me,onCancel:()=>v(!1)})]})})]})})});export{Ke as default,Ie as meta};
@@ -0,0 +1 @@
1
+ import{w as R,u as $,r as l,a as B,d as D,L as F}from"./chunk-JZWAC4HX-BBXArFPl.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{u as O}from"./useReportContext-BermyNU5.js";import{S as U}from"./SafeScreenshot-CDoF7ZpU.js";import{L as V}from"./LoadingDots-By5zI316.js";import{E as P}from"./EntityTypeIcon-B6OMi58N.js";import{g as Y,a as Q,f as q}from"./fileTableUtils-Daa96Fr1.js";import{C as J}from"./chevron-down-BZ2DZxbW.js";import{S as K}from"./search-C0Uw0bcK.js";import{L as W}from"./loader-circle-DVQ0oHR7.js";import"./createLucideIcon-DJB0YQJL.js";const ce=()=>[{title:"Simulations - CodeYam"},{name:"description",content:"A visual gallery of your recently captured component screenshots"}],de=R(function(){const i=$(),c=i.entities,x=i.queueState;O({source:"simulations-page"});const[n,u]=l.useState(""),[d,S]=l.useState("visual"),g=l.useMemo(()=>{const a=[];return c.forEach(t=>{var y;const r=(y=t.analyses)==null?void 0:y[0];if(r!=null&&r.scenarios){const b=r.scenarios.filter(o=>{var m;return!((m=o.metadata)!=null&&m.sameAsDefault)}).map(o=>{var z,k,A,L,E;const m=(k=(z=o.metadata)==null?void 0:z.screenshotPaths)==null?void 0:k[0],N=(A=o.metadata)==null?void 0:A.noScreenshotSaved,M=m&&!N,T=(E=(L=r.status)==null?void 0:L.scenarios)==null?void 0:E.find(H=>H.name===o.name),I=T&&T.screenshotStartedAt&&!T.screenshotFinishedAt;let w;return M?w="completed":I?w="capturing":w="error",{scenarioName:o.name,scenarioDescription:o.description||"",screenshotPath:m||"",scenarioId:o.id,state:w}}).filter(o=>o.state==="completed"||o.state==="capturing");b.length>0&&a.push({entity:t,screenshots:b,createdAt:r.createdAt||""})}}),a.sort((t,r)=>new Date(r.createdAt).getTime()-new Date(t.createdAt).getTime()),a},[c]),v=l.useMemo(()=>c.filter(a=>{var y,b;const t=(y=a.analyses)==null?void 0:y[0];return!((b=t==null?void 0:t.scenarios)==null?void 0:b.some(o=>{var m,N;return(N=(m=o.metadata)==null?void 0:m.screenshotPaths)==null?void 0:N[0]}))}),[c]),p=l.useMemo(()=>g.filter(({entity:a})=>{const t=!n||a.name.toLowerCase().includes(n.toLowerCase()),r=d==="all"||a.entityType===d;return t&&r}),[g,n,d]),f=l.useMemo(()=>v.filter(a=>{const t=!n||a.name.toLowerCase().includes(n.toLowerCase()),r=d==="all"||a.entityType===d;return t&&r}),[v,n,d]),C=l.useCallback(a=>{u(a.target.value)},[]),j=l.useCallback(a=>{S(a.target.value)},[]),h=g.length>0;return e.jsx("div",{className:"bg-[#F8F7F6] min-h-screen overflow-y-auto",children:e.jsxs("div",{className:"px-20 py-12",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-[28px] font-semibold text-gray-900 mb-2",children:"Simulations"}),e.jsx("p",{className:"text-[15px] text-gray-500",children:"A visual gallery of your recently captured simulations."})]}),!h&&e.jsx("div",{className:"bg-[#D1F3F9] border border-[#A5E8F0] rounded-lg p-4 mb-6",children:e.jsxs("p",{className:"text-sm text-gray-700 m-0",children:["This page will display a visual gallery of your recently captured component simulations."," ",e.jsx("strong",{children:"Start by analyzing your first component below."})]})}),e.jsxs("div",{className:"bg-white border-b border-gray-200 rounded-t-lg px-5 py-4 mb-3",children:[e.jsx("div",{className:"text-[11px] text-gray-500 mb-2 uppercase",children:"Filters"}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("select",{className:"appearance-none bg-gray-50 border border-gray-200 rounded px-3 pr-8 text-[13px] h-[39px] cursor-pointer focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] hover:border-gray-300 transition-colors",value:d,onChange:j,children:[e.jsx("option",{value:"all",children:"All Types"}),e.jsx("option",{value:"visual",children:"Visual"}),e.jsx("option",{value:"library",children:"Library"})]}),e.jsx(J,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-3 h-3 text-gray-500 pointer-events-none"})]}),e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(K,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),e.jsx("input",{type:"text",placeholder:"Search component",className:"w-full bg-gray-50 border border-gray-200 rounded pl-9 pr-3 text-[13px] h-[39px] placeholder:text-gray-400 focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] transition-colors",value:n,onChange:C})]})]})]}),h&&p.length>0&&e.jsx("div",{className:"mb-2",children:e.jsxs("div",{className:"flex items-center py-3",children:[e.jsxs("span",{className:"font-mono uppercase",style:{fontSize:"11px",color:"#8b8b8b",fontWeight:500,letterSpacing:"0.05em"},children:[e.jsx("span",{style:{color:"#000000"},children:p.length})," ",p.length===1?"entity":"entities"]}),e.jsxs("div",{className:"relative group inline-flex items-center ml-1.5",children:[e.jsx("svg",{className:"w-3 h-3 text-gray-400 cursor-help",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),e.jsx("div",{className:"absolute left-0 top-full mt-2 hidden group-hover:block z-50 w-80",children:e.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-lg px-3 py-2 shadow-lg",children:["In CodeYam, an entity is a discrete, analyzable unit of code that can be independently simulated and tested.",e.jsx("div",{className:"absolute -top-1 left-4 w-2 h-2 bg-gray-900 transform rotate-45"})]})})]}),e.jsx("span",{className:"font-mono uppercase",style:{fontSize:"11px",color:"#d1d5db",fontWeight:500,letterSpacing:"0.05em",marginLeft:"8px"},children:"|"}),e.jsxs("span",{className:"font-mono uppercase",style:{fontSize:"11px",color:"#8b8b8b",fontWeight:500,letterSpacing:"0.05em",marginLeft:"8px"},children:[e.jsx("span",{style:{color:"#000000"},children:p.reduce((a,{screenshots:t})=>a+t.length,0)})," ","scenarios"]})]})}),e.jsxs("div",{className:"flex flex-col gap-3",children:[h&&(p.length===0?e.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-8 text-center text-gray-500",children:"No simulations match your filters."}):e.jsx(e.Fragment,{children:p.map(({entity:a,screenshots:t})=>e.jsx(G,{entity:a,screenshots:t,queueJobs:(x==null?void 0:x.jobs)||[]},a.sha))})),!h&&(f.length===0?e.jsx("div",{className:"bg-white border border-gray-200 rounded-b-lg p-8 text-center text-gray-500",children:"No components found matching your filters."}):f.map(a=>e.jsx(X,{entity:a},a.sha)))]})]})})});function G({entity:s,screenshots:i,queueJobs:c}){var j,h,a;const x=B(),n=D(),[u,d]=l.useState(!1),S=i.length||(((a=(h=(j=s.analyses)==null?void 0:j[0])==null?void 0:h.scenarios)==null?void 0:a.length)??0),g=t=>{x(`/entity/${s.sha}/scenarios/${t}?from=simulations`)},v=()=>{d(!0),n.submit({entitySha:s.sha,filePath:s.filePath||""},{method:"post",action:"/api/analyze"})};l.useEffect(()=>{n.state==="idle"&&u&&d(!1)},[n.state,u]);const p=Y(s,c),f=Q(p),C=p==="out-of-date";return e.jsx("div",{className:"rounded-[8px]",style:{backgroundColor:"#ffffff",border:"1px solid #e1e1e1"},children:e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-center px-[15px] py-[15px]",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx(P,{type:s.entityType||"other",size:"large"})}),e.jsxs("div",{className:"flex flex-col flex-shrink-0",style:{marginLeft:"15px",gap:"4px"},children:[e.jsxs("div",{className:"flex items-center gap-[5px]",children:[e.jsxs(F,{to:`/entity/${s.sha}`,className:"hover:underline cursor-pointer",title:s.name,style:{fontSize:"14px",lineHeight:"18px",color:"#343434",fontWeight:500},children:[s.name," (",S,")"]}),e.jsx("div",{className:"flex items-center justify-center px-2 rounded",style:{height:"20px",backgroundColor:f.bgColor,color:f.textColor,fontSize:"12px",lineHeight:"16px",fontWeight:400},children:f.text})]}),e.jsx("div",{style:{fontSize:"12px",lineHeight:"15px",color:"#b0b0b0",fontWeight:400},className:"font-mono",title:s.filePath,children:s.filePath})]}),e.jsx("div",{className:"flex-1"}),e.jsxs("div",{className:"flex-shrink-0 flex items-center gap-2",children:[C&&e.jsx(e.Fragment,{children:u||n.state!=="idle"?e.jsxs("div",{className:"px-2 py-1 bg-pink-100 rounded flex items-center gap-1.5",children:[e.jsx(W,{size:14,className:"animate-spin",style:{color:"#be185d"}}),e.jsx("span",{style:{color:"#be185d",fontSize:"10px",lineHeight:"20px",fontWeight:600},children:"Analyzing..."})]}):e.jsx("button",{onClick:v,className:"px-[10px] rounded transition-colors whitespace-nowrap",style:{backgroundColor:"#005c75",color:"#ffffff",fontSize:"10px",lineHeight:"22px",fontWeight:600},onMouseEnter:t=>{t.currentTarget.style.backgroundColor="#004d5e"},onMouseLeave:t=>{t.currentTarget.style.backgroundColor="#005c75"},children:"Re-analyze"})}),e.jsx("button",{onClick:()=>void x(`/entity/${s.sha}/logs`),className:"px-[10px] rounded transition-colors whitespace-nowrap",style:{backgroundColor:"#e0e9ec",color:"#005c75",fontSize:"10px",lineHeight:"22px",fontWeight:600},onMouseEnter:t=>{t.currentTarget.style.backgroundColor="#d0dfe3"},onMouseLeave:t=>{t.currentTarget.style.backgroundColor="#e0e9ec"},children:"View Logs"})]})]}),e.jsx("div",{className:"border-t border-gray-200"}),e.jsx("div",{className:"flex gap-2.5 overflow-x-auto pb-3 px-[15px] pt-3",style:{paddingLeft:"47px"},children:i.length>0?i.map(t=>e.jsxs("div",{className:"shrink-0 flex flex-col gap-2",children:[e.jsx("button",{onClick:()=>g(t.scenarioId||""),className:"block cursor-pointer bg-transparent border-none p-0",children:e.jsx("div",{className:"w-36 h-24 rounded-md border overflow-hidden flex items-center justify-center transition-all",style:{"--hover-border":"#005C75",backgroundColor:t.state==="capturing"?"#f9f9f9":"#f3f4f6",borderColor:t.state==="capturing"?"#efefef":"#d1d5db"},onMouseEnter:r=>{t.state==="completed"&&(r.currentTarget.style.borderColor="#005C75",r.currentTarget.style.boxShadow="0 4px 12px rgba(0, 92, 117, 0.15)")},onMouseLeave:r=>{r.currentTarget.style.borderColor=t.state==="capturing"?"#efefef":"#d1d5db",r.currentTarget.style.boxShadow="none"},children:t.state==="completed"?e.jsx(U,{screenshotPath:t.screenshotPath,alt:t.scenarioName,className:"max-w-full max-h-full object-contain"}):t.state==="capturing"?e.jsx(V,{size:"medium"}):null})}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"text-left text-xs text-gray-600 cursor-default",style:{fontSize:"11px",lineHeight:"14px",maxWidth:"144px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.scenarioName}),e.jsx("div",{className:"fixed hidden group-hover:block pointer-events-none",style:{zIndex:1e4,transform:"translateY(8px)"},children:e.jsxs("div",{className:"bg-gray-100 text-gray-800 text-xs rounded-lg px-3 py-2 shadow-lg max-w-xs border border-gray-200",children:[t.scenarioName,t.scenarioDescription&&e.jsxs(e.Fragment,{children:[": ",t.scenarioDescription]}),e.jsx("div",{className:"absolute -top-1 left-4 w-2 h-2 bg-gray-100 border-l border-t border-gray-200 transform rotate-45"})]})})]})]},t.scenarioId)):e.jsx("div",{className:"text-xs text-gray-400 py-4",children:"No screenshots available"})})]})})}function X({entity:s}){const i=D(),[c,x]=l.useState(!1),n=()=>{x(!0),i.submit({entitySha:s.sha,filePath:s.filePath||""},{method:"post",action:"/api/analyze"})};return l.useEffect(()=>{i.state==="idle"&&c&&x(!1)},[i.state,c]),e.jsx("div",{className:"bg-white rounded hover:bg-gray-100 transition-colors cursor-pointer border-b border-[#e1e1e1]",onClick:n,children:e.jsxs("div",{className:"px-5 py-4 flex items-center",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx(P,{type:s.entityType}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-0.5",children:[e.jsx(F,{to:`/entity/${s.sha}`,className:"text-sm font-medium text-gray-900 no-underline",children:s.name}),e.jsx("span",{className:"text-[10px] font-semibold px-1 py-0.5 rounded",style:{color:s.entityType==="visual"?"#7c3aed":s.entityType==="library"?"#0DBFE9":s.entityType==="type"?"#dc2626":s.entityType==="data"?"#2563eb":s.entityType==="index"?"#ea580c":s.entityType==="functionCall"?"#7c3aed":s.entityType==="class"?"#059669":s.entityType==="method"?"#0891b2":"#6b7280",backgroundColor:s.entityType==="visual"?"#f3e8ff":s.entityType==="library"?"#cffafe":s.entityType==="type"?"#fee2e2":s.entityType==="data"?"#dbeafe":s.entityType==="index"?"#ffedd5":s.entityType==="functionCall"?"#f3e8ff":s.entityType==="class"?"#d1fae5":s.entityType==="method"?"#cffafe":"#f3f4f6"},children:s.entityType?s.entityType.toUpperCase():"UNKNOWN"})]}),e.jsx("div",{className:"text-xs text-gray-400 truncate",children:s.filePath})]})]}),e.jsx("div",{className:"w-32 flex justify-center",children:e.jsx("span",{className:"text-[10px] text-gray-500 bg-gray-100 px-2 py-1 rounded",children:"Not analyzed"})}),e.jsx("div",{className:"w-32 text-center text-[10px] text-gray-500",children:q(s.createdAt||null)}),e.jsx("div",{className:"w-24 flex justify-end",children:c||i.state!=="idle"?e.jsxs("div",{className:"px-2 py-1 bg-pink-100 rounded text-xs text-pink-700 font-semibold flex items-center gap-1.5",children:[e.jsx(W,{size:14,className:"animate-spin"}),"Analyzing..."]}):e.jsx("button",{onClick:n,className:"bg-[#e0e9ec] text-[#005c75] px-4 py-1.5 rounded text-xs font-medium hover:bg-[#d0dde1] transition-colors cursor-pointer",children:"Analyze"})})]})})}export{de as default,ce as meta};
@@ -1,4 +1,4 @@
1
- import{c as o}from"./createLucideIcon-CC6AbExI.js";/**
1
+ import{c as o}from"./createLucideIcon-DJB0YQJL.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as e}from"./createLucideIcon-CC6AbExI.js";/**
1
+ import{c as e}from"./createLucideIcon-DJB0YQJL.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1 @@
1
+ import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r}from"./chunk-JZWAC4HX-BBXArFPl.js";function D({currentWidth:d,currentHeight:u,devicePresets:l,customSizes:i,onApply:a,onSave:b,onRemove:x,onClose:s}){const[n,o]=r.useState(String(d)),[c,y]=r.useState(String(u)),[m,p]=r.useState(""),[v,L]=r.useState(!1),w=r.useRef(null),S=r.useRef(null);r.useEffect(()=>{const t=N=>{w.current&&!w.current.contains(N.target)&&s()};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[s]),r.useEffect(()=>{const t=N=>{N.key==="Escape"&&s()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[s]),r.useEffect(()=>{var t;(t=S.current)==null||t.select()},[]);const g=parseInt(n,10),f=parseInt(c,10),h=g>0&&f>0,k=h&&(g!==d||f!==u),C=()=>{h&&(a({name:"Custom",width:g,height:f}),s())},E=()=>{const t=m.trim();!t||!h||(b(t,g,f),a({name:t,width:g,height:f}),s())},j=t=>{t.key==="Enter"&&(v&&m.trim()?E():k&&C())};return e.jsxs("div",{ref:w,className:"absolute top-full mt-1 right-0 bg-[#2a2a2a] border border-[#444] rounded-lg shadow-xl z-50 w-64",children:[l&&l.length>0&&e.jsxs("div",{className:"border-b border-[#444]",children:[e.jsx("div",{className:"px-3 py-1.5 text-[10px] uppercase tracking-wider text-gray-500",children:"Presets"}),l.map(t=>e.jsxs("button",{onClick:()=>{a(t),s()},className:`w-full px-3 py-1.5 text-left text-xs transition-colors cursor-pointer ${t.width===d&&t.height===u?"text-white bg-[#444]":"text-gray-300 hover:text-white hover:bg-[#333]"}`,children:[e.jsx("span",{className:"font-medium",children:t.name}),e.jsxs("span",{className:"text-gray-500 ml-1.5",children:[t.width,"×",t.height]})]},t.name))]}),i.length>0&&e.jsxs("div",{className:"border-b border-[#444]",children:[e.jsx("div",{className:"px-3 py-1.5 text-[10px] uppercase tracking-wider text-gray-500",children:"Saved Sizes"}),i.map(t=>e.jsxs("div",{className:"flex items-center group hover:bg-[#333] transition-colors",children:[e.jsxs("button",{onClick:()=>{a(t),s()},className:"flex-1 px-3 py-1.5 text-left text-xs text-gray-300 hover:text-white transition-colors cursor-pointer",children:[e.jsx("span",{className:"font-medium",children:t.name}),e.jsxs("span",{className:"text-gray-500 ml-1.5",children:[t.width,"×",t.height]})]}),e.jsx("button",{onClick:()=>x(t.name),className:"px-2 py-1.5 text-gray-600 hover:text-red-400 opacity-0 group-hover:opacity-100 transition-all cursor-pointer",title:"Remove",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]},t.name))]}),e.jsxs("div",{className:"p-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("input",{ref:S,type:"number",value:n,onChange:t=>o(t.target.value),onKeyDown:j,min:"100",max:"7680",className:"w-full px-2 py-1.5 bg-[#1a1a1a] border border-[#555] rounded text-xs text-white text-center focus:outline-none focus:border-[#007a99] [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",placeholder:"Width"}),e.jsx("span",{className:"text-gray-500 text-xs flex-shrink-0",children:"×"}),e.jsx("input",{type:"number",value:c,onChange:t=>y(t.target.value),onKeyDown:j,min:"100",max:"7680",className:"w-full px-2 py-1.5 bg-[#1a1a1a] border border-[#555] rounded text-xs text-white text-center focus:outline-none focus:border-[#007a99] [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",placeholder:"Height"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:C,disabled:!h||!k,className:"flex-1 px-2 py-1.5 bg-[#007a99] text-white text-xs font-medium rounded hover:bg-[#006080] transition-colors cursor-pointer disabled:bg-[#333] disabled:text-gray-600 disabled:cursor-not-allowed",children:"Apply"}),v?e.jsxs("div",{className:"flex gap-1",children:[e.jsx("input",{type:"text",value:m,onChange:t=>p(t.target.value),onKeyDown:j,placeholder:"Name",className:"w-20 px-2 py-1.5 bg-[#1a1a1a] border border-[#555] rounded text-xs text-white focus:outline-none focus:border-[#007a99]",autoFocus:!0}),e.jsx("button",{onClick:E,disabled:!m.trim()||!h,className:"px-2 py-1.5 bg-[#007a99] text-white text-xs rounded hover:bg-[#006080] transition-colors cursor-pointer disabled:bg-[#333] disabled:text-gray-600 disabled:cursor-not-allowed",children:"OK"})]}):e.jsx("button",{onClick:()=>L(!0),disabled:!h,className:"px-2 py-1.5 bg-[#333] text-gray-300 text-xs rounded hover:bg-[#444] transition-colors cursor-pointer disabled:text-gray-600 disabled:cursor-not-allowed",title:"Save as preset",children:"Save"})]})]})]})}function I({width:d,height:u,onSave:l,onCancel:i}){const[a,b]=r.useState(""),[x,s]=r.useState(""),n=()=>{const o=a.trim();if(!o){s("Please enter a name");return}l(o)};return e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50",children:e.jsxs("div",{className:"bg-white rounded-lg max-w-md w-full p-6 shadow-xl",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Save Custom Size"}),e.jsx("button",{onClick:i,className:"text-gray-400 hover:text-gray-600 transition-colors cursor-pointer","aria-label":"Close",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsxs("div",{className:"mb-6 p-4 bg-gray-50 rounded-lg border border-gray-200",children:[e.jsx("div",{className:"text-sm text-gray-500 mb-1",children:"Dimensions"}),e.jsxs("div",{className:"text-lg font-medium text-gray-900",children:[d,"px × ",u,"px"]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{htmlFor:"custom-size-name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Name"}),e.jsx("input",{id:"custom-size-name",type:"text",value:a,onChange:o=>{b(o.target.value),s("")},onKeyDown:o=>{o.key==="Enter"&&a.trim()&&n(),o.key==="Escape"&&i()},placeholder:"e.g., iPhone 15 Pro",className:`w-full px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-[#005c75] focus:border-[#005c75] ${x?"border-red-300":"border-gray-300"}`,autoFocus:!0}),x&&e.jsx("p",{className:"mt-1 text-sm text-red-600",children:x})]}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx("button",{onClick:i,className:"px-4 py-2 bg-gray-100 text-gray-700 text-sm font-medium rounded-md hover:bg-gray-200 transition-colors cursor-pointer",children:"Cancel"}),e.jsx("button",{onClick:n,disabled:!a.trim(),className:"px-4 py-2 bg-[#005c75] text-white text-sm font-medium rounded-md hover:bg-[#004a5c] transition-colors cursor-pointer disabled:bg-gray-300 disabled:cursor-not-allowed",children:"Save"})]})]})})}function R(d){const[u,l]=r.useState([]),i=d?`codeyam-custom-sizes-${d}`:null;r.useEffect(()=>{if(!i||typeof window>"u"){l([]);return}try{const s=localStorage.getItem(i);if(s){const n=JSON.parse(s);Array.isArray(n)&&l(n)}}catch(s){console.error("[useCustomSizes] Failed to load custom sizes:",s),l([])}},[i]);const a=r.useCallback(s=>{if(!(!i||typeof window>"u"))try{localStorage.setItem(i,JSON.stringify(s))}catch(n){console.error("[useCustomSizes] Failed to save custom sizes:",n)}},[i]),b=r.useCallback((s,n,o)=>{l(c=>{const y=c.findIndex(v=>v.name===s),m={name:s,width:n,height:o};let p;return y>=0?(p=[...c],p[y]=m):p=[...c,m],a(p),p})},[a]),x=r.useCallback(s=>{l(n=>{const o=n.filter(c=>c.name!==s);return a(o),o})},[a]);return{customSizes:u,addCustomSize:b,removeCustomSize:x}}export{D as C,I as S,R as u};
@@ -1,2 +1,2 @@
1
- import{r as t}from"./chunk-JZWAC4HX-C4pqxYJB.js";function I(i,s){const[d,n]=t.useState(""),[g,l]=t.useState(!1),[h,a]=t.useState(null),[u,r]=t.useState(!1);t.useEffect(()=>{s&&(r(!1),l(!1),a(null))},[s]),t.useEffect(()=>{if(!i||!s){s||n("");return}const L=async()=>{if(!u)try{const c=await fetch(`/api/logs/${i}`);if(c.ok){const o=(await c.text()).trim().split(`
1
+ import{r as t}from"./chunk-JZWAC4HX-BBXArFPl.js";function I(i,s){const[d,n]=t.useState(""),[g,l]=t.useState(!1),[h,a]=t.useState(null),[u,r]=t.useState(!1);t.useEffect(()=>{s&&(r(!1),l(!1),a(null))},[s]),t.useEffect(()=>{if(!i||!s){s||n("");return}const L=async()=>{if(!u)try{const c=await fetch(`/api/logs/${i}`);if(c.ok){const o=(await c.text()).trim().split(`
2
2
  `).filter(e=>e.length>0);if(o.length<3){l(!1),r(!1),a(null),n("");return}const f=o.filter(e=>e.includes("CodeYam Log Level 1"));if(f.length>0){const e=f[f.length-1];n(e.replace(/.*CodeYam Log Level 1: /,""))}const E=o.find(e=>e.includes("$$INTERACTIVE_SERVER_URL$$:"));if(E){const e=E.split("$$INTERACTIVE_SERVER_URL$$:")[1].trim();a(e),r(!0)}o.some(e=>e.includes("CodeYam: Exiting start.js"))&&l(!0)}}catch{}};L().catch(()=>{});const $=setInterval(()=>{L().catch(()=>{})},500);return()=>clearInterval($)},[i,s,u]);const m=t.useCallback(()=>{n(""),l(!1),a(null),r(!1)},[]);return{lastLine:d,interactiveUrl:h,isCompleted:g,resetLogs:m}}export{I as u};
@@ -0,0 +1 @@
1
+ import{j as i}from"./jsx-runtime-D_zvdyIk.js";import{r as e,c as x}from"./chunk-JZWAC4HX-BBXArFPl.js";const s={source:"navbar"},r=e.createContext(void 0);function D({children:t}){const[n,o]=e.useState(s),a=e.useCallback(u=>{o(u)},[]),c=e.useCallback(()=>{o(s)},[]);return i.jsx(r.Provider,{value:{contextData:n,setContextData:a,resetContextData:c},children:t})}function p(t){const n=e.useContext(r),o=e.useRef(n);e.useEffect(()=>{if(o.current)return o.current.setContextData(t),()=>{var a;(a=o.current)==null||a.resetContextData()}},[t.source,t.entitySha,t.scenarioId,t.analysisId,t.entityName,t.entityType,t.scenarioName,t.errorMessage])}function m(){const t=e.useContext(r),n=x();return t?{source:t.contextData.source,entitySha:t.contextData.entitySha,scenarioId:t.contextData.scenarioId,analysisId:t.contextData.analysisId,currentUrl:n.pathname,entityName:t.contextData.entityName,entityType:t.contextData.entityType,scenarioName:t.contextData.scenarioName,errorMessage:t.contextData.errorMessage}:{source:"navbar",currentUrl:n.pathname}}export{D as R,m as a,p as u};
@@ -0,0 +1 @@
1
+ import{j as T}from"./jsx-runtime-D_zvdyIk.js";import{r as t}from"./chunk-JZWAC4HX-BBXArFPl.js";const n=t.createContext(void 0);function p({children:o}){const[i,r]=t.useState([]),c=t.useCallback((s,e="info",a=5e3)=>{const d={id:`toast-${Date.now()}-${Math.random()}`,message:s,type:e,duration:a};r(x=>[...x,d])},[]),u=t.useCallback(s=>{r(e=>e.filter(a=>a.id!==s))},[]);return T.jsx(n.Provider,{value:{toasts:i,showToast:c,closeToast:u},children:o})}function v(){const o=t.useContext(n);if(!o)throw new Error("useToast must be used within a ToastProvider");return o}export{p as T,v as u};