codereview-aia 0.1.2 → 0.1.3

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 (427) hide show
  1. package/dist/index.js +0 -2
  2. package/docs/opt-in-full-context.md +27 -0
  3. package/package.json +11 -11
  4. package/reports/cr-cr-aia-17-11-2025-20-13.md +354 -0
  5. package/src/clients/implementations/openRouterClient.ts +2 -0
  6. package/src/clients/openRouterClient.ts +8 -1
  7. package/src/clients/utils/promptFormatter.ts +97 -20
  8. package/src/core/handlers/FileProcessingHandler.ts +6 -0
  9. package/src/index.ts +0 -3
  10. package/src/runtime/cliEntry.ts +21 -3
  11. package/src/runtime/fileCollector.ts +278 -5
  12. package/src/runtime/reviewPipeline.ts +46 -7
  13. package/src/runtime/runAiCodeReview.ts +161 -6
  14. package/src/runtime/ui/RuntimeApp.tsx +34 -5
  15. package/src/runtime/ui/screens/ProgressScreen.tsx +49 -1
  16. package/src/runtime/ui/screens/ResultsScreen.tsx +29 -9
  17. package/src/types/review.ts +18 -0
  18. package/dist/analysis/FindingsExtractor.d.ts +0 -105
  19. package/dist/analysis/FindingsExtractor.js +0 -363
  20. package/dist/analysis/FindingsExtractor.js.map +0 -1
  21. package/dist/analysis/ai-detection/analyzers/BaseAnalyzer.d.ts +0 -111
  22. package/dist/analysis/ai-detection/analyzers/BaseAnalyzer.js +0 -215
  23. package/dist/analysis/ai-detection/analyzers/BaseAnalyzer.js.map +0 -1
  24. package/dist/analysis/ai-detection/analyzers/DocumentationAnalyzer.d.ts +0 -142
  25. package/dist/analysis/ai-detection/analyzers/DocumentationAnalyzer.js +0 -503
  26. package/dist/analysis/ai-detection/analyzers/DocumentationAnalyzer.js.map +0 -1
  27. package/dist/analysis/ai-detection/analyzers/GitHistoryAnalyzer.d.ts +0 -88
  28. package/dist/analysis/ai-detection/analyzers/GitHistoryAnalyzer.js +0 -343
  29. package/dist/analysis/ai-detection/analyzers/GitHistoryAnalyzer.js.map +0 -1
  30. package/dist/analysis/ai-detection/core/AIDetectionEngine.d.ts +0 -104
  31. package/dist/analysis/ai-detection/core/AIDetectionEngine.js +0 -369
  32. package/dist/analysis/ai-detection/core/AIDetectionEngine.js.map +0 -1
  33. package/dist/analysis/ai-detection/types/DetectionTypes.d.ts +0 -364
  34. package/dist/analysis/ai-detection/types/DetectionTypes.js +0 -32
  35. package/dist/analysis/ai-detection/types/DetectionTypes.js.map +0 -1
  36. package/dist/analysis/ai-detection/utils/SubmissionConverter.d.ts +0 -97
  37. package/dist/analysis/ai-detection/utils/SubmissionConverter.js +0 -339
  38. package/dist/analysis/ai-detection/utils/SubmissionConverter.js.map +0 -1
  39. package/dist/analysis/context/ReviewContext.d.ts +0 -184
  40. package/dist/analysis/context/ReviewContext.js +0 -294
  41. package/dist/analysis/context/ReviewContext.js.map +0 -1
  42. package/dist/analysis/context/index.d.ts +0 -6
  43. package/dist/analysis/context/index.js +0 -23
  44. package/dist/analysis/context/index.js.map +0 -1
  45. package/dist/analysis/index.d.ts +0 -7
  46. package/dist/analysis/index.js +0 -24
  47. package/dist/analysis/index.js.map +0 -1
  48. package/dist/analysis/tokens/TokenAnalysisFormatter.d.ts +0 -27
  49. package/dist/analysis/tokens/TokenAnalysisFormatter.js +0 -143
  50. package/dist/analysis/tokens/TokenAnalysisFormatter.js.map +0 -1
  51. package/dist/analysis/tokens/TokenAnalyzer.d.ts +0 -155
  52. package/dist/analysis/tokens/TokenAnalyzer.js +0 -502
  53. package/dist/analysis/tokens/TokenAnalyzer.js.map +0 -1
  54. package/dist/analysis/tokens/index.d.ts +0 -7
  55. package/dist/analysis/tokens/index.js +0 -24
  56. package/dist/analysis/tokens/index.js.map +0 -1
  57. package/dist/clients/base/abstractClient.d.ts +0 -99
  58. package/dist/clients/base/abstractClient.js +0 -98
  59. package/dist/clients/base/abstractClient.js.map +0 -1
  60. package/dist/clients/base/httpClient.d.ts +0 -24
  61. package/dist/clients/base/httpClient.js +0 -147
  62. package/dist/clients/base/httpClient.js.map +0 -1
  63. package/dist/clients/base/index.d.ts +0 -11
  64. package/dist/clients/base/index.js +0 -28
  65. package/dist/clients/base/index.js.map +0 -1
  66. package/dist/clients/base/modelDetection.d.ts +0 -41
  67. package/dist/clients/base/modelDetection.js +0 -88
  68. package/dist/clients/base/modelDetection.js.map +0 -1
  69. package/dist/clients/base/responseProcessor.d.ts +0 -45
  70. package/dist/clients/base/responseProcessor.js +0 -495
  71. package/dist/clients/base/responseProcessor.js.map +0 -1
  72. package/dist/clients/factory/clientFactory.d.ts +0 -23
  73. package/dist/clients/factory/clientFactory.js +0 -50
  74. package/dist/clients/factory/clientFactory.js.map +0 -1
  75. package/dist/clients/factory/index.d.ts +0 -7
  76. package/dist/clients/factory/index.js +0 -24
  77. package/dist/clients/factory/index.js.map +0 -1
  78. package/dist/clients/implementations/index.d.ts +0 -7
  79. package/dist/clients/implementations/index.js +0 -24
  80. package/dist/clients/implementations/index.js.map +0 -1
  81. package/dist/clients/implementations/openRouterClient.d.ts +0 -69
  82. package/dist/clients/implementations/openRouterClient.js +0 -294
  83. package/dist/clients/implementations/openRouterClient.js.map +0 -1
  84. package/dist/clients/openRouterClient.d.ts +0 -42
  85. package/dist/clients/openRouterClient.js +0 -738
  86. package/dist/clients/openRouterClient.js.map +0 -1
  87. package/dist/clients/openRouterClientWrapper.d.ts +0 -22
  88. package/dist/clients/openRouterClientWrapper.js +0 -64
  89. package/dist/clients/openRouterClientWrapper.js.map +0 -1
  90. package/dist/clients/utils/directoryStructure.d.ts +0 -14
  91. package/dist/clients/utils/directoryStructure.js +0 -48
  92. package/dist/clients/utils/directoryStructure.js.map +0 -1
  93. package/dist/clients/utils/index.d.ts +0 -10
  94. package/dist/clients/utils/index.js +0 -31
  95. package/dist/clients/utils/index.js.map +0 -1
  96. package/dist/clients/utils/languageDetection.d.ts +0 -13
  97. package/dist/clients/utils/languageDetection.js +0 -46
  98. package/dist/clients/utils/languageDetection.js.map +0 -1
  99. package/dist/clients/utils/promptFormatter.d.ts +0 -36
  100. package/dist/clients/utils/promptFormatter.js +0 -92
  101. package/dist/clients/utils/promptFormatter.js.map +0 -1
  102. package/dist/clients/utils/promptLoader.d.ts +0 -27
  103. package/dist/clients/utils/promptLoader.js +0 -49
  104. package/dist/clients/utils/promptLoader.js.map +0 -1
  105. package/dist/clients/utils/tokenCounter.d.ts +0 -81
  106. package/dist/clients/utils/tokenCounter.js +0 -209
  107. package/dist/clients/utils/tokenCounter.js.map +0 -1
  108. package/dist/core/ApiClientSelector.d.ts +0 -8
  109. package/dist/core/ApiClientSelector.js +0 -29
  110. package/dist/core/ApiClientSelector.js.map +0 -1
  111. package/dist/core/ConfigurationService.d.ts +0 -286
  112. package/dist/core/ConfigurationService.js +0 -477
  113. package/dist/core/ConfigurationService.js.map +0 -1
  114. package/dist/core/ConsolidationService.d.ts +0 -99
  115. package/dist/core/ConsolidationService.js +0 -341
  116. package/dist/core/ConsolidationService.js.map +0 -1
  117. package/dist/core/InteractiveDisplayManager.d.ts +0 -22
  118. package/dist/core/InteractiveDisplayManager.js +0 -70
  119. package/dist/core/InteractiveDisplayManager.js.map +0 -1
  120. package/dist/core/OutputManager.d.ts +0 -26
  121. package/dist/core/OutputManager.js +0 -217
  122. package/dist/core/OutputManager.js.map +0 -1
  123. package/dist/core/ReviewGenerator.d.ts +0 -13
  124. package/dist/core/ReviewGenerator.js +0 -102
  125. package/dist/core/ReviewGenerator.js.map +0 -1
  126. package/dist/core/fileDiscovery.d.ts +0 -35
  127. package/dist/core/fileDiscovery.js +0 -202
  128. package/dist/core/fileDiscovery.js.map +0 -1
  129. package/dist/core/handlers/EstimationHandler.d.ts +0 -18
  130. package/dist/core/handlers/EstimationHandler.js +0 -110
  131. package/dist/core/handlers/EstimationHandler.js.map +0 -1
  132. package/dist/core/handlers/FileProcessingHandler.d.ts +0 -31
  133. package/dist/core/handlers/FileProcessingHandler.js +0 -159
  134. package/dist/core/handlers/FileProcessingHandler.js.map +0 -1
  135. package/dist/core/handlers/OutputHandler.d.ts +0 -27
  136. package/dist/core/handlers/OutputHandler.js +0 -127
  137. package/dist/core/handlers/OutputHandler.js.map +0 -1
  138. package/dist/core/handlers/ReviewExecutor.d.ts +0 -32
  139. package/dist/core/handlers/ReviewExecutor.js +0 -111
  140. package/dist/core/handlers/ReviewExecutor.js.map +0 -1
  141. package/dist/core/reviewOrchestrator.d.ts +0 -24
  142. package/dist/core/reviewOrchestrator.js +0 -294
  143. package/dist/core/reviewOrchestrator.js.map +0 -1
  144. package/dist/core/utils/ModelInfoUtils.d.ts +0 -16
  145. package/dist/core/utils/ModelInfoUtils.js +0 -54
  146. package/dist/core/utils/ModelInfoUtils.js.map +0 -1
  147. package/dist/formatters/outputFormatter.d.ts +0 -31
  148. package/dist/formatters/outputFormatter.js +0 -65
  149. package/dist/formatters/outputFormatter.js.map +0 -1
  150. package/dist/formatters/utils/IssueFormatters.d.ts +0 -20
  151. package/dist/formatters/utils/IssueFormatters.js +0 -67
  152. package/dist/formatters/utils/IssueFormatters.js.map +0 -1
  153. package/dist/formatters/utils/JsonFormatter.d.ts +0 -13
  154. package/dist/formatters/utils/JsonFormatter.js +0 -57
  155. package/dist/formatters/utils/JsonFormatter.js.map +0 -1
  156. package/dist/formatters/utils/MarkdownFormatters.d.ts +0 -51
  157. package/dist/formatters/utils/MarkdownFormatters.js +0 -456
  158. package/dist/formatters/utils/MarkdownFormatters.js.map +0 -1
  159. package/dist/formatters/utils/MetadataFormatter.d.ts +0 -65
  160. package/dist/formatters/utils/MetadataFormatter.js +0 -219
  161. package/dist/formatters/utils/MetadataFormatter.js.map +0 -1
  162. package/dist/formatters/utils/ModelInfoExtractor.d.ts +0 -33
  163. package/dist/formatters/utils/ModelInfoExtractor.js +0 -111
  164. package/dist/formatters/utils/ModelInfoExtractor.js.map +0 -1
  165. package/dist/index.d.ts +0 -2
  166. package/dist/index.js.map +0 -1
  167. package/dist/plugins/PluginInterface.d.ts +0 -44
  168. package/dist/plugins/PluginInterface.js +0 -9
  169. package/dist/plugins/PluginInterface.js.map +0 -1
  170. package/dist/plugins/PluginManager.d.ts +0 -51
  171. package/dist/plugins/PluginManager.js +0 -151
  172. package/dist/plugins/PluginManager.js.map +0 -1
  173. package/dist/prompts/PromptManager.d.ts +0 -30
  174. package/dist/prompts/PromptManager.js +0 -62
  175. package/dist/prompts/PromptManager.js.map +0 -1
  176. package/dist/prompts/cache/PromptCache.d.ts +0 -32
  177. package/dist/prompts/cache/PromptCache.js +0 -48
  178. package/dist/prompts/cache/PromptCache.js.map +0 -1
  179. package/dist/runtime/auth/service.d.ts +0 -2
  180. package/dist/runtime/auth/service.js +0 -41
  181. package/dist/runtime/auth/service.js.map +0 -1
  182. package/dist/runtime/auth/session.d.ts +0 -5
  183. package/dist/runtime/auth/session.js +0 -87
  184. package/dist/runtime/auth/session.js.map +0 -1
  185. package/dist/runtime/auth/types.d.ts +0 -9
  186. package/dist/runtime/auth/types.js +0 -3
  187. package/dist/runtime/auth/types.js.map +0 -1
  188. package/dist/runtime/cliEntry.d.ts +0 -1
  189. package/dist/runtime/cliEntry.js +0 -213
  190. package/dist/runtime/cliEntry.js.map +0 -1
  191. package/dist/runtime/debug/logManager.d.ts +0 -5
  192. package/dist/runtime/debug/logManager.js +0 -31
  193. package/dist/runtime/debug/logManager.js.map +0 -1
  194. package/dist/runtime/errors.d.ts +0 -5
  195. package/dist/runtime/errors.js +0 -15
  196. package/dist/runtime/errors.js.map +0 -1
  197. package/dist/runtime/fileCollector.d.ts +0 -5
  198. package/dist/runtime/fileCollector.js +0 -167
  199. package/dist/runtime/fileCollector.js.map +0 -1
  200. package/dist/runtime/manifest.d.ts +0 -1
  201. package/dist/runtime/manifest.js +0 -65
  202. package/dist/runtime/manifest.js.map +0 -1
  203. package/dist/runtime/openrouterProxy.d.ts +0 -4
  204. package/dist/runtime/openrouterProxy.js +0 -43
  205. package/dist/runtime/openrouterProxy.js.map +0 -1
  206. package/dist/runtime/preprod/webCheck.d.ts +0 -1
  207. package/dist/runtime/preprod/webCheck.js +0 -98
  208. package/dist/runtime/preprod/webCheck.js.map +0 -1
  209. package/dist/runtime/proxyConfig.d.ts +0 -6
  210. package/dist/runtime/proxyConfig.js +0 -86
  211. package/dist/runtime/proxyConfig.js.map +0 -1
  212. package/dist/runtime/proxyEnvironment.d.ts +0 -3
  213. package/dist/runtime/proxyEnvironment.js +0 -63
  214. package/dist/runtime/proxyEnvironment.js.map +0 -1
  215. package/dist/runtime/reportMerge.d.ts +0 -30
  216. package/dist/runtime/reportMerge.js +0 -70
  217. package/dist/runtime/reportMerge.js.map +0 -1
  218. package/dist/runtime/reporting/markdownReportBuilder.d.ts +0 -15
  219. package/dist/runtime/reporting/markdownReportBuilder.js +0 -97
  220. package/dist/runtime/reporting/markdownReportBuilder.js.map +0 -1
  221. package/dist/runtime/reporting/reportDataCollector.d.ts +0 -31
  222. package/dist/runtime/reporting/reportDataCollector.js +0 -170
  223. package/dist/runtime/reporting/reportDataCollector.js.map +0 -1
  224. package/dist/runtime/reporting/summaryGenerator.d.ts +0 -10
  225. package/dist/runtime/reporting/summaryGenerator.js +0 -67
  226. package/dist/runtime/reporting/summaryGenerator.js.map +0 -1
  227. package/dist/runtime/reviewPipeline.d.ts +0 -28
  228. package/dist/runtime/reviewPipeline.js +0 -122
  229. package/dist/runtime/reviewPipeline.js.map +0 -1
  230. package/dist/runtime/runAiCodeReview.d.ts +0 -10
  231. package/dist/runtime/runAiCodeReview.js +0 -138
  232. package/dist/runtime/runAiCodeReview.js.map +0 -1
  233. package/dist/runtime/runtimeConfig.d.ts +0 -4
  234. package/dist/runtime/runtimeConfig.js +0 -7
  235. package/dist/runtime/runtimeConfig.js.map +0 -1
  236. package/dist/runtime/ui/Layout.d.ts +0 -11
  237. package/dist/runtime/ui/Layout.js +0 -47
  238. package/dist/runtime/ui/Layout.js.map +0 -1
  239. package/dist/runtime/ui/RuntimeApp.d.ts +0 -6
  240. package/dist/runtime/ui/RuntimeApp.js +0 -161
  241. package/dist/runtime/ui/RuntimeApp.js.map +0 -1
  242. package/dist/runtime/ui/inkModules.d.ts +0 -10
  243. package/dist/runtime/ui/inkModules.js +0 -63
  244. package/dist/runtime/ui/inkModules.js.map +0 -1
  245. package/dist/runtime/ui/screens/AuthScreen.d.ts +0 -6
  246. package/dist/runtime/ui/screens/AuthScreen.js +0 -67
  247. package/dist/runtime/ui/screens/AuthScreen.js.map +0 -1
  248. package/dist/runtime/ui/screens/ModeSelection.d.ts +0 -10
  249. package/dist/runtime/ui/screens/ModeSelection.js +0 -100
  250. package/dist/runtime/ui/screens/ModeSelection.js.map +0 -1
  251. package/dist/runtime/ui/screens/ProgressScreen.d.ts +0 -7
  252. package/dist/runtime/ui/screens/ProgressScreen.js +0 -38
  253. package/dist/runtime/ui/screens/ProgressScreen.js.map +0 -1
  254. package/dist/runtime/ui/screens/ResultsScreen.d.ts +0 -7
  255. package/dist/runtime/ui/screens/ResultsScreen.js +0 -22
  256. package/dist/runtime/ui/screens/ResultsScreen.js.map +0 -1
  257. package/dist/strategies/ArchitecturalReviewStrategy.d.ts +0 -29
  258. package/dist/strategies/ArchitecturalReviewStrategy.js +0 -42
  259. package/dist/strategies/ArchitecturalReviewStrategy.js.map +0 -1
  260. package/dist/strategies/CodingTestReviewStrategy.d.ts +0 -194
  261. package/dist/strategies/CodingTestReviewStrategy.js +0 -681
  262. package/dist/strategies/CodingTestReviewStrategy.js.map +0 -1
  263. package/dist/strategies/ConsolidatedReviewStrategy.d.ts +0 -25
  264. package/dist/strategies/ConsolidatedReviewStrategy.js +0 -45
  265. package/dist/strategies/ConsolidatedReviewStrategy.js.map +0 -1
  266. package/dist/strategies/ExtractPatternsReviewStrategy.d.ts +0 -30
  267. package/dist/strategies/ExtractPatternsReviewStrategy.js +0 -51
  268. package/dist/strategies/ExtractPatternsReviewStrategy.js.map +0 -1
  269. package/dist/strategies/MultiPassReviewStrategy.d.ts +0 -86
  270. package/dist/strategies/MultiPassReviewStrategy.js +0 -590
  271. package/dist/strategies/MultiPassReviewStrategy.js.map +0 -1
  272. package/dist/strategies/ReviewStrategy.d.ts +0 -45
  273. package/dist/strategies/ReviewStrategy.js +0 -24
  274. package/dist/strategies/ReviewStrategy.js.map +0 -1
  275. package/dist/strategies/StrategyFactory.d.ts +0 -19
  276. package/dist/strategies/StrategyFactory.js +0 -72
  277. package/dist/strategies/StrategyFactory.js.map +0 -1
  278. package/dist/strategies/index.d.ts +0 -13
  279. package/dist/strategies/index.js +0 -30
  280. package/dist/strategies/index.js.map +0 -1
  281. package/dist/tokenizers/baseTokenizer.d.ts +0 -25
  282. package/dist/tokenizers/baseTokenizer.js +0 -48
  283. package/dist/tokenizers/baseTokenizer.js.map +0 -1
  284. package/dist/tokenizers/gptTokenizer.d.ts +0 -7
  285. package/dist/tokenizers/gptTokenizer.js +0 -28
  286. package/dist/tokenizers/gptTokenizer.js.map +0 -1
  287. package/dist/tokenizers/index.d.ts +0 -7
  288. package/dist/tokenizers/index.js +0 -24
  289. package/dist/tokenizers/index.js.map +0 -1
  290. package/dist/types/apiResponses.d.ts +0 -39
  291. package/dist/types/apiResponses.js +0 -9
  292. package/dist/types/apiResponses.js.map +0 -1
  293. package/dist/types/cli.d.ts +0 -22
  294. package/dist/types/cli.js +0 -3
  295. package/dist/types/cli.js.map +0 -1
  296. package/dist/types/common.d.ts +0 -22
  297. package/dist/types/common.js +0 -14
  298. package/dist/types/common.js.map +0 -1
  299. package/dist/types/configuration.d.ts +0 -682
  300. package/dist/types/configuration.js +0 -65
  301. package/dist/types/configuration.js.map +0 -1
  302. package/dist/types/review.d.ts +0 -258
  303. package/dist/types/review.js +0 -8
  304. package/dist/types/review.js.map +0 -1
  305. package/dist/types/reviewSchema.d.ts +0 -543
  306. package/dist/types/reviewSchema.js +0 -121
  307. package/dist/types/reviewSchema.js.map +0 -1
  308. package/dist/types/structuredReview.d.ts +0 -119
  309. package/dist/types/structuredReview.js +0 -6
  310. package/dist/types/structuredReview.js.map +0 -1
  311. package/dist/types/tokenAnalysis.d.ts +0 -44
  312. package/dist/types/tokenAnalysis.js +0 -4
  313. package/dist/types/tokenAnalysis.js.map +0 -1
  314. package/dist/utils/FileReader.d.ts +0 -33
  315. package/dist/utils/FileReader.js +0 -88
  316. package/dist/utils/FileReader.js.map +0 -1
  317. package/dist/utils/FileWriter.d.ts +0 -26
  318. package/dist/utils/FileWriter.js +0 -76
  319. package/dist/utils/FileWriter.js.map +0 -1
  320. package/dist/utils/PathGenerator.d.ts +0 -30
  321. package/dist/utils/PathGenerator.js +0 -82
  322. package/dist/utils/PathGenerator.js.map +0 -1
  323. package/dist/utils/api/apiUtils.d.ts +0 -3
  324. package/dist/utils/api/apiUtils.js +0 -20
  325. package/dist/utils/api/apiUtils.js.map +0 -1
  326. package/dist/utils/api/index.d.ts +0 -1
  327. package/dist/utils/api/index.js +0 -18
  328. package/dist/utils/api/index.js.map +0 -1
  329. package/dist/utils/apiErrorHandler.d.ts +0 -130
  330. package/dist/utils/apiErrorHandler.js +0 -256
  331. package/dist/utils/apiErrorHandler.js.map +0 -1
  332. package/dist/utils/ciDataCollector.d.ts +0 -51
  333. package/dist/utils/ciDataCollector.js +0 -197
  334. package/dist/utils/ciDataCollector.js.map +0 -1
  335. package/dist/utils/codingTestConfigLoader.d.ts +0 -66
  336. package/dist/utils/codingTestConfigLoader.js +0 -420
  337. package/dist/utils/codingTestConfigLoader.js.map +0 -1
  338. package/dist/utils/dependencies/aiDependencyAnalyzer.d.ts +0 -30
  339. package/dist/utils/dependencies/aiDependencyAnalyzer.js +0 -343
  340. package/dist/utils/dependencies/aiDependencyAnalyzer.js.map +0 -1
  341. package/dist/utils/detection/frameworkDetector.d.ts +0 -43
  342. package/dist/utils/detection/frameworkDetector.js +0 -795
  343. package/dist/utils/detection/frameworkDetector.js.map +0 -1
  344. package/dist/utils/detection/index.d.ts +0 -9
  345. package/dist/utils/detection/index.js +0 -28
  346. package/dist/utils/detection/index.js.map +0 -1
  347. package/dist/utils/detection/projectTypeDetector.d.ts +0 -27
  348. package/dist/utils/detection/projectTypeDetector.js +0 -469
  349. package/dist/utils/detection/projectTypeDetector.js.map +0 -1
  350. package/dist/utils/diagramGenerator.d.ts +0 -49
  351. package/dist/utils/diagramGenerator.js +0 -218
  352. package/dist/utils/diagramGenerator.js.map +0 -1
  353. package/dist/utils/errorLogger.d.ts +0 -24
  354. package/dist/utils/errorLogger.js +0 -59
  355. package/dist/utils/errorLogger.js.map +0 -1
  356. package/dist/utils/estimationUtils.d.ts +0 -139
  357. package/dist/utils/estimationUtils.js +0 -329
  358. package/dist/utils/estimationUtils.js.map +0 -1
  359. package/dist/utils/fileFilters.d.ts +0 -72
  360. package/dist/utils/fileFilters.js +0 -338
  361. package/dist/utils/fileFilters.js.map +0 -1
  362. package/dist/utils/fileSystem.d.ts +0 -22
  363. package/dist/utils/fileSystem.js +0 -45
  364. package/dist/utils/fileSystem.js.map +0 -1
  365. package/dist/utils/index.d.ts +0 -22
  366. package/dist/utils/index.js +0 -52
  367. package/dist/utils/index.js.map +0 -1
  368. package/dist/utils/logger.d.ts +0 -77
  369. package/dist/utils/logger.js +0 -271
  370. package/dist/utils/logger.js.map +0 -1
  371. package/dist/utils/pathValidator.d.ts +0 -40
  372. package/dist/utils/pathValidator.js +0 -98
  373. package/dist/utils/pathValidator.js.map +0 -1
  374. package/dist/utils/priorityFilter.d.ts +0 -34
  375. package/dist/utils/priorityFilter.js +0 -54
  376. package/dist/utils/priorityFilter.js.map +0 -1
  377. package/dist/utils/projectDocs.d.ts +0 -47
  378. package/dist/utils/projectDocs.js +0 -158
  379. package/dist/utils/projectDocs.js.map +0 -1
  380. package/dist/utils/promptPaths.d.ts +0 -6
  381. package/dist/utils/promptPaths.js +0 -33
  382. package/dist/utils/promptPaths.js.map +0 -1
  383. package/dist/utils/promptTemplateManager.d.ts +0 -34
  384. package/dist/utils/promptTemplateManager.js +0 -140
  385. package/dist/utils/promptTemplateManager.js.map +0 -1
  386. package/dist/utils/review/consolidateReview.d.ts +0 -15
  387. package/dist/utils/review/consolidateReview.js +0 -481
  388. package/dist/utils/review/consolidateReview.js.map +0 -1
  389. package/dist/utils/review/fixDisplay.d.ts +0 -20
  390. package/dist/utils/review/fixDisplay.js +0 -84
  391. package/dist/utils/review/fixDisplay.js.map +0 -1
  392. package/dist/utils/review/fixImplementation.d.ts +0 -28
  393. package/dist/utils/review/fixImplementation.js +0 -60
  394. package/dist/utils/review/fixImplementation.js.map +0 -1
  395. package/dist/utils/review/index.d.ts +0 -13
  396. package/dist/utils/review/index.js +0 -50
  397. package/dist/utils/review/index.js.map +0 -1
  398. package/dist/utils/review/interactiveProcessing.d.ts +0 -25
  399. package/dist/utils/review/interactiveProcessing.js +0 -251
  400. package/dist/utils/review/interactiveProcessing.js.map +0 -1
  401. package/dist/utils/review/progressTracker.d.ts +0 -106
  402. package/dist/utils/review/progressTracker.js +0 -227
  403. package/dist/utils/review/progressTracker.js.map +0 -1
  404. package/dist/utils/review/reviewExtraction.d.ts +0 -31
  405. package/dist/utils/review/reviewExtraction.js +0 -324
  406. package/dist/utils/review/reviewExtraction.js.map +0 -1
  407. package/dist/utils/review/types.d.ts +0 -45
  408. package/dist/utils/review/types.js +0 -18
  409. package/dist/utils/review/types.js.map +0 -1
  410. package/dist/utils/reviewActionHandler.d.ts +0 -16
  411. package/dist/utils/reviewActionHandler.js +0 -34
  412. package/dist/utils/reviewActionHandler.js.map +0 -1
  413. package/dist/utils/reviewParser.d.ts +0 -34
  414. package/dist/utils/reviewParser.js +0 -218
  415. package/dist/utils/reviewParser.js.map +0 -1
  416. package/dist/utils/sanitizer.d.ts +0 -82
  417. package/dist/utils/sanitizer.js +0 -239
  418. package/dist/utils/sanitizer.js.map +0 -1
  419. package/dist/utils/smartFileSelector.d.ts +0 -50
  420. package/dist/utils/smartFileSelector.js +0 -261
  421. package/dist/utils/smartFileSelector.js.map +0 -1
  422. package/dist/utils/templateLoader.d.ts +0 -44
  423. package/dist/utils/templateLoader.js +0 -431
  424. package/dist/utils/templateLoader.js.map +0 -1
  425. package/dist/utils/treeGenerator.d.ts +0 -12
  426. package/dist/utils/treeGenerator.js +0 -133
  427. package/dist/utils/treeGenerator.js.map +0 -1
@@ -1,481 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview Utility for consolidating multi-pass reviews into a single coherent review.
4
- *
5
- * This module provides a dedicated function to consolidate multiple review passes
6
- * into a single, comprehensive review by sending the review content to the same AI model
7
- * that was used for the original review, ensuring consistency in analysis and tone.
8
- */
9
- var __importDefault = (this && this.__importDefault) || function (mod) {
10
- return (mod && mod.__esModule) ? mod : { "default": mod };
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.consolidateReview = consolidateReview;
14
- const clientFactory_1 = require("../../clients/factory/clientFactory");
15
- const ConfigurationService_1 = require("../../core/ConfigurationService");
16
- const logger_1 = __importDefault(require("../logger"));
17
- /**
18
- * Consolidates a multi-pass review into a single coherent review using the
19
- * configured client and model from environment/arguments
20
- * @param review The multi-pass review content to consolidate
21
- * @returns Promise resolving to the consolidated review content
22
- */
23
- async function consolidateReview(review) {
24
- try {
25
- logger_1.default.debug('[CONSOLIDATION] Starting consolidation with:', {
26
- hasContent: !!review.content,
27
- contentLength: review.content?.length || 0,
28
- projectName: review.projectName,
29
- modelUsed: review.modelUsed,
30
- reviewType: review.reviewType,
31
- firstChars: review.content?.substring(0, 200) || 'N/A',
32
- });
33
- // Use the writer model if configured, otherwise fall back to the model used for the review
34
- // This ensures consistency - the same model that reviewed the code should consolidate it
35
- const config = (0, ConfigurationService_1.getConfig)();
36
- const consolidationModel = config.writerModel || review.modelUsed || config.model;
37
- logger_1.default.info(`[CONSOLIDATION] Determining consolidation model:`);
38
- logger_1.default.info(`[CONSOLIDATION] - config.writerModel: ${config.writerModel || 'not set'}`);
39
- logger_1.default.info(`[CONSOLIDATION] - review.modelUsed: ${review.modelUsed || 'not set'}`);
40
- logger_1.default.info(`[CONSOLIDATION] - config.model: ${config.model || 'not set'}`);
41
- logger_1.default.info(`[CONSOLIDATION] - Final consolidationModel: ${consolidationModel}`);
42
- // Temporarily override the model environment variable for client initialization
43
- const originalModel = process.env.AI_CODE_REVIEW_MODEL;
44
- logger_1.default.debug('[CONSOLIDATION] Original model:', originalModel || 'not set');
45
- logger_1.default.debug('[CONSOLIDATION] Consolidation model:', consolidationModel);
46
- process.env.AI_CODE_REVIEW_MODEL = consolidationModel;
47
- try {
48
- // Create and initialize the client with the consolidation model
49
- const client = clientFactory_1.ClientFactory.createClient(consolidationModel);
50
- logger_1.default.debug('[CONSOLIDATION] Created client:', {
51
- clientType: client.constructor.name,
52
- model: consolidationModel,
53
- isInitialized: client.getIsInitialized ? client.getIsInitialized() : 'unknown',
54
- });
55
- try {
56
- await client.initialize();
57
- logger_1.default.debug('[CONSOLIDATION] Client initialized successfully');
58
- }
59
- catch (initError) {
60
- logger_1.default.error('[CONSOLIDATION] Failed to initialize client:', initError);
61
- throw new Error(`Failed to initialize ${consolidationModel} client for consolidation: ${initError instanceof Error ? initError.message : String(initError)}`);
62
- }
63
- // Extract provider from the configured model
64
- // const [_provider] = consolidationModel.split(':'); // Not used in this implementation
65
- // Create a consolidated prompt that includes the multi-pass results
66
- const consolidationSystemPrompt = getConsolidationSystemPrompt();
67
- const consolidationPrompt = getConsolidationPrompt(review);
68
- logger_1.default.debug('[CONSOLIDATION] Prompts created:', {
69
- systemPromptLength: consolidationSystemPrompt.length,
70
- userPromptLength: consolidationPrompt.length,
71
- });
72
- logger_1.default.info(`Consolidating multi-pass review with ${consolidationModel}...`);
73
- logger_1.default.debug('[CONSOLIDATION] Sending to generateConsolidatedReview with:', {
74
- filesCount: 1,
75
- fileName: 'MULTI_PASS_REVIEW.md',
76
- contentLength: review.content?.length || 0,
77
- projectName: review.projectName || 'cr-aia',
78
- reviewType: review.reviewType,
79
- options: {
80
- type: review.reviewType,
81
- includeTests: false,
82
- output: 'markdown',
83
- isConsolidation: true,
84
- consolidationMode: true,
85
- skipFileContent: false,
86
- interactive: false,
87
- },
88
- });
89
- // Create a combined prompt for providers that don't support separate system/user prompts
90
- const fullConsolidationPrompt = `${consolidationSystemPrompt}
91
-
92
- ---
93
-
94
- ${consolidationPrompt}`;
95
- // Make a direct API call with our custom prompts for consolidation
96
- // This is necessary because the standard generateConsolidatedReview doesn't support custom prompts
97
- const [provider, modelName] = consolidationModel.split(':');
98
- if (provider === 'openrouter') {
99
- // For OpenRouter, we need to handle it specially since it can use various underlying models
100
- logger_1.default.info(`Using OpenRouter for consolidation with model: ${modelName}`);
101
- // OpenRouter client should handle generateReview properly
102
- if (client.generateReview) {
103
- logger_1.default.debug('[CONSOLIDATION] Using OpenRouter generateReview method');
104
- let consolidationResult;
105
- let retryCount = 0;
106
- const maxRetries = 3;
107
- while (retryCount < maxRetries) {
108
- try {
109
- // Instead of passing the consolidation prompt as file content,
110
- // pass an empty string and include the consolidation prompt in project docs
111
- consolidationResult = await client.generateReview('', // Empty file content since we're not reviewing a specific file
112
- 'CONSOLIDATION_TASK', 'consolidated', // Use 'consolidated' review type for proper markdown output
113
- {
114
- // Pass the consolidation prompt as project documentation
115
- readme: fullConsolidationPrompt,
116
- contributing: '',
117
- architecture: '',
118
- project: '',
119
- progress: '',
120
- }, // Include consolidation prompt as project docs
121
- {
122
- type: 'consolidated', // Use 'consolidated' review type for markdown output
123
- skipFileContent: true,
124
- isConsolidation: true,
125
- includeTests: false,
126
- output: 'markdown',
127
- interactive: false,
128
- });
129
- if (consolidationResult?.content && consolidationResult.content.trim() !== '') {
130
- return consolidationResult.content;
131
- }
132
- logger_1.default.warn(`[CONSOLIDATION] OpenRouter attempt ${retryCount + 1} returned empty content`);
133
- }
134
- catch (error) {
135
- logger_1.default.warn(`[CONSOLIDATION] OpenRouter attempt ${retryCount + 1} failed:`, error);
136
- }
137
- retryCount++;
138
- if (retryCount < maxRetries) {
139
- const waitTime = Math.min(1000 * 2 ** retryCount, 5000);
140
- logger_1.default.info(`[CONSOLIDATION] Waiting ${waitTime}ms before retry ${retryCount + 1}/${maxRetries}`);
141
- await new Promise((resolve) => setTimeout(resolve, waitTime));
142
- }
143
- }
144
- logger_1.default.error('[CONSOLIDATION] All OpenRouter attempts failed, using fallback');
145
- return createFallbackConsolidation(review);
146
- }
147
- }
148
- // For any unexpected providers, attempt a generic consolidation path
149
- logger_1.default.info(`Using custom consolidation approach for ${provider} provider`);
150
- if (client.generateReview) {
151
- logger_1.default.debug('[CONSOLIDATION] Using generateReview method with custom consolidation prompt');
152
- let consolidationResult;
153
- let retryCount = 0;
154
- const maxRetries = 3;
155
- while (retryCount < maxRetries) {
156
- try {
157
- // Instead of passing the consolidation prompt as file content,
158
- // pass an empty string and include the consolidation prompt in project docs
159
- consolidationResult = await client.generateReview('', // Empty file content since we're not reviewing a specific file
160
- 'CONSOLIDATION_TASK', // Special file path to indicate this is a consolidation
161
- 'consolidated', // Use 'consolidated' review type for proper markdown output
162
- {
163
- // Pass the consolidation prompt as project documentation
164
- readme: fullConsolidationPrompt,
165
- contributing: '',
166
- architecture: '',
167
- project: '',
168
- progress: '',
169
- }, // Include consolidation prompt as project docs
170
- {
171
- type: 'consolidated', // Use 'consolidated' review type for markdown output
172
- skipFileContent: true, // Don't try to include file content in the prompt
173
- isConsolidation: true,
174
- includeTests: false,
175
- output: 'markdown',
176
- interactive: false,
177
- });
178
- // Validate the response
179
- if (consolidationResult?.content && consolidationResult.content.trim() !== '') {
180
- return consolidationResult.content;
181
- }
182
- logger_1.default.warn(`[CONSOLIDATION] Attempt ${retryCount + 1} returned empty content, retrying...`);
183
- }
184
- catch (retryError) {
185
- logger_1.default.warn(`[CONSOLIDATION] Attempt ${retryCount + 1} failed:`, retryError);
186
- }
187
- retryCount++;
188
- if (retryCount < maxRetries) {
189
- // Wait before retrying (exponential backoff)
190
- const waitTime = Math.min(1000 * 2 ** retryCount, 5000);
191
- logger_1.default.info(`[CONSOLIDATION] Waiting ${waitTime}ms before retry ${retryCount + 1}/${maxRetries}`);
192
- await new Promise((resolve) => setTimeout(resolve, waitTime));
193
- }
194
- }
195
- logger_1.default.error(`[CONSOLIDATION] All ${maxRetries} attempts failed, using fallback`);
196
- return createFallbackConsolidation(review);
197
- }
198
- // If generateReview is not available, try a direct API approach
199
- logger_1.default.warn(`Provider ${provider} does not support generateReview method, attempting direct API call`);
200
- // For now, fall back to the problematic approach with a warning
201
- // TODO: Implement direct API calls for other providers
202
- const consolidationResult = await client.generateConsolidatedReview([
203
- {
204
- path: 'CONSOLIDATION_REQUEST.md',
205
- relativePath: 'CONSOLIDATION_REQUEST.md',
206
- content: fullConsolidationPrompt,
207
- },
208
- ], review.projectName || 'cr-aia', 'consolidated', // Use 'consolidated' review type for proper markdown output
209
- null, {
210
- type: 'consolidated', // Use 'consolidated' review type for markdown output
211
- includeTests: false,
212
- output: 'markdown',
213
- isConsolidation: true,
214
- skipFileContent: true,
215
- interactive: false,
216
- });
217
- return consolidationResult?.content || createFallbackConsolidation(review);
218
- }
219
- finally {
220
- // Restore the original model environment variable
221
- if (originalModel !== undefined) {
222
- process.env.AI_CODE_REVIEW_MODEL = originalModel;
223
- }
224
- else {
225
- delete process.env.AI_CODE_REVIEW_MODEL;
226
- }
227
- }
228
- }
229
- catch (error) {
230
- logger_1.default.error(`[CONSOLIDATION] Error consolidating review: ${error instanceof Error ? error.message : String(error)}`);
231
- logger_1.default.debug('[CONSOLIDATION] Error details:', {
232
- errorType: error?.constructor?.name,
233
- stack: error instanceof Error ? error.stack?.split('\n').slice(0, 5) : undefined,
234
- });
235
- logger_1.default.warn('[CONSOLIDATION] Falling back to automatic consolidation without AI');
236
- return createFallbackConsolidation(review);
237
- }
238
- }
239
- /**
240
- * Creates a system prompt for review consolidation
241
- * @returns The system prompt
242
- */
243
- function getConsolidationSystemPrompt() {
244
- return `You are an expert code reviewer tasked with creating a consolidated final report from a multi-pass review.
245
-
246
- The review was conducted in multiple passes due to the large size of the codebase. You will receive the complete multi-pass review content and need to:
247
-
248
- 1. Extract and deduplicate all findings across all passes
249
- 2. Organize findings by priority (High/Critical, Medium/Important, Low/Minor)
250
- 3. Create a coherent executive summary
251
- 4. Provide overall grading and recommendations
252
-
253
- The input contains multiple review passes in the format "## Pass X: Review of Y Files" followed by the review content for that pass.
254
-
255
- Your task is to:
256
- 1. Analyze all the findings from each pass
257
- 2. Create a unified, coherent final report that consolidates all the insights
258
- 3. Eliminate redundancy and duplication
259
- 4. Prioritize the most important findings
260
- 5. Provide a comprehensive grade for the code, based on the following criteria:
261
-
262
- ## Grading System
263
- Assign an overall letter grade (A+ to F) to the codebase, where:
264
- - A+ to A-: Exceptional code with minimal issues
265
- - B+ to B-: Good code with some minor improvements needed
266
- - C+ to C-: Average code with several issues that should be addressed
267
- - D+ to D-: Problematic code with significant issues requiring attention
268
- - F: Critical issues that make the code unsuitable for production
269
-
270
- Include plus (+) or minus (-) modifiers to provide more granular assessment.
271
-
272
- For each major area (maintainability, performance, security, etc.), also provide a specific grade.
273
-
274
- Explain your grading rationale clearly, citing specific evidence from the review.
275
-
276
- ## Output Format
277
-
278
- Structure your consolidated report with these sections:
279
- 1. **Executive Summary**: Brief overview and overall grade
280
- 2. **Grading Breakdown**: Detailed grades by category with justification
281
- 3. **Critical Issues**: Most important problems to address (prioritized)
282
- 4. **Strengths**: Areas where the code excels
283
- 5. **Detailed Findings**: Consolidated findings across all passes
284
- 6. **Recommendations**: Actionable next steps, prioritized
285
-
286
- Make this report comprehensive but focused on high-value insights. Be specific and actionable in your recommendations.`;
287
- }
288
- /**
289
- * Creates a user prompt for review consolidation
290
- * @param review The review content to consolidate
291
- * @returns The user prompt
292
- */
293
- function getConsolidationPrompt(review) {
294
- const passCount = review.costInfo?.passCount || 5;
295
- // const _fileCount = review.files?.length || 200; // Not used in this prompt
296
- const projectName = review.projectName || 'cr-aia';
297
- return `I have conducted a multi-pass code review of a project named "${projectName}" using the "${review.reviewType}" review type. The review was split into ${passCount} passes due to the size of the codebase.
298
-
299
- Here are the results from all passes:
300
-
301
- ${review.content}
302
-
303
- Please create a unified, consolidated report that:
304
- 1. Extracts ALL issues from each pass (look for sections like "### High Priority", "### Medium Priority", "### Low Priority", "#### Issue Title", etc.)
305
- 2. Deduplicates issues that appear in multiple passes
306
- 3. Organizes all issues into three clear sections:
307
- - **Critical Issues (High Priority)**: List all high-priority/critical findings
308
- - **Important Issues (Medium Priority)**: List all medium-priority/important findings
309
- - **Minor Issues (Low Priority)**: List all low-priority/minor findings
310
- 4. Provides a comprehensive grade for the code quality with detailed category breakdowns
311
- 5. Maintains all the valuable insights from each pass
312
-
313
- IMPORTANT: Make sure to actually extract and list the specific issues found in each pass. Do not leave the issue sections empty.
314
-
315
- The consolidated report should begin with "# Consolidated Code Review Report: ${projectName}"
316
-
317
- Present this as a unified analysis without mentioning individual pass numbers.
318
-
319
- IMPORTANT: Use the actual current date (${new Date().toLocaleDateString()}) in your report, not any dates mentioned in the review content.`;
320
- }
321
- /**
322
- * Creates a fallback consolidated review when AI consolidation fails
323
- * @param review The review to consolidate
324
- * @returns Fallback consolidated content
325
- */
326
- function createFallbackConsolidation(review) {
327
- logger_1.default.info('Creating fallback consolidation from multi-pass results...');
328
- // Extract project name
329
- const projectName = review.projectName || 'cr-aia';
330
- // Extract key information from each pass - more flexible regex
331
- const passRegex = /## Pass (\d+): Review of (\d+) Files([\s\S]*?)(?=## Pass \d+:|$)/g;
332
- const passes = [];
333
- let match;
334
- while ((match = passRegex.exec(review.content)) !== null) {
335
- const [, passNumberStr, fileCountStr, passContent] = match;
336
- passes.push({
337
- passNumber: parseInt(passNumberStr, 10),
338
- fileCount: parseInt(fileCountStr, 10),
339
- content: passContent.trim(),
340
- });
341
- }
342
- logger_1.default.debug(`Found ${passes.length} passes in multi-pass review`);
343
- // If we couldn't extract passes, try alternative format
344
- if (passes.length === 0) {
345
- logger_1.default.warn('Could not extract passes using standard format, trying alternative patterns');
346
- // Try simpler pass detection
347
- const altPassRegex = /Pass (\d+)[:\s]+([\s\S]*?)(?=Pass \d+|$)/gi;
348
- let altMatch;
349
- while ((altMatch = altPassRegex.exec(review.content)) !== null) {
350
- const [, passNumberStr, passContent] = altMatch;
351
- passes.push({
352
- passNumber: parseInt(passNumberStr, 10),
353
- fileCount: 0, // Unknown
354
- content: passContent.trim(),
355
- });
356
- }
357
- logger_1.default.debug(`Found ${passes.length} passes using alternative pattern`);
358
- }
359
- // Deduplicate findings across passes
360
- const highPriorityFindings = new Set();
361
- const mediumPriorityFindings = new Set();
362
- const lowPriorityFindings = new Set();
363
- // Regular expressions to extract findings from each pass - support multiple formats
364
- const highPriorityRegex = /### (?:High Priority|Critical Issues?)([\s\S]*?)(?=###|## Pass|$)/gi;
365
- const mediumPriorityRegex = /### (?:Medium Priority|Important Issues?)([\s\S]*?)(?=###|## Pass|$)/gi;
366
- const lowPriorityRegex = /### (?:Low Priority|Minor Issues?)([\s\S]*?)(?=###|## Pass|$)/gi;
367
- // Extract issue titles from content blocks - support multiple formats
368
- const extractIssueTitles = (content) => {
369
- const titles = [];
370
- // Format 1: - **Issue title:** <title>
371
- const issueTitleRegex1 = /- \*\*Issue title:\*\* (.*?)(?=\n|$)/g;
372
- let match1;
373
- while ((match1 = issueTitleRegex1.exec(content)) !== null) {
374
- titles.push(match1[1].trim());
375
- }
376
- // Format 2: #### <title> (o3 format)
377
- const issueTitleRegex2 = /####\s+([^\n]+)/g;
378
- let match2;
379
- while ((match2 = issueTitleRegex2.exec(content)) !== null) {
380
- titles.push(match2[1].trim());
381
- }
382
- // Format 3: Simple bullet points starting with issues
383
- const issueTitleRegex3 = /^[\s-]*\*?\s*(.+?)$/gm;
384
- if (titles.length === 0) {
385
- // Only use this if no other format found
386
- let match3;
387
- while ((match3 = issueTitleRegex3.exec(content)) !== null) {
388
- const line = match3[1].trim();
389
- // Filter out meta lines
390
- if (line &&
391
- !line.startsWith('Location:') &&
392
- !line.startsWith('Type:') &&
393
- !line.startsWith('Description:') &&
394
- !line.startsWith('Impact:')) {
395
- titles.push(line);
396
- }
397
- }
398
- }
399
- return titles;
400
- };
401
- // Process each pass to extract findings
402
- passes.forEach((pass) => {
403
- const passContent = pass.content;
404
- // Extract findings by priority
405
- let highMatch;
406
- highPriorityRegex.lastIndex = 0; // Reset regex
407
- while ((highMatch = highPriorityRegex.exec(passContent)) !== null) {
408
- extractIssueTitles(highMatch[1]).forEach((title) => highPriorityFindings.add(title));
409
- }
410
- let mediumMatch;
411
- mediumPriorityRegex.lastIndex = 0; // Reset regex
412
- while ((mediumMatch = mediumPriorityRegex.exec(passContent)) !== null) {
413
- extractIssueTitles(mediumMatch[1]).forEach((title) => mediumPriorityFindings.add(title));
414
- }
415
- let lowMatch;
416
- lowPriorityRegex.lastIndex = 0; // Reset regex
417
- while ((lowMatch = lowPriorityRegex.exec(passContent)) !== null) {
418
- extractIssueTitles(lowMatch[1]).forEach((title) => lowPriorityFindings.add(title));
419
- }
420
- });
421
- logger_1.default.debug(`Extracted findings - High: ${highPriorityFindings.size}, Medium: ${mediumPriorityFindings.size}, Low: ${lowPriorityFindings.size}`);
422
- // Create a consolidated review
423
- return `# Consolidated ${review.reviewType.charAt(0).toUpperCase() + review.reviewType.slice(1)} Review Report: ${projectName}
424
-
425
- ## Executive Summary
426
-
427
- This consolidated review was generated from ${passes.length} passes analyzing a total of ${passes.reduce((sum, pass) => sum + pass.fileCount, 0)} files. The review identified potential issues and opportunities for improvement in the codebase.
428
-
429
- ### Key Findings
430
-
431
- ${highPriorityFindings.size > 0 ? `- ${highPriorityFindings.size} high-priority issues identified` : ''}
432
- ${mediumPriorityFindings.size > 0 ? `- ${mediumPriorityFindings.size} medium-priority issues identified` : ''}
433
- ${lowPriorityFindings.size > 0 ? `- ${lowPriorityFindings.size} low-priority issues identified` : ''}
434
-
435
- ## Grading
436
-
437
- Based on the identified issues, the codebase receives the following grades:
438
-
439
- | Category | Grade | Justification |
440
- |----------|-------|---------------|
441
- | Functionality | B | The code appears to function correctly with some potential bugs identified. |
442
- | Code Quality | B- | The codebase shows generally good practices but has several areas for improvement. |
443
- | Documentation | C+ | Documentation exists but is inconsistent in coverage and quality. |
444
- | Testing | C | Testing framework is in place but coverage and quality are inconsistent. |
445
- | Maintainability | B- | The codebase is reasonably maintainable but has some complexity issues. |
446
- | Security | B | Generally secure but has some potential vulnerability points. |
447
- | Performance | B | Mostly efficient with a few optimization opportunities. |
448
-
449
- **Overall Grade: B-**
450
-
451
- ## Critical Issues (High Priority)
452
-
453
- ${Array.from(highPriorityFindings)
454
- .map((issue) => `- ${issue}`)
455
- .join('\n')}
456
-
457
- ## Important Issues (Medium Priority)
458
-
459
- ${Array.from(mediumPriorityFindings)
460
- .map((issue) => `- ${issue}`)
461
- .join('\n')}
462
-
463
- ## Minor Issues (Low Priority)
464
-
465
- ${Array.from(lowPriorityFindings)
466
- .map((issue) => `- ${issue}`)
467
- .join('\n')}
468
-
469
- ## Recommendations
470
-
471
- 1. Address the high-priority issues first, particularly those related to error handling and security.
472
- 2. Improve documentation across the codebase for better maintainability.
473
- 3. Enhance test coverage, especially for error scenarios.
474
- 4. Consider refactoring complex functions to improve code readability and maintainability.
475
-
476
- ---
477
-
478
- **Note:** This is a fallback consolidated report generated automatically. The individual pass findings are included below for reference.
479
- `;
480
- }
481
- //# sourceMappingURL=consolidateReview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"consolidateReview.js","sourceRoot":"","sources":["../../../src/utils/review/consolidateReview.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;AAaH,8CAwQC;AAnRD,uEAAoE;AAEpE,0EAA4D;AAC5D,uDAA+B;AAE/B;;;;;GAKG;AACI,KAAK,UAAU,iBAAiB,CAAC,MAAoB;IAC1D,IAAI,CAAC;QACH,gBAAM,CAAC,KAAK,CAAC,8CAA8C,EAAE;YAC3D,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO;YAC5B,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;YAC1C,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,UAAU,EAAE,MAAM,CAAC,OA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,KAAK,KAAK,EAAE,CAAC;SAC5B,IAAI,CAAC,IAAI,CAAC;;;;EAIX,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC;SACjC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC;SAC5B,IAAI,CAAC,IAAI,CAAC;;;;EAIX,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC;SAC9B,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC;SAC5B,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;;;CAYZ,CAAC;AACF,CAAC"}
@@ -1,20 +0,0 @@
1
- /**
2
- * @fileoverview Utilities for displaying code review fixes
3
- *
4
- * This module provides functions for displaying code review fix suggestions
5
- * in a user-friendly manner, with colored output and formatting based on priority.
6
- */
7
- import { FixPriority, type FixSuggestion } from './types';
8
- /**
9
- * Display a concise summary of fix suggestions without prompting for interaction
10
- * @param suggestions Array of fix suggestions
11
- * @param priority Priority level of the suggestions
12
- */
13
- export declare function displayFixSuggestions(suggestions: FixSuggestion[], priority: FixPriority): void;
14
- /**
15
- * Display detailed information about a specific fix suggestion
16
- * @param suggestion The fix suggestion to display
17
- * @param index Index of the suggestion in its priority group
18
- * @param priority Priority level of the suggestion
19
- */
20
- export declare function displayDetailedFixSuggestion(suggestion: FixSuggestion, index: number, priority: FixPriority): void;
@@ -1,84 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview Utilities for displaying code review fixes
4
- *
5
- * This module provides functions for displaying code review fix suggestions
6
- * in a user-friendly manner, with colored output and formatting based on priority.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.displayFixSuggestions = displayFixSuggestions;
10
- exports.displayDetailedFixSuggestion = displayDetailedFixSuggestion;
11
- const types_1 = require("./types");
12
- /**
13
- * Display a concise summary of fix suggestions without prompting for interaction
14
- * @param suggestions Array of fix suggestions
15
- * @param priority Priority level of the suggestions
16
- */
17
- function displayFixSuggestions(suggestions, priority) {
18
- if (suggestions.length === 0) {
19
- return;
20
- }
21
- const priorityColor = {
22
- [types_1.FixPriority.HIGH]: '\x1b[31m', // Red
23
- [types_1.FixPriority.MEDIUM]: '\x1b[33m', // Yellow
24
- [types_1.FixPriority.LOW]: '\x1b[32m', // Green
25
- };
26
- const priorityEmoji = {
27
- [types_1.FixPriority.HIGH]: '🟥',
28
- [types_1.FixPriority.MEDIUM]: '🟧',
29
- [types_1.FixPriority.LOW]: '🟩',
30
- };
31
- const priorityLabel = {
32
- [types_1.FixPriority.HIGH]: 'HIGH',
33
- [types_1.FixPriority.MEDIUM]: 'MEDIUM',
34
- [types_1.FixPriority.LOW]: 'LOW',
35
- };
36
- console.log(`\n${priorityColor[priority]}${priorityEmoji[priority]} ${priorityLabel[priority]} PRIORITY ISSUES (${suggestions.length})\x1b[0m`);
37
- suggestions.forEach((suggestion, index) => {
38
- console.log(`${index + 1}. ${suggestion.description}`);
39
- console.log(` File: ${suggestion.file}`);
40
- if (suggestion.lineNumbers) {
41
- console.log(` Lines: ${suggestion.lineNumbers.start}-${suggestion.lineNumbers.end}`);
42
- }
43
- });
44
- }
45
- /**
46
- * Display detailed information about a specific fix suggestion
47
- * @param suggestion The fix suggestion to display
48
- * @param index Index of the suggestion in its priority group
49
- * @param priority Priority level of the suggestion
50
- */
51
- function displayDetailedFixSuggestion(suggestion, index, priority) {
52
- const priorityColor = {
53
- [types_1.FixPriority.HIGH]: '\x1b[31m', // Red
54
- [types_1.FixPriority.MEDIUM]: '\x1b[33m', // Yellow
55
- [types_1.FixPriority.LOW]: '\x1b[32m', // Green
56
- };
57
- const priorityEmoji = {
58
- [types_1.FixPriority.HIGH]: '🟥',
59
- [types_1.FixPriority.MEDIUM]: '🟧',
60
- [types_1.FixPriority.LOW]: '🟩',
61
- };
62
- const priorityLabel = {
63
- [types_1.FixPriority.HIGH]: 'HIGH',
64
- [types_1.FixPriority.MEDIUM]: 'MEDIUM',
65
- [types_1.FixPriority.LOW]: 'LOW',
66
- };
67
- console.log(`\n${priorityColor[priority]}${priorityEmoji[priority]} ${priorityLabel[priority]} PRIORITY ISSUE #${index + 1}\x1b[0m`);
68
- console.log(`Description: ${suggestion.description}`);
69
- console.log(`File: ${suggestion.file}`);
70
- if (suggestion.lineNumbers) {
71
- console.log(`Lines: ${suggestion.lineNumbers.start}-${suggestion.lineNumbers.end}`);
72
- }
73
- if (suggestion.currentCode && suggestion.suggestedCode) {
74
- console.log('\nCurrent code:');
75
- console.log('```');
76
- console.log(suggestion.currentCode);
77
- console.log('```');
78
- console.log('\nSuggested code:');
79
- console.log('```');
80
- console.log(suggestion.suggestedCode);
81
- console.log('```');
82
- }
83
- }
84
- //# sourceMappingURL=fixDisplay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fixDisplay.js","sourceRoot":"","sources":["../../../src/utils/review/fixDisplay.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AASH,sDAkCC;AAQD,oEA2CC;AA5FD,mCAA0D;AAE1D;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,WAA4B,EAAE,QAAqB;IACvF,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO;IACT,CAAC;IAED,MAAM,aAAa,GAAG;QACpB,CAAC,mBAAW,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,MAAM;QACtC,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,SAAS;QAC3C,CAAC,mBAAW,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,QAAQ;KACxC,CAAC;IAEF,MAAM,aAAa,GAAG;QACpB,CAAC,mBAAW,CAAC,IAAI,CAAC,EAAE,IAAI;QACxB,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE,IAAI;QAC1B,CAAC,mBAAW,CAAC,GAAG,CAAC,EAAE,IAAI;KACxB,CAAC;IAEF,MAAM,aAAa,GAAG;QACpB,CAAC,mBAAW,CAAC,IAAI,CA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
- *
4
- * This module provides functions for applying fixes from code review suggestions
5
- * to the corresponding files. Currently it only provides a placeholder for future
6
- * implementation as automatic fixes are not fully supported.
7
- */
8
- import readline from 'node:readline';
9
- import type { FixSuggestion } from './types';
10
- /**
11
- * Create a readline interface for user input
12
- */
13
- export declare function createReadlineInterface(): readline.Interface;
14
- /**
15
- * Prompt the user for confirmation
16
- * @param message Message to display to the user
17
- * @returns Promise resolving to boolean indicating user's response
18
- */
19
- export declare function promptForConfirmation(message: string): Promise<boolean>;
20
- /**
21
- * This function is a placeholder for future functionality.
22
- * Currently, the AI code review tool does not automatically apply fixes.
23
- * It only provides suggestions that developers must review and implement manually.
24
- *
25
- * @param suggestion The fix suggestion to apply
26
- * @returns Always returns false as automatic fixes are not supported
27
- */
28
- export declare function applyFixToFile(suggestion: FixSuggestion): Promise<boolean>;