MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / buildReviewPrompt

Function buildReviewPrompt

cli/src/commands/prompt-builders.ts:68–83  ·  view source on GitHub ↗
(scope: ReviewScope, customInput?: string)

Source from the content-addressed store, hash-verified

66 * @returns The full prompt to send to the agent
67 */
68export 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).

Callers 2

ReviewScreenFunction · 0.90
routeUserPromptFunction · 0.90

Calls 1

getReviewScopeTextFunction · 0.85

Tested by

no test coverage detected