(scope: ReviewScope, customInput?: string)
| 66 | * @returns The full prompt to send to the agent |
| 67 | */ |
| 68 | export function buildReviewPrompt(scope: ReviewScope, customInput?: string): string { |
| 69 | const scopeText = getReviewScopeText(scope) |
| 70 | |
| 71 | // For custom input, append the user's specific focus |
| 72 | if (scope === 'custom' && customInput?.trim()) { |
| 73 | return `${REVIEW_BASE_PROMPT} ${customInput.trim()}` |
| 74 | } |
| 75 | |
| 76 | // For preset scopes, use the scope text |
| 77 | if (scopeText) { |
| 78 | return `${REVIEW_BASE_PROMPT} ${scopeText}` |
| 79 | } |
| 80 | |
| 81 | // Fallback for custom with no input |
| 82 | return REVIEW_BASE_PROMPT |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * Build a review prompt from direct argument (e.g., /review foo). |
no test coverage detected