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.
- package/dist/index.js +0 -2
- package/docs/opt-in-full-context.md +27 -0
- package/package.json +11 -11
- package/reports/cr-cr-aia-17-11-2025-20-13.md +354 -0
- package/src/clients/implementations/openRouterClient.ts +2 -0
- package/src/clients/openRouterClient.ts +8 -1
- package/src/clients/utils/promptFormatter.ts +97 -20
- package/src/core/handlers/FileProcessingHandler.ts +6 -0
- package/src/index.ts +0 -3
- package/src/runtime/cliEntry.ts +21 -3
- package/src/runtime/fileCollector.ts +278 -5
- package/src/runtime/reviewPipeline.ts +46 -7
- package/src/runtime/runAiCodeReview.ts +161 -6
- package/src/runtime/ui/RuntimeApp.tsx +34 -5
- package/src/runtime/ui/screens/ProgressScreen.tsx +49 -1
- package/src/runtime/ui/screens/ResultsScreen.tsx +29 -9
- package/src/types/review.ts +18 -0
- package/dist/analysis/FindingsExtractor.d.ts +0 -105
- package/dist/analysis/FindingsExtractor.js +0 -363
- package/dist/analysis/FindingsExtractor.js.map +0 -1
- package/dist/analysis/ai-detection/analyzers/BaseAnalyzer.d.ts +0 -111
- package/dist/analysis/ai-detection/analyzers/BaseAnalyzer.js +0 -215
- package/dist/analysis/ai-detection/analyzers/BaseAnalyzer.js.map +0 -1
- package/dist/analysis/ai-detection/analyzers/DocumentationAnalyzer.d.ts +0 -142
- package/dist/analysis/ai-detection/analyzers/DocumentationAnalyzer.js +0 -503
- package/dist/analysis/ai-detection/analyzers/DocumentationAnalyzer.js.map +0 -1
- package/dist/analysis/ai-detection/analyzers/GitHistoryAnalyzer.d.ts +0 -88
- package/dist/analysis/ai-detection/analyzers/GitHistoryAnalyzer.js +0 -343
- package/dist/analysis/ai-detection/analyzers/GitHistoryAnalyzer.js.map +0 -1
- package/dist/analysis/ai-detection/core/AIDetectionEngine.d.ts +0 -104
- package/dist/analysis/ai-detection/core/AIDetectionEngine.js +0 -369
- package/dist/analysis/ai-detection/core/AIDetectionEngine.js.map +0 -1
- package/dist/analysis/ai-detection/types/DetectionTypes.d.ts +0 -364
- package/dist/analysis/ai-detection/types/DetectionTypes.js +0 -32
- package/dist/analysis/ai-detection/types/DetectionTypes.js.map +0 -1
- package/dist/analysis/ai-detection/utils/SubmissionConverter.d.ts +0 -97
- package/dist/analysis/ai-detection/utils/SubmissionConverter.js +0 -339
- package/dist/analysis/ai-detection/utils/SubmissionConverter.js.map +0 -1
- package/dist/analysis/context/ReviewContext.d.ts +0 -184
- package/dist/analysis/context/ReviewContext.js +0 -294
- package/dist/analysis/context/ReviewContext.js.map +0 -1
- package/dist/analysis/context/index.d.ts +0 -6
- package/dist/analysis/context/index.js +0 -23
- package/dist/analysis/context/index.js.map +0 -1
- package/dist/analysis/index.d.ts +0 -7
- package/dist/analysis/index.js +0 -24
- package/dist/analysis/index.js.map +0 -1
- package/dist/analysis/tokens/TokenAnalysisFormatter.d.ts +0 -27
- package/dist/analysis/tokens/TokenAnalysisFormatter.js +0 -143
- package/dist/analysis/tokens/TokenAnalysisFormatter.js.map +0 -1
- package/dist/analysis/tokens/TokenAnalyzer.d.ts +0 -155
- package/dist/analysis/tokens/TokenAnalyzer.js +0 -502
- package/dist/analysis/tokens/TokenAnalyzer.js.map +0 -1
- package/dist/analysis/tokens/index.d.ts +0 -7
- package/dist/analysis/tokens/index.js +0 -24
- package/dist/analysis/tokens/index.js.map +0 -1
- package/dist/clients/base/abstractClient.d.ts +0 -99
- package/dist/clients/base/abstractClient.js +0 -98
- package/dist/clients/base/abstractClient.js.map +0 -1
- package/dist/clients/base/httpClient.d.ts +0 -24
- package/dist/clients/base/httpClient.js +0 -147
- package/dist/clients/base/httpClient.js.map +0 -1
- package/dist/clients/base/index.d.ts +0 -11
- package/dist/clients/base/index.js +0 -28
- package/dist/clients/base/index.js.map +0 -1
- package/dist/clients/base/modelDetection.d.ts +0 -41
- package/dist/clients/base/modelDetection.js +0 -88
- package/dist/clients/base/modelDetection.js.map +0 -1
- package/dist/clients/base/responseProcessor.d.ts +0 -45
- package/dist/clients/base/responseProcessor.js +0 -495
- package/dist/clients/base/responseProcessor.js.map +0 -1
- package/dist/clients/factory/clientFactory.d.ts +0 -23
- package/dist/clients/factory/clientFactory.js +0 -50
- package/dist/clients/factory/clientFactory.js.map +0 -1
- package/dist/clients/factory/index.d.ts +0 -7
- package/dist/clients/factory/index.js +0 -24
- package/dist/clients/factory/index.js.map +0 -1
- package/dist/clients/implementations/index.d.ts +0 -7
- package/dist/clients/implementations/index.js +0 -24
- package/dist/clients/implementations/index.js.map +0 -1
- package/dist/clients/implementations/openRouterClient.d.ts +0 -69
- package/dist/clients/implementations/openRouterClient.js +0 -294
- package/dist/clients/implementations/openRouterClient.js.map +0 -1
- package/dist/clients/openRouterClient.d.ts +0 -42
- package/dist/clients/openRouterClient.js +0 -738
- package/dist/clients/openRouterClient.js.map +0 -1
- package/dist/clients/openRouterClientWrapper.d.ts +0 -22
- package/dist/clients/openRouterClientWrapper.js +0 -64
- package/dist/clients/openRouterClientWrapper.js.map +0 -1
- package/dist/clients/utils/directoryStructure.d.ts +0 -14
- package/dist/clients/utils/directoryStructure.js +0 -48
- package/dist/clients/utils/directoryStructure.js.map +0 -1
- package/dist/clients/utils/index.d.ts +0 -10
- package/dist/clients/utils/index.js +0 -31
- package/dist/clients/utils/index.js.map +0 -1
- package/dist/clients/utils/languageDetection.d.ts +0 -13
- package/dist/clients/utils/languageDetection.js +0 -46
- package/dist/clients/utils/languageDetection.js.map +0 -1
- package/dist/clients/utils/promptFormatter.d.ts +0 -36
- package/dist/clients/utils/promptFormatter.js +0 -92
- package/dist/clients/utils/promptFormatter.js.map +0 -1
- package/dist/clients/utils/promptLoader.d.ts +0 -27
- package/dist/clients/utils/promptLoader.js +0 -49
- package/dist/clients/utils/promptLoader.js.map +0 -1
- package/dist/clients/utils/tokenCounter.d.ts +0 -81
- package/dist/clients/utils/tokenCounter.js +0 -209
- package/dist/clients/utils/tokenCounter.js.map +0 -1
- package/dist/core/ApiClientSelector.d.ts +0 -8
- package/dist/core/ApiClientSelector.js +0 -29
- package/dist/core/ApiClientSelector.js.map +0 -1
- package/dist/core/ConfigurationService.d.ts +0 -286
- package/dist/core/ConfigurationService.js +0 -477
- package/dist/core/ConfigurationService.js.map +0 -1
- package/dist/core/ConsolidationService.d.ts +0 -99
- package/dist/core/ConsolidationService.js +0 -341
- package/dist/core/ConsolidationService.js.map +0 -1
- package/dist/core/InteractiveDisplayManager.d.ts +0 -22
- package/dist/core/InteractiveDisplayManager.js +0 -70
- package/dist/core/InteractiveDisplayManager.js.map +0 -1
- package/dist/core/OutputManager.d.ts +0 -26
- package/dist/core/OutputManager.js +0 -217
- package/dist/core/OutputManager.js.map +0 -1
- package/dist/core/ReviewGenerator.d.ts +0 -13
- package/dist/core/ReviewGenerator.js +0 -102
- package/dist/core/ReviewGenerator.js.map +0 -1
- package/dist/core/fileDiscovery.d.ts +0 -35
- package/dist/core/fileDiscovery.js +0 -202
- package/dist/core/fileDiscovery.js.map +0 -1
- package/dist/core/handlers/EstimationHandler.d.ts +0 -18
- package/dist/core/handlers/EstimationHandler.js +0 -110
- package/dist/core/handlers/EstimationHandler.js.map +0 -1
- package/dist/core/handlers/FileProcessingHandler.d.ts +0 -31
- package/dist/core/handlers/FileProcessingHandler.js +0 -159
- package/dist/core/handlers/FileProcessingHandler.js.map +0 -1
- package/dist/core/handlers/OutputHandler.d.ts +0 -27
- package/dist/core/handlers/OutputHandler.js +0 -127
- package/dist/core/handlers/OutputHandler.js.map +0 -1
- package/dist/core/handlers/ReviewExecutor.d.ts +0 -32
- package/dist/core/handlers/ReviewExecutor.js +0 -111
- package/dist/core/handlers/ReviewExecutor.js.map +0 -1
- package/dist/core/reviewOrchestrator.d.ts +0 -24
- package/dist/core/reviewOrchestrator.js +0 -294
- package/dist/core/reviewOrchestrator.js.map +0 -1
- package/dist/core/utils/ModelInfoUtils.d.ts +0 -16
- package/dist/core/utils/ModelInfoUtils.js +0 -54
- package/dist/core/utils/ModelInfoUtils.js.map +0 -1
- package/dist/formatters/outputFormatter.d.ts +0 -31
- package/dist/formatters/outputFormatter.js +0 -65
- package/dist/formatters/outputFormatter.js.map +0 -1
- package/dist/formatters/utils/IssueFormatters.d.ts +0 -20
- package/dist/formatters/utils/IssueFormatters.js +0 -67
- package/dist/formatters/utils/IssueFormatters.js.map +0 -1
- package/dist/formatters/utils/JsonFormatter.d.ts +0 -13
- package/dist/formatters/utils/JsonFormatter.js +0 -57
- package/dist/formatters/utils/JsonFormatter.js.map +0 -1
- package/dist/formatters/utils/MarkdownFormatters.d.ts +0 -51
- package/dist/formatters/utils/MarkdownFormatters.js +0 -456
- package/dist/formatters/utils/MarkdownFormatters.js.map +0 -1
- package/dist/formatters/utils/MetadataFormatter.d.ts +0 -65
- package/dist/formatters/utils/MetadataFormatter.js +0 -219
- package/dist/formatters/utils/MetadataFormatter.js.map +0 -1
- package/dist/formatters/utils/ModelInfoExtractor.d.ts +0 -33
- package/dist/formatters/utils/ModelInfoExtractor.js +0 -111
- package/dist/formatters/utils/ModelInfoExtractor.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js.map +0 -1
- package/dist/plugins/PluginInterface.d.ts +0 -44
- package/dist/plugins/PluginInterface.js +0 -9
- package/dist/plugins/PluginInterface.js.map +0 -1
- package/dist/plugins/PluginManager.d.ts +0 -51
- package/dist/plugins/PluginManager.js +0 -151
- package/dist/plugins/PluginManager.js.map +0 -1
- package/dist/prompts/PromptManager.d.ts +0 -30
- package/dist/prompts/PromptManager.js +0 -62
- package/dist/prompts/PromptManager.js.map +0 -1
- package/dist/prompts/cache/PromptCache.d.ts +0 -32
- package/dist/prompts/cache/PromptCache.js +0 -48
- package/dist/prompts/cache/PromptCache.js.map +0 -1
- package/dist/runtime/auth/service.d.ts +0 -2
- package/dist/runtime/auth/service.js +0 -41
- package/dist/runtime/auth/service.js.map +0 -1
- package/dist/runtime/auth/session.d.ts +0 -5
- package/dist/runtime/auth/session.js +0 -87
- package/dist/runtime/auth/session.js.map +0 -1
- package/dist/runtime/auth/types.d.ts +0 -9
- package/dist/runtime/auth/types.js +0 -3
- package/dist/runtime/auth/types.js.map +0 -1
- package/dist/runtime/cliEntry.d.ts +0 -1
- package/dist/runtime/cliEntry.js +0 -213
- package/dist/runtime/cliEntry.js.map +0 -1
- package/dist/runtime/debug/logManager.d.ts +0 -5
- package/dist/runtime/debug/logManager.js +0 -31
- package/dist/runtime/debug/logManager.js.map +0 -1
- package/dist/runtime/errors.d.ts +0 -5
- package/dist/runtime/errors.js +0 -15
- package/dist/runtime/errors.js.map +0 -1
- package/dist/runtime/fileCollector.d.ts +0 -5
- package/dist/runtime/fileCollector.js +0 -167
- package/dist/runtime/fileCollector.js.map +0 -1
- package/dist/runtime/manifest.d.ts +0 -1
- package/dist/runtime/manifest.js +0 -65
- package/dist/runtime/manifest.js.map +0 -1
- package/dist/runtime/openrouterProxy.d.ts +0 -4
- package/dist/runtime/openrouterProxy.js +0 -43
- package/dist/runtime/openrouterProxy.js.map +0 -1
- package/dist/runtime/preprod/webCheck.d.ts +0 -1
- package/dist/runtime/preprod/webCheck.js +0 -98
- package/dist/runtime/preprod/webCheck.js.map +0 -1
- package/dist/runtime/proxyConfig.d.ts +0 -6
- package/dist/runtime/proxyConfig.js +0 -86
- package/dist/runtime/proxyConfig.js.map +0 -1
- package/dist/runtime/proxyEnvironment.d.ts +0 -3
- package/dist/runtime/proxyEnvironment.js +0 -63
- package/dist/runtime/proxyEnvironment.js.map +0 -1
- package/dist/runtime/reportMerge.d.ts +0 -30
- package/dist/runtime/reportMerge.js +0 -70
- package/dist/runtime/reportMerge.js.map +0 -1
- package/dist/runtime/reporting/markdownReportBuilder.d.ts +0 -15
- package/dist/runtime/reporting/markdownReportBuilder.js +0 -97
- package/dist/runtime/reporting/markdownReportBuilder.js.map +0 -1
- package/dist/runtime/reporting/reportDataCollector.d.ts +0 -31
- package/dist/runtime/reporting/reportDataCollector.js +0 -170
- package/dist/runtime/reporting/reportDataCollector.js.map +0 -1
- package/dist/runtime/reporting/summaryGenerator.d.ts +0 -10
- package/dist/runtime/reporting/summaryGenerator.js +0 -67
- package/dist/runtime/reporting/summaryGenerator.js.map +0 -1
- package/dist/runtime/reviewPipeline.d.ts +0 -28
- package/dist/runtime/reviewPipeline.js +0 -122
- package/dist/runtime/reviewPipeline.js.map +0 -1
- package/dist/runtime/runAiCodeReview.d.ts +0 -10
- package/dist/runtime/runAiCodeReview.js +0 -138
- package/dist/runtime/runAiCodeReview.js.map +0 -1
- package/dist/runtime/runtimeConfig.d.ts +0 -4
- package/dist/runtime/runtimeConfig.js +0 -7
- package/dist/runtime/runtimeConfig.js.map +0 -1
- package/dist/runtime/ui/Layout.d.ts +0 -11
- package/dist/runtime/ui/Layout.js +0 -47
- package/dist/runtime/ui/Layout.js.map +0 -1
- package/dist/runtime/ui/RuntimeApp.d.ts +0 -6
- package/dist/runtime/ui/RuntimeApp.js +0 -161
- package/dist/runtime/ui/RuntimeApp.js.map +0 -1
- package/dist/runtime/ui/inkModules.d.ts +0 -10
- package/dist/runtime/ui/inkModules.js +0 -63
- package/dist/runtime/ui/inkModules.js.map +0 -1
- package/dist/runtime/ui/screens/AuthScreen.d.ts +0 -6
- package/dist/runtime/ui/screens/AuthScreen.js +0 -67
- package/dist/runtime/ui/screens/AuthScreen.js.map +0 -1
- package/dist/runtime/ui/screens/ModeSelection.d.ts +0 -10
- package/dist/runtime/ui/screens/ModeSelection.js +0 -100
- package/dist/runtime/ui/screens/ModeSelection.js.map +0 -1
- package/dist/runtime/ui/screens/ProgressScreen.d.ts +0 -7
- package/dist/runtime/ui/screens/ProgressScreen.js +0 -38
- package/dist/runtime/ui/screens/ProgressScreen.js.map +0 -1
- package/dist/runtime/ui/screens/ResultsScreen.d.ts +0 -7
- package/dist/runtime/ui/screens/ResultsScreen.js +0 -22
- package/dist/runtime/ui/screens/ResultsScreen.js.map +0 -1
- package/dist/strategies/ArchitecturalReviewStrategy.d.ts +0 -29
- package/dist/strategies/ArchitecturalReviewStrategy.js +0 -42
- package/dist/strategies/ArchitecturalReviewStrategy.js.map +0 -1
- package/dist/strategies/CodingTestReviewStrategy.d.ts +0 -194
- package/dist/strategies/CodingTestReviewStrategy.js +0 -681
- package/dist/strategies/CodingTestReviewStrategy.js.map +0 -1
- package/dist/strategies/ConsolidatedReviewStrategy.d.ts +0 -25
- package/dist/strategies/ConsolidatedReviewStrategy.js +0 -45
- package/dist/strategies/ConsolidatedReviewStrategy.js.map +0 -1
- package/dist/strategies/ExtractPatternsReviewStrategy.d.ts +0 -30
- package/dist/strategies/ExtractPatternsReviewStrategy.js +0 -51
- package/dist/strategies/ExtractPatternsReviewStrategy.js.map +0 -1
- package/dist/strategies/MultiPassReviewStrategy.d.ts +0 -86
- package/dist/strategies/MultiPassReviewStrategy.js +0 -590
- package/dist/strategies/MultiPassReviewStrategy.js.map +0 -1
- package/dist/strategies/ReviewStrategy.d.ts +0 -45
- package/dist/strategies/ReviewStrategy.js +0 -24
- package/dist/strategies/ReviewStrategy.js.map +0 -1
- package/dist/strategies/StrategyFactory.d.ts +0 -19
- package/dist/strategies/StrategyFactory.js +0 -72
- package/dist/strategies/StrategyFactory.js.map +0 -1
- package/dist/strategies/index.d.ts +0 -13
- package/dist/strategies/index.js +0 -30
- package/dist/strategies/index.js.map +0 -1
- package/dist/tokenizers/baseTokenizer.d.ts +0 -25
- package/dist/tokenizers/baseTokenizer.js +0 -48
- package/dist/tokenizers/baseTokenizer.js.map +0 -1
- package/dist/tokenizers/gptTokenizer.d.ts +0 -7
- package/dist/tokenizers/gptTokenizer.js +0 -28
- package/dist/tokenizers/gptTokenizer.js.map +0 -1
- package/dist/tokenizers/index.d.ts +0 -7
- package/dist/tokenizers/index.js +0 -24
- package/dist/tokenizers/index.js.map +0 -1
- package/dist/types/apiResponses.d.ts +0 -39
- package/dist/types/apiResponses.js +0 -9
- package/dist/types/apiResponses.js.map +0 -1
- package/dist/types/cli.d.ts +0 -22
- package/dist/types/cli.js +0 -3
- package/dist/types/cli.js.map +0 -1
- package/dist/types/common.d.ts +0 -22
- package/dist/types/common.js +0 -14
- package/dist/types/common.js.map +0 -1
- package/dist/types/configuration.d.ts +0 -682
- package/dist/types/configuration.js +0 -65
- package/dist/types/configuration.js.map +0 -1
- package/dist/types/review.d.ts +0 -258
- package/dist/types/review.js +0 -8
- package/dist/types/review.js.map +0 -1
- package/dist/types/reviewSchema.d.ts +0 -543
- package/dist/types/reviewSchema.js +0 -121
- package/dist/types/reviewSchema.js.map +0 -1
- package/dist/types/structuredReview.d.ts +0 -119
- package/dist/types/structuredReview.js +0 -6
- package/dist/types/structuredReview.js.map +0 -1
- package/dist/types/tokenAnalysis.d.ts +0 -44
- package/dist/types/tokenAnalysis.js +0 -4
- package/dist/types/tokenAnalysis.js.map +0 -1
- package/dist/utils/FileReader.d.ts +0 -33
- package/dist/utils/FileReader.js +0 -88
- package/dist/utils/FileReader.js.map +0 -1
- package/dist/utils/FileWriter.d.ts +0 -26
- package/dist/utils/FileWriter.js +0 -76
- package/dist/utils/FileWriter.js.map +0 -1
- package/dist/utils/PathGenerator.d.ts +0 -30
- package/dist/utils/PathGenerator.js +0 -82
- package/dist/utils/PathGenerator.js.map +0 -1
- package/dist/utils/api/apiUtils.d.ts +0 -3
- package/dist/utils/api/apiUtils.js +0 -20
- package/dist/utils/api/apiUtils.js.map +0 -1
- package/dist/utils/api/index.d.ts +0 -1
- package/dist/utils/api/index.js +0 -18
- package/dist/utils/api/index.js.map +0 -1
- package/dist/utils/apiErrorHandler.d.ts +0 -130
- package/dist/utils/apiErrorHandler.js +0 -256
- package/dist/utils/apiErrorHandler.js.map +0 -1
- package/dist/utils/ciDataCollector.d.ts +0 -51
- package/dist/utils/ciDataCollector.js +0 -197
- package/dist/utils/ciDataCollector.js.map +0 -1
- package/dist/utils/codingTestConfigLoader.d.ts +0 -66
- package/dist/utils/codingTestConfigLoader.js +0 -420
- package/dist/utils/codingTestConfigLoader.js.map +0 -1
- package/dist/utils/dependencies/aiDependencyAnalyzer.d.ts +0 -30
- package/dist/utils/dependencies/aiDependencyAnalyzer.js +0 -343
- package/dist/utils/dependencies/aiDependencyAnalyzer.js.map +0 -1
- package/dist/utils/detection/frameworkDetector.d.ts +0 -43
- package/dist/utils/detection/frameworkDetector.js +0 -795
- package/dist/utils/detection/frameworkDetector.js.map +0 -1
- package/dist/utils/detection/index.d.ts +0 -9
- package/dist/utils/detection/index.js +0 -28
- package/dist/utils/detection/index.js.map +0 -1
- package/dist/utils/detection/projectTypeDetector.d.ts +0 -27
- package/dist/utils/detection/projectTypeDetector.js +0 -469
- package/dist/utils/detection/projectTypeDetector.js.map +0 -1
- package/dist/utils/diagramGenerator.d.ts +0 -49
- package/dist/utils/diagramGenerator.js +0 -218
- package/dist/utils/diagramGenerator.js.map +0 -1
- package/dist/utils/errorLogger.d.ts +0 -24
- package/dist/utils/errorLogger.js +0 -59
- package/dist/utils/errorLogger.js.map +0 -1
- package/dist/utils/estimationUtils.d.ts +0 -139
- package/dist/utils/estimationUtils.js +0 -329
- package/dist/utils/estimationUtils.js.map +0 -1
- package/dist/utils/fileFilters.d.ts +0 -72
- package/dist/utils/fileFilters.js +0 -338
- package/dist/utils/fileFilters.js.map +0 -1
- package/dist/utils/fileSystem.d.ts +0 -22
- package/dist/utils/fileSystem.js +0 -45
- package/dist/utils/fileSystem.js.map +0 -1
- package/dist/utils/index.d.ts +0 -22
- package/dist/utils/index.js +0 -52
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -77
- package/dist/utils/logger.js +0 -271
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/pathValidator.d.ts +0 -40
- package/dist/utils/pathValidator.js +0 -98
- package/dist/utils/pathValidator.js.map +0 -1
- package/dist/utils/priorityFilter.d.ts +0 -34
- package/dist/utils/priorityFilter.js +0 -54
- package/dist/utils/priorityFilter.js.map +0 -1
- package/dist/utils/projectDocs.d.ts +0 -47
- package/dist/utils/projectDocs.js +0 -158
- package/dist/utils/projectDocs.js.map +0 -1
- package/dist/utils/promptPaths.d.ts +0 -6
- package/dist/utils/promptPaths.js +0 -33
- package/dist/utils/promptPaths.js.map +0 -1
- package/dist/utils/promptTemplateManager.d.ts +0 -34
- package/dist/utils/promptTemplateManager.js +0 -140
- package/dist/utils/promptTemplateManager.js.map +0 -1
- package/dist/utils/review/consolidateReview.d.ts +0 -15
- package/dist/utils/review/consolidateReview.js +0 -481
- package/dist/utils/review/consolidateReview.js.map +0 -1
- package/dist/utils/review/fixDisplay.d.ts +0 -20
- package/dist/utils/review/fixDisplay.js +0 -84
- package/dist/utils/review/fixDisplay.js.map +0 -1
- package/dist/utils/review/fixImplementation.d.ts +0 -28
- package/dist/utils/review/fixImplementation.js +0 -60
- package/dist/utils/review/fixImplementation.js.map +0 -1
- package/dist/utils/review/index.d.ts +0 -13
- package/dist/utils/review/index.js +0 -50
- package/dist/utils/review/index.js.map +0 -1
- package/dist/utils/review/interactiveProcessing.d.ts +0 -25
- package/dist/utils/review/interactiveProcessing.js +0 -251
- package/dist/utils/review/interactiveProcessing.js.map +0 -1
- package/dist/utils/review/progressTracker.d.ts +0 -106
- package/dist/utils/review/progressTracker.js +0 -227
- package/dist/utils/review/progressTracker.js.map +0 -1
- package/dist/utils/review/reviewExtraction.d.ts +0 -31
- package/dist/utils/review/reviewExtraction.js +0 -324
- package/dist/utils/review/reviewExtraction.js.map +0 -1
- package/dist/utils/review/types.d.ts +0 -45
- package/dist/utils/review/types.js +0 -18
- package/dist/utils/review/types.js.map +0 -1
- package/dist/utils/reviewActionHandler.d.ts +0 -16
- package/dist/utils/reviewActionHandler.js +0 -34
- package/dist/utils/reviewActionHandler.js.map +0 -1
- package/dist/utils/reviewParser.d.ts +0 -34
- package/dist/utils/reviewParser.js +0 -218
- package/dist/utils/reviewParser.js.map +0 -1
- package/dist/utils/sanitizer.d.ts +0 -82
- package/dist/utils/sanitizer.js +0 -239
- package/dist/utils/sanitizer.js.map +0 -1
- package/dist/utils/smartFileSelector.d.ts +0 -50
- package/dist/utils/smartFileSelector.js +0 -261
- package/dist/utils/smartFileSelector.js.map +0 -1
- package/dist/utils/templateLoader.d.ts +0 -44
- package/dist/utils/templateLoader.js +0 -431
- package/dist/utils/templateLoader.js.map +0 -1
- package/dist/utils/treeGenerator.d.ts +0 -12
- package/dist/utils/treeGenerator.js +0 -133
- package/dist/utils/treeGenerator.js.map +0 -1
|
@@ -5,7 +5,7 @@ import { ModeSelection } from './screens/ModeSelection';
|
|
|
5
5
|
import { ProgressScreen } from './screens/ProgressScreen';
|
|
6
6
|
import { ResultsScreen } from './screens/ResultsScreen';
|
|
7
7
|
import { getInk, getInkSpinner } from './inkModules';
|
|
8
|
-
import type { ReviewMode, ReviewResult, ReviewStage } from '../reviewPipeline';
|
|
8
|
+
import type { ReviewMode, ReviewResult, ReviewStage, StageUpdate } from '../reviewPipeline';
|
|
9
9
|
import { executeReview } from '../reviewPipeline';
|
|
10
10
|
import { loadSession, getSessionToken } from '../auth/session';
|
|
11
11
|
import type { SessionUser } from '../auth/types';
|
|
@@ -24,6 +24,11 @@ interface RuntimeAppProps {
|
|
|
24
24
|
interface ProgressState {
|
|
25
25
|
stage: ReviewStage;
|
|
26
26
|
filesFound?: number;
|
|
27
|
+
currentFile?: string;
|
|
28
|
+
currentIndex?: number;
|
|
29
|
+
totalFiles?: number;
|
|
30
|
+
uncommittedFiles?: number;
|
|
31
|
+
contextFiles?: number;
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
const defaultProgress: ProgressState = { stage: 'collecting' };
|
|
@@ -32,6 +37,19 @@ const GENERIC_ERROR_MESSAGE =
|
|
|
32
37
|
const PREPROD_ERROR_MESSAGE =
|
|
33
38
|
'Could not start the website check. Double-check the URL or try again later.';
|
|
34
39
|
|
|
40
|
+
function transformStageUpdate(stage: ReviewStage, info?: StageUpdate): ProgressState {
|
|
41
|
+
return {
|
|
42
|
+
stage,
|
|
43
|
+
filesFound: info?.filesFound,
|
|
44
|
+
currentFile: info?.currentFile,
|
|
45
|
+
currentIndex:
|
|
46
|
+
typeof info?.fileIndex === 'number' && info.fileIndex > 0 ? info.fileIndex : undefined,
|
|
47
|
+
totalFiles: info?.totalFiles,
|
|
48
|
+
uncommittedFiles: info?.uncommittedFiles,
|
|
49
|
+
contextFiles: info?.contextFiles,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
35
53
|
function AppBody({ debug = false }: RuntimeAppProps) {
|
|
36
54
|
const { Box, Text, useApp, useInput } = getInk();
|
|
37
55
|
const { exit } = useApp();
|
|
@@ -98,7 +116,7 @@ function AppBody({ debug = false }: RuntimeAppProps) {
|
|
|
98
116
|
setScreen('progress');
|
|
99
117
|
setResults(null);
|
|
100
118
|
setError(null);
|
|
101
|
-
setProgress(mode === 'preprod' ? { stage: 'preparing' } : defaultProgress);
|
|
119
|
+
setProgress(mode === 'preprod' ? { stage: 'preparing' } : { ...defaultProgress });
|
|
102
120
|
setLastDebugLogPath(null);
|
|
103
121
|
|
|
104
122
|
let debugSession: DebugLogSession | null = null;
|
|
@@ -138,14 +156,15 @@ function AppBody({ debug = false }: RuntimeAppProps) {
|
|
|
138
156
|
|
|
139
157
|
try {
|
|
140
158
|
logger.info('Starting code review run', { mode, workspace: process.cwd(), preprodTarget: trimmedUrl });
|
|
141
|
-
setProgress({
|
|
159
|
+
setProgress({ ...defaultProgress });
|
|
142
160
|
const reviewResult = await executeReview({
|
|
143
161
|
model: process.env.AI_CODE_REVIEW_MODEL || RUNTIME_CONFIG.DEFAULT_MODEL,
|
|
144
162
|
outDir: './reports',
|
|
145
163
|
debug: combinedDebugFlag,
|
|
146
164
|
mode,
|
|
147
165
|
preprodTargetUrl: trimmedUrl,
|
|
148
|
-
onStage: (stage, info) =>
|
|
166
|
+
onStage: (stage, info) =>
|
|
167
|
+
setProgress(transformStageUpdate(stage, info)),
|
|
149
168
|
});
|
|
150
169
|
|
|
151
170
|
logger.info('Code review run complete', {
|
|
@@ -182,7 +201,17 @@ function AppBody({ debug = false }: RuntimeAppProps) {
|
|
|
182
201
|
onToggleDebug={handleToggleDebug}
|
|
183
202
|
/>
|
|
184
203
|
)}
|
|
185
|
-
{screen === 'progress' &&
|
|
204
|
+
{screen === 'progress' && (
|
|
205
|
+
<ProgressScreen
|
|
206
|
+
stage={progress.stage}
|
|
207
|
+
filesFound={progress.filesFound}
|
|
208
|
+
currentFile={progress.currentFile}
|
|
209
|
+
currentIndex={progress.currentIndex}
|
|
210
|
+
totalFiles={progress.totalFiles}
|
|
211
|
+
uncommittedFiles={progress.uncommittedFiles}
|
|
212
|
+
contextFiles={progress.contextFiles}
|
|
213
|
+
/>
|
|
214
|
+
)}
|
|
186
215
|
{screen === 'results' && results && (
|
|
187
216
|
<ResultsScreen result={results} debugLogPath={lastDebugLogPath} />
|
|
188
217
|
)}
|
|
@@ -6,6 +6,11 @@ import { getInk, getInkSpinner } from '../inkModules';
|
|
|
6
6
|
interface ProgressScreenProps {
|
|
7
7
|
stage: ReviewStage;
|
|
8
8
|
filesFound?: number;
|
|
9
|
+
currentFile?: string;
|
|
10
|
+
currentIndex?: number;
|
|
11
|
+
totalFiles?: number;
|
|
12
|
+
uncommittedFiles?: number;
|
|
13
|
+
contextFiles?: number;
|
|
9
14
|
}
|
|
10
15
|
|
|
11
16
|
const STAGE_TEXT: Record<ReviewStage, { title: string; detail: string }> = {
|
|
@@ -27,12 +32,26 @@ const STAGE_TEXT: Record<ReviewStage, { title: string; detail: string }> = {
|
|
|
27
32
|
},
|
|
28
33
|
};
|
|
29
34
|
|
|
30
|
-
export function ProgressScreen({
|
|
35
|
+
export function ProgressScreen({
|
|
36
|
+
stage,
|
|
37
|
+
filesFound,
|
|
38
|
+
currentFile,
|
|
39
|
+
currentIndex,
|
|
40
|
+
totalFiles,
|
|
41
|
+
uncommittedFiles,
|
|
42
|
+
contextFiles,
|
|
43
|
+
}: ProgressScreenProps) {
|
|
31
44
|
const { Box, Text } = getInk();
|
|
32
45
|
const Spinner = getInkSpinner();
|
|
33
46
|
const { frameWidth } = useLayout();
|
|
34
47
|
|
|
35
48
|
const meta = useMemo(() => STAGE_TEXT[stage], [stage]);
|
|
49
|
+
const base = typeof uncommittedFiles === 'number' ? uncommittedFiles : undefined;
|
|
50
|
+
const context = typeof contextFiles === 'number' ? contextFiles : undefined;
|
|
51
|
+
const totalBreakdown =
|
|
52
|
+
base !== undefined || context !== undefined
|
|
53
|
+
? `Queued: ${base ?? '?'} uncommitted${context ? ` + ${context} context` : ''}`
|
|
54
|
+
: '';
|
|
36
55
|
const fileStatus =
|
|
37
56
|
stage === 'collecting' && typeof filesFound === 'number' && filesFound >= 0
|
|
38
57
|
? `${filesFound} files queued`
|
|
@@ -40,6 +59,19 @@ export function ProgressScreen({ stage, filesFound }: ProgressScreenProps) {
|
|
|
40
59
|
? 'Preparing file list…'
|
|
41
60
|
: '';
|
|
42
61
|
|
|
62
|
+
const showReviewingProgress =
|
|
63
|
+
stage === 'reviewing' &&
|
|
64
|
+
typeof currentIndex === 'number' &&
|
|
65
|
+
typeof totalFiles === 'number' &&
|
|
66
|
+
totalFiles > 0 &&
|
|
67
|
+
Boolean(currentFile);
|
|
68
|
+
|
|
69
|
+
const truncatedPath = useMemo(() => {
|
|
70
|
+
if (!currentFile) return '';
|
|
71
|
+
const availableWidth = Math.max(10, frameWidth - 10);
|
|
72
|
+
return truncateMiddle(currentFile, availableWidth);
|
|
73
|
+
}, [currentFile, frameWidth]);
|
|
74
|
+
|
|
43
75
|
return (
|
|
44
76
|
<Box
|
|
45
77
|
width={frameWidth}
|
|
@@ -57,6 +89,22 @@ export function ProgressScreen({ stage, filesFound }: ProgressScreenProps) {
|
|
|
57
89
|
</Box>
|
|
58
90
|
<Text dimColor>{meta.detail}</Text>
|
|
59
91
|
{fileStatus && <Text dimColor>{fileStatus}</Text>}
|
|
92
|
+
{totalBreakdown && <Text dimColor>{totalBreakdown}</Text>}
|
|
93
|
+
{showReviewingProgress && (
|
|
94
|
+
<Text dimColor>{`Reviewing (${currentIndex}/${totalFiles}): ${truncatedPath}`}</Text>
|
|
95
|
+
)}
|
|
60
96
|
</Box>
|
|
61
97
|
);
|
|
62
98
|
}
|
|
99
|
+
|
|
100
|
+
function truncateMiddle(value: string, maxLength: number): string {
|
|
101
|
+
if (value.length <= maxLength) {
|
|
102
|
+
return value;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const ellipsis = '…';
|
|
106
|
+
const keep = Math.max(1, Math.floor((maxLength - ellipsis.length) / 2));
|
|
107
|
+
const start = value.slice(0, keep);
|
|
108
|
+
const end = value.slice(value.length - keep);
|
|
109
|
+
return `${start}${ellipsis}${end}`;
|
|
110
|
+
}
|
|
@@ -22,6 +22,14 @@ export function ResultsScreen({ result, debugLogPath }: ResultsScreenProps) {
|
|
|
22
22
|
];
|
|
23
23
|
}, [result.totals]);
|
|
24
24
|
|
|
25
|
+
const scopeLine = useMemo(() => {
|
|
26
|
+
const breakdown = result.fileBreakdown;
|
|
27
|
+
if (!breakdown) return null;
|
|
28
|
+
return `Scope: ${breakdown.uncommitted} uncommitted + ${breakdown.context} context files`;
|
|
29
|
+
}, [result.fileBreakdown]);
|
|
30
|
+
|
|
31
|
+
const summaryText = result.reportSummary?.trim() || 'Summary unavailable. Open the saved report for details.';
|
|
32
|
+
|
|
25
33
|
return (
|
|
26
34
|
<Box
|
|
27
35
|
width={frameWidth}
|
|
@@ -36,15 +44,26 @@ export function ResultsScreen({ result, debugLogPath }: ResultsScreenProps) {
|
|
|
36
44
|
Review complete for {result.repo}
|
|
37
45
|
</Text>
|
|
38
46
|
<Text dimColor>Duration: {result.duration}s — Files reviewed: {result.filesReviewed}</Text>
|
|
47
|
+
{scopeLine && <Text dimColor>{scopeLine}</Text>}
|
|
48
|
+
|
|
49
|
+
<Box flexDirection="column" borderStyle="round" borderColor="cyan" paddingX={1} paddingY={0}>
|
|
50
|
+
<Text color="cyan" bold>
|
|
51
|
+
LLM summary
|
|
52
|
+
</Text>
|
|
53
|
+
<Text>{summaryText}</Text>
|
|
54
|
+
</Box>
|
|
39
55
|
|
|
40
56
|
<Box flexDirection="column" marginTop={1}>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
<Text bold>Severity totals</Text>
|
|
58
|
+
<Box flexDirection="row" flexWrap="wrap">
|
|
59
|
+
{severityRows.map((row) => (
|
|
60
|
+
<Box key={row.label} width={24}>
|
|
61
|
+
<Text>
|
|
62
|
+
{row.label}: {row.value}
|
|
63
|
+
</Text>
|
|
64
|
+
</Box>
|
|
65
|
+
))}
|
|
66
|
+
</Box>
|
|
48
67
|
</Box>
|
|
49
68
|
|
|
50
69
|
{result.findings.length === 0 ? (
|
|
@@ -53,8 +72,9 @@ export function ResultsScreen({ result, debugLogPath }: ResultsScreenProps) {
|
|
|
53
72
|
<Box flexDirection="column" marginTop={1}>
|
|
54
73
|
<Text bold>Sample findings</Text>
|
|
55
74
|
{result.findings.slice(0, 5).map((finding, index) => (
|
|
56
|
-
<Text key={`${finding.filePath}-${index}`} dimColor>
|
|
57
|
-
· {finding.filePath ?? finding.file ?? 'unknown'}
|
|
75
|
+
<Text key={`${finding.filePath ?? finding.file ?? 'unknown'}-${index}`} dimColor>
|
|
76
|
+
· {finding.filePath ?? finding.file ?? 'unknown'}{' '}
|
|
77
|
+
{finding.priority ? `(${finding.priority})` : ''}
|
|
58
78
|
</Text>
|
|
59
79
|
))}
|
|
60
80
|
{result.findings.length > 5 && (
|
package/src/types/review.ts
CHANGED
|
@@ -97,6 +97,10 @@ export interface ReviewOptions {
|
|
|
97
97
|
uiLanguage?: string;
|
|
98
98
|
/** Target file or directory (used internally) */
|
|
99
99
|
target?: string;
|
|
100
|
+
/** Explicit list of files to review (bypasses discovery) */
|
|
101
|
+
targetFileList?: string[];
|
|
102
|
+
/** Runtime context information for prompt enrichment */
|
|
103
|
+
runContext?: RunContext;
|
|
100
104
|
/** Schema instructions for structured output */
|
|
101
105
|
schemaInstructions?: string;
|
|
102
106
|
/** Examples for prompts */
|
|
@@ -277,6 +281,20 @@ export interface ReviewResult {
|
|
|
277
281
|
files?: FileInfo[];
|
|
278
282
|
}
|
|
279
283
|
|
|
284
|
+
export interface RunContext {
|
|
285
|
+
repoName: string;
|
|
286
|
+
reviewMode?: string;
|
|
287
|
+
totalFiles?: number;
|
|
288
|
+
groupIndex?: number;
|
|
289
|
+
groupCount?: number;
|
|
290
|
+
groupLabel?: string;
|
|
291
|
+
groupFiles?: string[];
|
|
292
|
+
docFiles?: string[];
|
|
293
|
+
uncommittedFiles?: number;
|
|
294
|
+
contextFiles?: number;
|
|
295
|
+
contextDocs?: Array<{ path: string; snippet: string }>;
|
|
296
|
+
}
|
|
297
|
+
|
|
280
298
|
/**
|
|
281
299
|
* Cost information for a single pass in a multi-pass review
|
|
282
300
|
*/
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Findings Extractor for Code Reviews
|
|
3
|
-
*
|
|
4
|
-
* This service extracts, categorizes, and analyzes findings from code review
|
|
5
|
-
* results. It provides utilities for grading, recommendation generation,
|
|
6
|
-
* and finding prioritization.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Categorized findings from code review
|
|
10
|
-
*/
|
|
11
|
-
export interface CategorizedFindings {
|
|
12
|
-
high: Set<string>;
|
|
13
|
-
medium: Set<string>;
|
|
14
|
-
low: Set<string>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Grade information with justification
|
|
18
|
-
*/
|
|
19
|
-
export interface GradeInfo {
|
|
20
|
-
grade: string;
|
|
21
|
-
justification: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Service for extracting and analyzing findings from code reviews
|
|
25
|
-
*/
|
|
26
|
-
export declare class FindingsExtractor {
|
|
27
|
-
/**
|
|
28
|
-
* Extract findings from review passes
|
|
29
|
-
* @param passes Array of review results with content
|
|
30
|
-
* @returns Categorized findings
|
|
31
|
-
*/
|
|
32
|
-
extractFindingsFromPasses(passes: Array<{
|
|
33
|
-
content: string;
|
|
34
|
-
}>): CategorizedFindings;
|
|
35
|
-
/**
|
|
36
|
-
* Extract individual issue texts from content
|
|
37
|
-
* @param content Review content
|
|
38
|
-
* @returns Array of issue descriptions
|
|
39
|
-
*/
|
|
40
|
-
extractIssueTexts(content: string): string[];
|
|
41
|
-
/**
|
|
42
|
-
* Check if an issue is high priority
|
|
43
|
-
* @param issue Issue text (lowercase)
|
|
44
|
-
* @returns True if high priority
|
|
45
|
-
*/
|
|
46
|
-
private isHighPriority;
|
|
47
|
-
/**
|
|
48
|
-
* Check if an issue is medium priority
|
|
49
|
-
* @param issue Issue text (lowercase)
|
|
50
|
-
* @returns True if medium priority
|
|
51
|
-
*/
|
|
52
|
-
private isMediumPriority;
|
|
53
|
-
/**
|
|
54
|
-
* Calculate grade based on findings for a specific category
|
|
55
|
-
* @param findings Categorized findings
|
|
56
|
-
* @param category Category name (for logging)
|
|
57
|
-
* @returns Grade information
|
|
58
|
-
*/
|
|
59
|
-
calculateGrade(findings: CategorizedFindings, category: string): GradeInfo;
|
|
60
|
-
/**
|
|
61
|
-
* Calculate overall grade based on findings
|
|
62
|
-
* @param findings Categorized findings
|
|
63
|
-
* @returns Overall grade string
|
|
64
|
-
*/
|
|
65
|
-
calculateOverallGrade(findings: CategorizedFindings): string;
|
|
66
|
-
/**
|
|
67
|
-
* Get justification for grade
|
|
68
|
-
* @param findings Categorized findings
|
|
69
|
-
* @param category Category name
|
|
70
|
-
* @returns Grade justification string
|
|
71
|
-
*/
|
|
72
|
-
getGradeJustification(findings: CategorizedFindings, category: string): string;
|
|
73
|
-
/**
|
|
74
|
-
* Generate recommendations based on findings
|
|
75
|
-
* @param findings Categorized findings
|
|
76
|
-
* @param hasErrors Whether there are compilation errors
|
|
77
|
-
* @returns Array of recommendation strings
|
|
78
|
-
*/
|
|
79
|
-
generateRecommendations(findings: CategorizedFindings, hasErrors: boolean): string[];
|
|
80
|
-
/**
|
|
81
|
-
* Check if findings contain security-related issues
|
|
82
|
-
* @param findings Categorized findings
|
|
83
|
-
* @returns True if security issues are present
|
|
84
|
-
*/
|
|
85
|
-
private hasSecurityIssues;
|
|
86
|
-
/**
|
|
87
|
-
* Check if findings contain performance-related issues
|
|
88
|
-
* @param findings Categorized findings
|
|
89
|
-
* @returns True if performance issues are present
|
|
90
|
-
*/
|
|
91
|
-
private hasPerformanceIssues;
|
|
92
|
-
/**
|
|
93
|
-
* Check if findings contain testing-related issues
|
|
94
|
-
* @param findings Categorized findings
|
|
95
|
-
* @returns True if testing issues are present
|
|
96
|
-
*/
|
|
97
|
-
private hasTestingIssues;
|
|
98
|
-
/**
|
|
99
|
-
* Format findings for display in reports
|
|
100
|
-
* @param findings Categorized findings
|
|
101
|
-
* @param maxPerCategory Maximum items to show per category
|
|
102
|
-
* @returns Formatted findings string
|
|
103
|
-
*/
|
|
104
|
-
formatFindings(findings: CategorizedFindings, maxPerCategory?: number): string;
|
|
105
|
-
}
|