codereview-aia 0.2.1 → 0.2.2

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 (435) hide show
  1. package/dist/index.js +0 -7
  2. package/dist/index.js.map +1 -1
  3. package/dist/runtime/api/batcher.d.ts +20 -0
  4. package/dist/runtime/api/batcher.js +52 -0
  5. package/dist/runtime/api/batcher.js.map +1 -0
  6. package/dist/runtime/api/edgeClient.d.ts +102 -0
  7. package/dist/runtime/api/edgeClient.js +162 -0
  8. package/dist/runtime/api/edgeClient.js.map +1 -0
  9. package/dist/runtime/api/index.d.ts +2 -0
  10. package/dist/runtime/api/index.js +9 -0
  11. package/dist/runtime/api/index.js.map +1 -0
  12. package/dist/runtime/cliEntry.js +24 -76
  13. package/dist/runtime/cliEntry.js.map +1 -1
  14. package/dist/runtime/errors.d.ts +13 -3
  15. package/dist/runtime/errors.js +31 -8
  16. package/dist/runtime/errors.js.map +1 -1
  17. package/dist/runtime/llm/index.d.ts +1 -0
  18. package/dist/runtime/llm/index.js +6 -0
  19. package/dist/runtime/llm/index.js.map +1 -0
  20. package/dist/runtime/llm/openRouterClient.d.ts +13 -0
  21. package/dist/runtime/llm/openRouterClient.js +187 -0
  22. package/dist/runtime/llm/openRouterClient.js.map +1 -0
  23. package/dist/runtime/phpFileResolver.d.ts +14 -0
  24. package/dist/runtime/phpFileResolver.js +231 -0
  25. package/dist/runtime/phpFileResolver.js.map +1 -0
  26. package/dist/runtime/phpcsParser.d.ts +10 -0
  27. package/dist/runtime/phpcsParser.js +35 -0
  28. package/dist/runtime/phpcsParser.js.map +1 -0
  29. package/dist/runtime/phpcsRunner.d.ts +32 -0
  30. package/dist/runtime/phpcsRunner.js +62 -0
  31. package/dist/runtime/phpcsRunner.js.map +1 -0
  32. package/dist/runtime/reportWriter.d.ts +17 -0
  33. package/dist/runtime/reportWriter.js +80 -0
  34. package/dist/runtime/reportWriter.js.map +1 -0
  35. package/dist/runtime/reviewPipeline.d.ts +14 -36
  36. package/dist/runtime/reviewPipeline.js +146 -199
  37. package/dist/runtime/reviewPipeline.js.map +1 -1
  38. package/dist/runtime/ui/RuntimeApp.js +23 -154
  39. package/dist/runtime/ui/RuntimeApp.js.map +1 -1
  40. package/dist/runtime/ui/screens/AuthScreen.d.ts +2 -3
  41. package/dist/runtime/ui/screens/AuthScreen.js +7 -53
  42. package/dist/runtime/ui/screens/AuthScreen.js.map +1 -1
  43. package/dist/runtime/ui/screens/ModeSelection.d.ts +1 -2
  44. package/dist/runtime/ui/screens/ModeSelection.js +14 -139
  45. package/dist/runtime/ui/screens/ModeSelection.js.map +1 -1
  46. package/dist/runtime/ui/screens/ProgressScreen.d.ts +5 -13
  47. package/dist/runtime/ui/screens/ProgressScreen.js +24 -61
  48. package/dist/runtime/ui/screens/ProgressScreen.js.map +1 -1
  49. package/dist/runtime/ui/screens/ResultsScreen.js +7 -17
  50. package/dist/runtime/ui/screens/ResultsScreen.js.map +1 -1
  51. package/package.json +3 -43
  52. package/dist/analysis/FindingsExtractor.d.ts +0 -105
  53. package/dist/analysis/FindingsExtractor.js +0 -363
  54. package/dist/analysis/FindingsExtractor.js.map +0 -1
  55. package/dist/analysis/ai-detection/analyzers/BaseAnalyzer.d.ts +0 -111
  56. package/dist/analysis/ai-detection/analyzers/BaseAnalyzer.js +0 -215
  57. package/dist/analysis/ai-detection/analyzers/BaseAnalyzer.js.map +0 -1
  58. package/dist/analysis/ai-detection/analyzers/DocumentationAnalyzer.d.ts +0 -142
  59. package/dist/analysis/ai-detection/analyzers/DocumentationAnalyzer.js +0 -503
  60. package/dist/analysis/ai-detection/analyzers/DocumentationAnalyzer.js.map +0 -1
  61. package/dist/analysis/ai-detection/analyzers/GitHistoryAnalyzer.d.ts +0 -88
  62. package/dist/analysis/ai-detection/analyzers/GitHistoryAnalyzer.js +0 -343
  63. package/dist/analysis/ai-detection/analyzers/GitHistoryAnalyzer.js.map +0 -1
  64. package/dist/analysis/ai-detection/core/AIDetectionEngine.d.ts +0 -104
  65. package/dist/analysis/ai-detection/core/AIDetectionEngine.js +0 -369
  66. package/dist/analysis/ai-detection/core/AIDetectionEngine.js.map +0 -1
  67. package/dist/analysis/ai-detection/types/DetectionTypes.d.ts +0 -364
  68. package/dist/analysis/ai-detection/types/DetectionTypes.js +0 -32
  69. package/dist/analysis/ai-detection/types/DetectionTypes.js.map +0 -1
  70. package/dist/analysis/ai-detection/utils/SubmissionConverter.d.ts +0 -97
  71. package/dist/analysis/ai-detection/utils/SubmissionConverter.js +0 -339
  72. package/dist/analysis/ai-detection/utils/SubmissionConverter.js.map +0 -1
  73. package/dist/analysis/context/ReviewContext.d.ts +0 -184
  74. package/dist/analysis/context/ReviewContext.js +0 -294
  75. package/dist/analysis/context/ReviewContext.js.map +0 -1
  76. package/dist/analysis/context/index.d.ts +0 -6
  77. package/dist/analysis/context/index.js +0 -23
  78. package/dist/analysis/context/index.js.map +0 -1
  79. package/dist/analysis/index.d.ts +0 -7
  80. package/dist/analysis/index.js +0 -24
  81. package/dist/analysis/index.js.map +0 -1
  82. package/dist/analysis/static/wpPhpcsRunner.d.ts +0 -11
  83. package/dist/analysis/static/wpPhpcsRunner.js +0 -219
  84. package/dist/analysis/static/wpPhpcsRunner.js.map +0 -1
  85. package/dist/analysis/tokens/TokenAnalysisFormatter.d.ts +0 -27
  86. package/dist/analysis/tokens/TokenAnalysisFormatter.js +0 -143
  87. package/dist/analysis/tokens/TokenAnalysisFormatter.js.map +0 -1
  88. package/dist/analysis/tokens/TokenAnalyzer.d.ts +0 -155
  89. package/dist/analysis/tokens/TokenAnalyzer.js +0 -502
  90. package/dist/analysis/tokens/TokenAnalyzer.js.map +0 -1
  91. package/dist/analysis/tokens/index.d.ts +0 -7
  92. package/dist/analysis/tokens/index.js +0 -24
  93. package/dist/analysis/tokens/index.js.map +0 -1
  94. package/dist/clients/base/abstractClient.d.ts +0 -99
  95. package/dist/clients/base/abstractClient.js +0 -98
  96. package/dist/clients/base/abstractClient.js.map +0 -1
  97. package/dist/clients/base/httpClient.d.ts +0 -24
  98. package/dist/clients/base/httpClient.js +0 -147
  99. package/dist/clients/base/httpClient.js.map +0 -1
  100. package/dist/clients/base/index.d.ts +0 -11
  101. package/dist/clients/base/index.js +0 -28
  102. package/dist/clients/base/index.js.map +0 -1
  103. package/dist/clients/base/modelDetection.d.ts +0 -41
  104. package/dist/clients/base/modelDetection.js +0 -88
  105. package/dist/clients/base/modelDetection.js.map +0 -1
  106. package/dist/clients/base/responseProcessor.d.ts +0 -45
  107. package/dist/clients/base/responseProcessor.js +0 -495
  108. package/dist/clients/base/responseProcessor.js.map +0 -1
  109. package/dist/clients/factory/clientFactory.d.ts +0 -23
  110. package/dist/clients/factory/clientFactory.js +0 -50
  111. package/dist/clients/factory/clientFactory.js.map +0 -1
  112. package/dist/clients/factory/index.d.ts +0 -7
  113. package/dist/clients/factory/index.js +0 -24
  114. package/dist/clients/factory/index.js.map +0 -1
  115. package/dist/clients/implementations/index.d.ts +0 -7
  116. package/dist/clients/implementations/index.js +0 -24
  117. package/dist/clients/implementations/index.js.map +0 -1
  118. package/dist/clients/implementations/openRouterClient.d.ts +0 -69
  119. package/dist/clients/implementations/openRouterClient.js +0 -294
  120. package/dist/clients/implementations/openRouterClient.js.map +0 -1
  121. package/dist/clients/openRouterClient.d.ts +0 -42
  122. package/dist/clients/openRouterClient.js +0 -580
  123. package/dist/clients/openRouterClient.js.map +0 -1
  124. package/dist/clients/openRouterClientWrapper.d.ts +0 -22
  125. package/dist/clients/openRouterClientWrapper.js +0 -64
  126. package/dist/clients/openRouterClientWrapper.js.map +0 -1
  127. package/dist/clients/utils/directoryStructure.d.ts +0 -14
  128. package/dist/clients/utils/directoryStructure.js +0 -48
  129. package/dist/clients/utils/directoryStructure.js.map +0 -1
  130. package/dist/clients/utils/index.d.ts +0 -10
  131. package/dist/clients/utils/index.js +0 -31
  132. package/dist/clients/utils/index.js.map +0 -1
  133. package/dist/clients/utils/languageDetection.d.ts +0 -13
  134. package/dist/clients/utils/languageDetection.js +0 -46
  135. package/dist/clients/utils/languageDetection.js.map +0 -1
  136. package/dist/clients/utils/promptFormatter.d.ts +0 -37
  137. package/dist/clients/utils/promptFormatter.js +0 -186
  138. package/dist/clients/utils/promptFormatter.js.map +0 -1
  139. package/dist/clients/utils/promptLoader.d.ts +0 -27
  140. package/dist/clients/utils/promptLoader.js +0 -49
  141. package/dist/clients/utils/promptLoader.js.map +0 -1
  142. package/dist/clients/utils/tokenCounter.d.ts +0 -81
  143. package/dist/clients/utils/tokenCounter.js +0 -184
  144. package/dist/clients/utils/tokenCounter.js.map +0 -1
  145. package/dist/core/ApiClientSelector.d.ts +0 -8
  146. package/dist/core/ApiClientSelector.js +0 -29
  147. package/dist/core/ApiClientSelector.js.map +0 -1
  148. package/dist/core/ConfigurationService.d.ts +0 -307
  149. package/dist/core/ConfigurationService.js +0 -516
  150. package/dist/core/ConfigurationService.js.map +0 -1
  151. package/dist/core/ConsolidationService.d.ts +0 -99
  152. package/dist/core/ConsolidationService.js +0 -341
  153. package/dist/core/ConsolidationService.js.map +0 -1
  154. package/dist/core/InteractiveDisplayManager.d.ts +0 -22
  155. package/dist/core/InteractiveDisplayManager.js +0 -70
  156. package/dist/core/InteractiveDisplayManager.js.map +0 -1
  157. package/dist/core/OutputManager.d.ts +0 -26
  158. package/dist/core/OutputManager.js +0 -217
  159. package/dist/core/OutputManager.js.map +0 -1
  160. package/dist/core/ReviewGenerator.d.ts +0 -13
  161. package/dist/core/ReviewGenerator.js +0 -102
  162. package/dist/core/ReviewGenerator.js.map +0 -1
  163. package/dist/core/fileDiscovery.d.ts +0 -35
  164. package/dist/core/fileDiscovery.js +0 -202
  165. package/dist/core/fileDiscovery.js.map +0 -1
  166. package/dist/core/handlers/EstimationHandler.d.ts +0 -18
  167. package/dist/core/handlers/EstimationHandler.js +0 -110
  168. package/dist/core/handlers/EstimationHandler.js.map +0 -1
  169. package/dist/core/handlers/FileProcessingHandler.d.ts +0 -31
  170. package/dist/core/handlers/FileProcessingHandler.js +0 -164
  171. package/dist/core/handlers/FileProcessingHandler.js.map +0 -1
  172. package/dist/core/handlers/OutputHandler.d.ts +0 -27
  173. package/dist/core/handlers/OutputHandler.js +0 -127
  174. package/dist/core/handlers/OutputHandler.js.map +0 -1
  175. package/dist/core/handlers/ReviewExecutor.d.ts +0 -32
  176. package/dist/core/handlers/ReviewExecutor.js +0 -111
  177. package/dist/core/handlers/ReviewExecutor.js.map +0 -1
  178. package/dist/core/reviewOrchestrator.d.ts +0 -24
  179. package/dist/core/reviewOrchestrator.js +0 -354
  180. package/dist/core/reviewOrchestrator.js.map +0 -1
  181. package/dist/core/utils/ModelInfoUtils.d.ts +0 -16
  182. package/dist/core/utils/ModelInfoUtils.js +0 -54
  183. package/dist/core/utils/ModelInfoUtils.js.map +0 -1
  184. package/dist/formatters/outputFormatter.d.ts +0 -31
  185. package/dist/formatters/outputFormatter.js +0 -65
  186. package/dist/formatters/outputFormatter.js.map +0 -1
  187. package/dist/formatters/utils/IssueFormatters.d.ts +0 -20
  188. package/dist/formatters/utils/IssueFormatters.js +0 -67
  189. package/dist/formatters/utils/IssueFormatters.js.map +0 -1
  190. package/dist/formatters/utils/JsonFormatter.d.ts +0 -13
  191. package/dist/formatters/utils/JsonFormatter.js +0 -57
  192. package/dist/formatters/utils/JsonFormatter.js.map +0 -1
  193. package/dist/formatters/utils/MarkdownFormatters.d.ts +0 -51
  194. package/dist/formatters/utils/MarkdownFormatters.js +0 -456
  195. package/dist/formatters/utils/MarkdownFormatters.js.map +0 -1
  196. package/dist/formatters/utils/MetadataFormatter.d.ts +0 -65
  197. package/dist/formatters/utils/MetadataFormatter.js +0 -219
  198. package/dist/formatters/utils/MetadataFormatter.js.map +0 -1
  199. package/dist/formatters/utils/ModelInfoExtractor.d.ts +0 -33
  200. package/dist/formatters/utils/ModelInfoExtractor.js +0 -111
  201. package/dist/formatters/utils/ModelInfoExtractor.js.map +0 -1
  202. package/dist/plugins/PluginInterface.d.ts +0 -44
  203. package/dist/plugins/PluginInterface.js +0 -9
  204. package/dist/plugins/PluginInterface.js.map +0 -1
  205. package/dist/plugins/PluginManager.d.ts +0 -51
  206. package/dist/plugins/PluginManager.js +0 -151
  207. package/dist/plugins/PluginManager.js.map +0 -1
  208. package/dist/prompts/PromptManager.d.ts +0 -30
  209. package/dist/prompts/PromptManager.js +0 -62
  210. package/dist/prompts/PromptManager.js.map +0 -1
  211. package/dist/prompts/cache/PromptCache.d.ts +0 -32
  212. package/dist/prompts/cache/PromptCache.js +0 -48
  213. package/dist/prompts/cache/PromptCache.js.map +0 -1
  214. package/dist/runtime/auth/service.d.ts +0 -2
  215. package/dist/runtime/auth/service.js +0 -41
  216. package/dist/runtime/auth/service.js.map +0 -1
  217. package/dist/runtime/auth/session.d.ts +0 -5
  218. package/dist/runtime/auth/session.js +0 -87
  219. package/dist/runtime/auth/session.js.map +0 -1
  220. package/dist/runtime/auth/types.d.ts +0 -9
  221. package/dist/runtime/auth/types.js +0 -3
  222. package/dist/runtime/auth/types.js.map +0 -1
  223. package/dist/runtime/fileCollector.d.ts +0 -14
  224. package/dist/runtime/fileCollector.js +0 -383
  225. package/dist/runtime/fileCollector.js.map +0 -1
  226. package/dist/runtime/manifest.d.ts +0 -1
  227. package/dist/runtime/manifest.js +0 -65
  228. package/dist/runtime/manifest.js.map +0 -1
  229. package/dist/runtime/openrouterProxy.d.ts +0 -4
  230. package/dist/runtime/openrouterProxy.js +0 -43
  231. package/dist/runtime/openrouterProxy.js.map +0 -1
  232. package/dist/runtime/preprod/batchStreamer.d.ts +0 -54
  233. package/dist/runtime/preprod/batchStreamer.js +0 -159
  234. package/dist/runtime/preprod/batchStreamer.js.map +0 -1
  235. package/dist/runtime/preprod/crEdgeServiceClient.d.ts +0 -30
  236. package/dist/runtime/preprod/crEdgeServiceClient.js +0 -133
  237. package/dist/runtime/preprod/crEdgeServiceClient.js.map +0 -1
  238. package/dist/runtime/preprod/progressTracker.d.ts +0 -21
  239. package/dist/runtime/preprod/progressTracker.js +0 -80
  240. package/dist/runtime/preprod/progressTracker.js.map +0 -1
  241. package/dist/runtime/preprod/webCheck.d.ts +0 -1
  242. package/dist/runtime/preprod/webCheck.js +0 -102
  243. package/dist/runtime/preprod/webCheck.js.map +0 -1
  244. package/dist/runtime/proxyConfig.d.ts +0 -6
  245. package/dist/runtime/proxyConfig.js +0 -86
  246. package/dist/runtime/proxyConfig.js.map +0 -1
  247. package/dist/runtime/proxyEnvironment.d.ts +0 -3
  248. package/dist/runtime/proxyEnvironment.js +0 -63
  249. package/dist/runtime/proxyEnvironment.js.map +0 -1
  250. package/dist/runtime/reportMerge.d.ts +0 -30
  251. package/dist/runtime/reportMerge.js +0 -70
  252. package/dist/runtime/reportMerge.js.map +0 -1
  253. package/dist/runtime/reporting/markdownReportBuilder.d.ts +0 -17
  254. package/dist/runtime/reporting/markdownReportBuilder.js +0 -154
  255. package/dist/runtime/reporting/markdownReportBuilder.js.map +0 -1
  256. package/dist/runtime/reporting/reportDataCollector.d.ts +0 -31
  257. package/dist/runtime/reporting/reportDataCollector.js +0 -170
  258. package/dist/runtime/reporting/reportDataCollector.js.map +0 -1
  259. package/dist/runtime/reporting/summaryGenerator.d.ts +0 -10
  260. package/dist/runtime/reporting/summaryGenerator.js +0 -67
  261. package/dist/runtime/reporting/summaryGenerator.js.map +0 -1
  262. package/dist/runtime/runAiCodeReview.d.ts +0 -36
  263. package/dist/runtime/runAiCodeReview.js +0 -409
  264. package/dist/runtime/runAiCodeReview.js.map +0 -1
  265. package/dist/runtime/runtimeConfig.d.ts +0 -4
  266. package/dist/runtime/runtimeConfig.js +0 -7
  267. package/dist/runtime/runtimeConfig.js.map +0 -1
  268. package/dist/strategies/ArchitecturalReviewStrategy.d.ts +0 -29
  269. package/dist/strategies/ArchitecturalReviewStrategy.js +0 -42
  270. package/dist/strategies/ArchitecturalReviewStrategy.js.map +0 -1
  271. package/dist/strategies/CodingTestReviewStrategy.d.ts +0 -194
  272. package/dist/strategies/CodingTestReviewStrategy.js +0 -681
  273. package/dist/strategies/CodingTestReviewStrategy.js.map +0 -1
  274. package/dist/strategies/ConsolidatedReviewStrategy.d.ts +0 -25
  275. package/dist/strategies/ConsolidatedReviewStrategy.js +0 -45
  276. package/dist/strategies/ConsolidatedReviewStrategy.js.map +0 -1
  277. package/dist/strategies/ExtractPatternsReviewStrategy.d.ts +0 -30
  278. package/dist/strategies/ExtractPatternsReviewStrategy.js +0 -51
  279. package/dist/strategies/ExtractPatternsReviewStrategy.js.map +0 -1
  280. package/dist/strategies/MultiPassReviewStrategy.d.ts +0 -86
  281. package/dist/strategies/MultiPassReviewStrategy.js +0 -590
  282. package/dist/strategies/MultiPassReviewStrategy.js.map +0 -1
  283. package/dist/strategies/ReviewStrategy.d.ts +0 -45
  284. package/dist/strategies/ReviewStrategy.js +0 -24
  285. package/dist/strategies/ReviewStrategy.js.map +0 -1
  286. package/dist/strategies/StrategyFactory.d.ts +0 -19
  287. package/dist/strategies/StrategyFactory.js +0 -72
  288. package/dist/strategies/StrategyFactory.js.map +0 -1
  289. package/dist/strategies/index.d.ts +0 -13
  290. package/dist/strategies/index.js +0 -30
  291. package/dist/strategies/index.js.map +0 -1
  292. package/dist/tokenizers/baseTokenizer.d.ts +0 -25
  293. package/dist/tokenizers/baseTokenizer.js +0 -48
  294. package/dist/tokenizers/baseTokenizer.js.map +0 -1
  295. package/dist/tokenizers/gptTokenizer.d.ts +0 -7
  296. package/dist/tokenizers/gptTokenizer.js +0 -28
  297. package/dist/tokenizers/gptTokenizer.js.map +0 -1
  298. package/dist/tokenizers/index.d.ts +0 -7
  299. package/dist/tokenizers/index.js +0 -24
  300. package/dist/tokenizers/index.js.map +0 -1
  301. package/dist/types/apiResponses.d.ts +0 -39
  302. package/dist/types/apiResponses.js +0 -9
  303. package/dist/types/apiResponses.js.map +0 -1
  304. package/dist/types/cli.d.ts +0 -22
  305. package/dist/types/cli.js +0 -3
  306. package/dist/types/cli.js.map +0 -1
  307. package/dist/types/common.d.ts +0 -22
  308. package/dist/types/common.js +0 -14
  309. package/dist/types/common.js.map +0 -1
  310. package/dist/types/configuration.d.ts +0 -682
  311. package/dist/types/configuration.js +0 -65
  312. package/dist/types/configuration.js.map +0 -1
  313. package/dist/types/review.d.ts +0 -318
  314. package/dist/types/review.js +0 -8
  315. package/dist/types/review.js.map +0 -1
  316. package/dist/types/reviewSchema.d.ts +0 -543
  317. package/dist/types/reviewSchema.js +0 -121
  318. package/dist/types/reviewSchema.js.map +0 -1
  319. package/dist/types/structuredReview.d.ts +0 -119
  320. package/dist/types/structuredReview.js +0 -6
  321. package/dist/types/structuredReview.js.map +0 -1
  322. package/dist/types/tokenAnalysis.d.ts +0 -44
  323. package/dist/types/tokenAnalysis.js +0 -4
  324. package/dist/types/tokenAnalysis.js.map +0 -1
  325. package/dist/utils/FileReader.d.ts +0 -33
  326. package/dist/utils/FileReader.js +0 -88
  327. package/dist/utils/FileReader.js.map +0 -1
  328. package/dist/utils/FileWriter.d.ts +0 -26
  329. package/dist/utils/FileWriter.js +0 -76
  330. package/dist/utils/FileWriter.js.map +0 -1
  331. package/dist/utils/PathGenerator.d.ts +0 -30
  332. package/dist/utils/PathGenerator.js +0 -82
  333. package/dist/utils/PathGenerator.js.map +0 -1
  334. package/dist/utils/api/apiUtils.d.ts +0 -3
  335. package/dist/utils/api/apiUtils.js +0 -20
  336. package/dist/utils/api/apiUtils.js.map +0 -1
  337. package/dist/utils/api/index.d.ts +0 -1
  338. package/dist/utils/api/index.js +0 -18
  339. package/dist/utils/api/index.js.map +0 -1
  340. package/dist/utils/apiErrorHandler.d.ts +0 -130
  341. package/dist/utils/apiErrorHandler.js +0 -256
  342. package/dist/utils/apiErrorHandler.js.map +0 -1
  343. package/dist/utils/ciDataCollector.d.ts +0 -51
  344. package/dist/utils/ciDataCollector.js +0 -197
  345. package/dist/utils/ciDataCollector.js.map +0 -1
  346. package/dist/utils/codingTestConfigLoader.d.ts +0 -66
  347. package/dist/utils/codingTestConfigLoader.js +0 -420
  348. package/dist/utils/codingTestConfigLoader.js.map +0 -1
  349. package/dist/utils/dependencies/aiDependencyAnalyzer.d.ts +0 -30
  350. package/dist/utils/dependencies/aiDependencyAnalyzer.js +0 -343
  351. package/dist/utils/dependencies/aiDependencyAnalyzer.js.map +0 -1
  352. package/dist/utils/detection/frameworkDetector.d.ts +0 -43
  353. package/dist/utils/detection/frameworkDetector.js +0 -850
  354. package/dist/utils/detection/frameworkDetector.js.map +0 -1
  355. package/dist/utils/detection/index.d.ts +0 -9
  356. package/dist/utils/detection/index.js +0 -28
  357. package/dist/utils/detection/index.js.map +0 -1
  358. package/dist/utils/detection/projectTypeDetector.d.ts +0 -27
  359. package/dist/utils/detection/projectTypeDetector.js +0 -469
  360. package/dist/utils/detection/projectTypeDetector.js.map +0 -1
  361. package/dist/utils/diagramGenerator.d.ts +0 -49
  362. package/dist/utils/diagramGenerator.js +0 -218
  363. package/dist/utils/diagramGenerator.js.map +0 -1
  364. package/dist/utils/errorLogger.d.ts +0 -24
  365. package/dist/utils/errorLogger.js +0 -59
  366. package/dist/utils/errorLogger.js.map +0 -1
  367. package/dist/utils/estimationUtils.d.ts +0 -139
  368. package/dist/utils/estimationUtils.js +0 -329
  369. package/dist/utils/estimationUtils.js.map +0 -1
  370. package/dist/utils/fileFilters.d.ts +0 -72
  371. package/dist/utils/fileFilters.js +0 -350
  372. package/dist/utils/fileFilters.js.map +0 -1
  373. package/dist/utils/fileSystem.d.ts +0 -22
  374. package/dist/utils/fileSystem.js +0 -45
  375. package/dist/utils/fileSystem.js.map +0 -1
  376. package/dist/utils/index.d.ts +0 -22
  377. package/dist/utils/index.js +0 -52
  378. package/dist/utils/index.js.map +0 -1
  379. package/dist/utils/pathValidator.d.ts +0 -40
  380. package/dist/utils/pathValidator.js +0 -98
  381. package/dist/utils/pathValidator.js.map +0 -1
  382. package/dist/utils/priorityFilter.d.ts +0 -34
  383. package/dist/utils/priorityFilter.js +0 -54
  384. package/dist/utils/priorityFilter.js.map +0 -1
  385. package/dist/utils/projectDocs.d.ts +0 -47
  386. package/dist/utils/projectDocs.js +0 -158
  387. package/dist/utils/projectDocs.js.map +0 -1
  388. package/dist/utils/promptPaths.d.ts +0 -6
  389. package/dist/utils/promptPaths.js +0 -33
  390. package/dist/utils/promptPaths.js.map +0 -1
  391. package/dist/utils/promptTemplateManager.d.ts +0 -34
  392. package/dist/utils/promptTemplateManager.js +0 -141
  393. package/dist/utils/promptTemplateManager.js.map +0 -1
  394. package/dist/utils/review/consolidateReview.d.ts +0 -15
  395. package/dist/utils/review/consolidateReview.js +0 -481
  396. package/dist/utils/review/consolidateReview.js.map +0 -1
  397. package/dist/utils/review/fixDisplay.d.ts +0 -20
  398. package/dist/utils/review/fixDisplay.js +0 -84
  399. package/dist/utils/review/fixDisplay.js.map +0 -1
  400. package/dist/utils/review/fixImplementation.d.ts +0 -28
  401. package/dist/utils/review/fixImplementation.js +0 -60
  402. package/dist/utils/review/fixImplementation.js.map +0 -1
  403. package/dist/utils/review/index.d.ts +0 -13
  404. package/dist/utils/review/index.js +0 -50
  405. package/dist/utils/review/index.js.map +0 -1
  406. package/dist/utils/review/interactiveProcessing.d.ts +0 -25
  407. package/dist/utils/review/interactiveProcessing.js +0 -251
  408. package/dist/utils/review/interactiveProcessing.js.map +0 -1
  409. package/dist/utils/review/progressTracker.d.ts +0 -106
  410. package/dist/utils/review/progressTracker.js +0 -227
  411. package/dist/utils/review/progressTracker.js.map +0 -1
  412. package/dist/utils/review/reviewExtraction.d.ts +0 -31
  413. package/dist/utils/review/reviewExtraction.js +0 -324
  414. package/dist/utils/review/reviewExtraction.js.map +0 -1
  415. package/dist/utils/review/types.d.ts +0 -45
  416. package/dist/utils/review/types.js +0 -18
  417. package/dist/utils/review/types.js.map +0 -1
  418. package/dist/utils/reviewActionHandler.d.ts +0 -16
  419. package/dist/utils/reviewActionHandler.js +0 -34
  420. package/dist/utils/reviewActionHandler.js.map +0 -1
  421. package/dist/utils/reviewParser.d.ts +0 -34
  422. package/dist/utils/reviewParser.js +0 -218
  423. package/dist/utils/reviewParser.js.map +0 -1
  424. package/dist/utils/sanitizer.d.ts +0 -82
  425. package/dist/utils/sanitizer.js +0 -239
  426. package/dist/utils/sanitizer.js.map +0 -1
  427. package/dist/utils/smartFileSelector.d.ts +0 -50
  428. package/dist/utils/smartFileSelector.js +0 -261
  429. package/dist/utils/smartFileSelector.js.map +0 -1
  430. package/dist/utils/templateLoader.d.ts +0 -44
  431. package/dist/utils/templateLoader.js +0 -431
  432. package/dist/utils/templateLoader.js.map +0 -1
  433. package/dist/utils/treeGenerator.d.ts +0 -12
  434. package/dist/utils/treeGenerator.js +0 -133
  435. package/dist/utils/treeGenerator.js.map +0 -1
@@ -1,34 +0,0 @@
1
- /**
2
- * @fileoverview Utility functions for handling priority filters.
3
- *
4
- * This module provides utility functions for working with priority filters
5
- * in interactive mode, including extracting priority filters from command line
6
- * arguments and review options.
7
- */
8
- import type { ReviewOptions } from '../types/review';
9
- import type { PriorityFilter } from '../types/common';
10
- /**
11
- * Get the priority filter from command line arguments or options
12
- *
13
- * This function extracts the priority filter from either:
14
- * 1. The options object (if the interactive property is a string)
15
- * 2. The command line arguments (if --interactive or -i is followed by a priority filter)
16
- *
17
- * Priority filters determine which issues to display in interactive mode:
18
- * - 'h': High priority issues only
19
- * - 'm': Medium and high priority issues
20
- * - 'l': Low, medium, and high priority issues
21
- * - 'a': All issues (including informational)
22
- *
23
- * @param options Review options that may contain the priority filter
24
- * @returns The priority filter (h, m, l, or a) or undefined if not specified
25
- * @example
26
- * // With options object
27
- * const filter = getPriorityFilterFromArgs({ interactive: 'h' });
28
- * // filter === 'h'
29
- *
30
- * // With command line arguments (if process.argv includes '--interactive h')
31
- * const filter = getPriorityFilterFromArgs();
32
- * // filter === 'h'
33
- */
34
- export declare function getPriorityFilterFromArgs(options?: ReviewOptions): PriorityFilter | undefined;
@@ -1,54 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview Utility functions for handling priority filters.
4
- *
5
- * This module provides utility functions for working with priority filters
6
- * in interactive mode, including extracting priority filters from command line
7
- * arguments and review options.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.getPriorityFilterFromArgs = getPriorityFilterFromArgs;
11
- /**
12
- * Get the priority filter from command line arguments or options
13
- *
14
- * This function extracts the priority filter from either:
15
- * 1. The options object (if the interactive property is a string)
16
- * 2. The command line arguments (if --interactive or -i is followed by a priority filter)
17
- *
18
- * Priority filters determine which issues to display in interactive mode:
19
- * - 'h': High priority issues only
20
- * - 'm': Medium and high priority issues
21
- * - 'l': Low, medium, and high priority issues
22
- * - 'a': All issues (including informational)
23
- *
24
- * @param options Review options that may contain the priority filter
25
- * @returns The priority filter (h, m, l, or a) or undefined if not specified
26
- * @example
27
- * // With options object
28
- * const filter = getPriorityFilterFromArgs({ interactive: 'h' });
29
- * // filter === 'h'
30
- *
31
- * // With command line arguments (if process.argv includes '--interactive h')
32
- * const filter = getPriorityFilterFromArgs();
33
- * // filter === 'h'
34
- */
35
- function getPriorityFilterFromArgs(options) {
36
- // First check if the interactive option is a string (priority filter)
37
- if (options &&
38
- typeof options.interactive === 'string' &&
39
- ['h', 'm', 'l', 'a'].includes(options.interactive)) {
40
- return options.interactive;
41
- }
42
- // Otherwise check if there's a priority filter argument after --interactive
43
- const args = process.argv;
44
- const interactiveIndex = args.findIndex((arg) => arg === '--interactive' || arg === '-i');
45
- if (interactiveIndex !== -1 && interactiveIndex < args.length - 1) {
46
- const nextArg = args[interactiveIndex + 1];
47
- // Check if the next argument is a priority filter and not another option
48
- if (['h', 'm', 'l', 'a'].includes(nextArg) && !nextArg.startsWith('-')) {
49
- return nextArg;
50
- }
51
- }
52
- return undefined;
53
- }
54
- //# sourceMappingURL=priorityFilter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"priorityFilter.js","sourceRoot":"","sources":["../../src/utils/priorityFilter.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AA6BH,8DAuBC;AA/CD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAgB,yBAAyB,CAAC,OAAuB;IAC/D,sEAAsE;IACtE,IACE,OAAO;QACP,OAAO,OAAO,CAAC,WAAW,KAAK,QAAQ;QACvC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,EAClD,CAAC;QACD,OAAO,OAAO,CAAC,WAA6B,CAAC;IAC/C,CAAC;IAED,4EAA4E;IAC5E,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1B,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,eAAe,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC;IAE1F,IAAI,gBAAgB,KAAK,CAAC,CAAC,IAAI,gBAAgB,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClE,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,CAAC;QAC3C,yEAAyE;QACzE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACvE,OAAO,OAAyB,CAAC;QACnC,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -1,47 +0,0 @@
1
- /**
2
- * @fileoverview Utilities for reading and processing project documentation.
3
- *
4
- * This module provides functionality for reading and processing project documentation
5
- * files like README.md, PROJECT.md, and PROGRESS.md. These files provide important
6
- * context for code reviews, helping the AI model understand the project's purpose,
7
- * structure, and current state.
8
- */
9
- /**
10
- * Project documentation interface
11
- */
12
- export interface ProjectDocs {
13
- readme?: string;
14
- project?: string;
15
- progress?: string;
16
- contributing?: string;
17
- architecture?: string;
18
- custom?: Record<string, string>;
19
- metadata?: Record<string, string>;
20
- }
21
- /**
22
- * Read project documentation files
23
- * @param projectDir Project directory
24
- * @returns Project documentation
25
- */
26
- export declare function readProjectDocs(projectDir: string): Promise<ProjectDocs>;
27
- /**
28
- * Add metadata to project documentation
29
- * @param docs Project documentation object
30
- * @param key Metadata key
31
- * @param value Metadata value
32
- * @returns Project documentation with added metadata
33
- */
34
- export declare function addMetadataToProjectDocs(docs: ProjectDocs, key: string, value: string): ProjectDocs;
35
- /**
36
- * Format project documentation for inclusion in prompts
37
- * @param docs Project documentation
38
- * @returns Formatted documentation string
39
- */
40
- export declare function formatProjectDocs(docs: ProjectDocs): string;
41
- /**
42
- * Add project documentation to a prompt
43
- * @param prompt The prompt to add documentation to
44
- * @param docs Project documentation object
45
- * @returns The prompt with documentation added
46
- */
47
- export declare function addProjectDocsToPrompt(prompt: string, docs: ProjectDocs): string;
@@ -1,158 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview Utilities for reading and processing project documentation.
4
- *
5
- * This module provides functionality for reading and processing project documentation
6
- * files like README.md, PROJECT.md, and PROGRESS.md. These files provide important
7
- * context for code reviews, helping the AI model understand the project's purpose,
8
- * structure, and current state.
9
- */
10
- var __importDefault = (this && this.__importDefault) || function (mod) {
11
- return (mod && mod.__esModule) ? mod : { "default": mod };
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.readProjectDocs = readProjectDocs;
15
- exports.addMetadataToProjectDocs = addMetadataToProjectDocs;
16
- exports.formatProjectDocs = formatProjectDocs;
17
- exports.addProjectDocsToPrompt = addProjectDocsToPrompt;
18
- const promises_1 = __importDefault(require("node:fs/promises"));
19
- const node_path_1 = __importDefault(require("node:path"));
20
- const fileSystem_1 = require("./fileSystem");
21
- const logger_1 = __importDefault(require("./logger"));
22
- /**
23
- * Maximum size for documentation files (in characters)
24
- * This helps prevent token limit issues
25
- */
26
- const MAX_DOC_SIZE = 50000;
27
- /**
28
- * Read a documentation file if it exists
29
- * @param filePath File path
30
- * @returns File content or undefined if the file doesn't exist
31
- */
32
- async function readDocFile(filePath) {
33
- try {
34
- if (await (0, fileSystem_1.fileExists)(filePath)) {
35
- const content = await promises_1.default.readFile(filePath, 'utf-8');
36
- // Truncate if too large
37
- if (content.length > MAX_DOC_SIZE) {
38
- logger_1.default.warn(`Documentation file ${filePath} is too large, truncating to ${MAX_DOC_SIZE} characters.`);
39
- return `${content.substring(0, MAX_DOC_SIZE)}\n\n[Content truncated due to size]`;
40
- }
41
- return content;
42
- }
43
- }
44
- catch (error) {
45
- logger_1.default.warn(`Error reading documentation file ${filePath}:`, error);
46
- }
47
- return undefined;
48
- }
49
- /**
50
- * Read project documentation files
51
- * @param projectDir Project directory
52
- * @returns Project documentation
53
- */
54
- async function readProjectDocs(projectDir) {
55
- const docs = {
56
- custom: {},
57
- };
58
- // Read standard documentation files
59
- docs.readme = await readDocFile(node_path_1.default.join(projectDir, 'README.md'));
60
- docs.project = await readDocFile(node_path_1.default.join(projectDir, 'PROJECT.md'));
61
- docs.progress = await readDocFile(node_path_1.default.join(projectDir, 'PROGRESS.md'));
62
- docs.contributing = await readDocFile(node_path_1.default.join(projectDir, 'CONTRIBUTING.md'));
63
- docs.architecture = await readDocFile(node_path_1.default.join(projectDir, 'ARCHITECTURE.md'));
64
- // Read custom documentation files from the docs directory
65
- try {
66
- const docsDir = node_path_1.default.join(projectDir, 'docs');
67
- if (await (0, fileSystem_1.fileExists)(docsDir)) {
68
- const files = await promises_1.default.readdir(docsDir);
69
- for (const file of files) {
70
- if (file.endsWith('.md')) {
71
- const filePath = node_path_1.default.join(docsDir, file);
72
- const content = await readDocFile(filePath);
73
- if (content) {
74
- docs.custom[file] = content;
75
- }
76
- }
77
- }
78
- }
79
- }
80
- catch (error) {
81
- logger_1.default.warn('Error reading docs directory:', error);
82
- }
83
- return docs;
84
- }
85
- /**
86
- * Add metadata to project documentation
87
- * @param docs Project documentation object
88
- * @param key Metadata key
89
- * @param value Metadata value
90
- * @returns Project documentation with added metadata
91
- */
92
- function addMetadataToProjectDocs(docs, key, value) {
93
- if (!docs.metadata) {
94
- docs.metadata = {};
95
- }
96
- docs.metadata[key] = value;
97
- return docs;
98
- }
99
- /**
100
- * Format project documentation for inclusion in prompts
101
- * @param docs Project documentation
102
- * @returns Formatted documentation string
103
- */
104
- function formatProjectDocs(docs) {
105
- const sections = [];
106
- if (docs.readme) {
107
- sections.push(`# README.md\n\n${docs.readme}`);
108
- }
109
- if (docs.project) {
110
- sections.push(`# PROJECT.md\n\n${docs.project}`);
111
- }
112
- if (docs.architecture) {
113
- sections.push(`# ARCHITECTURE.md\n\n${docs.architecture}`);
114
- }
115
- if (docs.progress) {
116
- sections.push(`# PROGRESS.md\n\n${docs.progress}`);
117
- }
118
- if (docs.contributing) {
119
- sections.push(`# CONTRIBUTING.md\n\n${docs.contributing}`);
120
- }
121
- // Add custom documentation files
122
- if (docs.custom) {
123
- for (const [file, content] of Object.entries(docs.custom)) {
124
- sections.push(`# docs/${file}\n\n${content}`);
125
- }
126
- }
127
- // Add metadata if present
128
- if (docs.metadata) {
129
- for (const [key, content] of Object.entries(docs.metadata)) {
130
- // Format the metadata section
131
- const title = key.charAt(0).toUpperCase() + key.slice(1).replace(/([A-Z])/g, ' $1');
132
- sections.push(`# ${title}\n\n${content}`);
133
- }
134
- }
135
- if (sections.length === 0) {
136
- return '';
137
- }
138
- return `## Project Documentation\n\n${sections.join('\n\n---\n\n')}`;
139
- }
140
- /**
141
- * Add project documentation to a prompt
142
- * @param prompt The prompt to add documentation to
143
- * @param docs Project documentation object
144
- * @returns The prompt with documentation added
145
- */
146
- function addProjectDocsToPrompt(prompt, docs) {
147
- const docsText = formatProjectDocs(docs);
148
- if (docsText) {
149
- // Try to replace a placeholder if it exists
150
- if (prompt.includes('{{PROJECT_DOCS}}')) {
151
- return prompt.replace('{{PROJECT_DOCS}}', docsText);
152
- }
153
- // Otherwise, append to the end
154
- return `${prompt}\n\n${docsText}`;
155
- }
156
- return prompt;
157
- }
158
- //# sourceMappingURL=projectDocs.js.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AC;IAED,0BAA0B;IAC1B,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAClB,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3D,8BAA8B;YAC9B,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;YACpF,QAAQ,CAAC,IAAI,CAAC,KAAK,KAAK,OAAO,OAAO,EAAE,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,+BAA+B,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;AACvE,CAAC;AAED;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,MAAc,EAAE,IAAiB;IACtE,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,QAAQ,EAAE,CAAC;QACb,4CAA4C;QAC5C,IAAI,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACxC,OAAO,MAAM,CAAC,OAAO,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;QACtD,CAAC;QACD,+BAA+B;QAC/B,OAAO,GAAG,MAAM,OAAO,QAAQ,EAAE,CAAC;IACpC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Resolve the directory that contains the compiled prompt templates.
3
- * The location varies depending on whether we're running from source,
4
- * the compiled dist output, or an older workspace layout.
5
- */
6
- export declare function resolvePromptTemplatesDir(): string;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.resolvePromptTemplatesDir = resolvePromptTemplatesDir;
7
- const node_fs_1 = __importDefault(require("node:fs"));
8
- const node_path_1 = __importDefault(require("node:path"));
9
- /**
10
- * Resolve the directory that contains the compiled prompt templates.
11
- * The location varies depending on whether we're running from source,
12
- * the compiled dist output, or an older workspace layout.
13
- */
14
- function resolvePromptTemplatesDir() {
15
- const candidates = [
16
- // When running via ts-node from the src tree
17
- node_path_1.default.resolve(__dirname, '..', 'prompts', 'promptText'),
18
- // When running compiled code while keeping src in the package
19
- node_path_1.default.resolve(__dirname, '..', '..', 'src', 'prompts', 'promptText'),
20
- // When executing directly from the repo root
21
- node_path_1.default.resolve(process.cwd(), 'src', 'prompts', 'promptText'),
22
- // Legacy location used before the prompts lived under src/
23
- node_path_1.default.resolve(process.cwd(), 'promptText'),
24
- ];
25
- for (const candidate of candidates) {
26
- if (node_fs_1.default.existsSync(candidate)) {
27
- return candidate;
28
- }
29
- }
30
- // Fall back to the first option so callers always receive a deterministic path.
31
- return candidates[0];
32
- }
33
- //# sourceMappingURL=promptPaths.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"promptPaths.js","sourceRoot":"","sources":["../../src/utils/promptPaths.ts"],"names":[],"mappings":";;;;;AAQA,8DAoBC;AA5BD,sDAAyB;AACzB,0DAA6B;AAE7B;;;;GAIG;AACH,SAAgB,yBAAyB;IACvC,MAAM,UAAU,GAAG;QACjB,6CAA6C;QAC7C,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,CAAC;QACtD,8DAA8D;QAC9D,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,CAAC;QACnE,6CAA6C;QAC7C,mBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,CAAC;QAC3D,2DAA2D;QAC3D,mBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC;KAC1C,CAAC;IAEF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,iBAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7B,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED,gFAAgF;IAChF,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;AACvB,CAAC"}
@@ -1,34 +0,0 @@
1
- /**
2
- * Prompt Template Manager
3
- *
4
- * This utility provides an interface between the bundledPrompts system
5
- * and the new Handlebars template system, enabling a smooth migration.
6
- */
7
- import type { ReviewType } from '../types/review';
8
- /**
9
- * Get prompt template for the specified review type, language, and framework
10
- *
11
- * @param reviewType The type of review to get a prompt for
12
- * @param language The programming language (optional)
13
- * @param framework The framework (optional)
14
- * @returns The prompt template string or undefined if not found
15
- */
16
- export declare function getPromptTemplate(reviewType: ReviewType | string, language?: string, framework?: string): string | undefined;
17
- /**
18
- * Check if templates directory exists and is properly structured
19
- *
20
- * @returns true if templates are available, false otherwise
21
- */
22
- export declare function checkTemplatesAvailability(): boolean;
23
- /**
24
- * Get a list of supported frameworks and languages
25
- *
26
- * @returns Object containing arrays of supported frameworks, languages, and review types
27
- */
28
- export declare function getSupportedTemplates(): Record<string, string[]>;
29
- declare const _default: {
30
- getPromptTemplate: typeof getPromptTemplate;
31
- checkTemplatesAvailability: typeof checkTemplatesAvailability;
32
- getSupportedTemplates: typeof getSupportedTemplates;
33
- };
34
- export default _default;
@@ -1,141 +0,0 @@
1
- "use strict";
2
- /**
3
- * Prompt Template Manager
4
- *
5
- * This utility provides an interface between the bundledPrompts system
6
- * and the new Handlebars template system, enabling a smooth migration.
7
- */
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getPromptTemplate = getPromptTemplate;
13
- exports.checkTemplatesAvailability = checkTemplatesAvailability;
14
- exports.getSupportedTemplates = getSupportedTemplates;
15
- const node_fs_1 = __importDefault(require("node:fs"));
16
- const node_path_1 = __importDefault(require("node:path"));
17
- const logger_1 = __importDefault(require("./logger"));
18
- const templateLoader_1 = require("./templateLoader");
19
- const promptPaths_1 = require("./promptPaths");
20
- /**
21
- * Maps framework identifiers from the API to template directory names
22
- */
23
- const frameworkMapping = {
24
- react: 'react',
25
- angular: 'angular',
26
- vue: 'vue',
27
- 'next.js': 'nextjs',
28
- nextjs: 'nextjs',
29
- django: 'django',
30
- flask: 'flask',
31
- fastapi: 'fastapi',
32
- pyramid: 'pyramid',
33
- laravel: 'laravel',
34
- flutter: 'flutter',
35
- wordpress: 'wordpress',
36
- };
37
- /**
38
- * Maps language identifiers from the API to template directory names
39
- */
40
- const languageMapping = {
41
- typescript: 'typescript',
42
- javascript: 'javascript',
43
- js: 'javascript',
44
- python: 'python',
45
- html: 'html',
46
- css: 'css',
47
- php: 'php',
48
- ruby: 'ruby',
49
- dart: 'dart',
50
- };
51
- /**
52
- * Maps ReviewType enum to template file names
53
- */
54
- const reviewTypeMapping = {
55
- architectural: 'architectural-review',
56
- 'best-practices': 'best-practices',
57
- 'quick-fixes': 'quick-fixes-review',
58
- security: 'security-review',
59
- performance: 'performance-review',
60
- 'unused-code': 'unused-code-review',
61
- 'code-tracing-unused-code': 'code-tracing-unused-code-review',
62
- 'focused-unused-code': 'focused-unused-code-review',
63
- 'improved-unused-code': 'improved-unused-code-review',
64
- consolidated: 'consolidated-review',
65
- // Add mapping for improved quick fixes
66
- 'improved-quick-fixes': 'improved-quick-fixes-review',
67
- evaluation: 'evaluation',
68
- 'extract-patterns': 'extract-patterns-review',
69
- 'coding-test': 'coding-test',
70
- // Contemporary development patterns
71
- 'ai-integration': 'ai-integration-review',
72
- 'cloud-native': 'cloud-native-review',
73
- 'developer-experience': 'developer-experience-review',
74
- comprehensive: 'comprehensive',
75
- };
76
- /**
77
- * Get prompt template for the specified review type, language, and framework
78
- *
79
- * @param reviewType The type of review to get a prompt for
80
- * @param language The programming language (optional)
81
- * @param framework The framework (optional)
82
- * @returns The prompt template string or undefined if not found
83
- */
84
- function getPromptTemplate(reviewType, language, framework) {
85
- // Convert ReviewType enum to string if needed
86
- const reviewTypeStr = typeof reviewType === 'string' ? reviewType : String(reviewType).toLowerCase();
87
- // Map review type to template file name
88
- const templateName = reviewTypeMapping[reviewTypeStr];
89
- if (!templateName) {
90
- logger_1.default.error(`No template mapping found for review type: ${reviewTypeStr}`);
91
- return undefined;
92
- }
93
- // Map language and framework to template directory names
94
- const mappedLanguage = language ? languageMapping[language.toLowerCase()] : undefined;
95
- const mappedFramework = framework ? frameworkMapping[framework.toLowerCase()] : undefined;
96
- // Try to load the template
97
- const template = (0, templateLoader_1.loadPromptTemplate)(templateName, mappedLanguage, mappedFramework);
98
- return template || undefined;
99
- }
100
- /**
101
- * Check if templates directory exists and is properly structured
102
- *
103
- * @returns true if templates are available, false otherwise
104
- */
105
- function checkTemplatesAvailability() {
106
- const templatesDir = (0, promptPaths_1.resolvePromptTemplatesDir)();
107
- if (!node_fs_1.default.existsSync(templatesDir)) {
108
- logger_1.default.warn('Templates directory not found. Using bundled prompts instead.');
109
- return false;
110
- }
111
- // Check for essential directories
112
- const requiredDirs = ['common', 'frameworks', 'languages'];
113
- for (const dir of requiredDirs) {
114
- if (!node_fs_1.default.existsSync(node_path_1.default.join(templatesDir, dir))) {
115
- logger_1.default.warn(`Required templates subdirectory '${dir}' not found. Using bundled prompts instead.`);
116
- return false;
117
- }
118
- }
119
- // Check for common variables
120
- const variablesDir = node_path_1.default.join(templatesDir, 'common', 'variables');
121
- if (!node_fs_1.default.existsSync(variablesDir) ||
122
- !node_fs_1.default.existsSync(node_path_1.default.join(variablesDir, 'framework-versions.json'))) {
123
- logger_1.default.warn('Framework variables data not found. Using bundled prompts instead.');
124
- return false;
125
- }
126
- return true;
127
- }
128
- /**
129
- * Get a list of supported frameworks and languages
130
- *
131
- * @returns Object containing arrays of supported frameworks, languages, and review types
132
- */
133
- function getSupportedTemplates() {
134
- return (0, templateLoader_1.listAvailableTemplates)();
135
- }
136
- exports.default = {
137
- getPromptTemplate,
138
- checkTemplatesAvailability,
139
- getSupportedTemplates,
140
- };
141
- //# sourceMappingURL=promptTemplateManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"promptTemplateManager.js","sourceRoot":"","sources":["../../src/utils/promptTemplateManager.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;AA4EH,8CAwBC;AAOD,gEA8BC;AAOD,sDAEC;AAhJD,sDAAyB;AACzB,0DAA6B;AAE7B,sDAA8B;AAC9B,qDAA8E;AAC9E,+CAA0D;AAE1D;;GAEG;AACH,MAAM,gBAAgB,GAA2B;IAC/C,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,KAAK;IACV,SAAS,EAAE,QAAQ;IACnB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;CACvB,CAAC;AAEF;;GAEG;AACH,MAAM,eAAe,GAA2B;IAC9C,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,EAAE,EAAE,YAAY;IAChB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;CACb,CAAC;AAEF;;GAEG;AACH,MAAM,iBAAiB,GAA2B;IAChD,aAAa,EAAE,sBAAsB;IACrC,gBAA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,0BAA0B;IAC1B,qBAAqB;CACtB,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * @fileoverview Utility for consolidating multi-pass reviews into a single coherent review.
3
- *
4
- * This module provides a dedicated function to consolidate multiple review passes
5
- * into a single, comprehensive review by sending the review content to the same AI model
6
- * that was used for the original review, ensuring consistency in analysis and tone.
7
- */
8
- import type { ReviewResult } from '../../types/review';
9
- /**
10
- * Consolidates a multi-pass review into a single coherent review using the
11
- * configured client and model from environment/arguments
12
- * @param review The multi-pass review content to consolidate
13
- * @returns Promise resolving to the consolidated review content
14
- */
15
- export declare function consolidateReview(review: ReviewResult): Promise<string>;