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,271 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview Centralized logging system for the cr-aia tool.
4
- *
5
- * This module provides a standardized logging interface with support for
6
- * different log levels, colored output, and log level control via environment
7
- * variables. It's designed to be used throughout the codebase to ensure
8
- * consistent logging behavior.
9
- */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.LogLevel = void 0;
12
- exports.setLogLevel = setLogLevel;
13
- exports.getLogLevel = getLogLevel;
14
- exports.enableFileLogging = enableFileLogging;
15
- exports.disableFileLogging = disableFileLogging;
16
- exports.debug = debug;
17
- exports.info = info;
18
- exports.warn = warn;
19
- exports.error = error;
20
- exports.createLogger = createLogger;
21
- // Define log levels with numeric values for comparison
22
- var LogLevel;
23
- (function (LogLevel) {
24
- LogLevel[LogLevel["DEBUG"] = 0] = "DEBUG";
25
- LogLevel[LogLevel["INFO"] = 1] = "INFO";
26
- LogLevel[LogLevel["WARN"] = 2] = "WARN";
27
- LogLevel[LogLevel["ERROR"] = 3] = "ERROR";
28
- LogLevel[LogLevel["NONE"] = 4] = "NONE";
29
- })(LogLevel || (exports.LogLevel = LogLevel = {}));
30
- // Map string log level names to enum values
31
- const LOG_LEVEL_MAP = {
32
- debug: LogLevel.DEBUG,
33
- info: LogLevel.INFO,
34
- warn: LogLevel.WARN,
35
- error: LogLevel.ERROR,
36
- none: LogLevel.NONE,
37
- };
38
- const node_fs_1 = require("node:fs");
39
- const node_path_1 = require("node:path");
40
- // ANSI color codes for terminal output
41
- const COLORS = {
42
- reset: '\x1b[0m',
43
- dim: '\x1b[2m',
44
- bright: '\x1b[1m',
45
- debug: '\x1b[36m', // Cyan
46
- info: '\x1b[32m', // Green
47
- warn: '\x1b[33m', // Yellow
48
- error: '\x1b[31m', // Red
49
- time: '\x1b[90m', // Gray
50
- };
51
- // Track if we're initializing to avoid circular dependencies
52
- const isInitializing = false;
53
- let logFileStream = null;
54
- let suppressConsoleOutput = false;
55
- // Get the current log level from environment variables
56
- function getCurrentLogLevel() {
57
- // Avoid debug logs during initialization to prevent overwhelming output
58
- const shouldLog = process.argv.includes('--trace-logger') && !isInitializing;
59
- if (shouldLog) {
60
- // Only print when explicitly requested with --trace-logger
61
- console.error(`Debug: getCurrentLogLevel called, AI_CODE_REVIEW_LOG_LEVEL=${process.env.AI_CODE_REVIEW_LOG_LEVEL}`);
62
- }
63
- // Always check CLI flags first - highest priority
64
- if (process.argv.includes('--debug')) {
65
- if (shouldLog) {
66
- console.error('Debug: Debug flag found in process.argv, forcing DEBUG level');
67
- }
68
- return LogLevel.DEBUG;
69
- }
70
- // Next check environment variable
71
- const envLogLevel = process.env.AI_CODE_REVIEW_LOG_LEVEL?.toLowerCase();
72
- if (envLogLevel) {
73
- if (shouldLog) {
74
- console.error(`Debug: Found AI_CODE_REVIEW_LOG_LEVEL environment variable: ${envLogLevel}`);
75
- }
76
- if (envLogLevel in LOG_LEVEL_MAP) {
77
- if (shouldLog) {
78
- console.error(`Debug: Mapped log level ${envLogLevel} -> ${LOG_LEVEL_MAP[envLogLevel]}`);
79
- }
80
- return LOG_LEVEL_MAP[envLogLevel];
81
- }
82
- if (shouldLog) {
83
- console.error(`Debug: Invalid log level: ${envLogLevel}, valid options are: ${Object.keys(LOG_LEVEL_MAP).join(', ')}`);
84
- }
85
- }
86
- else if (shouldLog) {
87
- console.error('Debug: AI_CODE_REVIEW_LOG_LEVEL environment variable not found');
88
- }
89
- // Default to INFO if not specified
90
- if (shouldLog) {
91
- console.error('Debug: No valid log level found, defaulting to INFO');
92
- }
93
- return LogLevel.INFO;
94
- }
95
- // The current log level
96
- let currentLogLevel = getCurrentLogLevel();
97
- /**
98
- * Set the current log level
99
- * @param level The log level to set
100
- */
101
- function setLogLevel(level) {
102
- // Only log when explicitly requested with --trace-logger
103
- const shouldLog = process.argv.includes('--trace-logger');
104
- if (shouldLog) {
105
- console.error(`Debug: setLogLevel called with ${level}`);
106
- }
107
- if (typeof level === 'string') {
108
- const levelLower = level.toLowerCase();
109
- if (levelLower in LOG_LEVEL_MAP) {
110
- currentLogLevel = LOG_LEVEL_MAP[levelLower];
111
- if (shouldLog) {
112
- console.error(`Debug: Log level set to ${levelLower} -> ${currentLogLevel}`);
113
- }
114
- }
115
- else {
116
- console.warn(`Invalid log level: ${level}. Using default.`);
117
- }
118
- }
119
- else {
120
- currentLogLevel = level;
121
- if (shouldLog) {
122
- console.error(`Debug: Log level set to numeric value ${level}`);
123
- }
124
- }
125
- }
126
- /**
127
- * Get the current log level
128
- * @returns The current log level
129
- */
130
- function getLogLevel() {
131
- return currentLogLevel;
132
- }
133
- function formatConsoleMessage(level, message, timestamp) {
134
- const levelUpper = level.toUpperCase().padEnd(5);
135
- return `${COLORS.time}[${timestamp}]${COLORS.reset} ${COLORS[level]}${levelUpper}${COLORS.reset} ${message}`;
136
- }
137
- function formatFileMessage(level, message, timestamp, args) {
138
- const levelUpper = level.toUpperCase().padEnd(5);
139
- const extras = args.length ? ` ${args.map((arg) => serializeLogArg(arg)).join(' ')}` : '';
140
- return `[${timestamp}] ${levelUpper} ${message}${extras}`;
141
- }
142
- function serializeLogArg(arg) {
143
- if (typeof arg === 'string') {
144
- return arg;
145
- }
146
- if (arg instanceof Error) {
147
- return arg.stack || arg.message;
148
- }
149
- try {
150
- return JSON.stringify(arg);
151
- }
152
- catch {
153
- return String(arg);
154
- }
155
- }
156
- function enableFileLogging(filePath, options) {
157
- try {
158
- (0, node_fs_1.mkdirSync)((0, node_path_1.dirname)(filePath), { recursive: true });
159
- if (logFileStream) {
160
- logFileStream.end();
161
- }
162
- logFileStream = (0, node_fs_1.createWriteStream)(filePath, { flags: 'a' });
163
- suppressConsoleOutput = options?.suppressConsole ?? true;
164
- }
165
- catch (error) {
166
- console.error('Failed to enable file logging:', error);
167
- logFileStream = null;
168
- suppressConsoleOutput = false;
169
- }
170
- }
171
- function disableFileLogging() {
172
- if (logFileStream) {
173
- logFileStream.end();
174
- logFileStream = null;
175
- }
176
- suppressConsoleOutput = false;
177
- }
178
- /**
179
- * Log a message if the current log level allows it
180
- * @param level The log level
181
- * @param message The message to log
182
- * @param args Additional arguments to log
183
- */
184
- function log(level, levelName, message, ...args) {
185
- const timestamp = new Date().toISOString();
186
- if (logFileStream) {
187
- logFileStream.write(`${formatFileMessage(levelName, message, timestamp, args)}\n`);
188
- }
189
- const shouldLogToConsole = !suppressConsoleOutput && level >= currentLogLevel;
190
- if (shouldLogToConsole) {
191
- const formattedMessage = formatConsoleMessage(levelName, message, timestamp);
192
- switch (level) {
193
- case LogLevel.DEBUG:
194
- console.debug(formattedMessage, ...args);
195
- break;
196
- case LogLevel.INFO:
197
- console.log(formattedMessage, ...args);
198
- break;
199
- case LogLevel.WARN:
200
- console.warn(formattedMessage, ...args);
201
- break;
202
- case LogLevel.ERROR:
203
- console.error(formattedMessage, ...args);
204
- break;
205
- default:
206
- break;
207
- }
208
- }
209
- else if (!suppressConsoleOutput && level === LogLevel.DEBUG && process.argv.includes('--trace-logger')) {
210
- console.error(`Suppressing DEBUG log because currentLogLevel=${currentLogLevel}, message was: ${message}`);
211
- }
212
- }
213
- /**
214
- * Log a debug message
215
- * @param message The message to log
216
- * @param args Additional arguments to log
217
- */
218
- function debug(message, ...args) {
219
- log(LogLevel.DEBUG, 'debug', message, ...args);
220
- }
221
- /**
222
- * Log an info message
223
- * @param message The message to log
224
- * @param args Additional arguments to log
225
- */
226
- function info(message, ...args) {
227
- log(LogLevel.INFO, 'info', message, ...args);
228
- }
229
- /**
230
- * Log a warning message
231
- * @param message The message to log
232
- * @param args Additional arguments to log
233
- */
234
- function warn(message, ...args) {
235
- log(LogLevel.WARN, 'warn', message, ...args);
236
- }
237
- /**
238
- * Log an error message
239
- * @param message The message to log
240
- * @param args Additional arguments to log
241
- */
242
- function error(message, ...args) {
243
- log(LogLevel.ERROR, 'error', message, ...args);
244
- }
245
- /**
246
- * Create a logger instance with a specific prefix
247
- * @param prefix The prefix to add to all log messages
248
- * @returns An object with debug, info, warn, and error methods
249
- */
250
- function createLogger(prefix) {
251
- return {
252
- debug: (message, ...args) => debug(`[${prefix}] ${message}`, ...args),
253
- info: (message, ...args) => info(`[${prefix}] ${message}`, ...args),
254
- warn: (message, ...args) => warn(`[${prefix}] ${message}`, ...args),
255
- error: (message, ...args) => error(`[${prefix}] ${message}`, ...args),
256
- };
257
- }
258
- // Export a default logger instance
259
- exports.default = {
260
- debug,
261
- info,
262
- warn,
263
- error,
264
- setLogLevel,
265
- getLogLevel,
266
- createLogger,
267
- LogLevel,
268
- enableFileLogging,
269
- disableFileLogging,
270
- };
271
- //# sourceMappingURL=logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAiGH,kCAwBC;AAMD,kCAEC;AA2BD,8CAaC;AAED,gDAMC;AAgDD,sBAEC;AAOD,oBAEC;AAOD,oBAEC;AAOD,sBAEC;AAOD,oCAOC;AA1QD,uDAAuD;AACvD,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,yCAAS,CAAA;IACT,uCAAQ,CAAA;IACR,uCAAQ,CAAA;IACR,yCAAS,CAAA;IACT,uCAAQ,CAAA;AACV,CAAC,EANW,QAAQ,wBAAR,QAAQ,QAMnB;AAED,4CAA4C;AAC5C,MAAM,aAAa,GAA6B;IAC9C,KAAK,EAAE,QAAQ,CAAC,KAAK;IACrB,IAAI,EAAE,QAAQ,CAAC,IAAI;IACnB,IAAI,EAAE,QAAQ,CAAC,IAAI;IACnB,KAAK,EAAE,QAAQ,CAAC,KAAK;IACrB,IAAI,EAAE,QAAQ,CAAC,IAAI;CACpB,CAAC;AAEF,qCAAyE;AACzE,yCAAoC;AAEpC,uCAAuC;AACvC,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,SAAS;IACd,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,UA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AE,GAAG,IAAI,CAAC,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,SAAgB,IAAI,CAAC,OAAe,EAAE,GAAG,IAAW;IAClD,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,SAAgB,KAAK,CAAC,OAAe,EAAE,GAAG,IAAW;IACnD,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AACjD,CAAC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,MAAc;IACzC,OAAO;QACL,KAAK,EAAE,CAAC,OAAe,EAAE,GAAG,IAAW,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,MAAM,KAAK,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC;QACpF,IAAI,EAAE,CAAC,OAAe,EAAE,GAAG,IAAW,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,MAAM,KAAK,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC;QAClF,IAAI,EAAE,CAAC,OAAe,EAAE,GAAG,IAAW,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,MAAM,KAAK,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC;QAClF,KAAK,EAAE,CAAC,OAAe,EAAE,GAAG,IAAW,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,MAAM,KAAK,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC;KACrF,CAAC;AACJ,CAAC;AAED,mCAAmC;AACnC,kBAAe;IACb,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,WAAW;IACX,WAAW;IACX,YAAY;IACZ,QAAQ;IACR,iBAAiB;IACjB,kBAAkB;CACnB,CAAC"}
@@ -1,40 +0,0 @@
1
- /**
2
- * @fileoverview Path validation utilities.
3
- *
4
- * This module provides utilities for validating file and directory paths,
5
- * ensuring they are safe to use and exist on the file system.
6
- */
7
- /**
8
- * Check if a path is within the current directory or its subdirectories
9
- * @param targetPath Path to check
10
- * @returns True if the path is within the current directory, false otherwise
11
- */
12
- export declare function isPathWithinCwd(targetPath: string): boolean;
13
- /**
14
- * Check if a path exists
15
- * @param targetPath Path to check
16
- * @returns True if the path exists, false otherwise
17
- */
18
- export declare function pathExists(targetPath: string): boolean;
19
- /**
20
- * Check if a path is a directory
21
- * @param targetPath Path to check
22
- * @returns True if the path is a directory, false otherwise
23
- */
24
- export declare function isDirectory(targetPath: string): boolean;
25
- /**
26
- * Check if a path is a file
27
- * @param targetPath Path to check
28
- * @returns True if the path is a file, false otherwise
29
- */
30
- export declare function isFile(targetPath: string): boolean;
31
- /**
32
- * Validate a target path for security and existence
33
- * @param targetPath Path to validate
34
- * @returns Object with validation results
35
- */
36
- export declare function validateTargetPath(targetPath: string): {
37
- isValid: boolean;
38
- isDir: boolean;
39
- error?: string;
40
- };
@@ -1,98 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview Path validation utilities.
4
- *
5
- * This module provides utilities for validating file and directory paths,
6
- * ensuring they are safe to use and exist on the file system.
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.isPathWithinCwd = isPathWithinCwd;
13
- exports.pathExists = pathExists;
14
- exports.isDirectory = isDirectory;
15
- exports.isFile = isFile;
16
- exports.validateTargetPath = validateTargetPath;
17
- const node_fs_1 = __importDefault(require("node:fs"));
18
- const node_path_1 = __importDefault(require("node:path"));
19
- /**
20
- * Check if a path is within the current directory or its subdirectories
21
- * @param targetPath Path to check
22
- * @returns True if the path is within the current directory, false otherwise
23
- */
24
- function isPathWithinCwd(targetPath) {
25
- const resolvedPath = node_path_1.default.resolve(targetPath);
26
- const resolvedCwd = node_path_1.default.resolve(process.cwd());
27
- return resolvedPath.startsWith(resolvedCwd);
28
- }
29
- /**
30
- * Check if a path exists
31
- * @param targetPath Path to check
32
- * @returns True if the path exists, false otherwise
33
- */
34
- function pathExists(targetPath) {
35
- try {
36
- node_fs_1.default.accessSync(targetPath);
37
- return true;
38
- }
39
- catch (_error) {
40
- return false;
41
- }
42
- }
43
- /**
44
- * Check if a path is a directory
45
- * @param targetPath Path to check
46
- * @returns True if the path is a directory, false otherwise
47
- */
48
- function isDirectory(targetPath) {
49
- try {
50
- return node_fs_1.default.statSync(targetPath).isDirectory();
51
- }
52
- catch (_error) {
53
- return false;
54
- }
55
- }
56
- /**
57
- * Check if a path is a file
58
- * @param targetPath Path to check
59
- * @returns True if the path is a file, false otherwise
60
- */
61
- function isFile(targetPath) {
62
- try {
63
- return node_fs_1.default.statSync(targetPath).isFile();
64
- }
65
- catch (_error) {
66
- return false;
67
- }
68
- }
69
- /**
70
- * Validate a target path for security and existence
71
- * @param targetPath Path to validate
72
- * @returns Object with validation results
73
- */
74
- function validateTargetPath(targetPath) {
75
- // Check if the path is within the current directory
76
- if (!isPathWithinCwd(targetPath)) {
77
- return {
78
- isValid: false,
79
- isDir: false,
80
- error: `Path must be within the current directory: ${process.cwd()}`,
81
- };
82
- }
83
- // Check if the path exists
84
- if (!pathExists(targetPath)) {
85
- return {
86
- isValid: false,
87
- isDir: false,
88
- error: `Path does not exist: ${targetPath}`,
89
- };
90
- }
91
- // Check if the path is a directory or file
92
- const isDir = isDirectory(targetPath);
93
- return {
94
- isValid: true,
95
- isDir,
96
- };
97
- }
98
- //# sourceMappingURL=pathValidator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pathValidator.js","sourceRoot":"","sources":["../../src/utils/pathValidator.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;AAUH,0CAKC;AAOD,gCAOC;AAOD,kCAMC;AAOD,wBAMC;AAOD,gDA8BC;AA1FD,sDAAyB;AACzB,0DAA6B;AAE7B;;;;GAIG;AACH,SAAgB,eAAe,CAAC,UAAkB;IAChD,MAAM,Y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AAO,EAAE,KAAK;YACd,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,wBAAwB,UAAU,EAAE;SAC5C,CAAC;IACJ,CAAC;IAED,2CAA2C;IAC3C,MAAM,KAAK,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO;QACL,OAAO,EAAE,IAAI;QACb,KAAK;KACN,CAAC;AACJ,CAAC"}
@@ -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;