@codeyam/codeyam-cli 0.1.0-staging.09652b8 → 0.1.0-staging.28f73cf

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 (287) 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 +7 -6
  4. package/analyzer-template/packages/ai/index.ts +2 -0
  5. package/analyzer-template/packages/ai/package.json +2 -2
  6. package/analyzer-template/packages/ai/src/lib/analyzeScope.ts +24 -0
  7. package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +14 -0
  8. package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +1402 -546
  9. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/FunctionCallManager.ts +138 -0
  10. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.ts +1 -1
  11. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.ts +139 -0
  12. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/DebugTracer.ts +224 -0
  13. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/PathManager.ts +203 -0
  14. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/README.md +294 -0
  15. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.ts +161 -0
  16. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/VisitedTracker.ts +235 -0
  17. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +2 -0
  18. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/selectBestValue.ts +70 -0
  19. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/uniqueIdUtils.ts +113 -0
  20. package/analyzer-template/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.ts +36 -0
  21. package/analyzer-template/packages/ai/src/lib/generateEntityKeyAttributes.ts +32 -8
  22. package/analyzer-template/packages/ai/src/lib/getConditionalUsagesFromCode.ts +27 -6
  23. package/analyzer-template/packages/ai/src/lib/promptGenerators/gatherAttributesMap.ts +42 -4
  24. package/analyzer-template/packages/ai/src/lib/worker/SerializableDataStructure.ts +39 -0
  25. package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +18 -6
  26. package/analyzer-template/packages/analyze/src/lib/asts/nodes/index.ts +2 -1
  27. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +8 -10
  28. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +6 -1
  29. package/analyzer-template/packages/analyze/src/lib/files/analyze/gatherEntityMap.ts +8 -6
  30. package/analyzer-template/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.ts +5 -13
  31. package/analyzer-template/packages/analyze/src/lib/files/analyzeChange.ts +34 -15
  32. package/analyzer-template/packages/analyze/src/lib/files/analyzeEntity.ts +17 -3
  33. package/analyzer-template/packages/analyze/src/lib/files/analyzeInitial.ts +35 -16
  34. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +7 -1
  35. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.ts +9 -1
  36. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarioData.ts +6 -1
  37. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarios.ts +9 -1
  38. package/analyzer-template/packages/aws/dist/src/lib/s3/getPresignedUrl.d.ts +23 -0
  39. package/analyzer-template/packages/aws/dist/src/lib/s3/getPresignedUrl.d.ts.map +1 -0
  40. package/analyzer-template/packages/aws/dist/src/lib/s3/getPresignedUrl.js +30 -0
  41. package/analyzer-template/packages/aws/dist/src/lib/s3/getPresignedUrl.js.map +1 -0
  42. package/analyzer-template/packages/aws/package.json +5 -4
  43. package/analyzer-template/packages/aws/s3/index.ts +4 -0
  44. package/analyzer-template/packages/aws/src/lib/s3/getPresignedUrl.ts +62 -0
  45. package/analyzer-template/packages/generate/src/lib/scenarioComponent.ts +6 -3
  46. package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponent.d.ts.map +1 -1
  47. package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponent.js +5 -3
  48. package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponent.js.map +1 -1
  49. package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/db.d.ts +2 -0
  50. package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/db.d.ts.map +1 -1
  51. package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/db.js +3 -0
  52. package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/db.js.map +1 -1
  53. package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/tableRelations.d.ts +2 -0
  54. package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/tableRelations.d.ts.map +1 -1
  55. package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/tables/debugReportsTable.d.ts +37 -0
  56. package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/tables/debugReportsTable.d.ts.map +1 -0
  57. package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/tables/debugReportsTable.js +27 -0
  58. package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/tables/debugReportsTable.js.map +1 -0
  59. package/analyzer-template/packages/github/dist/utils/index.d.ts +1 -0
  60. package/analyzer-template/packages/github/dist/utils/index.d.ts.map +1 -1
  61. package/analyzer-template/packages/github/dist/utils/index.js +1 -0
  62. package/analyzer-template/packages/github/dist/utils/index.js.map +1 -1
  63. package/analyzer-template/packages/github/dist/utils/src/lib/Semaphore.d.ts +25 -0
  64. package/analyzer-template/packages/github/dist/utils/src/lib/Semaphore.d.ts.map +1 -0
  65. package/analyzer-template/packages/github/dist/utils/src/lib/Semaphore.js +40 -0
  66. package/analyzer-template/packages/github/dist/utils/src/lib/Semaphore.js.map +1 -0
  67. package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getRemixRoutePath.d.ts.map +1 -1
  68. package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getRemixRoutePath.js +2 -1
  69. package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getRemixRoutePath.js.map +1 -1
  70. package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/remixRouteFileNameToRoute.d.ts.map +1 -1
  71. package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/remixRouteFileNameToRoute.js +1 -0
  72. package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/remixRouteFileNameToRoute.js.map +1 -1
  73. package/analyzer-template/packages/supabase/src/lib/kysely/db.ts +6 -0
  74. package/analyzer-template/packages/supabase/src/lib/kysely/tableRelations.ts +3 -0
  75. package/analyzer-template/packages/supabase/src/lib/kysely/tables/debugReportsTable.ts +61 -0
  76. package/analyzer-template/packages/utils/dist/utils/index.d.ts +1 -0
  77. package/analyzer-template/packages/utils/dist/utils/index.d.ts.map +1 -1
  78. package/analyzer-template/packages/utils/dist/utils/index.js +1 -0
  79. package/analyzer-template/packages/utils/dist/utils/index.js.map +1 -1
  80. package/analyzer-template/packages/utils/dist/utils/src/lib/Semaphore.d.ts +25 -0
  81. package/analyzer-template/packages/utils/dist/utils/src/lib/Semaphore.d.ts.map +1 -0
  82. package/analyzer-template/packages/utils/dist/utils/src/lib/Semaphore.js +40 -0
  83. package/analyzer-template/packages/utils/dist/utils/src/lib/Semaphore.js.map +1 -0
  84. package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getRemixRoutePath.d.ts.map +1 -1
  85. package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getRemixRoutePath.js +2 -1
  86. package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getRemixRoutePath.js.map +1 -1
  87. package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/remixRouteFileNameToRoute.d.ts.map +1 -1
  88. package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/remixRouteFileNameToRoute.js +1 -0
  89. package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/remixRouteFileNameToRoute.js.map +1 -1
  90. package/analyzer-template/packages/utils/index.ts +1 -0
  91. package/analyzer-template/packages/utils/src/lib/Semaphore.ts +42 -0
  92. package/analyzer-template/packages/utils/src/lib/frameworks/getRemixRoutePath.ts +2 -1
  93. package/analyzer-template/packages/utils/src/lib/frameworks/remixRouteFileNameToRoute.ts +1 -0
  94. package/analyzer-template/project/constructMockCode.ts +170 -6
  95. package/analyzer-template/project/reconcileMockDataKeys.ts +13 -0
  96. package/analyzer-template/project/start.ts +1 -11
  97. package/analyzer-template/project/writeMockDataTsx.ts +32 -1
  98. package/analyzer-template/project/writeScenarioComponents.ts +164 -18
  99. package/analyzer-template/project/writeUniversalMocks.ts +66 -8
  100. package/background/src/lib/virtualized/project/constructMockCode.js +158 -7
  101. package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
  102. package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +12 -0
  103. package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
  104. package/background/src/lib/virtualized/project/start.js +1 -8
  105. package/background/src/lib/virtualized/project/start.js.map +1 -1
  106. package/background/src/lib/virtualized/project/writeMockDataTsx.js +25 -1
  107. package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
  108. package/background/src/lib/virtualized/project/writeScenarioComponents.js +129 -17
  109. package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
  110. package/background/src/lib/virtualized/project/writeUniversalMocks.js +56 -7
  111. package/background/src/lib/virtualized/project/writeUniversalMocks.js.map +1 -1
  112. package/codeyam-cli/src/cli.js +6 -0
  113. package/codeyam-cli/src/cli.js.map +1 -1
  114. package/codeyam-cli/src/codeyam-cli.js +0 -0
  115. package/codeyam-cli/src/commands/debug.js +221 -0
  116. package/codeyam-cli/src/commands/debug.js.map +1 -0
  117. package/codeyam-cli/src/commands/report.js +102 -0
  118. package/codeyam-cli/src/commands/report.js.map +1 -0
  119. package/codeyam-cli/src/commands/setup-sandbox.js +164 -0
  120. package/codeyam-cli/src/commands/setup-sandbox.js.map +1 -0
  121. package/codeyam-cli/src/utils/__tests__/cleanupAnalysisFiles.test.js +6 -6
  122. package/codeyam-cli/src/utils/__tests__/cleanupAnalysisFiles.test.js.map +1 -1
  123. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +8 -0
  124. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
  125. package/codeyam-cli/src/utils/analyzer.js +30 -0
  126. package/codeyam-cli/src/utils/analyzer.js.map +1 -1
  127. package/codeyam-cli/src/utils/cleanupAnalysisFiles.js +2 -2
  128. package/codeyam-cli/src/utils/cleanupAnalysisFiles.js.map +1 -1
  129. package/codeyam-cli/src/utils/generateReport.js +219 -0
  130. package/codeyam-cli/src/utils/generateReport.js.map +1 -0
  131. package/codeyam-cli/src/utils/install-skills.js +7 -0
  132. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  133. package/codeyam-cli/src/utils/queue/__tests__/job.pidTracking.test.js +1 -0
  134. package/codeyam-cli/src/utils/queue/__tests__/job.pidTracking.test.js.map +1 -1
  135. package/codeyam-cli/src/utils/queue/job.js +5 -1
  136. package/codeyam-cli/src/utils/queue/job.js.map +1 -1
  137. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +4 -0
  138. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
  139. package/codeyam-cli/src/webserver/app/lib/database.js +50 -2
  140. package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
  141. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-D5ZHFomX.js +1 -0
  142. package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-CDnfNKKQ.js → InteractivePreview-XDSzQLOY.js} +2 -2
  143. package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-DUS-3h7I.js → LibraryFunctionPreview-BYVx9KFp.js} +1 -1
  144. package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-TJzDQku1.js → LogViewer-CRcT5fOZ.js} +1 -1
  145. package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-BORLgi0X.js +1 -0
  146. package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-BgdlWM6p.js → SafeScreenshot-Bual6h18.js} +1 -1
  147. package/codeyam-cli/src/webserver/build/client/assets/ScenarioPreview-Bi-YUMa-.js +6 -0
  148. package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-4D2vLLJz.js +5 -0
  149. package/codeyam-cli/src/webserver/build/client/assets/_index-BC200mfN.js +1 -0
  150. package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-CxvZPkCv.js +10 -0
  151. package/codeyam-cli/src/webserver/build/client/assets/api.generate-report-l0sNRNKZ.js +1 -0
  152. package/codeyam-cli/src/webserver/build/client/assets/chart-column-B8fb6wnw.js +1 -0
  153. package/codeyam-cli/src/webserver/build/client/assets/{chunk-WWGJGFF6-DvL0YqDJ.js → chunk-WWGJGFF6-De6i8FUT.js} +1 -1
  154. package/codeyam-cli/src/webserver/build/client/assets/circle-alert-IdsgAK39.js +1 -0
  155. package/codeyam-cli/src/webserver/build/client/assets/circle-check-BACUUf75.js +1 -0
  156. package/codeyam-cli/src/webserver/build/client/assets/clock-vWeoCemX.js +1 -0
  157. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CS7XDrKv.js +1 -0
  158. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-DIOEw_3i.js +1 -0
  159. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-3bYjyojg.js → entity._sha._-8Els_3Wb.js} +10 -10
  160. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.create-scenario-DtfwpN9J.js → entity._sha_.create-scenario-C3FZJx1w.js} +1 -1
  161. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.edit._scenarioId-YJz_igar.js +5 -0
  162. package/codeyam-cli/src/webserver/build/client/assets/entityStatus-BEqj2qBy.js +1 -0
  163. package/codeyam-cli/src/webserver/build/client/assets/entry.client-DiP0q291.js +5 -0
  164. package/codeyam-cli/src/webserver/build/client/assets/file-text-LM0mgxXE.js +1 -0
  165. package/codeyam-cli/src/webserver/build/client/assets/files-Dxh9CcaV.js +1 -0
  166. package/codeyam-cli/src/webserver/build/client/assets/{git-WoKohOtW.js → git-BXmqrWCH.js} +10 -10
  167. package/codeyam-cli/src/webserver/build/client/assets/globals-BGS74ED-.css +1 -0
  168. package/codeyam-cli/src/webserver/build/client/assets/html2canvas-pro.esm-XQCGvadH.js +5 -0
  169. package/codeyam-cli/src/webserver/build/client/assets/{index-Vvbl94Xc.js → index-D-zYbzFZ.js} +2 -2
  170. package/codeyam-cli/src/webserver/build/client/assets/loader-circle-BXPKbHEb.js +1 -0
  171. package/codeyam-cli/src/webserver/build/client/assets/manifest-1af162d4.js +1 -0
  172. package/codeyam-cli/src/webserver/build/client/assets/root-DB7VgjCY.js +16 -0
  173. package/codeyam-cli/src/webserver/build/client/assets/settings-5zF_GOcS.js +1 -0
  174. package/codeyam-cli/src/webserver/build/client/assets/{settings-LuiJ1UIm.js → settings-Dc4MlMpK.js} +1 -1
  175. package/codeyam-cli/src/webserver/build/client/assets/simulations-BQ-02-jB.js +1 -0
  176. package/codeyam-cli/src/webserver/build/client/assets/triangle-alert-D7k-ArFa.js +1 -0
  177. package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-CpUcCv1V.js → useLastLogLine-AlhS7g5F.js} +1 -1
  178. package/codeyam-cli/src/webserver/build/client/assets/useToast-Ddo4UQv7.js +1 -0
  179. package/codeyam-cli/src/webserver/build/client/assets/zap-_jw-9DCp.js +1 -0
  180. package/codeyam-cli/src/webserver/build/server/assets/{index-DzbqTxoN.js → index-D4JpXSIO.js} +1 -1
  181. package/codeyam-cli/src/webserver/build/server/assets/server-build-vwbN7n65.js +169 -0
  182. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  183. package/codeyam-cli/src/webserver/build-info.json +5 -5
  184. package/codeyam-cli/templates/codeyam-setup-skill.md +65 -85
  185. package/codeyam-cli/templates/debug-command.md +125 -0
  186. package/package.json +4 -6
  187. package/packages/ai/index.js +1 -1
  188. package/packages/ai/index.js.map +1 -1
  189. package/packages/ai/src/lib/analyzeScope.js +13 -0
  190. package/packages/ai/src/lib/analyzeScope.js.map +1 -1
  191. package/packages/ai/src/lib/astScopes/processExpression.js +12 -0
  192. package/packages/ai/src/lib/astScopes/processExpression.js.map +1 -1
  193. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +1023 -405
  194. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
  195. package/packages/ai/src/lib/dataStructure/equivalencyManagers/FunctionCallManager.js +137 -1
  196. package/packages/ai/src/lib/dataStructure/equivalencyManagers/FunctionCallManager.js.map +1 -1
  197. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js +1 -1
  198. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js.map +1 -1
  199. package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js +112 -0
  200. package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js.map +1 -0
  201. package/packages/ai/src/lib/dataStructure/helpers/DebugTracer.js +176 -0
  202. package/packages/ai/src/lib/dataStructure/helpers/DebugTracer.js.map +1 -0
  203. package/packages/ai/src/lib/dataStructure/helpers/PathManager.js +178 -0
  204. package/packages/ai/src/lib/dataStructure/helpers/PathManager.js.map +1 -0
  205. package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js +138 -0
  206. package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js.map +1 -0
  207. package/packages/ai/src/lib/dataStructure/helpers/VisitedTracker.js +199 -0
  208. package/packages/ai/src/lib/dataStructure/helpers/VisitedTracker.js.map +1 -0
  209. package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js +2 -0
  210. package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
  211. package/packages/ai/src/lib/dataStructure/helpers/selectBestValue.js +62 -0
  212. package/packages/ai/src/lib/dataStructure/helpers/selectBestValue.js.map +1 -0
  213. package/packages/ai/src/lib/dataStructure/helpers/uniqueIdUtils.js +90 -0
  214. package/packages/ai/src/lib/dataStructure/helpers/uniqueIdUtils.js.map +1 -0
  215. package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js +22 -0
  216. package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js.map +1 -1
  217. package/packages/ai/src/lib/generateEntityKeyAttributes.js +32 -8
  218. package/packages/ai/src/lib/generateEntityKeyAttributes.js.map +1 -1
  219. package/packages/ai/src/lib/getConditionalUsagesFromCode.js +13 -8
  220. package/packages/ai/src/lib/getConditionalUsagesFromCode.js.map +1 -1
  221. package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js +36 -3
  222. package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js.map +1 -1
  223. package/packages/ai/src/lib/worker/SerializableDataStructure.js +7 -0
  224. package/packages/ai/src/lib/worker/SerializableDataStructure.js.map +1 -1
  225. package/packages/analyze/src/lib/FileAnalyzer.js +17 -5
  226. package/packages/analyze/src/lib/FileAnalyzer.js.map +1 -1
  227. package/packages/analyze/src/lib/asts/nodes/index.js +2 -1
  228. package/packages/analyze/src/lib/asts/nodes/index.js.map +1 -1
  229. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +6 -8
  230. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
  231. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +5 -1
  232. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
  233. package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js +8 -2
  234. package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js.map +1 -1
  235. package/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.js +5 -8
  236. package/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.js.map +1 -1
  237. package/packages/analyze/src/lib/files/analyzeChange.js +21 -9
  238. package/packages/analyze/src/lib/files/analyzeChange.js.map +1 -1
  239. package/packages/analyze/src/lib/files/analyzeEntity.js +10 -4
  240. package/packages/analyze/src/lib/files/analyzeEntity.js.map +1 -1
  241. package/packages/analyze/src/lib/files/analyzeInitial.js +21 -9
  242. package/packages/analyze/src/lib/files/analyzeInitial.js.map +1 -1
  243. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +6 -1
  244. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
  245. package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js +9 -1
  246. package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js.map +1 -1
  247. package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js +5 -1
  248. package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js.map +1 -1
  249. package/packages/analyze/src/lib/files/scenarios/generateScenarios.js +9 -1
  250. package/packages/analyze/src/lib/files/scenarios/generateScenarios.js.map +1 -1
  251. package/packages/generate/src/lib/scenarioComponent.js +5 -3
  252. package/packages/generate/src/lib/scenarioComponent.js.map +1 -1
  253. package/packages/supabase/src/lib/kysely/db.js +3 -0
  254. package/packages/supabase/src/lib/kysely/db.js.map +1 -1
  255. package/packages/supabase/src/lib/kysely/tables/debugReportsTable.js +27 -0
  256. package/packages/supabase/src/lib/kysely/tables/debugReportsTable.js.map +1 -0
  257. package/packages/utils/index.js +1 -0
  258. package/packages/utils/index.js.map +1 -1
  259. package/packages/utils/src/lib/Semaphore.js +40 -0
  260. package/packages/utils/src/lib/Semaphore.js.map +1 -0
  261. package/packages/utils/src/lib/frameworks/getRemixRoutePath.js +2 -1
  262. package/packages/utils/src/lib/frameworks/getRemixRoutePath.js.map +1 -1
  263. package/packages/utils/src/lib/frameworks/remixRouteFileNameToRoute.js +1 -0
  264. package/packages/utils/src/lib/frameworks/remixRouteFileNameToRoute.js.map +1 -1
  265. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-B9Sf8e9w.js +0 -1
  266. package/codeyam-cli/src/webserver/build/client/assets/ScenarioPreview-Bl6GY-OE.js +0 -6
  267. package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-BDq8RX50.js +0 -5
  268. package/codeyam-cli/src/webserver/build/client/assets/_index-Bh3y3Wsl.js +0 -1
  269. package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-tq7Bl6-t.js +0 -10
  270. package/codeyam-cli/src/webserver/build/client/assets/chart-column-q9_nHfwv.js +0 -1
  271. package/codeyam-cli/src/webserver/build/client/assets/circle-alert-CKMpA1v_.js +0 -1
  272. package/codeyam-cli/src/webserver/build/client/assets/clock-Wnfog8Qw.js +0 -1
  273. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-C_ixaqqh.js +0 -1
  274. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.edit._scenarioId-QecTs_sq.js +0 -5
  275. package/codeyam-cli/src/webserver/build/client/assets/entry.client-hnkEgHrC.js +0 -5
  276. package/codeyam-cli/src/webserver/build/client/assets/file-text-CvCVdKLW.js +0 -1
  277. package/codeyam-cli/src/webserver/build/client/assets/files-DgUCYhbd.js +0 -1
  278. package/codeyam-cli/src/webserver/build/client/assets/globals-DZfbt0u5.css +0 -1
  279. package/codeyam-cli/src/webserver/build/client/assets/loader-circle-Bxm63UxG.js +0 -1
  280. package/codeyam-cli/src/webserver/build/client/assets/manifest-c90b8608.js +0 -1
  281. package/codeyam-cli/src/webserver/build/client/assets/root-DrVZQamX.js +0 -16
  282. package/codeyam-cli/src/webserver/build/client/assets/search-CJkk16Ct.js +0 -1
  283. package/codeyam-cli/src/webserver/build/client/assets/settings-ConzHeiL.js +0 -1
  284. package/codeyam-cli/src/webserver/build/client/assets/simulations-B9LRwAej.js +0 -1
  285. package/codeyam-cli/src/webserver/build/client/assets/useToast-DOxmMaSg.js +0 -1
  286. package/codeyam-cli/src/webserver/build/client/assets/zap-D5R1FAcH.js +0 -1
  287. package/codeyam-cli/src/webserver/build/server/assets/server-build-DGGis3OZ.js +0 -166
@@ -1 +1 @@
1
- import{w as L,u as $,c as W,b as Q,d as B,r as a,j as e}from"./chunk-WWGJGFF6-DvL0YqDJ.js";const ee=()=>[{title:"CodeYam - Settings"},{name:"description",content:"Configure project settings"}];function J(i){if(!i)return"";const t=[i.command];return i.args&&i.args.length>0&&t.push(...i.args),t.join(" ")}function P({mock:i,onSave:t,onCancel:o}){const[n,h]=a.useState(i.entityName),[c,l]=a.useState(i.filePath),[x,m]=a.useState(i.content),u=()=>{if(!n.trim()||!c.trim()||!x.trim()){alert("All fields are required");return}t({entityName:n,filePath:c,content:x})};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:n,onChange:d=>h(d.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600",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:c,onChange:d=>l(d.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600",placeholder:"e.g., packages/supabase/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:x,onChange:d=>m(d.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-blue-600 focus:ring-1 focus:ring-blue-600",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:u,className:"px-4 py-2 bg-blue-600 text-white border-none rounded text-sm cursor-pointer hover:bg-blue-700",children:"Save"})]})]})}function X(i){try{return new Date(i).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return i}}const se=L(function(){const{config:t,secrets:o,versionInfo:n,error:h}=$(),c=W(),l=Q(),x=B(),[m,u]=a.useState(t?.universalMocks||[]),[d,v]=a.useState((t?.pathsToIgnore||[]).join(", ")),[w,K]=a.useState((t?.pathsToIgnore||[]).join(", ")),[M,A]=a.useState(o?.GROQ_API_KEY||""),[T,S]=a.useState(o?.ANTHROPIC_API_KEY||""),[_,k]=a.useState(o?.OPENAI_API_KEY||""),[b,E]=a.useState(!1),[y,F]=a.useState(!1),[f,q]=a.useState(!1),[D,p]=a.useState(!1),[R,O]=a.useState(!1),[C,I]=a.useState(!1),[V,j]=a.useState(null),[z,N]=a.useState(!1);a.useEffect(()=>{if(t){u(t.universalMocks||[]);const s=(t.pathsToIgnore||[]).join(", ");v(s),K(s)}o&&(A(o.GROQ_API_KEY||""),S(o.ANTHROPIC_API_KEY||""),k(o.OPENAI_API_KEY||""))},[t,o]),a.useEffect(()=>{if(c?.success){p(!0);const s=setTimeout(()=>p(!1),3e3);return()=>clearTimeout(s)}},[c]),a.useEffect(()=>{if(l.state==="idle"&&l.data&&!C){console.log("[Settings] Fetcher data:",l.data);const s=l.data;if(s.success){console.log("[Settings] Save successful, revalidating..."),p(!0),I(!0),(d!==w||s.requiresRestart)&&O(!0),x.revalidate();const r=setTimeout(()=>{p(!1),I(!1)},3e3);return()=>clearTimeout(r)}}},[l.state,l.data,C,x,d,w]);const G=s=>{s.preventDefault();const r=new FormData(s.currentTarget);r.set("universalMocks",JSON.stringify(m)),console.log("[Settings] Submitting form data:",{universalMocks:r.get("universalMocks"),openAiApiKey:r.get("openAiApiKey")?"***":"(empty)"}),l.submit(r,{method:"post"})},Y=s=>{u([...m,s]),N(!1)},H=(s,r)=>{const g=[...m];g[s]=r,u(g),j(null)},U=s=>{u(m.filter((r,g)=>g!==s))};return h?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})})]}):e.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:e.jsxs("div",{className:"px-36 py-12 font-sans",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Settings"}),e.jsx("p",{className:"text-sm text-gray-500 mt-2",children:"Project Configuration"})]}),e.jsx("div",{className:"max-w-5xl my-8",children:e.jsxs("form",{onSubmit:G,className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl mb-4 text-gray-800 font-semibold",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?.webapps&&t.webapps.length>0?e.jsx("div",{className:"space-y-3",children:t.webapps.map((s,r)=>e.jsx("div",{className:"p-4 bg-gray-50 border border-gray-200 rounded",children:e.jsxs("div",{className:"grid grid-cols-2 gap-3 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})]}),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.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})]}),s.startCommand&&e.jsxs("div",{className:"col-span-2",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," ",s.startCommand.args?.join(" ")]})]})]})},r))}):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`."})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"AI Provider Configuration"}),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-gray-50",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 gap-3 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-blue-100 text-blue-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:b?"text":"password",id:"groqApiKey",name:"groqApiKey",value:M,onChange:s=>A(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-blue-600 focus:ring-1 focus:ring-blue-600"}),e.jsx("button",{type:"button",onClick:()=>E(!b),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",children:b?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-gray-50",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 gap-3 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-blue-100 text-blue-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:y?"text":"password",id:"anthropicApiKey",name:"anthropicApiKey",value:T,onChange:s=>S(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-blue-600 focus:ring-1 focus:ring-blue-600"}),e.jsx("button",{type:"button",onClick:()=>F(!y),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",children:y?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-gray-50",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 gap-3 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-blue-100 text-blue-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:f?"text":"password",id:"openAiApiKey",name:"openAiApiKey",value:_,onChange:s=>k(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-blue-600 focus:ring-1 focus:ring-blue-600"}),e.jsx("button",{type:"button",onClick:()=>q(!f),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",children:f?"Hide":"Show"})]})]})]})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{htmlFor:"pathsToIgnore",className:"block mb-2 font-medium text-gray-700",children:"Paths To Ignore"}),e.jsx("input",{type:"text",id:"pathsToIgnore",name:"pathsToIgnore",value:d,onChange:s=>v(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-base font-mono focus:outline-none focus:border-blue-600 focus:ring-2 focus:ring-blue-600/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"})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex justify-between items-center mb-3",children:[e.jsx("label",{className:"block font-medium text-gray-700",children:"Universal Mocks"}),e.jsx("button",{type:"button",onClick:()=>N(!0),className:"px-4 py-2 bg-green-600 text-white border-none rounded text-sm cursor-pointer hover:bg-green-700",children:"Add Mock"})]}),e.jsx("p",{className:"mb-3 text-sm text-gray-600",children:"Mock functions that will be applied across all entity simulations"}),m.length===0?e.jsx("div",{className:"p-4 bg-gray-50 rounded text-sm text-gray-500 text-center",children:"No universal mocks configured"}):e.jsx("div",{className:"space-y-3",children:m.map((s,r)=>e.jsx("div",{className:"p-4 bg-gray-50 rounded border border-gray-200",children:V===r?e.jsx(P,{mock:s,onSave:g=>H(r,g),onCancel:()=>j(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:()=>j(r),className:"px-3 py-1 bg-blue-600 text-white border-none rounded text-sm cursor-pointer hover:bg-blue-700",children:"Edit"}),e.jsx("button",{type:"button",onClick:()=>U(r),className:"px-3 py-1 bg-red-600 text-white border-none rounded text-sm cursor-pointer hover:bg-red-700",children:"Delete"})]})]})})},r))})]})]}),e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx("button",{type:"submit",disabled:l.state==="submitting",className:"px-8 py-3 bg-blue-600 text-white border-none rounded text-base font-medium cursor-pointer disabled:cursor-not-allowed disabled:opacity-60 hover:bg-blue-700 whitespace-nowrap",children:l.state==="submitting"?"Saving...":"Save Settings"}),l.state==="submitting"&&e.jsx("span",{className:"text-gray-600 text-sm font-medium",children:"Saving..."}),D&&e.jsx("span",{className:"text-emerald-600 text-sm font-medium whitespace-nowrap",children:"Settings saved successfully!"}),R&&e.jsxs("div",{className:"text-amber-700 text-sm font-medium bg-amber-50 border border-amber-200 rounded px-3 py-2",children:[e.jsx("div",{children:"⚠️ Settings changed. Please restart CodeYam for changes to take effect:"}),e.jsx("code",{className:"ml-2 bg-amber-100 px-2 py-1 rounded text-xs",children:"codeyam stop && codeyam"})]}),c?.error&&e.jsx("span",{className:"text-red-600 text-sm font-medium",children:c.error}),(()=>{if(l.data&&typeof l.data=="object"&&"error"in l.data){const s=l.data;return typeof s.error=="string"?e.jsx("span",{className:"text-red-600 text-sm font-medium",children:s.error}):null}return null})()]}),t&&e.jsxs("div",{className:"mt-8 p-4 bg-gray-50 rounded text-sm",children:[e.jsx("h3",{className:"text-base mb-3 text-gray-800 font-semibold",children:"Current Configuration"}),e.jsxs("dl",{className:"grid grid-cols-[150px_1fr] gap-2 m-0",children:[t.projectSlug&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Project Slug:"}),e.jsx("dd",{className:"m-0 text-gray-800",children:t.projectSlug})]}),t.packageManager&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Package Manager:"}),e.jsx("dd",{className:"m-0 text-gray-800",children:t.packageManager})]}),t.webapps&&t.webapps.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Web Applications:"}),e.jsx("dd",{className:"m-0 text-gray-800",children:t.webapps.map((s,r)=>e.jsxs("div",{className:"mb-2",children:[e.jsx("div",{className:"font-semibold",children:s.path==="."?"Root":s.path}),e.jsxs("div",{className:"text-sm text-gray-600",children:["Framework: ",s.framework]}),s.startCommand&&e.jsxs("div",{className:"text-sm text-gray-600 font-mono",children:["Command:"," ",J(s.startCommand)]})]},r))})]})]})]}),n&&e.jsxs("div",{className:"mt-8 p-4 bg-gray-50 rounded text-sm",children:[e.jsx("h3",{className:"text-base mb-3 text-gray-800 font-semibold",children:"Version Information"}),e.jsxs("dl",{className:"grid grid-cols-[180px_1fr] gap-2 m-0",children:[n.webserverVersion&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Webserver:"}),e.jsx("dd",{className:"m-0 text-gray-800 font-mono",children:n.webserverVersion.version||"unknown"})]}),n.templateVersion&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Analyzer Template:"}),e.jsxs("dd",{className:"m-0 text-gray-800",children:[e.jsx("span",{className:"font-mono",children:n.templateVersion.version||n.templateVersion.gitCommit?.slice(0,7)||"unknown"}),n.templateVersion.buildTimestamp&&e.jsxs("span",{className:"text-gray-500 ml-2",children:["(built"," ",X(n.templateVersion.buildTimestamp),")"]})]})]}),n.cachedAnalyzerVersion&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Cached Analyzer:"}),e.jsxs("dd",{className:"m-0 text-gray-800",children:[e.jsx("span",{className:"font-mono",children:n.cachedAnalyzerVersion.version||n.cachedAnalyzerVersion.gitCommit?.slice(0,7)||"unknown"}),n.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"})]})]}),!n.cachedAnalyzerVersion&&t?.projectSlug&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Cached Analyzer:"}),e.jsx("dd",{className:"m-0 text-gray-500 italic",children:"Not initialized - will be created on first analysis"})]})]})]})]})}),z&&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(P,{mock:{entityName:"",filePath:"",content:""},onSave:Y,onCancel:()=>N(!1)})]})})]})})});export{se as default,ee as meta};
1
+ import{w as L,u as $,c as W,b as Q,d as B,r as a,j as e}from"./chunk-WWGJGFF6-De6i8FUT.js";const ee=()=>[{title:"CodeYam - Settings"},{name:"description",content:"Configure project settings"}];function J(i){if(!i)return"";const t=[i.command];return i.args&&i.args.length>0&&t.push(...i.args),t.join(" ")}function P({mock:i,onSave:t,onCancel:o}){const[n,h]=a.useState(i.entityName),[c,l]=a.useState(i.filePath),[x,m]=a.useState(i.content),u=()=>{if(!n.trim()||!c.trim()||!x.trim()){alert("All fields are required");return}t({entityName:n,filePath:c,content:x})};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:n,onChange:d=>h(d.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600",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:c,onChange:d=>l(d.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600",placeholder:"e.g., packages/supabase/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:x,onChange:d=>m(d.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-blue-600 focus:ring-1 focus:ring-blue-600",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:u,className:"px-4 py-2 bg-blue-600 text-white border-none rounded text-sm cursor-pointer hover:bg-blue-700",children:"Save"})]})]})}function X(i){try{return new Date(i).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return i}}const se=L(function(){const{config:t,secrets:o,versionInfo:n,error:h}=$(),c=W(),l=Q(),x=B(),[m,u]=a.useState(t?.universalMocks||[]),[d,v]=a.useState((t?.pathsToIgnore||[]).join(", ")),[w,K]=a.useState((t?.pathsToIgnore||[]).join(", ")),[M,A]=a.useState(o?.GROQ_API_KEY||""),[T,S]=a.useState(o?.ANTHROPIC_API_KEY||""),[_,k]=a.useState(o?.OPENAI_API_KEY||""),[b,E]=a.useState(!1),[y,F]=a.useState(!1),[f,q]=a.useState(!1),[D,p]=a.useState(!1),[R,O]=a.useState(!1),[C,I]=a.useState(!1),[V,j]=a.useState(null),[z,N]=a.useState(!1);a.useEffect(()=>{if(t){u(t.universalMocks||[]);const s=(t.pathsToIgnore||[]).join(", ");v(s),K(s)}o&&(A(o.GROQ_API_KEY||""),S(o.ANTHROPIC_API_KEY||""),k(o.OPENAI_API_KEY||""))},[t,o]),a.useEffect(()=>{if(c?.success){p(!0);const s=setTimeout(()=>p(!1),3e3);return()=>clearTimeout(s)}},[c]),a.useEffect(()=>{if(l.state==="idle"&&l.data&&!C){console.log("[Settings] Fetcher data:",l.data);const s=l.data;if(s.success){console.log("[Settings] Save successful, revalidating..."),p(!0),I(!0),(d!==w||s.requiresRestart)&&O(!0),x.revalidate();const r=setTimeout(()=>{p(!1),I(!1)},3e3);return()=>clearTimeout(r)}}},[l.state,l.data,C,x,d,w]);const G=s=>{s.preventDefault();const r=new FormData(s.currentTarget);r.set("universalMocks",JSON.stringify(m)),console.log("[Settings] Submitting form data:",{universalMocks:r.get("universalMocks"),openAiApiKey:r.get("openAiApiKey")?"***":"(empty)"}),l.submit(r,{method:"post"})},Y=s=>{u([...m,s]),N(!1)},H=(s,r)=>{const g=[...m];g[s]=r,u(g),j(null)},U=s=>{u(m.filter((r,g)=>g!==s))};return h?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})})]}):e.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:e.jsxs("div",{className:"px-36 py-12 font-sans",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Settings"}),e.jsx("p",{className:"text-sm text-gray-500 mt-2",children:"Project Configuration"})]}),e.jsx("div",{className:"max-w-5xl my-8",children:e.jsxs("form",{onSubmit:G,className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl mb-4 text-gray-800 font-semibold",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?.webapps&&t.webapps.length>0?e.jsx("div",{className:"space-y-3",children:t.webapps.map((s,r)=>e.jsx("div",{className:"p-4 bg-gray-50 border border-gray-200 rounded",children:e.jsxs("div",{className:"grid grid-cols-2 gap-3 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})]}),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.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})]}),s.startCommand&&e.jsxs("div",{className:"col-span-2",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," ",s.startCommand.args?.join(" ")]})]})]})},r))}):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`."})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"AI Provider Configuration"}),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-gray-50",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 gap-3 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-blue-100 text-blue-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:b?"text":"password",id:"groqApiKey",name:"groqApiKey",value:M,onChange:s=>A(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-blue-600 focus:ring-1 focus:ring-blue-600"}),e.jsx("button",{type:"button",onClick:()=>E(!b),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",children:b?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-gray-50",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 gap-3 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-blue-100 text-blue-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:y?"text":"password",id:"anthropicApiKey",name:"anthropicApiKey",value:T,onChange:s=>S(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-blue-600 focus:ring-1 focus:ring-blue-600"}),e.jsx("button",{type:"button",onClick:()=>F(!y),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",children:y?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-gray-50",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 gap-3 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-blue-100 text-blue-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:f?"text":"password",id:"openAiApiKey",name:"openAiApiKey",value:_,onChange:s=>k(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-blue-600 focus:ring-1 focus:ring-blue-600"}),e.jsx("button",{type:"button",onClick:()=>q(!f),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",children:f?"Hide":"Show"})]})]})]})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{htmlFor:"pathsToIgnore",className:"block mb-2 font-medium text-gray-700",children:"Paths To Ignore"}),e.jsx("input",{type:"text",id:"pathsToIgnore",name:"pathsToIgnore",value:d,onChange:s=>v(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-base font-mono focus:outline-none focus:border-blue-600 focus:ring-2 focus:ring-blue-600/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"})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex justify-between items-center mb-3",children:[e.jsx("label",{className:"block font-medium text-gray-700",children:"Universal Mocks"}),e.jsx("button",{type:"button",onClick:()=>N(!0),className:"px-4 py-2 bg-green-600 text-white border-none rounded text-sm cursor-pointer hover:bg-green-700",children:"Add Mock"})]}),e.jsx("p",{className:"mb-3 text-sm text-gray-600",children:"Mock functions that will be applied across all entity simulations"}),m.length===0?e.jsx("div",{className:"p-4 bg-gray-50 rounded text-sm text-gray-500 text-center",children:"No universal mocks configured"}):e.jsx("div",{className:"space-y-3",children:m.map((s,r)=>e.jsx("div",{className:"p-4 bg-gray-50 rounded border border-gray-200",children:V===r?e.jsx(P,{mock:s,onSave:g=>H(r,g),onCancel:()=>j(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:()=>j(r),className:"px-3 py-1 bg-blue-600 text-white border-none rounded text-sm cursor-pointer hover:bg-blue-700",children:"Edit"}),e.jsx("button",{type:"button",onClick:()=>U(r),className:"px-3 py-1 bg-red-600 text-white border-none rounded text-sm cursor-pointer hover:bg-red-700",children:"Delete"})]})]})})},r))})]})]}),e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx("button",{type:"submit",disabled:l.state==="submitting",className:"px-8 py-3 bg-blue-600 text-white border-none rounded text-base font-medium cursor-pointer disabled:cursor-not-allowed disabled:opacity-60 hover:bg-blue-700 whitespace-nowrap",children:l.state==="submitting"?"Saving...":"Save Settings"}),l.state==="submitting"&&e.jsx("span",{className:"text-gray-600 text-sm font-medium",children:"Saving..."}),D&&e.jsx("span",{className:"text-emerald-600 text-sm font-medium whitespace-nowrap",children:"Settings saved successfully!"}),R&&e.jsxs("div",{className:"text-amber-700 text-sm font-medium bg-amber-50 border border-amber-200 rounded px-3 py-2",children:[e.jsx("div",{children:"⚠️ Settings changed. Please restart CodeYam for changes to take effect:"}),e.jsx("code",{className:"ml-2 bg-amber-100 px-2 py-1 rounded text-xs",children:"codeyam stop && codeyam"})]}),c?.error&&e.jsx("span",{className:"text-red-600 text-sm font-medium",children:c.error}),(()=>{if(l.data&&typeof l.data=="object"&&"error"in l.data){const s=l.data;return typeof s.error=="string"?e.jsx("span",{className:"text-red-600 text-sm font-medium",children:s.error}):null}return null})()]}),t&&e.jsxs("div",{className:"mt-8 p-4 bg-gray-50 rounded text-sm",children:[e.jsx("h3",{className:"text-base mb-3 text-gray-800 font-semibold",children:"Current Configuration"}),e.jsxs("dl",{className:"grid grid-cols-[150px_1fr] gap-2 m-0",children:[t.projectSlug&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Project Slug:"}),e.jsx("dd",{className:"m-0 text-gray-800",children:t.projectSlug})]}),t.packageManager&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Package Manager:"}),e.jsx("dd",{className:"m-0 text-gray-800",children:t.packageManager})]}),t.webapps&&t.webapps.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Web Applications:"}),e.jsx("dd",{className:"m-0 text-gray-800",children:t.webapps.map((s,r)=>e.jsxs("div",{className:"mb-2",children:[e.jsx("div",{className:"font-semibold",children:s.path==="."?"Root":s.path}),e.jsxs("div",{className:"text-sm text-gray-600",children:["Framework: ",s.framework]}),s.startCommand&&e.jsxs("div",{className:"text-sm text-gray-600 font-mono",children:["Command:"," ",J(s.startCommand)]})]},r))})]})]})]}),n&&e.jsxs("div",{className:"mt-8 p-4 bg-gray-50 rounded text-sm",children:[e.jsx("h3",{className:"text-base mb-3 text-gray-800 font-semibold",children:"Version Information"}),e.jsxs("dl",{className:"grid grid-cols-[180px_1fr] gap-2 m-0",children:[n.webserverVersion&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Webserver:"}),e.jsx("dd",{className:"m-0 text-gray-800 font-mono",children:n.webserverVersion.version||"unknown"})]}),n.templateVersion&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Analyzer Template:"}),e.jsxs("dd",{className:"m-0 text-gray-800",children:[e.jsx("span",{className:"font-mono",children:n.templateVersion.version||n.templateVersion.gitCommit?.slice(0,7)||"unknown"}),n.templateVersion.buildTimestamp&&e.jsxs("span",{className:"text-gray-500 ml-2",children:["(built"," ",X(n.templateVersion.buildTimestamp),")"]})]})]}),n.cachedAnalyzerVersion&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Cached Analyzer:"}),e.jsxs("dd",{className:"m-0 text-gray-800",children:[e.jsx("span",{className:"font-mono",children:n.cachedAnalyzerVersion.version||n.cachedAnalyzerVersion.gitCommit?.slice(0,7)||"unknown"}),n.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"})]})]}),!n.cachedAnalyzerVersion&&t?.projectSlug&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"font-medium text-gray-600",children:"Cached Analyzer:"}),e.jsx("dd",{className:"m-0 text-gray-500 italic",children:"Not initialized - will be created on first analysis"})]})]})]})]})}),z&&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(P,{mock:{entityName:"",filePath:"",content:""},onSave:Y,onCancel:()=>N(!1)})]})})]})})});export{se as default,ee as meta};
@@ -0,0 +1 @@
1
+ import{j as e,w as M,u as $,r as o,L as S,a as L,b as F}from"./chunk-WWGJGFF6-De6i8FUT.js";import{S as A}from"./SafeScreenshot-Bual6h18.js";import{g as _,C as U}from"./entityStatus-BEqj2qBy.js";import{E as D}from"./EntityTypeIcon-D5ZHFomX.js";import{c as v}from"./createLucideIcon-CS7XDrKv.js";import"./clock-vWeoCemX.js";import"./file-text-LM0mgxXE.js";import"./chart-column-B8fb6wnw.js";const R=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],V=v("chevron-left",R);const B=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],E=v("chevron-right",B);const O=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],K=v("search",O);const Q=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],W=v("x",Q);function q({entity:t,variant:d="default",currentRun:c,queueState:l}){const r=_(t,c,l);return r.badge?d==="compact"?r.isOutdated?e.jsx("div",{className:"bg-[#fdf9c9] px-2 py-0 h-[20px] rounded flex items-center text-[10px] leading-[15px] font-medium text-[#c69538]",children:"Out of date"}):e.jsxs("div",{className:"flex items-center gap-1.5 bg-[#e8ffe6] px-2 py-0 h-[20px] rounded text-[10px] leading-[15px] font-medium text-[#00925d]",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-[#00925d]"}),"Up to date"]}):e.jsxs("div",{className:`flex items-center gap-1.5 px-2 py-0 h-[20px] rounded ${r.badge.bgColor}`,children:[typeof r.badge.icon=="string"?e.jsx("span",{className:"text-xs",children:r.badge.icon}):r.badge.icon,e.jsxs("span",{className:`text-[10px] leading-[15px] font-medium ${r.badge.color}`,children:[r.badge.label,r.badge.subtitle&&e.jsx("span",{className:"opacity-75 ml-1",children:r.badge.subtitle})]})]}):null}const H="data:image/svg+xml,%3csvg%20width='35'%20height='35'%20viewBox='0%200%2035%2035'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='35'%20height='35'%20rx='4'%20fill='%239040F5'/%3e%3cpath%20d='M26.6995%2024.0683V18.306L21.2533%2012.835L14.5785%2019.5423L12.4946%2017.4919L8.29688%2021.6596V24.0683H26.6995Z'%20fill='%23F3EEFE'/%3e%3ccircle%20cx='12.4044'%20cy='13.4307'%20r='2.49813'%20fill='%23F3EEFE'/%3e%3c/svg%3e",oe=()=>[{title:"Simulations - CodeYam"},{name:"description",content:"A visual gallery of your recently captured component screenshots"}],le=M(function(){const c=$().entities,[l,r]=o.useState(""),[h,x]=o.useState("visual"),[n,u]=o.useState(null),y=o.useMemo(()=>{const s=[];return c.forEach(a=>{const i=a.analyses?.[0];if(i?.scenarios){const m=i.scenarios.filter(g=>g.metadata?.screenshotPaths?.[0]).map(g=>({scenarioName:g.name,scenarioDescription:g.description||"",screenshotPath:g.metadata?.screenshotPaths?.[0]||"",scenarioId:g.id}));m.length>0&&s.push({entity:a,screenshots:m,createdAt:i.createdAt||""})}}),s.sort((a,i)=>new Date(i.createdAt).getTime()-new Date(a.createdAt).getTime()),s},[c]),f=o.useMemo(()=>c.filter(s=>!s.analyses?.[0]?.scenarios?.some(m=>m.metadata?.screenshotPaths?.[0])),[c]),b=o.useMemo(()=>y.filter(({entity:s})=>{const a=!l||s.name.toLowerCase().includes(l.toLowerCase()),i=h==="all"||s.entityType===h;return a&&i}),[y,l,h]),T=o.useMemo(()=>f.filter(s=>{const a=!l||s.name.toLowerCase().includes(l.toLowerCase()),i=h==="all"||s.entityType===h;return a&&i}),[f,l,h]),p=o.useMemo(()=>{const s=[];return b.forEach(({entity:a,screenshots:i})=>{i.forEach(m=>{s.push({entitySha:a.sha,entityName:a.name,scenarioId:m.scenarioId||"",scenarioName:m.scenarioName,scenarioDescription:m.scenarioDescription,screenshotPath:m.screenshotPath})})}),s},[b]),P=o.useCallback(s=>{r(s.target.value)},[]),z=o.useCallback(s=>{x(s.target.value)},[]),I=o.useCallback((s,a)=>{const i=p.findIndex(m=>m.entitySha===s&&m.scenarioId===a);i!==-1&&u(i)},[p]),j=o.useCallback(()=>{u(null)},[]),N=o.useCallback(()=>{u(s=>s===null||s===0?p.length-1:s-1)},[p.length]),w=o.useCallback(()=>{u(s=>s===null?0:(s+1)%p.length)},[p.length]);o.useEffect(()=>{if(n===null)return;const s=a=>{a.key==="Escape"?j():a.key==="ArrowLeft"?N():a.key==="ArrowRight"&&w()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[n,j,N,w]);const C=y.length>0,k=n!==null?p[n]:null;return e.jsxs("div",{className:"bg-[#f9f9f9] min-h-screen overflow-y-auto",children:[e.jsxs("div",{className:"px-36 py-12",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900 m-0",children:"Simulations"}),e.jsx("p",{className:"text-sm text-gray-600 mt-2",children:"All recently captured simulations."})]}),!C&&e.jsxs("div",{className:"rounded-lg px-5 py-6 mb-6 flex items-center gap-4",style:{backgroundColor:"#f3eefe"},children:[e.jsx("img",{src:H,alt:"",className:"rounded shrink-0",style:{width:"35px",height:"35px"}}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm m-0 mb-1",style:{color:"#9040f5"},children:"This page will display a visual gallery of your recently captured component screenshots."}),e.jsx("p",{className:"text-sm font-semibold m-0",style:{color:"#9040f5"},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-6",children:[e.jsx("div",{className:"text-[10px] 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 py-2 pr-8 text-sm cursor-pointer focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] hover:border-gray-300 transition-colors",value:h,onChange:z,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(U,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 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 py-2 text-sm placeholder:text-gray-400 focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] transition-colors",value:l,onChange:P})]})]})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[C&&(b.length===0?e.jsx("div",{className:"bg-white border border-gray-200 rounded-b-lg p-8 text-center text-gray-500",children:"No simulations match your filters."}):e.jsxs(e.Fragment,{children:[b.map(({entity:s,screenshots:a})=>e.jsx(Y,{entity:s,screenshots:a,onScreenshotClick:I},s.sha)),e.jsx("div",{className:"bg-white border-x border-b border-gray-200 rounded-b-lg px-5 py-4 text-center",children:e.jsx(S,{to:"/files?entityType=visual",className:"text-sm text-[#005c75] hover:text-[#004a5e] hover:underline",children:"Find more entities to simulate →"})})]})),!C&&(T.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."}):T.map(s=>e.jsx(Z,{entity:s},s.sha)))]})]}),k&&e.jsx(X,{screenshot:k,currentIndex:n,totalCount:p.length,onClose:j,onPrevious:N,onNext:w})]})});function X({screenshot:t,currentIndex:d,totalCount:c,onClose:l,onPrevious:r,onNext:h}){const x=L(),[n,u]=o.useState(!1),y=()=>{x(`/entity/${t.entitySha}/scenarios/${t.scenarioId}?from=simulations`)};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80",onClick:l,children:e.jsxs("div",{className:"relative flex flex-col w-[90vw] h-[90vh] max-w-[1400px] bg-white rounded-lg overflow-hidden",onClick:f=>f.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 bg-gray-50 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm text-gray-500",children:[d+1," of ",c]}),e.jsx("span",{className:"text-gray-300",children:"|"}),e.jsx("span",{className:"text-sm font-medium text-gray-700",children:t.entityName})]}),e.jsx("button",{onClick:l,className:"p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-200 rounded-full transition-colors cursor-pointer",children:e.jsx(W,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"relative flex-1 flex items-center justify-center p-6 bg-gray-100 overflow-hidden",onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[e.jsx("button",{onClick:r,className:`absolute left-4 z-10 p-3 bg-white/90 hover:bg-white rounded-full shadow-lg transition-all cursor-pointer ${n?"opacity-100":"opacity-0"}`,children:e.jsx(V,{className:"w-6 h-6 text-gray-700"})}),e.jsx("div",{className:"flex items-center justify-center w-full h-full cursor-pointer",onClick:y,children:e.jsx(A,{screenshotPath:t.screenshotPath,alt:t.scenarioName,className:"max-w-full max-h-full object-contain rounded-lg shadow-lg"})}),e.jsx("button",{onClick:h,className:`absolute right-4 z-10 p-3 bg-white/90 hover:bg-white rounded-full shadow-lg transition-all cursor-pointer ${n?"opacity-100":"opacity-0"}`,children:e.jsx(E,{className:"w-6 h-6 text-gray-700"})})]}),e.jsxs("div",{className:"px-6 py-4 border-t border-gray-200 bg-white cursor-pointer hover:bg-gray-50 transition-colors shrink-0",onClick:y,children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-lg font-semibold text-[#005c75] hover:text-[#004a5e] m-0 mb-1",children:t.scenarioName}),e.jsx("p",{className:"text-sm text-gray-600 m-0 line-clamp-2 min-h-10",children:t.scenarioDescription||" "})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-1 text-sm text-[#005c75]",children:[e.jsx("span",{children:"View details"}),e.jsx(E,{className:"w-4 h-4"})]})]}),e.jsx("p",{className:"text-xs text-gray-400 mt-2 m-0",children:"Click to view this scenario in the entity page"})]})]})})}function Y({entity:t,screenshots:d,onScreenshotClick:c}){const l=L();t.entityType;const r=d.length||(t.analyses?.[0]?.scenarios?.length??0),h=x=>{l(`/entity/${t.sha}/scenarios/${x}?from=simulations`)};return e.jsx("div",{className:"bg-white border-x border-b border-gray-200 first:border-t last:rounded-b-lg hover:bg-gray-100 transition-colors",children:e.jsxs("div",{className:"px-5 py-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(S,{to:`/entity/${t.sha}`,className:"flex items-center gap-2 no-underline",children:[e.jsx(D,{type:t.entityType}),e.jsxs("span",{className:"text-xs font-medium text-gray-800",children:[t.name," (",r,")"]})]}),e.jsx(q,{entity:t,variant:"compact"})]}),e.jsx("div",{className:"flex gap-2.5 mt-3 overflow-x-auto pb-1",children:d.length>0?d.map(x=>e.jsx("button",{onClick:()=>h(x.scenarioId||""),className:"shrink-0 block cursor-pointer bg-transparent border-none p-0",children:e.jsx("div",{className:"w-36 h-24 rounded-md border border-gray-200 overflow-hidden bg-gray-100 flex items-center justify-center transition-all",style:{"--hover-border":"#005C75"},onMouseEnter:n=>{n.currentTarget.style.borderColor="#005C75",n.currentTarget.style.boxShadow="0 4px 12px rgba(0, 92, 117, 0.15)"},onMouseLeave:n=>{n.currentTarget.style.borderColor="#d1d5db",n.currentTarget.style.boxShadow="none"},children:e.jsx(A,{screenshotPath:x.screenshotPath,alt:x.scenarioName,className:"max-w-full max-h-full object-contain"})})},x.scenarioId)):e.jsx("div",{className:"text-xs text-gray-400 py-4",children:"No screenshots available"})})]})})}function Z({entity:t}){const d=F(),[c,l]=o.useState(!1);t.entityType;const r=()=>{l(!0),d.submit({entitySha:t.sha,filePath:t.filePath||""},{method:"post",action:"/api/analyze"})};o.useEffect(()=>{d.state==="idle"&&c&&l(!1)},[d.state,c]);const h=x=>{if(!x)return"";const n=new Date(x),u=new Date;return n.toDateString()===u.toDateString()?`Today, ${n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).toLowerCase()}`:n.toLocaleDateString("en-US",{month:"short",day:"numeric"})};return e.jsx("div",{className:"bg-white border-x border-b border-gray-200 first:border-t last:rounded-b-lg hover:bg-gray-100 transition-colors cursor-pointer",onClick:r,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(D,{type:t.entityType}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-0.5",children:[e.jsx(S,{to:`/entity/${t.sha}`,className:"text-sm font-medium text-gray-900 no-underline",children:t.name}),e.jsx("span",{className:"text-[10px] font-semibold px-1 py-0.5 rounded",style:{color:t.entityType==="visual"?"#7c3aed":t.entityType==="library"?"#0DBFE9":t.entityType==="type"?"#dc2626":t.entityType==="data"?"#2563eb":t.entityType==="index"?"#ea580c":t.entityType==="functionCall"?"#7c3aed":t.entityType==="class"?"#059669":t.entityType==="method"?"#0891b2":"#6b7280",backgroundColor:t.entityType==="visual"?"#f3e8ff":t.entityType==="library"?"#cffafe":t.entityType==="type"?"#fee2e2":t.entityType==="data"?"#dbeafe":t.entityType==="index"?"#ffedd5":t.entityType==="functionCall"?"#f3e8ff":t.entityType==="class"?"#d1fae5":t.entityType==="method"?"#cffafe":"#f3f4f6"},children:t.entityType?t.entityType.toUpperCase():"UNKNOWN"})]}),e.jsx("div",{className:"text-xs text-gray-400 truncate",children:t.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:h(t.createdAt)}),e.jsx("div",{className:"w-24 flex justify-end",children:e.jsx("button",{onClick:r,disabled:c||d.state!=="idle",className:"bg-[#e0e9ec] text-[#005c75] px-4 py-1.5 rounded text-xs font-medium hover:bg-[#d0dde1] transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",children:c?"Analyzing...":"Analyze"})})]})})}export{le as default,oe as meta};
@@ -0,0 +1 @@
1
+ import{c as e}from"./createLucideIcon-CS7XDrKv.js";const a=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],o=e("triangle-alert",a);export{o as T};
@@ -1,2 +1,2 @@
1
- import{r as t}from"./chunk-WWGJGFF6-DvL0YqDJ.js";function I(c,s){const[E,l]=t.useState(""),[d,n]=t.useState(!1),[g,a]=t.useState(null),[$,r]=t.useState(!1);t.useEffect(()=>{s&&(r(!1),n(!1),a(null))},[s]),t.useEffect(()=>{if(!c||!s){s||l("");return}const u=async()=>{try{const i=await fetch(`/api/logs/${c}`);if(i.ok){const o=(await i.text()).trim().split(`
1
+ import{r as t}from"./chunk-WWGJGFF6-De6i8FUT.js";function I(c,s){const[E,l]=t.useState(""),[d,n]=t.useState(!1),[g,a]=t.useState(null),[$,r]=t.useState(!1);t.useEffect(()=>{s&&(r(!1),n(!1),a(null))},[s]),t.useEffect(()=>{if(!c||!s){s||l("");return}const u=async()=>{try{const i=await fetch(`/api/logs/${c}`);if(i.ok){const o=(await i.text()).trim().split(`
2
2
  `).filter(e=>e.length>0);if(o.length<3){n(!1),r(!1),a(null),l("");return}const f=o.filter(e=>e.includes("CodeYam Log Level 1"));if(f.length>0){const e=f[f.length-1];l(e.replace(/.*CodeYam Log Level 1: /,""))}const L=o.find(e=>e.includes("$$INTERACTIVE_SERVER_URL$$:"));if(L){const e=L.split("$$INTERACTIVE_SERVER_URL$$:")[1].trim();a(e),r(!0)}o.some(e=>e.includes("CodeYam: Exiting start.js"))&&n(!0)}}catch{}};u().catch(()=>{});const m=setInterval(()=>{u().catch(()=>{})},2e3);return()=>clearInterval(m)},[c,s]);const h=t.useCallback(()=>{l(""),n(!1),a(null),r(!1)},[]);return{lastLine:E,interactiveUrl:g,isCompleted:d,resetLogs:h}}export{I as u};
@@ -0,0 +1 @@
1
+ import{r as t,j as T}from"./chunk-WWGJGFF6-De6i8FUT.js";const n=t.createContext(void 0);function m({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{m as T,v as u};
@@ -0,0 +1 @@
1
+ import{c as a}from"./createLucideIcon-CS7XDrKv.js";const o=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],e=a("zap",o);export{e as Z};
@@ -1 +1 @@
1
- import"fetch-retry";import{G as Q,H as R,I as V,J as W,K as X,L as Y,P as Z,S as _,d as $,a as aa,b as sa,c as ta,e as oa,f as ia,g as ra,h as ma,i as ea,j as pa,k as la,C as na,F as da,E as ba,D as ua,l as ca,m as Ta,n as Ca,o as ha,p as ya,q as Ba,r as Sa,s as Aa,t as ga,u as Ea,v as Fa,w as Pa,x as ja,y as Da,z as Ma,A as fa,B as qa}from"./server-build-DGGis3OZ.js";import"typescript";import"kysely";import"react/jsx-runtime";import"node:stream";import"@react-router/node";import"react-router";import"isbot";import"react-dom/server";import"react";import"lucide-react";import"better-sqlite3";import"pg";import"fs";import"path";import"kysely/helpers/sqlite";import"kysely/helpers/postgres";import"fs/promises";import"os";import"prompts";import"chalk";import"crypto";import"react-resizable";import"openai";import"p-queue";import"p-retry";import"child_process";import"util";import"@aws-sdk/client-dynamodb";import"lru-cache";import"pluralize";import"piscina";import"json5";import"@aws-sdk/util-dynamodb";import"dotenv";import"events";import"uuid";import"url";import"react-syntax-highlighter";import"react-syntax-highlighter/dist/cjs/styles/prism/index.js";import"node:crypto";import"v8";import"react-diff-viewer-continued";export{Q as AnalysisBranchesTableColumns,R as BranchesTableColumns,V as CommitsTableColumns,W as EntitiesTableColumns,X as EntityBranchesTableColumns,Y as FilesTableColumns,Z as ProjectsTableColumns,_ as ScenariosTableColumns,$ as dbToAnalysis,aa as dbToAnalysisBranch,sa as dbToBranch,ta as dbToCommit,oa as dbToEntity,ia as dbToFile,ra as dbToProject,ma as dbToScenario,ea as dbToUserScenario,pa as deleteScenarios,la as generateSha,na as getDatabase,da as getJsonHelper,ba as getPostgreDatabase,ua as getSqliteDatabase,ca as loadAnalyses,Ta as loadAnalysis,Ca as loadBranches,ha as loadCommitBranches,ya as loadCommits,Ba as loadEntities,Sa as loadEntity,Aa as loadFiles,ga as loadProject,Ea as updateCommitMetadata,Fa as updateFreshAnalysisMetadata,Pa as updateFreshAnalysisStatus,ja as updateProjectMetadata,Da as upsertCommitBranches,Ma as upsertCommits,fa as upsertGithubUser,qa as upsertScenarios};
1
+ import"fetch-retry";import{G as Q,H as R,I as V,J as W,K as X,L as Y,P as Z,S as _,d as $,a as aa,b as sa,c as ta,e as oa,f as ia,g as ra,h as ma,i as ea,j as pa,k as la,C as na,F as da,E as ba,D as ua,l as ca,m as Ta,n as Ca,o as ha,p as ya,q as Ba,r as Sa,s as Aa,t as ga,u as Ea,v as Fa,w as Pa,x as ja,y as Da,z as Ma,A as fa,B as qa}from"./server-build-vwbN7n65.js";import"typescript";import"kysely";import"react/jsx-runtime";import"node:stream";import"@react-router/node";import"react-router";import"isbot";import"react-dom/server";import"react";import"lucide-react";import"better-sqlite3";import"pg";import"fs";import"path";import"kysely/helpers/sqlite";import"kysely/helpers/postgres";import"fs/promises";import"os";import"prompts";import"chalk";import"crypto";import"react-resizable";import"openai";import"p-queue";import"p-retry";import"child_process";import"util";import"@aws-sdk/client-dynamodb";import"lru-cache";import"pluralize";import"piscina";import"json5";import"@aws-sdk/util-dynamodb";import"dotenv";import"events";import"uuid";import"url";import"react-syntax-highlighter";import"react-syntax-highlighter/dist/cjs/styles/prism/index.js";import"node:crypto";import"v8";import"react-diff-viewer-continued";export{Q as AnalysisBranchesTableColumns,R as BranchesTableColumns,V as CommitsTableColumns,W as EntitiesTableColumns,X as EntityBranchesTableColumns,Y as FilesTableColumns,Z as ProjectsTableColumns,_ as ScenariosTableColumns,$ as dbToAnalysis,aa as dbToAnalysisBranch,sa as dbToBranch,ta as dbToCommit,oa as dbToEntity,ia as dbToFile,ra as dbToProject,ma as dbToScenario,ea as dbToUserScenario,pa as deleteScenarios,la as generateSha,na as getDatabase,da as getJsonHelper,ba as getPostgreDatabase,ua as getSqliteDatabase,ca as loadAnalyses,Ta as loadAnalysis,Ca as loadBranches,ha as loadCommitBranches,ya as loadCommits,Ba as loadEntities,Sa as loadEntity,Aa as loadFiles,ga as loadProject,Ea as updateCommitMetadata,Fa as updateFreshAnalysisMetadata,Pa as updateFreshAnalysisStatus,ja as updateProjectMetadata,Da as upsertCommitBranches,Ma as upsertCommits,fa as upsertGithubUser,qa as upsertScenarios};