sfcoe-ailabs
Version:
AI-powered code review tool with static analysis integration for comprehensive code quality assessment.
39 lines (37 loc) • 2.22 kB
JavaScript
/**
* @file index.ts
* Simple message constants for the AI Code Reviewer CLI tool
* Replaces the Salesforce Messages framework with straightforward constants
*/
export const MESSAGES = {
'pr-review': {
summary: 'Analyze code changes between commits using AI-powered review',
description: `Performs comprehensive AI-assisted code review by:
• Analyzing differences between specified Git commits or branches
• Running static code analysis (Salesforce Code Analyzer + PMD)
• Generating intelligent review comments using AI providers
• Optionally posting review comments to pull requests`,
examples: [
'sfcoe-ailabs pr-review --repo-dir ./ --ai-provider OpenAI --ai-model gpt-4 --ai-token $OPENAI_TOKEN',
'sfcoe-ailabs pr-review --from main --to feature-branch --ai-provider Anthropic --ai-model claude-3-sonnet --ai-token $ANTHROPIC_TOKEN',
'sfcoe-ailabs pr-review --pull-request-id 123 --git-provider GitHub --git-token $GITHUB_TOKEN --ai-provider AzureOpenAI --ai-model gpt-4o --ai-token $AZURE_TOKEN --git-owner myorg --git-repo myrepo',
],
flags: {
repoDir: 'Path to Git repository directory (default: current directory)',
from: 'Source commit/branch for diff comparison (default: HEAD~1)',
to: 'Target commit/branch for diff comparison (default: HEAD)',
pullRequestId: 'Pull request ID for posting review comments',
sfConfigFile: 'Path to Salesforce Code Analyzer configuration file (YAML format)',
pmdConfigFile: 'Path to PMD configuration file (XML ruleset format)',
aiProvider: 'AI service provider: OpenAI, AzureOpenAI, or Anthropic',
aiToken: 'Authentication token for AI provider',
aiModel: 'AI model identifier (e.g., gpt-4, claude-3-sonnet)',
aiApiEndpoint: 'Custom AI API endpoint URL',
aiApiVersion: 'AI API version',
gitProvider: 'Git hosting provider (currently supports GitHub)',
gitToken: 'Authentication token for git provider',
gitOwner: 'Git repository owner/organization name',
gitRepo: 'Git repository name',
},
},
};